rewire-backend-2.8: A Haskell-to-Verilog/VHDL compiler, the Hyle backend
Safe HaskellTrustworthy
LanguageHaskell2010

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

Documentation

type Size = Word Source #

type Name = Text Source #

type GId = Text Source #

class SizeAnnotated a where Source #

Methods

sizeOf :: a -> Size Source #

Instances

Instances details
SizeAnnotated Defn Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

sizeOf :: Defn -> Size Source #

SizeAnnotated Exp Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

sizeOf :: Exp -> Size Source #

SizeAnnotated Extern Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

sizeOf :: Extern -> Size Source #

SizeAnnotated Register Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

sizeOf :: Register -> Size Source #

SizeAnnotated Sig Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

sizeOf :: Sig -> Size Source #

data Op Source #

Primitive operations (doc/hyle.md, section 3.3). Static parameters (target widths, replication counts) are part of the operator.

Instances

Instances details
Data Op Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Op -> c Op #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Op #

toConstr :: Op -> Constr #

dataTypeOf :: Op -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Op) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Op) #

gmapT :: (forall b. Data b => b -> b) -> Op -> Op #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r #

gmapQ :: (forall d. Data d => d -> u) -> Op -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Op -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Op -> m Op #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Op -> m Op #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Op -> m Op #

Generic Op Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Associated Types

type Rep Op 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Op = D1 ('MetaData "Op" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) ((((C1 ('MetaCons "Add" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Sub" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mul" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UDiv" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UMod" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Pow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "And" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Or" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "XOr" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Not" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Shl" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "LShr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AShr" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Eq" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Ne" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ULt" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ULe" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UGt" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UGe" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SLt" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SLe" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SGt" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "SGe" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RedAnd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RedOr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RedXOr" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ZExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size)) :+: C1 ('MetaCons "SExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size))) :+: (C1 ('MetaCons "Trunc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size)) :+: C1 ('MetaCons "Rep" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural)))))))

Methods

from :: Op -> Rep Op x #

to :: Rep Op x -> Op #

Show Op Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

showsPrec :: Int -> Op -> ShowS #

show :: Op -> String #

showList :: [Op] -> ShowS #

Eq Op Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

(==) :: Op -> Op -> Bool #

(/=) :: Op -> Op -> Bool #

Ord Op Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

compare :: Op -> Op -> Ordering #

(<) :: Op -> Op -> Bool #

(<=) :: Op -> Op -> Bool #

(>) :: Op -> Op -> Bool #

(>=) :: Op -> Op -> Bool #

max :: Op -> Op -> Op #

min :: Op -> Op -> Op #

Hashable Op Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

hashWithSalt :: Int -> Op -> Int

hash :: Op -> Int

Pretty Op Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: Op -> Doc ann #

prettyList :: [Op] -> Doc ann

TextShow Op Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

showbPrec :: Int -> Op -> Builder #

showb :: Op -> Builder #

showbList :: [Op] -> Builder

showtPrec :: Int -> Op -> Text

showt :: Op -> Text #

showtList :: [Op] -> Text

showtlPrec :: Int -> Op -> Text

showtl :: Op -> Text

showtlList :: [Op] -> Text

type Rep Op Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Op = D1 ('MetaData "Op" "ReWire.Hyle.Syntax" "rewire-backend-2.8-D0iOlvJit8y3HBhD7LZRbe" 'False) ((((C1 ('MetaCons "Add" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Sub" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mul" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UDiv" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UMod" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Pow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "And" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Or" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "XOr" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Not" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Shl" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "LShr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AShr" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Eq" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Ne" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ULt" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ULe" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UGt" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UGe" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SLt" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SLe" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SGt" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "SGe" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RedAnd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RedOr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RedXOr" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ZExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size)) :+: C1 ('MetaCons "SExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size))) :+: (C1 ('MetaCons "Trunc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Size)) :+: C1 ('MetaCons "Rep" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural)))))))

opName :: Op -> Text Source #

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.

data Exp Source #

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

Instances details
Data Exp Source # 
Instance details

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 #

toConstr :: Exp -> Constr #

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 # 
Instance details

Defined in ReWire.Hyle.Syntax

Associated Types

type Rep Exp 
Instance details

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))))))))

Methods

from :: Exp -> Rep Exp x #

to :: Rep Exp x -> Exp #

Show Exp Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

showsPrec :: Int -> Exp -> ShowS #

