Safe Haskell | None |
---|---|
Language | Haskell98 |
Contains the state monad that the compiler works in and some functions for tampering with the state.
- data CompileState = CompileState {}
- initCompileState :: CompileState
- type Compile = StateT CompileState
- epicError :: String -> Compile TCM a
- modifyEI :: (EInterface -> EInterface) -> Compile TCM ()
- getsEI :: (EInterface -> a) -> Compile TCM a
- getType :: QName -> Compile TCM Type
- unqname :: QName -> Var
- resetNameSupply :: Compile TCM ()
- getDelayed :: QName -> Compile TCM Bool
- putDelayed :: QName -> Bool -> Compile TCM ()
- newName :: Compile TCM Var
- putConstrTag :: QName -> Tag -> Compile TCM ()
- assignConstrTag :: QName -> Compile TCM Tag
- assignConstrTag' :: QName -> [QName] -> Compile TCM Tag
- getConData :: QName -> Compile TCM QName
- getDataCon :: QName -> Compile TCM [QName]
- getConstrTag :: QName -> Compile TCM Tag
- getConstrTag' :: QName -> Compile TCM (Maybe Tag)
- addDefName :: QName -> Compile TCM ()
- topBindings :: Compile TCM (Set Var)
- getConArity :: QName -> Compile TCM Int
- putConArity :: QName -> Int -> Compile TCM ()
- putMain :: QName -> Compile TCM ()
- getMain :: Compile TCM Var
- lookInterface :: (EInterface -> Maybe a) -> Compile TCM a -> Compile TCM a
- constrInScope :: QName -> Compile TCM Bool
- getForcedArgs :: QName -> Compile TCM ForcedArgs
- putForcedArgs :: QName -> ForcedArgs -> Compile TCM ()
- replaceAt :: Int -> [a] -> [a] -> [a]
- constructorArity :: Num a => QName -> TCM a
- bindExpr :: Expr -> (Var -> Compile TCM Expr) -> Compile TCM Expr
Documentation
data CompileState Source
Stuff we need in our compiler
initCompileState :: CompileState Source
The initial (empty) state
type Compile = StateT CompileState Source
Compiler monad
modifyEI :: (EInterface -> EInterface) -> Compile TCM () Source
Modify the state of the current module's Epic Interface
getsEI :: (EInterface -> a) -> Compile TCM a Source
Get the state of the current module's Epic Interface
State modifiers
resetNameSupply :: Compile TCM () Source
addDefName :: QName -> Compile TCM () Source
lookInterface :: (EInterface -> Maybe a) -> Compile TCM a -> Compile TCM a Source
getForcedArgs :: QName -> Compile TCM ForcedArgs Source
putForcedArgs :: QName -> ForcedArgs -> Compile TCM () Source
constructorArity :: Num a => QName -> TCM a Source
Copy pasted from MAlonzo, HAHA!!! Move somewhere else!