{-# LANGUAGE DeriveDataTypeable #-}
{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_DERIVE --append -d Binary #-}
module Language.Netlist.AST where
import Data.Binary ( Binary(..), putWord8, getWord8 )
import Data.Generics ( Data, Typeable )
data Module = Module
{ Module -> Ident
module_name :: Ident
, Module -> [(Ident, Maybe Range)]
module_inputs :: [(Ident, Maybe Range)]
, Module -> [(Ident, Maybe Range)]
module_outputs :: [(Ident, Maybe Range)]
, Module -> [(Ident, ConstExpr)]
module_statics :: [(Ident, ConstExpr)]
, Module -> [Decl]
module_decls :: [Decl]
}
deriving (Module -> Module -> Bool
(Module -> Module -> Bool)
-> (Module -> Module -> Bool) -> Eq Module
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Module -> Module -> Bool
== :: Module -> Module -> Bool
$c/= :: Module -> Module -> Bool
/= :: Module -> Module -> Bool
Eq, Eq Module
Eq Module
-> (Module -> Module -> Ordering)
-> (Module -> Module -> Bool)
-> (Module -> Module -> Bool)
-> (Module -> Module -> Bool)
-> (Module -> Module -> Bool)
-> (Module -> Module -> Module)
-> (Module -> Module -> Module)
-> Ord Module
Module -> Module -> Bool
Module -> Module -> Ordering
Module -> Module -> Module
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Module -> Module -> Ordering
compare :: Module -> Module -> Ordering
$c< :: Module -> Module -> Bool
< :: Module -> Module -> Bool
$c<= :: Module -> Module -> Bool
<= :: Module -> Module -> Bool
$c> :: Module -> Module -> Bool
> :: Module -> Module -> Bool
$c>= :: Module -> Module -> Bool
>= :: Module -> Module -> Bool
$cmax :: Module -> Module -> Module
max :: Module -> Module -> Module
$cmin :: Module -> Module -> Module
min :: Module -> Module -> Module
Ord, Int -> Module -> ShowS
[Module] -> ShowS
Module -> Ident
(Int -> Module -> ShowS)
-> (Module -> Ident) -> ([Module] -> ShowS) -> Show Module
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Module -> ShowS
showsPrec :: Int -> Module -> ShowS
$cshow :: Module -> Ident
show :: Module -> Ident
$cshowList :: [Module] -> ShowS
showList :: [Module] -> ShowS
Show, Typeable Module
Typeable Module
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Module -> c Module)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Module)
-> (Module -> Constr)
-> (Module -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Module))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Module))
-> ((forall b. Data b => b -> b) -> Module -> Module)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Module -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Module -> r)
-> (forall u. (forall d. Data d => d -> u) -> Module -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Module -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Module -> m Module)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Module -> m Module)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Module -> m Module)
-> Data Module
Module -> Constr
Module -> DataType
(forall b. Data b => b -> b) -> Module -> Module
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Module -> u
forall u. (forall d. Data d => d -> u) -> Module -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Module -> m Module
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Module -> m Module
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Module
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Module -> c Module
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Module)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Module)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Module -> c Module
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Module -> c Module
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Module
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Module
$ctoConstr :: Module -> Constr
toConstr :: Module -> Constr
$cdataTypeOf :: Module -> DataType
dataTypeOf :: Module -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Module)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Module)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Module)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Module)
$cgmapT :: (forall b. Data b => b -> b) -> Module -> Module
gmapT :: (forall b. Data b => b -> b) -> Module -> Module
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Module -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Module -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Module -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Module -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Module -> m Module
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Module -> m Module
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Module -> m Module
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Module -> m Module
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Module -> m Module
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Module -> m Module
Data, Typeable)
type Ident = String
type Size = Int
data Decl
= NetDecl Ident (Maybe Range) (Maybe Expr)
| NetAssign Ident Expr
| MemDecl Ident (Maybe Range) (Maybe Range) (Maybe [Expr])
| MemAssign Ident Expr Expr
| InstDecl Ident
Ident
[(Ident, Expr)]
[(Ident, Expr)]
[(Ident, Expr)]
| ProcessDecl Event (Maybe (Event, Stmt)) Stmt
| InitProcessDecl Stmt
| String
deriving (Decl -> Decl -> Bool
(Decl -> Decl -> Bool) -> (Decl -> Decl -> Bool) -> Eq Decl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Decl -> Decl -> Bool
== :: Decl -> Decl -> Bool
$c/= :: Decl -> Decl -> Bool
/= :: Decl -> Decl -> Bool
Eq, Eq Decl
Eq Decl
-> (Decl -> Decl -> Ordering)
-> (Decl -> Decl -> Bool)
-> (Decl -> Decl -> Bool)
-> (Decl -> Decl -> Bool)
-> (Decl -> Decl -> Bool)
-> (Decl -> Decl -> Decl)
-> (Decl -> Decl -> Decl)
-> Ord Decl
Decl -> Decl -> Bool
Decl -> Decl -> Ordering
Decl -> Decl -> Decl
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Decl -> Decl -> Ordering
compare :: Decl -> Decl -> Ordering
$c< :: Decl -> Decl -> Bool
< :: Decl -> Decl -> Bool
$c<= :: Decl -> Decl -> Bool
<= :: Decl -> Decl -> Bool
$c> :: Decl -> Decl -> Bool
> :: Decl -> Decl -> Bool
$c>= :: Decl -> Decl -> Bool
>= :: Decl -> Decl -> Bool
$cmax :: Decl -> Decl -> Decl
max :: Decl -> Decl -> Decl
$cmin :: Decl -> Decl -> Decl
min :: Decl -> Decl -> Decl
Ord, Int -> Decl -> ShowS
[Decl] -> ShowS
Decl -> Ident
(Int -> Decl -> ShowS)
-> (Decl -> Ident) -> ([Decl] -> ShowS) -> Show Decl
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Decl -> ShowS
showsPrec :: Int -> Decl -> ShowS
$cshow :: Decl -> Ident
show :: Decl -> Ident
$cshowList :: [Decl] -> ShowS
showList :: [Decl] -> ShowS
Show, Typeable Decl
Typeable Decl
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Decl -> c Decl)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Decl)
-> (Decl -> Constr)
-> (Decl -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Decl))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Decl))
-> ((forall b. Data b => b -> b) -> Decl -> Decl)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Decl -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Decl -> r)
-> (forall u. (forall d. Data d => d -> u) -> Decl -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Decl -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl)
-> Data Decl
Decl -> Constr
Decl -> DataType
(forall b. Data b => b -> b) -> Decl -> Decl
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Decl -> u
forall u. (forall d. Data d => d -> u) -> Decl -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Decl -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Decl -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Decl
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Decl -> c Decl
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Decl)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Decl)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Decl -> c Decl
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Decl -> c Decl
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Decl
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Decl
$ctoConstr :: Decl -> Constr
toConstr :: Decl -> Constr
$cdataTypeOf :: Decl -> DataType
dataTypeOf :: Decl -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Decl)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Decl)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Decl)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Decl)
$cgmapT :: (forall b. Data b => b -> b) -> Decl -> Decl
gmapT :: (forall b. Data b => b -> b) -> Decl -> Decl
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Decl -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Decl -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Decl -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Decl -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Decl -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Decl -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Decl -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Decl -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Decl -> m Decl
Data, Typeable)
data Range
= Range ConstExpr ConstExpr
deriving (Range -> Range -> Bool
(Range -> Range -> Bool) -> (Range -> Range -> Bool) -> Eq Range
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Range -> Range -> Bool
== :: Range -> Range -> Bool
$c/= :: Range -> Range -> Bool
/= :: Range -> Range -> Bool
Eq, Eq Range
Eq Range
-> (Range -> Range -> Ordering)
-> (Range -> Range -> Bool)
-> (Range -> Range -> Bool)
-> (Range -> Range -> Bool)
-> (Range -> Range -> Bool)
-> (Range -> Range -> Range)
-> (Range -> Range -> Range)
-> Ord Range
Range -> Range -> Bool
Range -> Range -> Ordering
Range -> Range -> Range
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Range -> Range -> Ordering
compare :: Range -> Range -> Ordering
$c< :: Range -> Range -> Bool
< :: Range -> Range -> Bool
$c<= :: Range -> Range -> Bool
<= :: Range -> Range -> Bool
$c> :: Range -> Range -> Bool
> :: Range -> Range -> Bool
$c>= :: Range -> Range -> Bool
>= :: Range -> Range -> Bool
$cmax :: Range -> Range -> Range
max :: Range -> Range -> Range
$cmin :: Range -> Range -> Range
min :: Range -> Range -> Range
Ord, Int -> Range -> ShowS
[Range] -> ShowS
Range -> Ident
(Int -> Range -> ShowS)
-> (Range -> Ident) -> ([Range] -> ShowS) -> Show Range
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Range -> ShowS
showsPrec :: Int -> Range -> ShowS
$cshow :: Range -> Ident
show :: Range -> Ident
$cshowList :: [Range] -> ShowS
showList :: [Range] -> ShowS
Show, Typeable Range
Typeable Range
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Range -> c Range)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Range)
-> (Range -> Constr)
-> (Range -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Range))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Range))
-> ((forall b. Data b => b -> b) -> Range -> Range)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Range -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Range -> r)
-> (forall u. (forall d. Data d => d -> u) -> Range -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Range -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Range -> m Range)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Range -> m Range)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Range -> m Range)
-> Data Range
Range -> Constr
Range -> DataType
(forall b. Data b => b -> b) -> Range -> Range
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Range -> u
forall u. (forall d. Data d => d -> u) -> Range -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Range -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Range -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Range -> m Range
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Range -> m Range
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Range
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Range -> c Range
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Range)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Range)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Range -> c Range
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Range -> c Range
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Range
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Range
$ctoConstr :: Range -> Constr
toConstr :: Range -> Constr
$cdataTypeOf :: Range -> DataType
dataTypeOf :: Range -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Range)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Range)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Range)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Range)
$cgmapT :: (forall b. Data b => b -> b) -> Range -> Range
gmapT :: (forall b. Data b => b -> b) -> Range -> Range
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Range -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Range -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Range -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Range -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Range -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Range -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Range -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Range -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Range -> m Range
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Range -> m Range
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Range -> m Range
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Range -> m Range
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Range -> m Range
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Range -> m Range
Data, Typeable)
type ConstExpr = Expr
data Event
= Event Expr Edge
deriving (Event -> Event -> Bool
(Event -> Event -> Bool) -> (Event -> Event -> Bool) -> Eq Event
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Event -> Event -> Bool
== :: Event -> Event -> Bool
$c/= :: Event -> Event -> Bool
/= :: Event -> Event -> Bool
Eq, Eq Event
Eq Event
-> (Event -> Event -> Ordering)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Event)
-> (Event -> Event -> Event)
-> Ord Event
Event -> Event -> Bool
Event -> Event -> Ordering
Event -> Event -> Event
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Event -> Event -> Ordering
compare :: Event -> Event -> Ordering
$c< :: Event -> Event -> Bool
< :: Event -> Event -> Bool
$c<= :: Event -> Event -> Bool
<= :: Event -> Event -> Bool
$c> :: Event -> Event -> Bool
> :: Event -> Event -> Bool
$c>= :: Event -> Event -> Bool
>= :: Event -> Event -> Bool
$cmax :: Event -> Event -> Event
max :: Event -> Event -> Event
$cmin :: Event -> Event -> Event
min :: Event -> Event -> Event
Ord, Int -> Event -> ShowS
[Event] -> ShowS
Event -> Ident
(Int -> Event -> ShowS)
-> (Event -> Ident) -> ([Event] -> ShowS) -> Show Event
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Event -> ShowS
showsPrec :: Int -> Event -> ShowS
$cshow :: Event -> Ident
show :: Event -> Ident
$cshowList :: [Event] -> ShowS
showList :: [Event] -> ShowS
Show, Typeable Event
Typeable Event
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Event -> c Event)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Event)
-> (Event -> Constr)
-> (Event -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Event))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Event))
-> ((forall b. Data b => b -> b) -> Event -> Event)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r)
-> (forall u. (forall d. Data d => d -> u) -> Event -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Event -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Event -> m Event)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Event -> m Event)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Event -> m Event)
-> Data Event
Event -> Constr
Event -> DataType
(forall b. Data b => b -> b) -> Event -> Event
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Event -> u
forall u. (forall d. Data d => d -> u) -> Event -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Event -> m Event
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Event -> m Event
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Event
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Event -> c Event
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Event)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Event)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Event -> c Event
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Event -> c Event
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Event
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Event
$ctoConstr :: Event -> Constr
toConstr :: Event -> Constr
$cdataTypeOf :: Event -> DataType
dataTypeOf :: Event -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Event)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Event)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Event)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Event)
$cgmapT :: (forall b. Data b => b -> b) -> Event -> Event
gmapT :: (forall b. Data b => b -> b) -> Event -> Event
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Event -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Event -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Event -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Event -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Event -> m Event
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Event -> m Event
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Event -> m Event
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Event -> m Event
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Event -> m Event
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Event -> m Event
Data, Typeable)
data Edge
= PosEdge
| NegEdge
deriving (Edge -> Edge -> Bool
(Edge -> Edge -> Bool) -> (Edge -> Edge -> Bool) -> Eq Edge
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Edge -> Edge -> Bool
== :: Edge -> Edge -> Bool
$c/= :: Edge -> Edge -> Bool
/= :: Edge -> Edge -> Bool
Eq, Eq Edge
Eq Edge
-> (Edge -> Edge -> Ordering)
-> (Edge -> Edge -> Bool)
-> (Edge -> Edge -> Bool)
-> (Edge -> Edge -> Bool)
-> (Edge -> Edge -> Bool)
-> (Edge -> Edge -> Edge)
-> (Edge -> Edge -> Edge)
-> Ord Edge
Edge -> Edge -> Bool
Edge -> Edge -> Ordering
Edge -> Edge -> Edge
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Edge -> Edge -> Ordering
compare :: Edge -> Edge -> Ordering
$c< :: Edge -> Edge -> Bool
< :: Edge -> Edge -> Bool
$c<= :: Edge -> Edge -> Bool
<= :: Edge -> Edge -> Bool
$c> :: Edge -> Edge -> Bool
> :: Edge -> Edge -> Bool
$c>= :: Edge -> Edge -> Bool
>= :: Edge -> Edge -> Bool
$cmax :: Edge -> Edge -> Edge
max :: Edge -> Edge -> Edge
$cmin :: Edge -> Edge -> Edge
min :: Edge -> Edge -> Edge
Ord, Int -> Edge -> ShowS
[Edge] -> ShowS
Edge -> Ident
(Int -> Edge -> ShowS)
-> (Edge -> Ident) -> ([Edge] -> ShowS) -> Show Edge
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Edge -> ShowS
showsPrec :: Int -> Edge -> ShowS
$cshow :: Edge -> Ident
show :: Edge -> Ident
$cshowList :: [Edge] -> ShowS
showList :: [Edge] -> ShowS
Show, Typeable Edge
Typeable Edge
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Edge -> c Edge)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Edge)
-> (Edge -> Constr)
-> (Edge -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Edge))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Edge))
-> ((forall b. Data b => b -> b) -> Edge -> Edge)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Edge -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Edge -> r)
-> (forall u. (forall d. Data d => d -> u) -> Edge -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Edge -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge)
-> Data Edge
Edge -> Constr
Edge -> DataType
(forall b. Data b => b -> b) -> Edge -> Edge
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Edge -> u
forall u. (forall d. Data d => d -> u) -> Edge -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Edge -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Edge -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Edge
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Edge -> c Edge
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Edge)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Edge)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Edge -> c Edge
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Edge -> c Edge
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Edge
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Edge
$ctoConstr :: Edge -> Constr
toConstr :: Edge -> Constr
$cdataTypeOf :: Edge -> DataType
dataTypeOf :: Edge -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Edge)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Edge)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Edge)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Edge)
$cgmapT :: (forall b. Data b => b -> b) -> Edge -> Edge
gmapT :: (forall b. Data b => b -> b) -> Edge -> Edge
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Edge -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Edge -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Edge -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Edge -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Edge -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Edge -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Edge -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Edge -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Edge -> m Edge
Data, Typeable)
data Expr
= ExprLit (Maybe Size) ExprLit
| ExprVar Ident
| ExprString String
| ExprIndex Ident Expr
| ExprSlice Ident Expr Expr
| ExprSliceOff Ident Expr Int
| ExprCase Expr [([ConstExpr], Expr)] (Maybe Expr)
| ExprConcat [Expr]
| ExprCond Expr Expr Expr
| ExprUnary UnaryOp Expr
| ExprBinary BinaryOp Expr Expr
| ExprFunCall Ident [Expr]
deriving (ConstExpr -> ConstExpr -> Bool
(ConstExpr -> ConstExpr -> Bool)
-> (ConstExpr -> ConstExpr -> Bool) -> Eq ConstExpr
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConstExpr -> ConstExpr -> Bool
== :: ConstExpr -> ConstExpr -> Bool
$c/= :: ConstExpr -> ConstExpr -> Bool
/= :: ConstExpr -> ConstExpr -> Bool
Eq, Eq ConstExpr
Eq ConstExpr
-> (ConstExpr -> ConstExpr -> Ordering)
-> (ConstExpr -> ConstExpr -> Bool)
-> (ConstExpr -> ConstExpr -> Bool)
-> (ConstExpr -> ConstExpr -> Bool)
-> (ConstExpr -> ConstExpr -> Bool)
-> (ConstExpr -> ConstExpr -> ConstExpr)
-> (ConstExpr -> ConstExpr -> ConstExpr)
-> Ord ConstExpr
ConstExpr -> ConstExpr -> Bool
ConstExpr -> ConstExpr -> Ordering
ConstExpr -> ConstExpr -> ConstExpr
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: ConstExpr -> ConstExpr -> Ordering
compare :: ConstExpr -> ConstExpr -> Ordering
$c< :: ConstExpr -> ConstExpr -> Bool
< :: ConstExpr -> ConstExpr -> Bool
$c<= :: ConstExpr -> ConstExpr -> Bool
<= :: ConstExpr -> ConstExpr -> Bool
$c> :: ConstExpr -> ConstExpr -> Bool
> :: ConstExpr -> ConstExpr -> Bool
$c>= :: ConstExpr -> ConstExpr -> Bool
>= :: ConstExpr -> ConstExpr -> Bool
$cmax :: ConstExpr -> ConstExpr -> ConstExpr
max :: ConstExpr -> ConstExpr -> ConstExpr
$cmin :: ConstExpr -> ConstExpr -> ConstExpr
min :: ConstExpr -> ConstExpr -> ConstExpr
Ord, Int -> ConstExpr -> ShowS
[ConstExpr] -> ShowS
ConstExpr -> Ident
(Int -> ConstExpr -> ShowS)
-> (ConstExpr -> Ident) -> ([ConstExpr] -> ShowS) -> Show ConstExpr
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConstExpr -> ShowS
showsPrec :: Int -> ConstExpr -> ShowS
$cshow :: ConstExpr -> Ident
show :: ConstExpr -> Ident
$cshowList :: [ConstExpr] -> ShowS
showList :: [ConstExpr] -> ShowS
Show, Typeable ConstExpr
Typeable ConstExpr
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConstExpr -> c ConstExpr)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConstExpr)
-> (ConstExpr -> Constr)
-> (ConstExpr -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ConstExpr))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConstExpr))
-> ((forall b. Data b => b -> b) -> ConstExpr -> ConstExpr)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConstExpr -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConstExpr -> r)
-> (forall u. (forall d. Data d => d -> u) -> ConstExpr -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> ConstExpr -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr)
-> Data ConstExpr
ConstExpr -> Constr
ConstExpr -> DataType
(forall b. Data b => b -> b) -> ConstExpr -> ConstExpr
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ConstExpr -> u
forall u. (forall d. Data d => d -> u) -> ConstExpr -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConstExpr -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConstExpr -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConstExpr
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConstExpr -> c ConstExpr
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ConstExpr)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConstExpr)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConstExpr -> c ConstExpr
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConstExpr -> c ConstExpr
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConstExpr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConstExpr
$ctoConstr :: ConstExpr -> Constr
toConstr :: ConstExpr -> Constr
$cdataTypeOf :: ConstExpr -> DataType
dataTypeOf :: ConstExpr -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ConstExpr)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ConstExpr)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConstExpr)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConstExpr)
$cgmapT :: (forall b. Data b => b -> b) -> ConstExpr -> ConstExpr
gmapT :: (forall b. Data b => b -> b) -> ConstExpr -> ConstExpr
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConstExpr -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConstExpr -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConstExpr -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConstExpr -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ConstExpr -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> ConstExpr -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ConstExpr -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ConstExpr -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConstExpr -> m ConstExpr
Data, Typeable)
data ExprLit
= ExprNum Integer
| ExprBit Bit
| ExprBitVector [Bit]
deriving (ExprLit -> ExprLit -> Bool
(ExprLit -> ExprLit -> Bool)
-> (ExprLit -> ExprLit -> Bool) -> Eq ExprLit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExprLit -> ExprLit -> Bool
== :: ExprLit -> ExprLit -> Bool
$c/= :: ExprLit -> ExprLit -> Bool
/= :: ExprLit -> ExprLit -> Bool
Eq, Eq ExprLit
Eq ExprLit
-> (ExprLit -> ExprLit -> Ordering)
-> (ExprLit -> ExprLit -> Bool)
-> (ExprLit -> ExprLit -> Bool)
-> (ExprLit -> ExprLit -> Bool)
-> (ExprLit -> ExprLit -> Bool)
-> (ExprLit -> ExprLit -> ExprLit)
-> (ExprLit -> ExprLit -> ExprLit)
-> Ord ExprLit
ExprLit -> ExprLit -> Bool
ExprLit -> ExprLit -> Ordering
ExprLit -> ExprLit -> ExprLit
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: ExprLit -> ExprLit -> Ordering
compare :: ExprLit -> ExprLit -> Ordering
$c< :: ExprLit -> ExprLit -> Bool
< :: ExprLit -> ExprLit -> Bool
$c<= :: ExprLit -> ExprLit -> Bool
<= :: ExprLit -> ExprLit -> Bool
$c> :: ExprLit -> ExprLit -> Bool
> :: ExprLit -> ExprLit -> Bool
$c>= :: ExprLit -> ExprLit -> Bool
>= :: ExprLit -> ExprLit -> Bool
$cmax :: ExprLit -> ExprLit -> ExprLit
max :: ExprLit -> ExprLit -> ExprLit
$cmin :: ExprLit -> ExprLit -> ExprLit
min :: ExprLit -> ExprLit -> ExprLit
Ord, Int -> ExprLit -> ShowS
[ExprLit] -> ShowS
ExprLit -> Ident
(Int -> ExprLit -> ShowS)
-> (ExprLit -> Ident) -> ([ExprLit] -> ShowS) -> Show ExprLit
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExprLit -> ShowS
showsPrec :: Int -> ExprLit -> ShowS
$cshow :: ExprLit -> Ident
show :: ExprLit -> Ident
$cshowList :: [ExprLit] -> ShowS
showList :: [ExprLit] -> ShowS
Show, Typeable ExprLit
Typeable ExprLit
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ExprLit -> c ExprLit)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ExprLit)
-> (ExprLit -> Constr)
-> (ExprLit -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ExprLit))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ExprLit))
-> ((forall b. Data b => b -> b) -> ExprLit -> ExprLit)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ExprLit -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ExprLit -> r)
-> (forall u. (forall d. Data d => d -> u) -> ExprLit -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> ExprLit -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit)
-> Data ExprLit
ExprLit -> Constr
ExprLit -> DataType
(forall b. Data b => b -> b) -> ExprLit -> ExprLit
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ExprLit -> u
forall u. (forall d. Data d => d -> u) -> ExprLit -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ExprLit -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ExprLit -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ExprLit
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ExprLit -> c ExprLit
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ExprLit)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ExprLit)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ExprLit -> c ExprLit
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ExprLit -> c ExprLit
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ExprLit
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ExprLit
$ctoConstr :: ExprLit -> Constr
toConstr :: ExprLit -> Constr
$cdataTypeOf :: ExprLit -> DataType
dataTypeOf :: ExprLit -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ExprLit)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ExprLit)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ExprLit)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ExprLit)
$cgmapT :: (forall b. Data b => b -> b) -> ExprLit -> ExprLit
gmapT :: (forall b. Data b => b -> b) -> ExprLit -> ExprLit
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ExprLit -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ExprLit -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ExprLit -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ExprLit -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ExprLit -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> ExprLit -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ExprLit -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ExprLit -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ExprLit -> m ExprLit
Data, Typeable)
data Bit
= T | F | U | Z
deriving (Bit -> Bit -> Bool
(Bit -> Bit -> Bool) -> (Bit -> Bit -> Bool) -> Eq Bit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Bit -> Bit -> Bool
== :: Bit -> Bit -> Bool
$c/= :: Bit -> Bit -> Bool
/= :: Bit -> Bit -> Bool
Eq, Eq Bit
Eq Bit
-> (Bit -> Bit -> Ordering)
-> (Bit -> Bit -> Bool)
-> (Bit -> Bit -> Bool)
-> (Bit -> Bit -> Bool)
-> (Bit -> Bit -> Bool)
-> (Bit -> Bit -> Bit)
-> (Bit -> Bit -> Bit)
-> Ord Bit
Bit -> Bit -> Bool
Bit -> Bit -> Ordering
Bit -> Bit -> Bit
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Bit -> Bit -> Ordering
compare :: Bit -> Bit -> Ordering
$c< :: Bit -> Bit -> Bool
< :: Bit -> Bit -> Bool
$c<= :: Bit -> Bit -> Bool
<= :: Bit -> Bit -> Bool
$c> :: Bit -> Bit -> Bool
> :: Bit -> Bit -> Bool
$c>= :: Bit -> Bit -> Bool
>= :: Bit -> Bit -> Bool
$cmax :: Bit -> Bit -> Bit
max :: Bit -> Bit -> Bit
$cmin :: Bit -> Bit -> Bit
min :: Bit -> Bit -> Bit
Ord, Int -> Bit -> ShowS
[Bit] -> ShowS
Bit -> Ident
(Int -> Bit -> ShowS)
-> (Bit -> Ident) -> ([Bit] -> ShowS) -> Show Bit
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Bit -> ShowS
showsPrec :: Int -> Bit -> ShowS
$cshow :: Bit -> Ident
show :: Bit -> Ident
$cshowList :: [Bit] -> ShowS
showList :: [Bit] -> ShowS
Show, Typeable Bit
Typeable Bit
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Bit -> c Bit)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Bit)
-> (Bit -> Constr)
-> (Bit -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Bit))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bit))
-> ((forall b. Data b => b -> b) -> Bit -> Bit)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bit -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bit -> r)
-> (forall u. (forall d. Data d => d -> u) -> Bit -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Bit -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit)
-> Data Bit
Bit -> Constr
Bit -> DataType
(forall b. Data b => b -> b) -> Bit -> Bit
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Bit -> u
forall u. (forall d. Data d => d -> u) -> Bit -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bit -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bit -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Bit
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Bit -> c Bit
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Bit)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bit)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Bit -> c Bit
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Bit -> c Bit
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Bit
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Bit
$ctoConstr :: Bit -> Constr
toConstr :: Bit -> Constr
$cdataTypeOf :: Bit -> DataType
dataTypeOf :: Bit -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Bit)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Bit)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bit)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bit)
$cgmapT :: (forall b. Data b => b -> b) -> Bit -> Bit
gmapT :: (forall b. Data b => b -> b) -> Bit -> Bit
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bit -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bit -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bit -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bit -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Bit -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Bit -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Bit -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Bit -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Bit -> m Bit
Data, Typeable)
data Stmt
= Assign LValue Expr
| If Expr Stmt (Maybe Stmt)
| Case Expr [([Expr], Stmt)] (Maybe Stmt)
| Seq [Stmt]
| FunCallStmt Ident [Expr]
deriving (Stmt -> Stmt -> Bool
(Stmt -> Stmt -> Bool) -> (Stmt -> Stmt -> Bool) -> Eq Stmt
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Stmt -> Stmt -> Bool
== :: Stmt -> Stmt -> Bool
$c/= :: Stmt -> Stmt -> Bool
/= :: Stmt -> Stmt -> Bool
Eq, Eq Stmt
Eq Stmt
-> (Stmt -> Stmt -> Ordering)
-> (Stmt -> Stmt -> Bool)
-> (Stmt -> Stmt -> Bool)
-> (Stmt -> Stmt -> Bool)
-> (Stmt -> Stmt -> Bool)
-> (Stmt -> Stmt -> Stmt)
-> (Stmt -> Stmt -> Stmt)
-> Ord Stmt
Stmt -> Stmt -> Bool
Stmt -> Stmt -> Ordering
Stmt -> Stmt -> Stmt
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Stmt -> Stmt -> Ordering
compare :: Stmt -> Stmt -> Ordering
$c< :: Stmt -> Stmt -> Bool
< :: Stmt -> Stmt -> Bool
$c<= :: Stmt -> Stmt -> Bool
<= :: Stmt -> Stmt -> Bool
$c> :: Stmt -> Stmt -> Bool
> :: Stmt -> Stmt -> Bool
$c>= :: Stmt -> Stmt -> Bool
>= :: Stmt -> Stmt -> Bool
$cmax :: Stmt -> Stmt -> Stmt
max :: Stmt -> Stmt -> Stmt
$cmin :: Stmt -> Stmt -> Stmt
min :: Stmt -> Stmt -> Stmt
Ord, Int -> Stmt -> ShowS
[Stmt] -> ShowS
Stmt -> Ident
(Int -> Stmt -> ShowS)
-> (Stmt -> Ident) -> ([Stmt] -> ShowS) -> Show Stmt
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Stmt -> ShowS
showsPrec :: Int -> Stmt -> ShowS
$cshow :: Stmt -> Ident
show :: Stmt -> Ident
$cshowList :: [Stmt] -> ShowS
showList :: [Stmt] -> ShowS
Show, Typeable Stmt
Typeable Stmt
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Stmt -> c Stmt)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Stmt)
-> (Stmt -> Constr)
-> (Stmt -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Stmt))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Stmt))
-> ((forall b. Data b => b -> b) -> Stmt -> Stmt)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Stmt -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Stmt -> r)
-> (forall u. (forall d. Data d => d -> u) -> Stmt -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Stmt -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt)
-> Data Stmt
Stmt -> Constr
Stmt -> DataType
(forall b. Data b => b -> b) -> Stmt -> Stmt
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Stmt -> u
forall u. (forall d. Data d => d -> u) -> Stmt -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Stmt -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Stmt -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Stmt
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Stmt -> c Stmt
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Stmt)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Stmt)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Stmt -> c Stmt
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Stmt -> c Stmt
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Stmt
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Stmt
$ctoConstr :: Stmt -> Constr
toConstr :: Stmt -> Constr
$cdataTypeOf :: Stmt -> DataType
dataTypeOf :: Stmt -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Stmt)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Stmt)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Stmt)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Stmt)
$cgmapT :: (forall b. Data b => b -> b) -> Stmt -> Stmt
gmapT :: (forall b. Data b => b -> b) -> Stmt -> Stmt
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Stmt -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Stmt -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Stmt -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Stmt -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Stmt -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Stmt -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Stmt -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Stmt -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Stmt -> m Stmt
Data, Typeable)
type LValue = Expr
data UnaryOp
= UPlus | UMinus | LNeg | Neg | UAnd | UNand | UOr | UNor | UXor | UXnor
deriving (UnaryOp -> UnaryOp -> Bool
(UnaryOp -> UnaryOp -> Bool)
-> (UnaryOp -> UnaryOp -> Bool) -> Eq UnaryOp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UnaryOp -> UnaryOp -> Bool
== :: UnaryOp -> UnaryOp -> Bool
$c/= :: UnaryOp -> UnaryOp -> Bool
/= :: UnaryOp -> UnaryOp -> Bool
Eq, Eq UnaryOp
Eq UnaryOp
-> (UnaryOp -> UnaryOp -> Ordering)
-> (UnaryOp -> UnaryOp -> Bool)
-> (UnaryOp -> UnaryOp -> Bool)
-> (UnaryOp -> UnaryOp -> Bool)
-> (UnaryOp -> UnaryOp -> Bool)
-> (UnaryOp -> UnaryOp -> UnaryOp)
-> (UnaryOp -> UnaryOp -> UnaryOp)
-> Ord UnaryOp
UnaryOp -> UnaryOp -> Bool
UnaryOp -> UnaryOp -> Ordering
UnaryOp -> UnaryOp -> UnaryOp
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: UnaryOp -> UnaryOp -> Ordering
compare :: UnaryOp -> UnaryOp -> Ordering
$c< :: UnaryOp -> UnaryOp -> Bool
< :: UnaryOp -> UnaryOp -> Bool
$c<= :: UnaryOp -> UnaryOp -> Bool
<= :: UnaryOp -> UnaryOp -> Bool
$c> :: UnaryOp -> UnaryOp -> Bool
> :: UnaryOp -> UnaryOp -> Bool
$c>= :: UnaryOp -> UnaryOp -> Bool
>= :: UnaryOp -> UnaryOp -> Bool
$cmax :: UnaryOp -> UnaryOp -> UnaryOp
max :: UnaryOp -> UnaryOp -> UnaryOp
$cmin :: UnaryOp -> UnaryOp -> UnaryOp
min :: UnaryOp -> UnaryOp -> UnaryOp
Ord, Int -> UnaryOp -> ShowS
[UnaryOp] -> ShowS
UnaryOp -> Ident
(Int -> UnaryOp -> ShowS)
-> (UnaryOp -> Ident) -> ([UnaryOp] -> ShowS) -> Show UnaryOp
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UnaryOp -> ShowS
showsPrec :: Int -> UnaryOp -> ShowS
$cshow :: UnaryOp -> Ident
show :: UnaryOp -> Ident
$cshowList :: [UnaryOp] -> ShowS
showList :: [UnaryOp] -> ShowS
Show, Typeable UnaryOp
Typeable UnaryOp
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UnaryOp -> c UnaryOp)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UnaryOp)
-> (UnaryOp -> Constr)
-> (UnaryOp -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UnaryOp))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnaryOp))
-> ((forall b. Data b => b -> b) -> UnaryOp -> UnaryOp)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UnaryOp -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UnaryOp -> r)
-> (forall u. (forall d. Data d => d -> u) -> UnaryOp -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> UnaryOp -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp)
-> Data UnaryOp
UnaryOp -> Constr
UnaryOp -> DataType
(forall b. Data b => b -> b) -> UnaryOp -> UnaryOp
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> UnaryOp -> u
forall u. (forall d. Data d => d -> u) -> UnaryOp -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UnaryOp -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UnaryOp -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UnaryOp
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UnaryOp -> c UnaryOp
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UnaryOp)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnaryOp)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UnaryOp -> c UnaryOp
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> UnaryOp -> c UnaryOp
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UnaryOp
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UnaryOp
$ctoConstr :: UnaryOp -> Constr
toConstr :: UnaryOp -> Constr
$cdataTypeOf :: UnaryOp -> DataType
dataTypeOf :: UnaryOp -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UnaryOp)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UnaryOp)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnaryOp)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnaryOp)
$cgmapT :: (forall b. Data b => b -> b) -> UnaryOp -> UnaryOp
gmapT :: (forall b. Data b => b -> b) -> UnaryOp -> UnaryOp
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UnaryOp -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UnaryOp -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UnaryOp -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UnaryOp -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> UnaryOp -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> UnaryOp -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> UnaryOp -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> UnaryOp -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp
Data, Typeable)
data BinaryOp
= Pow | Plus | Minus | Times | Divide | Modulo
| Equals | NotEquals
| CEquals | CNotEquals
| LAnd | LOr
| LessThan | LessEqual | GreaterThan | GreaterEqual
| And | Nand | Or | Nor | Xor | Xnor
| ShiftLeft | ShiftRight | RotateLeft | RotateRight
| ShiftLeftArith | ShiftRightArith
deriving (BinaryOp -> BinaryOp -> Bool
(BinaryOp -> BinaryOp -> Bool)
-> (BinaryOp -> BinaryOp -> Bool) -> Eq BinaryOp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BinaryOp -> BinaryOp -> Bool
== :: BinaryOp -> BinaryOp -> Bool
$c/= :: BinaryOp -> BinaryOp -> Bool
/= :: BinaryOp -> BinaryOp -> Bool
Eq, Eq BinaryOp
Eq BinaryOp
-> (BinaryOp -> BinaryOp -> Ordering)
-> (BinaryOp -> BinaryOp -> Bool)
-> (BinaryOp -> BinaryOp -> Bool)
-> (BinaryOp -> BinaryOp -> Bool)
-> (BinaryOp -> BinaryOp -> Bool)
-> (BinaryOp -> BinaryOp -> BinaryOp)
-> (BinaryOp -> BinaryOp -> BinaryOp)
-> Ord BinaryOp
BinaryOp -> BinaryOp -> Bool
BinaryOp -> BinaryOp -> Ordering
BinaryOp -> BinaryOp -> BinaryOp
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: BinaryOp -> BinaryOp -> Ordering
compare :: BinaryOp -> BinaryOp -> Ordering
$c< :: BinaryOp -> BinaryOp -> Bool
< :: BinaryOp -> BinaryOp -> Bool
$c<= :: BinaryOp -> BinaryOp -> Bool
<= :: BinaryOp -> BinaryOp -> Bool
$c> :: BinaryOp -> BinaryOp -> Bool
> :: BinaryOp -> BinaryOp -> Bool
$c>= :: BinaryOp -> BinaryOp -> Bool
>= :: BinaryOp -> BinaryOp -> Bool
$cmax :: BinaryOp -> BinaryOp -> BinaryOp
max :: BinaryOp -> BinaryOp -> BinaryOp
$cmin :: BinaryOp -> BinaryOp -> BinaryOp
min :: BinaryOp -> BinaryOp -> BinaryOp
Ord, Int -> BinaryOp -> ShowS
[BinaryOp] -> ShowS
BinaryOp -> Ident
(Int -> BinaryOp -> ShowS)
-> (BinaryOp -> Ident) -> ([BinaryOp] -> ShowS) -> Show BinaryOp
forall a.
(Int -> a -> ShowS) -> (a -> Ident) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BinaryOp -> ShowS
showsPrec :: Int -> BinaryOp -> ShowS
$cshow :: BinaryOp -> Ident
show :: BinaryOp -> Ident
$cshowList :: [BinaryOp] -> ShowS
showList :: [BinaryOp] -> ShowS
Show, Typeable BinaryOp
Typeable BinaryOp
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BinaryOp -> c BinaryOp)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BinaryOp)
-> (BinaryOp -> Constr)
-> (BinaryOp -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BinaryOp))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinaryOp))
-> ((forall b. Data b => b -> b) -> BinaryOp -> BinaryOp)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BinaryOp -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BinaryOp -> r)
-> (forall u. (forall d. Data d => d -> u) -> BinaryOp -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> BinaryOp -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp)
-> Data BinaryOp
BinaryOp -> Constr
BinaryOp -> DataType
(forall b. Data b => b -> b) -> BinaryOp -> BinaryOp
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> BinaryOp -> u
forall u. (forall d. Data d => d -> u) -> BinaryOp -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BinaryOp -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BinaryOp -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BinaryOp
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BinaryOp -> c BinaryOp
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BinaryOp)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinaryOp)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BinaryOp -> c BinaryOp
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BinaryOp -> c BinaryOp
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BinaryOp
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BinaryOp
$ctoConstr :: BinaryOp -> Constr
toConstr :: BinaryOp -> Constr
$cdataTypeOf :: BinaryOp -> DataType
dataTypeOf :: BinaryOp -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BinaryOp)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BinaryOp)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinaryOp)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinaryOp)
$cgmapT :: (forall b. Data b => b -> b) -> BinaryOp -> BinaryOp
gmapT :: (forall b. Data b => b -> b) -> BinaryOp -> BinaryOp
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BinaryOp -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BinaryOp -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BinaryOp -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BinaryOp -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> BinaryOp -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> BinaryOp -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BinaryOp -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BinaryOp -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp
Data, Typeable)
instance Binary Module where
put :: Module -> Put
put (Module Ident
x1 [(Ident, Maybe Range)]
x2 [(Ident, Maybe Range)]
x3 [(Ident, ConstExpr)]
x4 [Decl]
x5)
= do Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
[(Ident, Maybe Range)] -> Put
forall t. Binary t => t -> Put
put [(Ident, Maybe Range)]
x2
[(Ident, Maybe Range)] -> Put
forall t. Binary t => t -> Put
put [(Ident, Maybe Range)]
x3
[(Ident, ConstExpr)] -> Put
forall t. Binary t => t -> Put
put [(Ident, ConstExpr)]
x4
[Decl] -> Put
forall t. Binary t => t -> Put
put [Decl]
x5
get :: Get Module
get
= do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
[(Ident, Maybe Range)]
x2 <- Get [(Ident, Maybe Range)]
forall t. Binary t => Get t
get
[(Ident, Maybe Range)]
x3 <- Get [(Ident, Maybe Range)]
forall t. Binary t => Get t
get
[(Ident, ConstExpr)]
x4 <- Get [(Ident, ConstExpr)]
forall t. Binary t => Get t
get
[Decl]
x5 <- Get [Decl]
forall t. Binary t => Get t
get
Module -> Get Module
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident
-> [(Ident, Maybe Range)]
-> [(Ident, Maybe Range)]
-> [(Ident, ConstExpr)]
-> [Decl]
-> Module
Module Ident
x1 [(Ident, Maybe Range)]
x2 [(Ident, Maybe Range)]
x3 [(Ident, ConstExpr)]
x4 [Decl]
x5)
instance Binary Decl where
put :: Decl -> Put
put Decl
x
= case Decl
x of
NetDecl Ident
x1 Maybe Range
x2 Maybe ConstExpr
x3 -> do Word8 -> Put
putWord8 Word8
0
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
Maybe Range -> Put
forall t. Binary t => t -> Put
put Maybe Range
x2
Maybe ConstExpr -> Put
forall t. Binary t => t -> Put
put Maybe ConstExpr
x3
NetAssign Ident
x1 ConstExpr
x2 -> do Word8 -> Put
putWord8 Word8
1
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x2
MemDecl Ident
x1 Maybe Range
x2 Maybe Range
x3 Maybe [ConstExpr]
x4 -> do Word8 -> Put
putWord8 Word8
2
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
Maybe Range -> Put
forall t. Binary t => t -> Put
put Maybe Range
x2
Maybe Range -> Put
forall t. Binary t => t -> Put
put Maybe Range
x3
Maybe [ConstExpr] -> Put
forall t. Binary t => t -> Put
put Maybe [ConstExpr]
x4
MemAssign Ident
x1 ConstExpr
x2 ConstExpr
x3 -> do Word8 -> Put
putWord8 Word8
3
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x2
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x3
InstDecl Ident
x1 Ident
x2 [(Ident, ConstExpr)]
x3 [(Ident, ConstExpr)]
x4 [(Ident, ConstExpr)]
x5 -> do Word8 -> Put
putWord8 Word8
4
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x2
[(Ident, ConstExpr)] -> Put
forall t. Binary t => t -> Put
put [(Ident, ConstExpr)]
x3
[(Ident, ConstExpr)] -> Put
forall t. Binary t => t -> Put
put [(Ident, ConstExpr)]
x4
[(Ident, ConstExpr)] -> Put
forall t. Binary t => t -> Put
put [(Ident, ConstExpr)]
x5
ProcessDecl Event
x1 Maybe (Event, Stmt)
x2 Stmt
x3 -> do Word8 -> Put
putWord8 Word8
5
Event -> Put
forall t. Binary t => t -> Put
put Event
x1
Maybe (Event, Stmt) -> Put
forall t. Binary t => t -> Put
put Maybe (Event, Stmt)
x2
Stmt -> Put
forall t. Binary t => t -> Put
put Stmt
x3
InitProcessDecl Stmt
x1 -> do Word8 -> Put
putWord8 Word8
6
Stmt -> Put
forall t. Binary t => t -> Put
put Stmt
x1
CommentDecl Ident
x1 -> do Word8 -> Put
putWord8 Word8
7
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
get :: Get Decl
get
= do Word8
i <- Get Word8
getWord8
case Word8
i of
Word8
0 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
Maybe Range
x2 <- Get (Maybe Range)
forall t. Binary t => Get t
get
Maybe ConstExpr
x3 <- Get (Maybe ConstExpr)
forall t. Binary t => Get t
get
Decl -> Get Decl
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> Maybe Range -> Maybe ConstExpr -> Decl
NetDecl Ident
x1 Maybe Range
x2 Maybe ConstExpr
x3)
Word8
1 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
ConstExpr
x2 <- Get ConstExpr
forall t. Binary t => Get t
get
Decl -> Get Decl
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> ConstExpr -> Decl
NetAssign Ident
x1 ConstExpr
x2)
Word8
2 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
Maybe Range
x2 <- Get (Maybe Range)
forall t. Binary t => Get t
get
Maybe Range
x3 <- Get (Maybe Range)
forall t. Binary t => Get t
get
Maybe [ConstExpr]
x4 <- Get (Maybe [ConstExpr])
forall t. Binary t => Get t
get
Decl -> Get Decl
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> Maybe Range -> Maybe Range -> Maybe [ConstExpr] -> Decl
MemDecl Ident
x1 Maybe Range
x2 Maybe Range
x3 Maybe [ConstExpr]
x4)
Word8
3 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
ConstExpr
x2 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr
x3 <- Get ConstExpr
forall t. Binary t => Get t
get
Decl -> Get Decl
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> ConstExpr -> ConstExpr -> Decl
MemAssign Ident
x1 ConstExpr
x2 ConstExpr
x3)
Word8
4 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
Ident
x2 <- Get Ident
forall t. Binary t => Get t
get
[(Ident, ConstExpr)]
x3 <- Get [(Ident, ConstExpr)]
forall t. Binary t => Get t
get
[(Ident, ConstExpr)]
x4 <- Get [(Ident, ConstExpr)]
forall t. Binary t => Get t
get
[(Ident, ConstExpr)]
x5 <- Get [(Ident, ConstExpr)]
forall t. Binary t => Get t
get
Decl -> Get Decl
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident
-> Ident
-> [(Ident, ConstExpr)]
-> [(Ident, ConstExpr)]
-> [(Ident, ConstExpr)]
-> Decl
InstDecl Ident
x1 Ident
x2 [(Ident, ConstExpr)]
x3 [(Ident, ConstExpr)]
x4 [(Ident, ConstExpr)]
x5)
Word8
5 -> do Event
x1 <- Get Event
forall t. Binary t => Get t
get
Maybe (Event, Stmt)
x2 <- Get (Maybe (Event, Stmt))
forall t. Binary t => Get t
get
Stmt
x3 <- Get Stmt
forall t. Binary t => Get t
get
Decl -> Get Decl
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Event -> Maybe (Event, Stmt) -> Stmt -> Decl
ProcessDecl Event
x1 Maybe (Event, Stmt)
x2 Stmt
x3)
Word8
6 -> do Stmt
x1 <- Get Stmt
forall t. Binary t => Get t
get
Decl -> Get Decl
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Stmt -> Decl
InitProcessDecl Stmt
x1)
Word8
7 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
Decl -> Get Decl
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> Decl
CommentDecl Ident
x1)
Word8
_ -> Ident -> Get Decl
forall a. HasCallStack => Ident -> a
error Ident
"Corrupted binary data for Decl"
instance Binary Range where
put :: Range -> Put
put (Range ConstExpr
x1 ConstExpr
x2)
= do ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x2
get :: Get Range
get
= do ConstExpr
x1 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr
x2 <- Get ConstExpr
forall t. Binary t => Get t
get
Range -> Get Range
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ConstExpr -> ConstExpr -> Range
Range ConstExpr
x1 ConstExpr
x2)
instance Binary Event where
put :: Event -> Put
put (Event ConstExpr
x1 Edge
x2)
= do ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x1
Edge -> Put
forall t. Binary t => t -> Put
put Edge
x2
get :: Get Event
get
= do ConstExpr
x1 <- Get ConstExpr
forall t. Binary t => Get t
get
Edge
x2 <- Get Edge
forall t. Binary t => Get t
get
Event -> Get Event
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ConstExpr -> Edge -> Event
Event ConstExpr
x1 Edge
x2)
instance Binary Edge where
put :: Edge -> Put
put Edge
x
= case Edge
x of
Edge
PosEdge -> Word8 -> Put
putWord8 Word8
0
Edge
NegEdge -> Word8 -> Put
putWord8 Word8
1
get :: Get Edge
get
= do Word8
i <- Get Word8
getWord8
case Word8
i of
Word8
0 -> Edge -> Get Edge
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return Edge
PosEdge
Word8
1 -> Edge -> Get Edge
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return Edge
NegEdge
Word8
_ -> Ident -> Get Edge
forall a. HasCallStack => Ident -> a
error Ident
"Corrupted binary data for Edge"
instance Binary Expr where
put :: ConstExpr -> Put
put ConstExpr
x
= case ConstExpr
x of
ExprLit Maybe Int
x1 ExprLit
x2 -> do Word8 -> Put
putWord8 Word8
0
Maybe Int -> Put
forall t. Binary t => t -> Put
put Maybe Int
x1
ExprLit -> Put
forall t. Binary t => t -> Put
put ExprLit
x2
ExprVar Ident
x1 -> do Word8 -> Put
putWord8 Word8
1
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
ExprString Ident
x1 -> do Word8 -> Put
putWord8 Word8
2
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
ExprIndex Ident
x1 ConstExpr
x2 -> do Word8 -> Put
putWord8 Word8
3
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x2
ExprSlice Ident
x1 ConstExpr
x2 ConstExpr
x3 -> do Word8 -> Put
putWord8 Word8
4
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x2
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x3
ExprSliceOff Ident
x1 ConstExpr
x2 Int
x3 -> do Word8 -> Put
putWord8 Word8
5
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x2
Int -> Put
forall t. Binary t => t -> Put
put Int
x3
ExprCase ConstExpr
x1 [([ConstExpr], ConstExpr)]
x2 Maybe ConstExpr
x3 -> do Word8 -> Put
putWord8 Word8
6
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x1
[([ConstExpr], ConstExpr)] -> Put
forall t. Binary t => t -> Put
put [([ConstExpr], ConstExpr)]
x2
Maybe ConstExpr -> Put
forall t. Binary t => t -> Put
put Maybe ConstExpr
x3
ExprConcat [ConstExpr]
x1 -> do Word8 -> Put
putWord8 Word8
7
[ConstExpr] -> Put
forall t. Binary t => t -> Put
put [ConstExpr]
x1
ExprCond ConstExpr
x1 ConstExpr
x2 ConstExpr
x3 -> do Word8 -> Put
putWord8 Word8
8
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x2
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x3
ExprUnary UnaryOp
x1 ConstExpr
x2 -> do Word8 -> Put
putWord8 Word8
9
UnaryOp -> Put
forall t. Binary t => t -> Put
put UnaryOp
x1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x2
ExprBinary BinaryOp
x1 ConstExpr
x2 ConstExpr
x3 -> do Word8 -> Put
putWord8 Word8
10
BinaryOp -> Put
forall t. Binary t => t -> Put
put BinaryOp
x1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x2
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x3
ExprFunCall Ident
x1 [ConstExpr]
x2 -> do Word8 -> Put
putWord8 Word8
11
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
[ConstExpr] -> Put
forall t. Binary t => t -> Put
put [ConstExpr]
x2
get :: Get ConstExpr
get
= do Word8
i <- Get Word8
getWord8
case Word8
i of
Word8
0 -> do Maybe Int
x1 <- Get (Maybe Int)
forall t. Binary t => Get t
get
ExprLit
x2 <- Get ExprLit
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Int -> ExprLit -> ConstExpr
ExprLit Maybe Int
x1 ExprLit
x2)
Word8
1 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> ConstExpr
ExprVar Ident
x1)
Word8
2 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> ConstExpr
ExprString Ident
x1)
Word8
3 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
ConstExpr
x2 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> ConstExpr -> ConstExpr
ExprIndex Ident
x1 ConstExpr
x2)
Word8
4 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
ConstExpr
x2 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr
x3 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> ConstExpr -> ConstExpr -> ConstExpr
ExprSlice Ident
x1 ConstExpr
x2 ConstExpr
x3)
Word8
5 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
ConstExpr
x2 <- Get ConstExpr
forall t. Binary t => Get t
get
Int
x3 <- Get Int
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> ConstExpr -> Int -> ConstExpr
ExprSliceOff Ident
x1 ConstExpr
x2 Int
x3)
Word8
6 -> do ConstExpr
x1 <- Get ConstExpr
forall t. Binary t => Get t
get
[([ConstExpr], ConstExpr)]
x2 <- Get [([ConstExpr], ConstExpr)]
forall t. Binary t => Get t
get
Maybe ConstExpr
x3 <- Get (Maybe ConstExpr)
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ConstExpr
-> [([ConstExpr], ConstExpr)] -> Maybe ConstExpr -> ConstExpr
ExprCase ConstExpr
x1 [([ConstExpr], ConstExpr)]
x2 Maybe ConstExpr
x3)
Word8
7 -> do [ConstExpr]
x1 <- Get [ConstExpr]
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ([ConstExpr] -> ConstExpr
ExprConcat [ConstExpr]
x1)
Word8
8 -> do ConstExpr
x1 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr
x2 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr
x3 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ConstExpr -> ConstExpr -> ConstExpr -> ConstExpr
ExprCond ConstExpr
x1 ConstExpr
x2 ConstExpr
x3)
Word8
9 -> do UnaryOp
x1 <- Get UnaryOp
forall t. Binary t => Get t
get
ConstExpr
x2 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (UnaryOp -> ConstExpr -> ConstExpr
ExprUnary UnaryOp
x1 ConstExpr
x2)
Word8
10 -> do BinaryOp
x1 <- Get BinaryOp
forall t. Binary t => Get t
get
ConstExpr
x2 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr
x3 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (BinaryOp -> ConstExpr -> ConstExpr -> ConstExpr
ExprBinary BinaryOp
x1 ConstExpr
x2 ConstExpr
x3)
Word8
11 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
[ConstExpr]
x2 <- Get [ConstExpr]
forall t. Binary t => Get t
get
ConstExpr -> Get ConstExpr
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> [ConstExpr] -> ConstExpr
ExprFunCall Ident
x1 [ConstExpr]
x2)
Word8
_ -> Ident -> Get ConstExpr
forall a. HasCallStack => Ident -> a
error Ident
"Corrupted binary data for Expr"
instance Binary ExprLit where
put :: ExprLit -> Put
put ExprLit
x
= case ExprLit
x of
ExprNum Integer
x1 -> do Word8 -> Put
putWord8 Word8
0
Integer -> Put
forall t. Binary t => t -> Put
put Integer
x1
ExprBit Bit
x1 -> do Word8 -> Put
putWord8 Word8
1
Bit -> Put
forall t. Binary t => t -> Put
put Bit
x1
ExprBitVector [Bit]
x1 -> do Word8 -> Put
putWord8 Word8
2
[Bit] -> Put
forall t. Binary t => t -> Put
put [Bit]
x1
get :: Get ExprLit
get
= do Word8
i <- Get Word8
getWord8
case Word8
i of
Word8
0 -> do Integer
x1 <- Get Integer
forall t. Binary t => Get t
get
ExprLit -> Get ExprLit
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Integer -> ExprLit
ExprNum Integer
x1)
Word8
1 -> do Bit
x1 <- Get Bit
forall t. Binary t => Get t
get
ExprLit -> Get ExprLit
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bit -> ExprLit
ExprBit Bit
x1)
Word8
2 -> do [Bit]
x1 <- Get [Bit]
forall t. Binary t => Get t
get
ExprLit -> Get ExprLit
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ([Bit] -> ExprLit
ExprBitVector [Bit]
x1)
Word8
_ -> Ident -> Get ExprLit
forall a. HasCallStack => Ident -> a
error Ident
"Corrupted binary data for ExprLit"
instance Binary Bit where
put :: Bit -> Put
put Bit
x
= case Bit
x of
Bit
T -> Word8 -> Put
putWord8 Word8
0
Bit
F -> Word8 -> Put
putWord8 Word8
1
Bit
U -> Word8 -> Put
putWord8 Word8
2
Bit
Z -> Word8 -> Put
putWord8 Word8
3
get :: Get Bit
get
= do Word8
i <- Get Word8
getWord8
case Word8
i of
Word8
0 -> Bit -> Get Bit
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return Bit
T
Word8
1 -> Bit -> Get Bit
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return Bit
F
Word8
2 -> Bit -> Get Bit
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return Bit
U
Word8
3 -> Bit -> Get Bit
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return Bit
Z
Word8
_ -> Ident -> Get Bit
forall a. HasCallStack => Ident -> a
error Ident
"Corrupted binary data for Bit"
instance Binary Stmt where
put :: Stmt -> Put
put Stmt
x
= case Stmt
x of
Assign ConstExpr
x1 ConstExpr
x2 -> do Word8 -> Put
putWord8 Word8
0
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x2
If ConstExpr
x1 Stmt
x2 Maybe Stmt
x3 -> do Word8 -> Put
putWord8 Word8
1
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x1
Stmt -> Put
forall t. Binary t => t -> Put
put Stmt
x2
Maybe Stmt -> Put
forall t. Binary t => t -> Put
put Maybe Stmt
x3
Case ConstExpr
x1 [([ConstExpr], Stmt)]
x2 Maybe Stmt
x3 -> do Word8 -> Put
putWord8 Word8
2
ConstExpr -> Put
forall t. Binary t => t -> Put
put ConstExpr
x1
[([ConstExpr], Stmt)] -> Put
forall t. Binary t => t -> Put
put [([ConstExpr], Stmt)]
x2
Maybe Stmt -> Put
forall t. Binary t => t -> Put
put Maybe Stmt
x3
Seq [Stmt]
x1 -> do Word8 -> Put
putWord8 Word8
3
[Stmt] -> Put
forall t. Binary t => t -> Put
put [Stmt]
x1
FunCallStmt Ident
x1 [ConstExpr]
x2 -> do Word8 -> Put
putWord8 Word8
4
Ident -> Put
forall t. Binary t => t -> Put
put Ident
x1
[ConstExpr] -> Put
forall t. Binary t => t -> Put
put [ConstExpr]
x2
get :: Get Stmt
get
= do Word8
i <- Get Word8
getWord8
case Word8
i of
Word8
0 -> do ConstExpr
x1 <- Get ConstExpr
forall t. Binary t => Get t
get
ConstExpr
x2 <- Get ConstExpr
forall t. Binary t => Get t
get
Stmt -> Get Stmt
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ConstExpr -> ConstExpr -> Stmt
Assign ConstExpr
x1 ConstExpr
x2)
Word8
1 -> do ConstExpr
x1 <- Get ConstExpr
forall t. Binary t => Get t
get
Stmt
x2 <- Get Stmt
forall t. Binary t => Get t
get
Maybe Stmt
x3 <- Get (Maybe Stmt)
forall t. Binary t => Get t
get
Stmt -> Get Stmt
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ConstExpr -> Stmt -> Maybe Stmt -> Stmt
If ConstExpr
x1 Stmt
x2 Maybe Stmt
x3)
Word8
2 -> do ConstExpr
x1 <- Get ConstExpr
forall t. Binary t => Get t
get
[([ConstExpr], Stmt)]
x2 <- Get [([ConstExpr], Stmt)]
forall t. Binary t => Get t
get
Maybe Stmt
x3 <- Get (Maybe Stmt)
forall t. Binary t => Get t
get
Stmt -> Get Stmt
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ConstExpr -> [([ConstExpr], Stmt)] -> Maybe Stmt -> Stmt
Case ConstExpr
x1 [([ConstExpr], Stmt)]
x2 Maybe Stmt
x3)
Word8
3 -> do [Stmt]
x1 <- Get [Stmt]
forall t. Binary t => Get t
get
Stmt -> Get Stmt
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ([Stmt] -> Stmt
Seq [Stmt]
x1)
Word8
4 -> do Ident
x1 <- Get Ident
forall t. Binary t => Get t
get
[ConstExpr]
x2 <- Get [ConstExpr]
forall t. Binary t => Get t
get
Stmt -> Get Stmt
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ident -> [ConstExpr] -> Stmt
FunCallStmt Ident
x1 [ConstExpr]
x2)
Word8
_ -> Ident -> Get Stmt
forall a. HasCallStack => Ident -> a
error Ident
"Corrupted binary data for Stmt"
instance Binary UnaryOp where
put :: UnaryOp -> Put
put UnaryOp
x
= case UnaryOp
x of
UnaryOp
UPlus -> Word8 -> Put
putWord8 Word8
0
UnaryOp
UMinus -> Word8 -> Put
putWord8 Word8
1
UnaryOp
LNeg -> Word8 -> Put
putWord8 Word8
2
UnaryOp
Neg -> Word8 -> Put
putWord8 Word8
3
UnaryOp
UAnd -> Word8 -> Put
putWord8 Word8
4
UnaryOp
UNand -> Word8 -> Put
putWord8 Word8
5
UnaryOp
UOr -> Word8 -> Put
putWord8 Word8
6
UnaryOp
UNor -> Word8 -> Put
putWord8 Word8
7
UnaryOp
UXor -> Word8 -> Put
putWord8 Word8
8
UnaryOp
UXnor -> Word8 -> Put
putWord8 Word8
9
get :: Get UnaryOp
get
= do Word8
i <- Get Word8
getWord8
case Word8
i of
Word8
0 -> UnaryOp -> Get UnaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return UnaryOp
UPlus
Word8
1 -> UnaryOp -> Get UnaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return UnaryOp
UMinus
Word8
2 -> UnaryOp -> Get UnaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return UnaryOp
LNeg
Word8
3 -> UnaryOp -> Get UnaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return UnaryOp
Neg
Word8
4 -> UnaryOp -> Get UnaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return UnaryOp
UAnd
Word8
5 -> UnaryOp -> Get UnaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return UnaryOp
UNand
Word8
6 -> UnaryOp -> Get UnaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return UnaryOp
UOr
Word8
7 -> UnaryOp -> Get UnaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return UnaryOp
UNor
Word8
8 -> UnaryOp -> Get UnaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return UnaryOp
UXor
Word8
9 -> UnaryOp -> Get UnaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return UnaryOp
UXnor
Word8
_ -> Ident -> Get UnaryOp
forall a. HasCallStack => Ident -> a
error Ident
"Corrupted binary data for UnaryOp"
instance Binary BinaryOp where
put :: BinaryOp -> Put
put BinaryOp
x
= case BinaryOp
x of
BinaryOp
Pow -> Word8 -> Put
putWord8 Word8
0
BinaryOp
Plus -> Word8 -> Put
putWord8 Word8
1
BinaryOp
Minus -> Word8 -> Put
putWord8 Word8
2
BinaryOp
Times -> Word8 -> Put
putWord8 Word8
3
BinaryOp
Divide -> Word8 -> Put
putWord8 Word8
4
BinaryOp
Modulo -> Word8 -> Put
putWord8 Word8
5
BinaryOp
Equals -> Word8 -> Put
putWord8 Word8
6
BinaryOp
NotEquals -> Word8 -> Put
putWord8 Word8
7
BinaryOp
CEquals -> Word8 -> Put
putWord8 Word8
8
BinaryOp
CNotEquals -> Word8 -> Put
putWord8 Word8
9
BinaryOp
LAnd -> Word8 -> Put
putWord8 Word8
10
BinaryOp
LOr -> Word8 -> Put
putWord8 Word8
11
BinaryOp
LessThan -> Word8 -> Put
putWord8 Word8
12
BinaryOp
LessEqual -> Word8 -> Put
putWord8 Word8
13
BinaryOp
GreaterThan -> Word8 -> Put
putWord8 Word8
14
BinaryOp
GreaterEqual -> Word8 -> Put
putWord8 Word8
15
BinaryOp
And -> Word8 -> Put
putWord8 Word8
16
BinaryOp
Nand -> Word8 -> Put
putWord8 Word8
17
BinaryOp
Or -> Word8 -> Put
putWord8 Word8
18
BinaryOp
Nor -> Word8 -> Put
putWord8 Word8
19
BinaryOp
Xor -> Word8 -> Put
putWord8 Word8
20
BinaryOp
Xnor -> Word8 -> Put
putWord8 Word8
21
BinaryOp
ShiftLeft -> Word8 -> Put
putWord8 Word8
22
BinaryOp
ShiftRight -> Word8 -> Put
putWord8 Word8
23
BinaryOp
RotateLeft -> Word8 -> Put
putWord8 Word8
24
BinaryOp
RotateRight -> Word8 -> Put
putWord8 Word8
25
BinaryOp
ShiftLeftArith -> Word8 -> Put
putWord8 Word8
26
BinaryOp
ShiftRightArith -> Word8 -> Put
putWord8 Word8
27
get :: Get BinaryOp
get
= do Word8
i <- Get Word8
getWord8
case Word8
i of
Word8
0 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Pow
Word8
1 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Plus
Word8
2 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Minus
Word8
3 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Times
Word8
4 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Divide
Word8
5 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Modulo
Word8
6 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Equals
Word8
7 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
NotEquals
Word8
8 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
CEquals
Word8
9 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
CNotEquals
Word8
10 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
LAnd
Word8
11 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
LOr
Word8
12 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
LessThan
Word8
13 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
LessEqual
Word8
14 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
GreaterThan
Word8
15 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
GreaterEqual
Word8
16 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
And
Word8
17 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Nand
Word8
18 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Or
Word8
19 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Nor
Word8
20 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Xor
Word8
21 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
Xnor
Word8
22 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
ShiftLeft
Word8
23 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
ShiftRight
Word8
24 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
RotateLeft
Word8
25 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
RotateRight
Word8
26 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
ShiftLeftArith
Word8
27 -> BinaryOp -> Get BinaryOp
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return BinaryOp
ShiftRightArith
Word8
_ -> Ident -> Get BinaryOp
forall a. HasCallStack => Ident -> a
error Ident
"Corrupted binary data for BinaryOp"