show :: Exp -> String #

showList :: [Exp] -> ShowS #

Eq Exp Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

(==) :: Exp -> Exp -> Bool #

(/=) :: Exp -> Exp -> Bool #

Ord Exp Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

compare :: Exp -> Exp -> Ordering #

(<) :: Exp -> Exp -> Bool #

(<=) :: Exp -> Exp -> Bool #

(>) :: Exp -> Exp -> Bool #

(>=) :: Exp -> Exp -> Bool #

max :: Exp -> Exp -> Exp #

min :: Exp -> Exp -> Exp #

Hashable Exp Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

hashWithSalt :: Int -> Exp -> Int

hash :: Exp -> Int

Pretty Exp Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: Exp -> Doc ann #

prettyList :: [Exp] -> Doc ann

SizeAnnotated Exp Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

sizeOf :: Exp -> Size Source #

Annotated Exp Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

ann :: Exp -> Annote #

TextShow Exp Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Exp Source # 
Instance details

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))))))))

data Sig Source #

Constructors

Sig Annote ![Size] !Size 

Instances

Instances details
Data Sig Source # 
Instance details

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 #

toConstr :: Sig -> Constr #

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 # 
Instance details

Defined in ReWire.Hyle.Syntax

Associated Types

type Rep Sig 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

from :: Sig -> Rep Sig x #

to :: Rep Sig x -> Sig #

Show Sig Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

showsPrec :: Int -> Sig -> ShowS #

show :: Sig -> String #

showList :: [Sig] -> ShowS #

Eq Sig Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

(==) :: Sig -> Sig -> Bool #

(/=) :: Sig -> Sig -> Bool #

Ord Sig Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

compare :: Sig -> Sig -> Ordering #

(<) :: Sig -> Sig -> Bool #

(<=) :: Sig -> Sig -> Bool #

(>) :: Sig -> Sig -> Bool #

(>=) :: Sig -> Sig -> Bool #

max :: Sig -> Sig -> Sig #

min :: Sig -> Sig -> Sig #

Hashable Sig Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

hashWithSalt :: Int -> Sig -> Int

hash :: Sig -> Int

Pretty Sig Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: Sig -> Doc ann #

prettyList :: [Sig] -> Doc ann

SizeAnnotated Sig Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

sizeOf :: Sig -> Size Source #

Annotated Sig Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

ann :: Sig -> Annote #

TextShow Sig Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Sig Source # 
Instance details

Defined in ReWire.Hyle.Syntax

data Defn Source #

Constructors

Defn 

Fields

Instances

Instances details
Data Defn Source # 
Instance details

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 #

toConstr :: Defn -> Constr #

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 # 
Instance details

Defined in ReWire.Hyle.Syntax

Associated Types

type Rep Defn 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

from :: Defn -> Rep Defn x #

to :: Rep Defn x -> Defn #

Show Defn Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

showsPrec :: Int -> Defn -> ShowS #

show :: Defn -> String #

showList :: [Defn] -> ShowS #

Eq Defn Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

(==) :: Defn -> Defn -> Bool #

(/=) :: Defn -> Defn -> Bool #

Ord Defn Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

compare :: Defn -> Defn -> Ordering #

(<) :: Defn -> Defn -> Bool #

(<=) :: Defn -> Defn -> Bool #

(>) :: Defn -> Defn -> Bool #

(>=) :: Defn -> Defn -> Bool #

max :: Defn -> Defn -> Defn #

min :: Defn -> Defn -> Defn #

Hashable Defn Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

hashWithSalt :: Int -> Defn -> Int

hash :: Defn -> Int

Pretty Defn Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: Defn -> Doc ann #

prettyList :: [Defn] -> Doc ann

SizeAnnotated Defn Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

sizeOf :: Defn -> Size Source #

Annotated Defn Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

ann :: Defn -> Annote #

TextShow Defn Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Defn Source # 
Instance details

Defined in ReWire.Hyle.Syntax

data ExternKind Source #

Sequential externs carry the names of their clock and reset ports (either may be absent); combinational externs have neither.

Constructors

Comb 
Seq !(Maybe Name) !(Maybe Name) 

Instances

Instances details
Data ExternKind Source # 
Instance details

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 # 
Instance details

Defined in ReWire.Hyle.Syntax

Associated Types

type Rep ExternKind 
Instance details

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))))
Show ExternKind Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Eq ExternKind Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Ord ExternKind Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Hashable ExternKind Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Pretty ExternKind Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: ExternKind -> Doc ann #

