Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- type Nat = Int
- type Align = Int
- type ExistsID = String
- type NameID = String
- data Exp a
- data Attribute ty
- data BaseType
- type BaseExp = Exp (Attribute BaseType)
- accum :: (Exp a -> Maybe b) -> Exp a -> [b]
- callSub :: (Exp a -> [b]) -> Exp a -> [b]
- plus :: Maybe Int -> Maybe Int -> Maybe Int
- expSize :: Exp a -> Maybe Int
- l2r :: forall a b. (Maybe Nat -> Exp a -> Maybe b) -> Exp a -> [b]
Documentation
Prim Nat | Primitive number of bytes |
Con Nat (Exp a) | Constrained |
(:@) (Exp a) Align | Alignment |
(:+) (Exp a) (Exp a) | Sequencing |
(:||) (Exp a) (Exp a) | Union / alternation |
(:::) NameID (Exp a) | Layer (and field) name binding |
Exists ExistsID (Exp a) | Formal name binding |
(:#) ExistsID (Exp a) | Repetitions |
Attr a (Exp a) | Extensible attributes |
Instances
Eq ty => Eq (Attribute ty) Source # | |
Ord ty => Ord (Attribute ty) Source # | |
Defined in Language.Floorplan.Core.Syntax | |
Show ty => Show (Attribute ty) Source # | |
type BaseExp = Exp (Attribute BaseType) Source #
Default core expression type for FLP compiler targeting Rust library (with contains(...) attibutes):
accum :: (Exp a -> Maybe b) -> Exp a -> [b] Source #
Accumulate the results of applying some function to every node in the Exp AST.
callSub :: (Exp a -> [b]) -> Exp a -> [b] Source #
Call the given function on all subexpressions. Good for fixedpoint functions calling on themselves in recursive case where they don't care which type they see. This is slightly dangerous in the case where something gets added to the core calculus. If this happens, PLEASE check all callers of this function to see if they should handle the new case personally.