ModuleAgda-2.7.0.1Haskell2010
Agda.TypeChecking.Rules.Def
- 2 types
- 22 values
- PackageAgda-2.7.0.1
- Exports24
- LanguageHaskell2010
- LicenceMIT
- SourceDef.hs
Definitions by pattern matching
14 declarationsA single clause without arguments and without type signature is an alias.
Check a trivial definition of the form f = e
checkFunDef' :: Typethe type we expect the function to have
-> ArgInfois it irrelevant (for instance)
-> Maybe ExtLamInfodoes the definition come from an extended lambda (if so, we need to know some stuff about lambda-lifted args)
-> Maybe QNameis it a with function (if so, what's the name of the parent function)
-> DefInforange info
-> QNamethe name of the function
-> [Clause]the clauses to check
-> TCM ()
Type check a definition by pattern matching.
checkFunDefS :: Typethe type we expect the function to have
-> ArgInfois it irrelevant (for instance)
-> Maybe ExtLamInfodoes the definition come from an extended lambda (if so, we need to know some stuff about lambda-lifted args)
-> Maybe QNameis it a with function (if so, what's the name of the parent function)
-> DefInforange info
-> QNamethe name of the function
-> Maybe (Substitution, Map Name LetBinding)substitution (from with abstraction) that needs to be applied to module parameters, and let-bindings inherited from parent clause
-> [Clause]the clauses to check
-> TCM ()
Type check a definition by pattern matching.
Set funTerminates according to termination info in TCEnv, which comes from a possible termination pragma.
Modify all the LHSCore of the given RHS.
(Used to insert patterns for rewrite or the inspect idiom)
Insert some names into the with-clauses LHS of the given RHS. (Used for the inspect idiom)
Insert some with-patterns into the with-clauses LHS of the given RHS.
(Used for rewrite)
Insert with-patterns before the trailing with patterns. If there are none, append the with-patterns.
Parameters for creating a with-function.
Constructors
NoWithFunctionWithFunctionwfParentName :: QNameParent function name.
wfName :: QNameWith function name.
wfParentType :: TypeType of the parent function.
wfParentTel :: TelescopeContext of the parent patterns.
wfBeforeTel :: TelescopeTypes of arguments to the with function before the with expressions (needed vars).
wfAfterTel :: TelescopeTypes of arguments to the with function after the with expressions (unneeded vars).
wfExprs :: [Arg (Term, EqualityView)]With and rewrite expressions and their types.
wfRHSType :: TypeType of the right hand side.
wfParentPats :: [NamedArg DeBruijnPattern]Parent patterns.
wfParentParams :: NatNumber of module parameters in parent patterns
wfPermSplit :: PermutationPermutation resulting from splitting the telescope into needed and unneeded vars.
wfPermParent :: PermutationPermutation reordering the variables in the parent pattern.
wfPermFinal :: PermutationFinal permutation (including permutation for the parent clause).
wfClauses :: List1 ClauseThe given clauses for the with function
wfCallSubst :: SubstitutionSubtsitution to generate call for the parent.
wfLetBindings :: Map Name LetBindingThe let-bindings in scope of the parent (in the parent context)
Info that is needed after all clauses have been processed.
10 declarationsConstructors
CPCcpcPartialSplits :: IntSetWhich argument indexes have a partial split.
Instances2Semigroup, Monoid
Semigroup ClausesPostChecksDefined in Agda-2.7.0.1 · Agda.TypeChecking.Rules.DefMonoid ClausesPostChecksDefined in Agda-2.7.0.1 · Agda.TypeChecking.Rules.Def
The LHS part of checkClause.
checkClause :: TypeType of function defined by this clause.
-> Maybe (Substitution, Map Name LetBinding)Module parameter substitution arising from with-abstraction, and inherited let-bindings.
-> SpineClauseClause.
-> TCM (Clause, ClausesPostChecks)Type-checked clause
Type check a function clause.
Generate the abstract pattern corresponding to Refl
checkRHS Type check the with and rewrite lhss and/or the rhs.
checkWithRHS Invoked in empty context.
Type check a where clause.
Enter a new section during type-checking.
Set the current clause number.