prettyList :: [ExternKind] -> Doc ann

TextShow ExternKind Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep ExternKind Source # 
Instance details

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))))

data Extern Source #

Constructors

Extern 

Fields

Instances

Instances details
Data Extern Source # 
Instance details

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 # 
Instance details

Defined in ReWire.Hyle.Syntax

Associated Types

type Rep Extern 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

from :: Extern -> Rep Extern x #

to :: Rep Extern x -> Extern #

Show Extern Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Eq Extern Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

(==) :: Extern -> Extern -> Bool #

(/=) :: Extern -> Extern -> Bool #

Ord Extern Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Hashable Extern Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

hashWithSalt :: Int -> Extern -> Int

hash :: Extern -> Int

Pretty Extern Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: Extern -> Doc ann #

prettyList :: [Extern] -> Doc ann

SizeAnnotated Extern Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

sizeOf :: Extern -> Size Source #

Annotated Extern Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

ann :: Extern -> Annote #

TextShow Extern Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Extern Source # 
Instance details

Defined in ReWire.Hyle.Syntax

externResultSize :: Extern -> Size Source #

The width of a call to the extern: its outputs, concatenated.

data Register Source #

Constructors

Register Annote !Name !Size !BV 

Instances

Instances details
Data Register Source # 
Instance details

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 # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

from :: Register -> Rep Register x #

to :: Rep Register x -> Register #

Show Register Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Eq Register Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Ord Register Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Hashable Register Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Pretty Register Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: Register -> Doc ann #

prettyList :: [Register] -> Doc ann

SizeAnnotated Register Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

sizeOf :: Register -> Size Source #

Annotated Register Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

ann :: Register -> Annote #

TextShow Register Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Register Source # 
Instance details

Defined in ReWire.Hyle.Syntax

data Instance Source #

Constructors

Instance Annote !Name !Name ![Natural]

Instance name, extern name, generic arguments.

Instances

Instances details
Data Instance Source # 
Instance details

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 # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

from :: Instance -> Rep Instance x #

to :: Rep Instance x -> Instance #

Show Instance Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Eq Instance Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Ord Instance Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Hashable Instance Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Pretty Instance Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: Instance -> Doc ann #

prettyList :: [Instance] -> Doc ann

Annotated Instance Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

ann :: Instance -> Annote #

TextShow Instance Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Instance Source # 
Instance details

Defined in ReWire.Hyle.Syntax

data Stmt Source #

Constructors

SLet Annote !Name !Exp 
SOutput Annote !Name !Exp 
SNext Annote !Name !Exp 
SInstIn Annote !Name !Name !Exp

Instance name, port name.

Instances

Instances details
Data Stmt Source # 
Instance details

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 #

toConstr :: Stmt -> Constr #

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 # 
Instance details

Defined in ReWire.Hyle.Syntax

Associated Types

type Rep Stmt 
Instance details

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)))))

Methods

from :: Stmt -> Rep Stmt x #

to :: Rep Stmt x -> Stmt #

Show Stmt Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

showsPrec :: Int -> Stmt -> ShowS #

show :: Stmt -> String #

showList :: [Stmt] -> ShowS #

Eq Stmt Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

(==) :: Stmt -> Stmt -> Bool #

(/=) :: Stmt -> Stmt -> Bool #

Ord Stmt Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

compare :: Stmt -> Stmt -> Ordering #

(<) :: Stmt -> Stmt -> Bool #

(<=) :: Stmt -> Stmt -> Bool #

(>) :: Stmt -> Stmt -> Bool #

(>=) :: Stmt -> Stmt -> Bool #

max :: Stmt -> Stmt -> Stmt #

min :: Stmt -> Stmt -> Stmt #

Hashable Stmt Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

hashWithSalt :: Int -> Stmt -> Int

hash :: Stmt -> Int

Pretty Stmt Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: Stmt -> Doc ann #

prettyList :: [Stmt] -> Doc ann

Annotated Stmt Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

ann :: Stmt -> Annote #

TextShow Stmt Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Stmt Source # 
Instance details

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)))))

data Device Source #

Constructors

Device 

Fields

Instances

Instances details
Data Device Source # 
Instance details

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 # 
Instance details

Defined in ReWire.Hyle.Syntax

Associated Types

type Rep Device 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

from :: Device -> Rep Device x #

to :: Rep Device x -> Device #

