Safe Haskell | None |
---|---|
Language | Haskell98 |
Convert from Agda's internal representation to UHC Core via Treeless.
The coinduction kit is translated the same way as in MAlonzo: flat = id sharp = id -> There is no runtime representation of Coinductive values.
- opts :: EHCOpts
- fromAgdaModule :: ModuleName -> [ModuleName] -> Interface -> TCM CModule
- translateDefn :: (QName, Definition) -> Compile [CBind]
- runTT :: TT a -> Compile a
- data TTEnv = TTEnv {}
- type TT = ReaderT TTEnv Compile
- addToEnv :: [HsName] -> TT a -> TT a
- data BuiltinKit = BuiltinKit {}
- builtinKit :: TCM BuiltinKit
- compileTerm :: TTerm -> TT CExpr
- buildPrimCases :: CExpr -> CExpr -> [TAlt] -> CExpr -> TT CExpr
- mkIfThenElse :: CExpr -> CExpr -> CExpr -> CExpr
- compileConAlt :: TAlt -> TT CAlt
- makeConAlt :: QName -> ([HsName] -> TT CExpr) -> TT CAlt
- defaultBranches :: QName -> [TAlt] -> CExpr -> TT [CAlt]
- litToCore :: Literal -> CExpr
- getCTagArity :: CTag -> Int
- coreError :: String -> CExpr
- compilePrim :: TPrim -> CExpr
- createMainModule :: ModuleName -> HsName -> CModule
Documentation
fromAgdaModule :: ModuleName -> [ModuleName] -> Interface -> TCM CModule Source
Convert from Agda's internal representation to our auxiliary AST.
translateDefn :: (QName, Definition) -> Compile [CBind] Source
Translate an Agda definition to an UHC Core function where applicable
data BuiltinKit Source
compileTerm :: TTerm -> TT CExpr Source
Translate the actual Agda terms, with an environment of all the bound variables from patternmatching. Agda terms are in de Bruijn so we just check the new names in the position.
compileConAlt :: TAlt -> TT CAlt Source
defaultBranches :: QName -> [TAlt] -> CExpr -> TT [CAlt] Source
Constructs an alternative for all constructors not explicitly matched by a branch.
getCTagArity :: CTag -> Int Source
compilePrim :: TPrim -> CExpr Source
createMainModule :: ModuleName -> HsName -> CModule Source