Safe Haskell | None |
---|
- normalise :: Context -> Env -> TT Name -> TT Name
- normaliseTrace :: Bool -> Context -> Env -> TT Name -> TT Name
- normaliseC :: Context -> Env -> TT Name -> TT Name
- normaliseAll :: Context -> Env -> TT Name -> TT Name
- rt_simplify :: Context -> Env -> TT Name -> TT Name
- simplify :: Context -> Env -> TT Name -> TT Name
- specialise :: Context -> Env -> [(Name, Int)] -> TT Name -> TT Name
- hnf :: Context -> Env -> TT Name -> TT Name
- convEq :: Context -> TT Name -> TT Name -> StateT UCs TC Bool
- convEq' :: Context -> TT Name -> TT Name -> TC Bool
- data Def
- data CaseInfo = CaseInfo {}
- data CaseDefs = CaseDefs {
- cases_totcheck :: !([Name], SC)
- cases_compiletime :: !([Name], SC)
- cases_inlined :: !([Name], SC)
- cases_runtime :: !([Name], SC)
- data Accessibility
- data Totality
- data PReason
- = Other [Name]
- | Itself
- | NotCovering
- | NotPositive
- | UseUndef Name
- | BelieveMe
- | Mutual [Name]
- | NotProductive
- data Context
- initContext :: Context
- ctxtAlist :: Context -> [(Name, Def)]
- uconstraints :: Context -> [UConstraint]
- next_tvar :: Context -> Int
- addToCtxt :: Name -> Term -> Type -> Context -> Context
- setAccess :: Name -> Accessibility -> Context -> Context
- setTotal :: Name -> Totality -> Context -> Context
- addCtxtDef :: Name -> Def -> Context -> Context
- addTyDecl :: Name -> NameType -> Type -> Context -> Context
- addDatatype :: Datatype Name -> Context -> Context
- addCasedef :: Name -> CaseInfo -> Bool -> Bool -> Bool -> Bool -> [Either Term (Term, Term)] -> [([Name], Term, Term)] -> [([Name], Term, Term)] -> [([Name], Term, Term)] -> [([Name], Term, Term)] -> Type -> Context -> Context
- simplifyCasedef :: Name -> Context -> Context
- addOperator :: Name -> Type -> Int -> ([Value] -> Maybe Value) -> Context -> Context
- lookupNames :: Name -> Context -> [Name]
- lookupTy :: Name -> Context -> [Type]
- lookupP :: Name -> Context -> [Term]
- lookupDef :: Name -> Context -> [Def]
- lookupDefAcc :: Name -> Bool -> Context -> [(Def, Accessibility)]
- lookupVal :: Name -> Context -> [Value]
- lookupTotal :: Name -> Context -> [Totality]
- lookupNameTotal :: Name -> Context -> [(Name, Totality)]
- lookupTyEnv :: Name -> Env -> Maybe (Int, Type)
- isDConName :: Name -> Context -> Bool
- isTConName :: Name -> Context -> Bool
- isConName :: Name -> Context -> Bool
- isFnName :: Name -> Context -> Bool
- data Value
- class Quote a where
- initEval :: EvalState
Documentation
normaliseC :: Context -> Env -> TT Name -> TT NameSource
Normalise fully type checked terms (so, assume all names/let bindings resolved)
rt_simplify :: Context -> Env -> TT Name -> TT NameSource
Simplify for run-time (i.e. basic inlining)
simplify :: Context -> Env -> TT Name -> TT NameSource
Like normalise, but we only reduce functions that are marked as okay to inline (and probably shouldn't reduce lets?) 20130908: now only used to reduce for totality checking. Inlining should be done elsewhere.
A definition is either a simple function (just an expression with a type), a constant, which could be a data or type constructor, an axiom or as an yet undefined function, or an Operator. An Operator is a function which explains how to reduce. A CaseOp is a function defined by a simple case tree
CaseDefs | |
|
data Accessibility Source
The result of totality checking
Reasons why a function may not be total
Contexts used for global definitions and for proof state. They contain universe constraints and existing definitions.
The initial empty context
uconstraints :: Context -> [UConstraint]Source
addCasedef :: Name -> CaseInfo -> Bool -> Bool -> Bool -> Bool -> [Either Term (Term, Term)] -> [([Name], Term, Term)] -> [([Name], Term, Term)] -> [([Name], Term, Term)] -> [([Name], Term, Term)] -> Type -> Context -> ContextSource
simplifyCasedef :: Name -> Context -> ContextSource
lookupNames :: Name -> Context -> [Name]Source
lookupDefAcc :: Name -> Bool -> Context -> [(Def, Accessibility)]Source
lookupTotal :: Name -> Context -> [Totality]Source
isDConName :: Name -> Context -> BoolSource
isTConName :: Name -> Context -> BoolSource