Show Device Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Eq Device Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

(==) :: Device -> Device -> Bool #

(/=) :: Device -> Device -> Bool #

Ord Device Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Hashable Device Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

hashWithSalt :: Int -> Device -> Int

hash :: Device -> Int

Pretty Device Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: Device -> Doc ann #

prettyList :: [Device] -> Doc ann

Annotated Device Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

ann :: Device -> Annote #

TextShow Device Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Device Source # 
Instance details

Defined in ReWire.Hyle.Syntax

data Program Source #

Constructors

Program 

Fields

Instances

Instances details
Data Program Source # 
Instance details

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 # 
Instance details

Defined in ReWire.Hyle.Syntax

Associated Types

type Rep Program 
Instance details

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))))

Methods

from :: Program -> Rep Program x #

to :: Rep Program x -> Program #

Show Program Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Eq Program Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

(==) :: Program -> Program -> Bool #

(/=) :: Program -> Program -> Bool #

Ord Program Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Hashable Program Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

hashWithSalt :: Int -> Program -> Int

hash :: Program -> Int

Pretty Program Source # 
Instance details

Defined in ReWire.Hyle.Syntax

Methods

pretty :: Program -> Doc ann #

prettyList :: [Program] -> Doc ann

TextShow Program Source # 
Instance details

Defined in ReWire.Hyle.Syntax

type Rep Program Source # 
Instance details

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))))

newtype Blind a #

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).

Constructors

Blind 

Fields

Instances

Instances details
NFData a => NFData (Blind a) 
Instance details

Defined in ReWire.Annotation

Methods

rnf :: Blind a -> () #

Data a => Data (Blind a) 
Instance details

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) 
Instance details

Defined in ReWire.Annotation

Associated Types

type Rep (Blind a) 
Instance details

Defined in ReWire.Annotation

type Rep (Blind a) = D1 ('MetaData "Blind" "ReWire.Annotation" "rewire-base-2.8-FlLB0CaWUZ0C08bXxr65qo" 'True) (C1 ('MetaCons "Blind" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from :: Blind a -> Rep (Blind a) x #

to :: Rep (Blind a) x -> Blind a #

Show a => Show (Blind a) 
Instance details

Defined in ReWire.Annotation

Methods

showsPrec :: Int -> Blind a -> ShowS #

show :: Blind a -> String #

showList :: [Blind a] -> ShowS #

Eq (Blind a) 
Instance details

Defined in ReWire.Annotation

Methods

(==) :: Blind a -> Blind a -> Bool #

(/=) :: Blind a -> Blind a -> Bool #

Ord (Blind a) 
Instance details

Defined in ReWire.Annotation

Methods

compare :: Blind a -> Blind a -> Ordering #

(<) :: Blind a -> Blind a -> Bool #

(<=) :: Blind a -> Blind a -> Bool #

(>) :: Blind a -> Blind a -> Bool #

(>=) :: Blind a -> Blind a -> Bool #

max :: Blind a -> Blind a -> Blind a #

min :: Blind a -> Blind a -> Blind a #

Hashable (Blind a) 
Instance details

Defined in ReWire.Annotation

Methods

hashWithSalt :: Int -> Blind a -> Int

hash :: Blind a -> Int

Show a => TextShow (Blind a) 
Instance details

Defined in ReWire.Annotation

Methods

showbPrec :: Int -> Blind a -> Builder #

showb :: Blind a -> Builder #

showbList :: [Blind a] -> Builder

showtPrec :: Int -> Blind a -> Text

showt :: Blind a -> Text #

showtList :: [Blind a] -> Text

showtlPrec :: Int -> Blind a -> Text

showtl :: Blind a -> Text

showtlList :: [Blind a] -> Text

type Rep (Blind a) 
Instance details

Defined in ReWire.Annotation

type Rep (Blind a) = D1 ('MetaData "Blind" "ReWire.Annotation" "rewire-base-2.8-FlLB0CaWUZ0C08bXxr65qo" 'True) (C1 ('MetaCons "Blind" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

nil :: Exp Source #

The unique width-0 value.

cat :: [Exp] -> Exp Source #

Concatenate a list of expressions, dropping width-0 components.

gather :: Exp -> [Exp] Source #

Flatten nested concatenations, dropping width-0 components.

reservedWords :: HashSet Text Source #

Keywords and operator names: rejected as bare identifiers by the parser, and printed quoted when used as identifiers.