Safe Haskell | None |
---|---|
Language | Haskell98 |
CoreRun Internal API
Intended for implementing stuff that has to know about internals (i.e. class instances).
See CoreRun.API.
To do (currently sorely missing): proper/enough primitives, and doc for them.
- data Mod = Mod_Mod {
- ref2nm_Mod_Mod :: !Ref2Nm
- moduleNm_Mod_Mod :: !HsName
- moduleNr_Mod_Mod :: !Int
- stkDepth_Mod_Mod :: !Int
- binds_Mod_Mod :: !(CRArray Bind)
- body_Mod_Mod :: !Exp
- data Exp
- = Exp_SExp {
- sexpr_Exp_SExp :: !SExp
- | Exp_Tup {
- tag_Exp_Tup :: !Int
- args_Exp_Tup :: !(CRArray SExp)
- | Exp_Let {
- firstOff_Exp_Let :: !Int
- ref2nm_Exp_Let :: !Ref2Nm
- binds_Exp_Let :: !(CRArray Bind)
- body_Exp_Let :: !Exp
- | Exp_App {
- func_Exp_App :: !Exp
- args_Exp_App :: !(CRArray SExp)
- | Exp_Lam {
- mbNm_Exp_Lam :: !(Maybe HsName)
- nrArgs_Exp_Lam :: !Int
- stkDepth_Exp_Lam :: !Int
- ref2nm_Exp_Lam :: !Ref2Nm
- body_Exp_Lam :: !Exp
- | Exp_Force {
- expr_Exp_Force :: !Exp
- | Exp_Tail {
- expr_Exp_Tail :: !Exp
- | Exp_Case {
- expr_Exp_Case :: !SExp
- alts_Exp_Case :: !(CRArray Alt)
- | Exp_FFI {
- prim_Exp_FFI :: !RunPrim
- args_Exp_FFI :: !(CRArray SExp)
- = Exp_SExp {
- data SExp
- = SExp_Var {
- ref_SExp_Var :: !RRef
- | SExp_Int {
- int_SExp_Int :: !Int
- | SExp_Char {
- char_SExp_Char :: !Char
- | SExp_String { }
- | SExp_Integer { }
- | SExp_Dbg {
- msg_SExp_Dbg :: !String
- = SExp_Var {
- data Alt = Alt_Alt {
- ref2nm_Alt_Alt :: !Ref2Nm
- expr_Alt_Alt :: !Exp
- data Pat
- = Pat_Con {
- tag_Pat_Con :: !Int
- | Pat_BoolExpr {
- expr_Pat_BoolExpr :: !Exp
- = Pat_Con {
- data RRef
- crarrayFromList :: [x] -> CRArray x
- crarrayToList :: CRArray x -> [x]
- module UHC.Light.Compiler.CoreRun.API
CoreRun AST
The datatypes making up a CoreRun program, with constructors
Mod_Mod | |
|
Exp_SExp | |
| |
Exp_Tup | |
| |
Exp_Let | |
| |
Exp_App | |
| |
Exp_Lam | |
| |
Exp_Force | |
| |
Exp_Tail | |
| |
Exp_Case | |
| |
Exp_FFI | |
|
Identifier references for use during running CoreRun
RRef_Glb | global reference to module and its entry |
RRef_Loc | local reference to on stack value, not interpreted during running |
RRef_LDf | local reference to on stack value, but measured relative to level of from where is referenced, used at runtime |
| |
RRef_Tag | tag of memory/constructor node referred to by other ref (not yet used) |
RRef_Fld | fld of memory/constructor node referred to by other ref |
RRef_Dbg | debug variant, holding original name |
Utilities
crarrayFromList :: [x] -> CRArray x Source
Wrapper (rename) around vector-list conversion
crarrayToList :: CRArray x -> [x] Source
Wrapper (rename) around vector-list conversion