{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingStrategies #-}
module Codec.CBOR.Cuddle.CDDL.CtlOp where
import Data.Hashable (Hashable)
import Data.TreeDiff (ToExpr)
import GHC.Generics (Generic)
data CtlOp
= Size
| Bits
| Regexp
| Cbor
| Cborseq
| Within
| And
| Lt
| Le
| Gt
| Ge
| Eq
| Ne
| Default
deriving (CtlOp -> CtlOp -> Bool
(CtlOp -> CtlOp -> Bool) -> (CtlOp -> CtlOp -> Bool) -> Eq CtlOp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CtlOp -> CtlOp -> Bool
== :: CtlOp -> CtlOp -> Bool
$c/= :: CtlOp -> CtlOp -> Bool
/= :: CtlOp -> CtlOp -> Bool
Eq, (forall x. CtlOp -> Rep CtlOp x)
-> (forall x. Rep CtlOp x -> CtlOp) -> Generic CtlOp
forall x. Rep CtlOp x -> CtlOp
forall x. CtlOp -> Rep CtlOp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. CtlOp -> Rep CtlOp x
from :: forall x. CtlOp -> Rep CtlOp x
$cto :: forall x. Rep CtlOp x -> CtlOp
to :: forall x. Rep CtlOp x -> CtlOp
Generic, Int -> CtlOp -> ShowS
[CtlOp] -> ShowS
CtlOp -> String
(Int -> CtlOp -> ShowS)
-> (CtlOp -> String) -> ([CtlOp] -> ShowS) -> Show CtlOp
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CtlOp -> ShowS
showsPrec :: Int -> CtlOp -> ShowS
$cshow :: CtlOp -> String
show :: CtlOp -> String
$cshowList :: [CtlOp] -> ShowS
showList :: [CtlOp] -> ShowS
Show)
deriving anyclass ([CtlOp] -> Expr
CtlOp -> Expr
(CtlOp -> Expr) -> ([CtlOp] -> Expr) -> ToExpr CtlOp
forall a. (a -> Expr) -> ([a] -> Expr) -> ToExpr a
$ctoExpr :: CtlOp -> Expr
toExpr :: CtlOp -> Expr
$clistToExpr :: [CtlOp] -> Expr
listToExpr :: [CtlOp] -> Expr
ToExpr)
instance Hashable CtlOp