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

Safe HaskellNone

Agda.TypeChecking.Reduce

Contents

Synopsis

Documentation

reduce :: Reduce a => a -> TCM aSource

reduceB :: Reduce a => a -> TCM (Blocked a)Source

simplify :: Simplify a => a -> TCM aSource

class Instantiate t whereSource

Instantiate something. Results in an open meta variable or a non meta. Doesn't do any reduction, and preserves blocking tags (when blocking meta is uninstantiated).

Methods

instantiate' :: t -> ReduceM tSource

Reduction to weak head normal form.

ifBlocked :: MonadTCM tcm => Term -> (MetaId -> Term -> tcm a) -> (Term -> tcm a) -> tcm aSource

ifBlockedType :: MonadTCM tcm => Type -> (MetaId -> Type -> tcm a) -> (Type -> tcm a) -> tcm aSource

class Reduce t whereSource

Methods

reduce' :: t -> ReduceM tSource

reduceB' :: t -> ReduceM (Blocked t)Source

Instances

Reduce LevelAtom 
Reduce PlusLevel 
Reduce Level 
Reduce Sort 
Reduce Telescope 
Reduce Type 
Reduce Elim 
Reduce Term 
Reduce Constraint 
Reduce t => Reduce [t] 
(Subst t, Reduce t) => Reduce (Abs t) 
Reduce t => Reduce (Dom t) 
Reduce t => Reduce (Arg t) 
Reduce a => Reduce (Closure a) 
(Reduce a, Reduce b) => Reduce (a, b) 
(Ord k, Reduce e) => Reduce (Map k e) 
(Reduce a, Reduce b, Reduce c) => Reduce (a, b, c) 

unfoldDefinition :: Bool -> (Term -> ReduceM (Blocked Term)) -> Term -> QName -> Args -> ReduceM (Blocked Term)Source

If the first argument is True, then a single delayed clause may be unfolded.

reduceDefCopy :: QName -> Args -> TCM (Reduced () Term)Source

Reduce a non-primitive definition if it is a copy linking to another def.

reduceDef :: QName -> Args -> TCM (Reduced () Term)Source

Reduce a non-primitive definition once unless it is delayed.

reduceHead :: Term -> TCM (Blocked Term)Source

Reduce simple (single clause) definitions.

appDef_ :: QName -> Term -> [Clause] -> Maybe CompiledClauses -> MaybeReducedArgs -> ReduceM (Reduced (Blocked Term) Term)Source

Apply a definition using the compiled clauses, or fall back to ordinary clauses if no compiled clauses exist.

appDef :: Term -> CompiledClauses -> MaybeReducedArgs -> ReduceM (Reduced (Blocked Term) Term)Source

Apply a defined function to it's arguments, using the compiled clauses. The original term is the first argument applied to the third.

appDef' :: Term -> [Clause] -> MaybeReducedArgs -> ReduceM (Reduced (Blocked Term) Term)Source

Apply a defined function to it's arguments, using the original clauses.

Simplification

class Simplify t whereSource

Only unfold definitions if this leads to simplification which means that a constructor/literal pattern is matched.

Methods

simplify' :: t -> ReduceM tSource

Normalisation

Full instantiation

class InstantiateFull t whereSource

instantiateFull' instantiates metas everywhere (and recursively) but does not reduce.

Instances

InstantiateFull Bool 
InstantiateFull Char 
InstantiateFull ModuleName 
InstantiateFull QName 
InstantiateFull Name 
InstantiateFull Scope 
InstantiateFull Pattern 
InstantiateFull ClauseBody 
InstantiateFull Clause 
InstantiateFull LevelAtom 
InstantiateFull PlusLevel 
InstantiateFull Level 
InstantiateFull Sort 
InstantiateFull Type 
InstantiateFull Elim 
InstantiateFull Term 
InstantiateFull CompiledClauses 
InstantiateFull FunctionInverse 
InstantiateFull Defn 
InstantiateFull Definition 
InstantiateFull RewriteRule 
InstantiateFull DisplayTerm 
InstantiateFull DisplayForm 
InstantiateFull Section 
InstantiateFull Signature 
InstantiateFull Constraint 
InstantiateFull ProblemConstraint 
InstantiateFull Interface 
InstantiateFull t => InstantiateFull [t] 
InstantiateFull a => InstantiateFull (Maybe a) 
(Subst a, InstantiateFull a) => InstantiateFull (Tele a) 
(Subst t, InstantiateFull t) => InstantiateFull (Abs t) 
InstantiateFull t => InstantiateFull (Dom t) 
InstantiateFull t => InstantiateFull (Arg t) 
InstantiateFull a => InstantiateFull (Case a) 
InstantiateFull a => InstantiateFull (WithArity a) 
InstantiateFull a => InstantiateFull (Builtin a) 
InstantiateFull a => InstantiateFull (Open a) 
InstantiateFull a => InstantiateFull (Closure a) 
(InstantiateFull a, InstantiateFull b) => InstantiateFull (a, b) 
(Eq k, Hashable k, InstantiateFull e) => InstantiateFull (HashMap k e) 
(Ord k, InstantiateFull e) => InstantiateFull (Map k e) 
InstantiateFull t => InstantiateFull (Named name t) 
(InstantiateFull a, InstantiateFull b, InstantiateFull c) => InstantiateFull (a, b, c)