Epic.Language
- data CompileOptions
- = KeepC
- | Trace
- | ShowBytecode
- | ShowParseTree
- | MakeHeader FilePath
- | GCCOpt String
- | Debug
- | Checking Int
- | ExternalMain
- | MainInc FilePath
- | LinkObj FilePath
- data Type
- data Const
- data Name
- type Context = [(Name, ([Type], Type))]
- type Tag = Int
- type HFun = Expr -> Expr
- data Expr
- = V Int
- | R Name
- | App Expr [Expr]
- | Lazy Expr
- | Effect Expr
- | Par Expr
- | Con Tag [Expr]
- | Const Const
- | Proj Expr Int
- | Case Expr [CaseAlt]
- | If Expr Expr Expr
- | While Expr Expr
- | WhileAcc Expr Expr Expr
- | Op Op Expr Expr
- | Let Name Type Expr Expr
- | LetM Name Expr Expr
- | HLet Name Type Expr HFun
- | Update Int Expr Expr
- | Lam Name Type Expr
- | HLam Name Type HFun
- | Error String
- | Impossible
- | WithMem Allocator Expr Expr
- | ForeignCall Type String [(Expr, Type)]
- | LazyForeignCall Type String [(Expr, Type)]
- data CaseAlt
- data HRHS
- data Allocator
- data Op
- data Func = Bind {}
- data Decl
- data EvalDecl
- class SubstV x where
- class HOAS a b | a -> b where
- data CGFlag
- data Result r
- appForm :: Expr -> Bool
- checkLevel :: [CompileOptions] -> Int
- tempfile :: IO (FilePath, Handle)
- environment :: String -> IO (Maybe String)
Documentation
data CompileOptions
(Debugging) options to give to compiler
Constructors
KeepC | Keep intermediate C file |
Trace | Generate trace at run-time (debug) |
ShowBytecode | Show generated code |
ShowParseTree | Show parse tree |
MakeHeader FilePath | Output a .h file too |
GCCOpt String | Extra GCC option |
Debug | Generate debug info |
Checking Int | Checking level (0 none) |
ExternalMain | main is defined externally (in C) |
MainInc FilePath | File to #include in main program |
LinkObj FilePath | .o file to link with |
Instances
data Type
data Const
data Expr
Constructors
V Int | |
R Name | |
App Expr [Expr] | |
Lazy Expr | |
Effect Expr | |
Par Expr | |
Con Tag [Expr] | |
Const Const | |
Proj Expr Int | |
Case Expr [CaseAlt] | |
If Expr Expr Expr | |
While Expr Expr | |
WhileAcc Expr Expr Expr | |
Op Op Expr Expr | |
Let Name Type Expr Expr | |
LetM Name Expr Expr | |
HLet Name Type Expr HFun | |
Update Int Expr Expr | |
Lam Name Type Expr | |
HLam Name Type HFun | |
Error String | |
Impossible | |
WithMem Allocator Expr Expr | |
ForeignCall Type String [(Expr, Type)] | |
LazyForeignCall Type String [(Expr, Type)] |
data CaseAlt
Constructors
Alt | |
HAlt | |
ConstAlt | |
DefaultCase | |
data Op
data Func
class SubstV x where
class HOAS a b | a -> b where
data Result r
checkLevel :: [CompileOptions] -> Int
environment :: String -> IO (Maybe String)