Agda-2.2.10: A dependently typed functional programming language and proof assistant

Agda.Compiler.Epic.CompileState

Contents

Description

Contains the state monad that the compiler works in and some functions for tampering with the state.

Synopsis

Documentation

data CompileState Source

Stuff we need in our compiler

Instances

initCompileState :: CompileStateSource

The initial (empty) state

type Compile = StateT CompileStateSource

Compiler monad

unqname :: QName -> VarSource

Create a name which can be used in Epic code from a QName.

State modifiers

addDataDecl :: Monad m => [QName] -> Compile m ()Source

Add a data declaration by giving a list of its constructors. Tags will be created and saved.

replaceAtSource

Arguments

:: Int

replace at

-> [a]

to replace

-> [a]

replace with

-> [a]

result?

constructorArity :: (MonadTCM tcm, Num a) => QName -> tcm aSource

Copy pasted from MAlonzo, HAHA!!! Move somewhere else!