Safe Haskell | None |
---|
- data Callable
- = Continuation
- | Function
- | Closure
- | LocalFunction
- | Primitive'
- data Exp
- data FuncDef = FuncDef {
- funcDefName :: Atom
- funcDefBody :: Lam
- funcDefCall :: Val
- funcDefProps :: FuncProps
- data FuncProps = FuncProps {}
- data Grin = Grin {
- grinEntryPoints :: GMap Atom FfiExport
- grinPhase :: !Phase
- grinTypeEnv :: TyEnv
- grinFunctions :: [FuncDef]
- grinSuspFunctions :: Set Atom
- grinPartFunctions :: Set Atom
- grinStats :: !Stat
- grinCafs :: [(Var, Val)]
- data TyThunk
- data Lam = [Val] :-> Exp
- data Phase
- data BaseOp
- type Tag = Atom
- updateFuncDefProps :: FuncDef -> FuncDef
- data Ty
- newtype TyEnv = TyEnv (GMap Atom TyTy)
- data TyTy = TyTy {}
- tyTy :: TyTy
- data Val
- newtype Var = V Int
- extendTyEnv :: [FuncDef] -> TyEnv -> TyEnv
- createFuncDef :: Bool -> Atom -> Lam -> FuncDef
- setGrinFunctions :: [(Atom, Lam)] -> Grin -> Grin
- grinFuncs :: Grin -> [(Atom, Lam)]
- emptyGrin :: Grin
- tyINode :: Ty
- tyDNode :: Ty
- findArgs :: Monad m => TyEnv -> Atom -> m [Ty]
- findArgsType :: Monad m => TyEnv -> Atom -> m ([Ty], [Ty])
- findTyTy :: Monad m => TyEnv -> Atom -> m TyTy
- gEval :: Val -> Exp
- grinEntryPointNames :: Grin -> [Atom]
- isHole :: Val -> Bool
- isValUnknown :: Val -> Bool
- isVar :: Val -> Bool
- n0 :: Val
- n1 :: Val
- n2 :: Val
- n3 :: Val
- p0 :: Val
- p1 :: Val
- p2 :: Val
- p3 :: Val
- partialTag :: Tag -> Int -> Tag
- phaseEvalInlined :: Phase -> Bool
- properHole :: Ty -> Val
- tagFlipFunction :: Atom -> Atom
- tagHole :: Atom
- tagInfo :: Atom -> TagInfo
- data TagInfo
- = TagPApp !Int !Atom
- | TagSusp !Bool !Atom
- | TagDataCons
- | TagTypeCons
- | TagTypePApp !Int Tag
- | TagFunc
- tagIsFunction :: Atom -> Bool
- tagIsPartialAp :: Atom -> Bool
- tagIsSuspFunction :: Atom -> Bool
- tagIsTag :: Atom -> Bool
- tagIsWHNF :: Atom -> Bool
- tagToFunction :: Monad m => Atom -> m Atom
- tagUnfunction :: Monad m => Tag -> m (Int, Tag)
- v0 :: Var
- v1 :: Var
- v2 :: Var
- v3 :: Var
- lamExp :: Lam -> Exp
- lamBind :: Lam -> [Val]
- valIsNF :: Val -> Bool
Documentation
Exp :>>= Lam | Sequencing - the same as >>= for monads. |
BaseOp | |
App | Application of functions and builtins |
Prim | Primitive operation |
Case | Case statement |
Return | Return a value |
Error | Abort with an error message, non recoverably. |
Call | Call or jump to a callable |
NewRegion | create a new region and pass it to its argument |
Alloc | allocate space for a number of values in the given region |
Let | A let of local functions |
MkClosure | create a closure |
MkCont | Make a continuation, always allocated on region encompasing expLam |
GcRoots | |
Eq Exp | |
Ord Exp | |
Show Exp | |
CanType Exp | |
Tickleable Val Exp | |
Tickleable Exp Exp | |
Tickleable Exp Lam | |
PPrint Doc Exp | |
FreeVars Exp [Var] | |
FreeVars Exp [Tag] | |
FreeVars Exp (Set (Var, Ty)) | |
FreeVars Exp (Set Var) | |
FreeVars Exp (Set Tag) | |
FreeVars Exp (GSet Var) | |
FreeVars Exp (GSet Tag) | |
FreeVars Exp (Set Var, Set Tag) | |
FreeVars Exp (GSet Var, GSet Tag) |
FuncDef | |
|
FuncProps | |
|
Grin | |
|
TyPtr Ty | pointer to a memory location which contains its argument |
TyNode | a whole node |
TyINode | a whole possibly indirect node |
TyAttr Ty Ty | attach an attribute to a type |
TyAnd Ty Ty | boolean conjunction of types |
TyOr Ty Ty | boolean disjunction of types |
TyPrim Ty | a basic type |
TyUnit | type of Unit |
TyCall Callable [Ty] [Ty] | something call,jump, or cut-to-able |
TyRegion | a region |
TyGcContext | the context for garbage collection |
TyRegister Ty | a register contains a mutable value, the register itself cannot be addressed, hence they may not be returned from functions or passed as arguments. |
TyComplex Ty | A complex version of a basic type |
TyVector !Int Ty | A vector of a basic type |
TyUnknown | an unknown possibly undefined type, All of these must be eliminated by code generation |
NodeC !Tag [Val] | Complete node, of type TyNode |
Const Val | constant data, only Lit, Const and NodeC may be children. of type TyINode |
Lit !Number Ty | Literal |
Var !Var Ty | Variable |
Unit | Empty value used as placeholder |
ValPrim Prim [Val] Ty | Primitive value |
Index Val Val | A pointer incremented some number of values (Index v 0) == v |
Item Atom Ty | Specific named thing. function, global, region, etc.. |
ValUnknown Ty | Unknown or unimportant value |
Eq Val | |
Ord Val | |
Show Val | |
ConNames Val | |
CanType Val | |
FromVal Val | |
ToVal Val | |
Tickleable Val Val | |
Tickleable Val Exp | |
DocLike d => PPrint d Val | |
FreeVars Val [Var] | |
FreeVars Val [Tag] | |
FreeVars Val (Set (Var, Ty)) | |
FreeVars Val (Set Var) | |
FreeVars Val (Set Tag) | |
FreeVars Val (GSet Var) | |
FreeVars Val (GSet Tag) | |
ToVal (Val, Val) |
Enum Var | |
Eq Var | |
Ord Var | |
Show Var | |
Intjection Var | |
DocLike d => PPrint d Var | |
FreeVars FuncProps (Set Var) | |
FreeVars FuncProps (GSet Var) | |
FreeVars Val [Var] | |
FreeVars Val (Set (Var, Ty)) | |
FreeVars Val (Set Var) | |
FreeVars Val (GSet Var) | |
FreeVars Exp [Var] | |
FreeVars Exp (Set (Var, Ty)) | |
FreeVars Exp (Set Var) | |
FreeVars Exp (GSet Var) | |
FreeVars Lam [Var] | |
FreeVars Lam (Set (Var, Ty)) | |
FreeVars Lam (Set Var) | |
FreeVars Lam (GSet Var) | |
FreeVars Exp (Set Var, Set Tag) | |
FreeVars Exp (GSet Var, GSet Tag) | |
Eq (GSet Var) | |
Ord (GSet Var) | |
Monoid (GSet Var) | |
HasSize (GSet Var) | |
IsEmpty (GSet Var) | |
SetLike (GSet Var) | |
Collection (GSet Var) | |
Unionize (GSet Var) | |
Eq v => Eq (GMap Var v) | |
Ord v => Ord (GMap Var v) | |
Monoid (GMap Var v) | |
HasSize (GMap Var v) | |
IsEmpty (GMap Var v) | |
MapLike (GMap Var v) | |
SetLike (GMap Var v) | |
Collection (GMap Var v) | |
Unionize (GMap Var v) |
extendTyEnv :: [FuncDef] -> TyEnv -> TyEnvSource
grinEntryPointNames :: Grin -> [Atom]Source
isValUnknown :: Val -> BoolSource
partialTag :: Tag -> Int -> TagSource
phaseEvalInlined :: Phase -> BoolSource
properHole :: Ty -> ValSource
tagFlipFunction :: Atom -> AtomSource
tagIsFunction :: Atom -> BoolSource
tagIsPartialAp :: Atom -> BoolSource
tagIsSuspFunction :: Atom -> BoolSource
tagToFunction :: Monad m => Atom -> m AtomSource