| Safe Haskell | Trustworthy |
|---|---|
| Language | Haskell2010 |
ReWire.Hyle.Syntax
Description
The Hyle IR: a pure, first-order, monomorphic, total language over width-indexed bitvectors, plus a synchronous device construct (registers, sequential-extern instances, parallel wire equations). The syntax and semantics are specified in doc/hyle.md; this module is the AST and the pretty printer for the concrete syntax (doc/hyle.md, section 10).
Synopsis
- type Size = Word
- type Index = Word
- type Name = Text
- type GId = Text
- type Value = Integer
- class SizeAnnotated a where
- data Op
- opName :: Op -> Text
- opResultSize :: Op -> [Size] -> Maybe Size
- data Exp
- data Sig = Sig Annote ![Size] !Size
- data Defn = Defn {
- defnAnnote :: Annote
- defnName :: !GId
- defnSig :: !Sig
- defnParams :: ![Name]
- defnBody :: !Exp
- defnNoInline :: !Bool
- defnDoc :: !(Blind [Text])
- data ExternKind
- data Extern = Extern {}
- externResultSize :: Extern -> Size
- data Register = Register Annote !Name !Size !BV
- data Instance = Instance Annote !Name !Name ![Natural]
- data Stmt
- data Device = Device {}
- data Program = Program {
- progExterns :: ![Extern]
- progDefns :: ![Defn]
- progDevice :: !Device
- newtype Blind a = Blind {
- unBlind :: a
- nil :: Exp
- isNil :: Exp -> Bool
- cat :: [Exp] -> Exp
- gather :: Exp -> [Exp]
- reservedWords :: HashSet Text
Documentation
class SizeAnnotated a where Source #
Primitive operations (doc/hyle.md, section 3.3). Static parameters (target widths, replication counts) are part of the operator.
Constructors
| Add | |
| Sub | |
| Mul | |
| UDiv | |
| UMod | |
| Pow | |
| And | |
| Or | |
| XOr | |
| Not | |
| Shl | |
| LShr | |
| AShr | |
| Eq | |
| Ne | |
| ULt | |
| ULe | |
| UGt | |
| UGe | |
| SLt | |
| SLe | |
| SGt | |
| SGe | |
| RedAnd | |
| RedOr | |
| RedXOr | |
| ZExt !Size | |
| SExt !Size | |
| Trunc !Size | |
| Rep !Natural |
Instances
The operator name in the concrete syntax (static arguments printed separately).
opResultSize :: Op -> [Size] -> Maybe Size Source #
The typing rule for each operator (doc/hyle.md, section 3.3): given the operand widths, the result width, or Nothing if the operands are ill-typed.
Constructors
| Lit Annote !BV | |
| Undef Annote !Size | |
| Var Annote !Size !Name | |
| Cat Annote !Exp !Exp | |
| Slice Annote !Index !Size !Exp | e[offset +: width], LSB-indexed. |
| Prim Annote !Size !Op ![Exp] | |
| Call Annote !Size !GId ![Exp] | |
| XCall Annote !Size !Name ![Natural] ![Exp] | Combinational extern call with generic arguments. |
| If Annote !Size !Exp !Exp !Exp | |
| Let Annote !Size !Name !Exp !Exp |
Instances
| Data Exp Source # | |||||
Defined in ReWire.Hyle.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Exp -> c Exp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Exp # dataTypeOf :: Exp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Exp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Exp) # gmapT :: (forall b. Data b => b -> b) -> Exp -> Exp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Exp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Exp -> r # gmapQ :: (forall d. Data d => d -> u) -> Exp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Exp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Exp -> m Exp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Exp -> m Exp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Exp -> m Exp # | |||||
| Generic Exp Source # | |||||
Defined in ReWire.Hyle.Syntax Associated Types
| |||||
| Show Exp Source # | |||||
| Eq Exp Source # | |||||
| Ord Exp Source # | |||||
| Hashable Exp Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Pretty Exp Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| SizeAnnotated Exp Source # | |||||
| Annotated Exp Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| TextShow Exp Source # | |||||
| type Rep Exp Source # | |||||
Defined in ReWire.Hyle.Syntax type Rep Exp = D1 ('MetaData "Exp" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) (((C1 ('MetaCons "Lit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BV)) :+: C1 ('MetaCons "Undef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size))) :+: (C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))) :+: (C1 ('MetaCons "Cat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp))) :+: C1 ('MetaCons "Slice" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Index)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp)))))) :+: ((C1 ('MetaCons "Prim" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Op) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Exp]))) :+: C1 ('MetaCons "Call" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Exp])))) :+: (C1 ('MetaCons "XCall" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Natural]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Exp])))) :+: (C1 ('MetaCons "If" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp)))) :+: C1 ('MetaCons "Let" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp)))))))) | |||||
Instances
| Data Sig Source # | |||||
Defined in ReWire.Hyle.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Sig -> c Sig # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Sig # dataTypeOf :: Sig -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Sig) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Sig) # gmapT :: (forall b. Data b => b -> b) -> Sig -> Sig # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Sig -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Sig -> r # gmapQ :: (forall d. Data d => d -> u) -> Sig -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Sig -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Sig -> m Sig # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Sig -> m Sig # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Sig -> m Sig # | |||||
| Generic Sig Source # | |||||
Defined in ReWire.Hyle.Syntax Associated Types
| |||||
| Show Sig Source # | |||||
| Eq Sig Source # | |||||
| Ord Sig Source # | |||||
| Hashable Sig Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Pretty Sig Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| SizeAnnotated Sig Source # | |||||
| Annotated Sig Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| TextShow Sig Source # | |||||
| type Rep Sig Source # | |||||
Defined in ReWire.Hyle.Syntax type Rep Sig = D1 ('MetaData "Sig" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) (C1 ('MetaCons "Sig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Size]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size)))) | |||||
Constructors
| Defn | |
Fields
| |
Instances
| Data Defn Source # | |||||
Defined in ReWire.Hyle.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Defn -> c Defn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Defn # dataTypeOf :: Defn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Defn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Defn) # gmapT :: (forall b. Data b => b -> b) -> Defn -> Defn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Defn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Defn -> r # gmapQ :: (forall d. Data d => d -> u) -> Defn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Defn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Defn -> m Defn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Defn -> m Defn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Defn -> m Defn # | |||||
| Generic Defn Source # | |||||
Defined in ReWire.Hyle.Syntax Associated Types
| |||||
| Show Defn Source # | |||||
| Eq Defn Source # | |||||
| Ord Defn Source # | |||||
| Hashable Defn Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Pretty Defn Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| SizeAnnotated Defn Source # | |||||
| Annotated Defn Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| TextShow Defn Source # | |||||
| type Rep Defn Source # | |||||
Defined in ReWire.Hyle.Syntax type Rep Defn = D1 ('MetaData "Defn" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) (C1 ('MetaCons "Defn" 'PrefixI 'True) ((S1 ('MetaSel ('Just "defnAnnote") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: (S1 ('MetaSel ('Just "defnName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GId) :*: S1 ('MetaSel ('Just "defnSig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Sig))) :*: ((S1 ('MetaSel ('Just "defnParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Name]) :*: S1 ('MetaSel ('Just "defnBody") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp)) :*: (S1 ('MetaSel ('Just "defnNoInline") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "defnDoc") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Blind [Text])))))) | |||||
data ExternKind Source #
Sequential externs carry the names of their clock and reset ports (either may be absent); combinational externs have neither.
Instances
| Data ExternKind Source # | |||||
Defined in ReWire.Hyle.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ExternKind -> c ExternKind # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ExternKind # toConstr :: ExternKind -> Constr # dataTypeOf :: ExternKind -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ExternKind) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ExternKind) # gmapT :: (forall b. Data b => b -> b) -> ExternKind -> ExternKind # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ExternKind -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ExternKind -> r # gmapQ :: (forall d. Data d => d -> u) -> ExternKind -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ExternKind -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ExternKind -> m ExternKind # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ExternKind -> m ExternKind # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ExternKind -> m ExternKind # | |||||
| Generic ExternKind Source # | |||||
Defined in ReWire.Hyle.Syntax Associated Types
| |||||
| Show ExternKind Source # | |||||
Defined in ReWire.Hyle.Syntax Methods showsPrec :: Int -> ExternKind -> ShowS # show :: ExternKind -> String # showList :: [ExternKind] -> ShowS # | |||||
| Eq ExternKind Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Ord ExternKind Source # | |||||
Defined in ReWire.Hyle.Syntax Methods compare :: ExternKind -> ExternKind -> Ordering # (<) :: ExternKind -> ExternKind -> Bool # (<=) :: ExternKind -> ExternKind -> Bool # (>) :: ExternKind -> ExternKind -> Bool # (>=) :: ExternKind -> ExternKind -> Bool # max :: ExternKind -> ExternKind -> ExternKind # min :: ExternKind -> ExternKind -> ExternKind # | |||||
| Hashable ExternKind Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Pretty ExternKind Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| TextShow ExternKind Source # | |||||
Defined in ReWire.Hyle.Syntax Methods showbPrec :: Int -> ExternKind -> Builder # showb :: ExternKind -> Builder # showbList :: [ExternKind] -> Builder showtPrec :: Int -> ExternKind -> Text showt :: ExternKind -> Text # showtList :: [ExternKind] -> Text showtlPrec :: Int -> ExternKind -> Text showtl :: ExternKind -> Text showtlList :: [ExternKind] -> Text | |||||
| type Rep ExternKind Source # | |||||
Defined in ReWire.Hyle.Syntax type Rep ExternKind = D1 ('MetaData "ExternKind" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) (C1 ('MetaCons "Comb" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Seq" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Name)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Name)))) | |||||
Constructors
| Extern | |
Instances
| Data Extern Source # | |||||
Defined in ReWire.Hyle.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Extern -> c Extern # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Extern # toConstr :: Extern -> Constr # dataTypeOf :: Extern -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Extern) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Extern) # gmapT :: (forall b. Data b => b -> b) -> Extern -> Extern # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Extern -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Extern -> r # gmapQ :: (forall d. Data d => d -> u) -> Extern -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Extern -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Extern -> m Extern # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Extern -> m Extern # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Extern -> m Extern # | |||||
| Generic Extern Source # | |||||
Defined in ReWire.Hyle.Syntax Associated Types
| |||||
| Show Extern Source # | |||||
| Eq Extern Source # | |||||
| Ord Extern Source # | |||||
| Hashable Extern Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Pretty Extern Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| SizeAnnotated Extern Source # | |||||
| Annotated Extern Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| TextShow Extern Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| type Rep Extern Source # | |||||
Defined in ReWire.Hyle.Syntax type Rep Extern = D1 ('MetaData "Extern" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) (C1 ('MetaCons "Extern" 'PrefixI 'True) ((S1 ('MetaSel ('Just "extAnnote") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: (S1 ('MetaSel ('Just "extName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Just "extGenerics") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Name]))) :*: ((S1 ('MetaSel ('Just "extKind") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternKind) :*: S1 ('MetaSel ('Just "extInputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(Name, Size)])) :*: (S1 ('MetaSel ('Just "extOutputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(Name, Size)]) :*: S1 ('MetaSel ('Just "extModel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe GId)))))) | |||||
externResultSize :: Extern -> Size Source #
The width of a call to the extern: its outputs, concatenated.
Instances
| Data Register Source # | |||||
Defined in ReWire.Hyle.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Register -> c Register # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Register # toConstr :: Register -> Constr # dataTypeOf :: Register -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Register) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Register) # gmapT :: (forall b. Data b => b -> b) -> Register -> Register # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Register -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Register -> r # gmapQ :: (forall d. Data d => d -> u) -> Register -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Register -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Register -> m Register # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Register -> m Register # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Register -> m Register # | |||||
| Generic Register Source # | |||||
Defined in ReWire.Hyle.Syntax Associated Types
| |||||
| Show Register Source # | |||||
| Eq Register Source # | |||||
| Ord Register Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Hashable Register Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Pretty Register Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| SizeAnnotated Register Source # | |||||
| Annotated Register Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| TextShow Register Source # | |||||
| type Rep Register Source # | |||||
Defined in ReWire.Hyle.Syntax type Rep Register = D1 ('MetaData "Register" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) (C1 ('MetaCons "Register" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BV)))) | |||||
Instances
| Data Instance Source # | |||||
Defined in ReWire.Hyle.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Instance -> c Instance # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Instance # toConstr :: Instance -> Constr # dataTypeOf :: Instance -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Instance) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Instance) # gmapT :: (forall b. Data b => b -> b) -> Instance -> Instance # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Instance -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Instance -> r # gmapQ :: (forall d. Data d => d -> u) -> Instance -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Instance -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Instance -> m Instance # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Instance -> m Instance # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Instance -> m Instance # | |||||
| Generic Instance Source # | |||||
Defined in ReWire.Hyle.Syntax Associated Types
| |||||
| Show Instance Source # | |||||
| Eq Instance Source # | |||||
| Ord Instance Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Hashable Instance Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Pretty Instance Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Annotated Instance Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| TextShow Instance Source # | |||||
| type Rep Instance Source # | |||||
Defined in ReWire.Hyle.Syntax type Rep Instance = D1 ('MetaData "Instance" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) (C1 ('MetaCons "Instance" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Natural])))) | |||||
Constructors
| SLet Annote !Name !Exp | |
| SOutput Annote !Name !Exp | |
| SNext Annote !Name !Exp | |
| SInstIn Annote !Name !Name !Exp | Instance name, port name. |
Instances
| Data Stmt Source # | |||||
Defined in ReWire.Hyle.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Stmt -> c Stmt # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Stmt # dataTypeOf :: Stmt -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Stmt) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Stmt) # gmapT :: (forall b. Data b => b -> b) -> Stmt -> Stmt # gmapQl :: (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 # gmapQ :: (forall d. Data d => d -> u) -> Stmt -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Stmt -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Stmt -> m Stmt # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Stmt -> m Stmt # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Stmt -> m Stmt # | |||||
| Generic Stmt Source # | |||||
Defined in ReWire.Hyle.Syntax Associated Types
| |||||
| Show Stmt Source # | |||||
| Eq Stmt Source # | |||||
| Ord Stmt Source # | |||||
| Hashable Stmt Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Pretty Stmt Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Annotated Stmt Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| TextShow Stmt Source # | |||||
| type Rep Stmt Source # | |||||
Defined in ReWire.Hyle.Syntax type Rep Stmt = D1 ('MetaData "Stmt" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) ((C1 ('MetaCons "SLet" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp))) :+: C1 ('MetaCons "SOutput" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp)))) :+: (C1 ('MetaCons "SNext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp))) :+: C1 ('MetaCons "SInstIn" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Exp))))) | |||||
Constructors
| Device | |
Instances
| Data Device Source # | |||||
Defined in ReWire.Hyle.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Device -> c Device # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Device # toConstr :: Device -> Constr # dataTypeOf :: Device -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Device) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Device) # gmapT :: (forall b. Data b => b -> b) -> Device -> Device # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Device -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Device -> r # gmapQ :: (forall d. Data d => d -> u) -> Device -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Device -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Device -> m Device # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Device -> m Device # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Device -> m Device # | |||||
| Generic Device Source # | |||||
Defined in ReWire.Hyle.Syntax Associated Types
| |||||
| Show Device Source # | |||||
| Eq Device Source # | |||||
| Ord Device Source # | |||||
| Hashable Device Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Pretty Device Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Annotated Device Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| TextShow Device Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| type Rep Device Source # | |||||
Defined in ReWire.Hyle.Syntax type Rep Device = D1 ('MetaData "Device" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) (C1 ('MetaCons "Device" 'PrefixI 'True) (((S1 ('MetaSel ('Just "devAnnote") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Annote) :*: S1 ('MetaSel ('Just "devName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :*: (S1 ('MetaSel ('Just "devInputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(Name, Size)]) :*: S1 ('MetaSel ('Just "devOutputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(Name, Size)]))) :*: ((S1 ('MetaSel ('Just "devRegisters") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Register]) :*: S1 ('MetaSel ('Just "devInstances") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Instance])) :*: (S1 ('MetaSel ('Just "devBody") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Stmt]) :*: S1 ('MetaSel ('Just "devTags") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Blind [(Text, Integer)])))))) | |||||
Constructors
| Program | |
Fields
| |
Instances
| Data Program Source # | |||||
Defined in ReWire.Hyle.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Program -> c Program # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Program # toConstr :: Program -> Constr # dataTypeOf :: Program -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Program) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Program) # gmapT :: (forall b. Data b => b -> b) -> Program -> Program # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Program -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Program -> r # gmapQ :: (forall d. Data d => d -> u) -> Program -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Program -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Program -> m Program # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Program -> m Program # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Program -> m Program # | |||||
| Generic Program Source # | |||||
Defined in ReWire.Hyle.Syntax Associated Types
| |||||
| Show Program Source # | |||||
| Eq Program Source # | |||||
| Ord Program Source # | |||||
| Hashable Program Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| Pretty Program Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| TextShow Program Source # | |||||
Defined in ReWire.Hyle.Syntax | |||||
| type Rep Program Source # | |||||
Defined in ReWire.Hyle.Syntax type Rep Program = D1 ('MetaData "Program" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) (C1 ('MetaCons "Program" 'PrefixI 'True) (S1 ('MetaSel ('Just "progExterns") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Extern]) :*: (S1 ('MetaSel ('Just "progDefns") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Defn]) :*: S1 ('MetaSel ('Just "progDevice") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Device)))) | |||||
Display metadata invisible to equality, ordering, and hashing: wrapping
a field in Blind keeps doc lines and tag tables from perturbing dedupe
keys, memo keys, or the optimizer's fixpoint test (the same convention as
Annote itself, for metadata that isn't an annotation).
Instances
| NFData a => NFData (Blind a) | |||||
Defined in ReWire.Annotation | |||||
| Data a => Data (Blind a) | |||||
Defined in ReWire.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Blind a -> c (Blind a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Blind a) # toConstr :: Blind a -> Constr # dataTypeOf :: Blind a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Blind a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Blind a)) # gmapT :: (forall b. Data b => b -> b) -> Blind a -> Blind a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Blind a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Blind a -> r # gmapQ :: (forall d. Data d => d -> u) -> Blind a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Blind a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Blind a -> m (Blind a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Blind a -> m (Blind a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Blind a -> m (Blind a) # | |||||
| Generic (Blind a) | |||||
Defined in ReWire.Annotation Associated Types
| |||||
| Show a => Show (Blind a) | |||||
| Eq (Blind a) | |||||
| Ord (Blind a) | |||||
| Hashable (Blind a) | |||||
Defined in ReWire.Annotation | |||||
| Show a => TextShow (Blind a) | |||||
Defined in ReWire.Annotation | |||||
| type Rep (Blind a) | |||||
Defined in ReWire.Annotation | |||||
reservedWords :: HashSet Text Source #
Keywords and operator names: rejected as bare identifiers by the parser, and printed quoted when used as identifiers.