Translate the clause patterns to terms with free variables bound by the clause telescope.
Precondition: no projection patterns.
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
ModuleAgda-2.7.0.1Haskell2010
Translate the clause patterns to terms with free variables bound by the clause telescope.
Precondition: no projection patterns.
Translate the clause patterns to an elimination spine with free variables bound by the clause telescope.
FunArity ClauseDefined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternGet the number of initial Apply patterns in a clause.
IsProjP p => FunArity [p]Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternGet the number of initial Apply patterns.
FunArity [Clause]Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternGet the number of common initial Apply patterns in a list of clauses.
Label the pattern variables from left to right using one label for each variable pattern and one for each dot pattern.
type family PatVarLabel blabelPatVars :: a -> State [PatVarLabel b] bunlabelPatVars :: b -> aIntended, but unpractical due to the absence of type-level lambda, is:
labelPatVars :: f (Pattern' x) -> State [i] (f (Pattern' (i,x)))
LabelPatVars Pattern DeBruijnPatternDefined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternLabelPatVars a b => LabelPatVars (Arg a) (Arg b)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternLabelPatVars a b => LabelPatVars [a] [b]Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternLabelPatVars a b => LabelPatVars (Named x a) (Named x b)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternAugment pattern variables with their de Bruijn index.
Computes the permutation from the clause telescope to the pattern variables.
Use as fromMaybe IMPOSSIBLE . dbPatPerm to crash
in a controlled way if a de Bruijn index is out of scope here.
The first argument controls whether dot patterns counts as variables or not.
Computes the permutation from the clause telescope to the pattern variables.
Use as fromMaybe IMPOSSIBLE . clausePerm to crash
in a controlled way if a de Bruijn index is out of scope here.
Turn a pattern into a term. Projection patterns are turned into projection eliminations, other patterns into apply elimination.
mapNamedArgPattern :: (NamedArg (Pattern' a) -> NamedArg (Pattern' a)) -> p -> pMapNamedArgPattern a (NamedArg (Pattern' a))Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternModify the content of VarP, and the closest surrounding NamedArg.
Note: the mapNamedArg for Pattern' is not expressible simply
by fmap or traverse etc., since ConP has NamedArg subpatterns,
which are taken into account by mapNamedArg.
MapNamedArgPattern a p => MapNamedArgPattern a [p]Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternGeneric pattern traversal.
Pre-applies a pattern modification, recurses, and post-applies another one.
foldrPattern :: Monoid m => (Pattern' a -> m -> m) -> b -> mFold pattern.
traversePatternM :: Monad m => (Pattern' a -> m (Pattern' a)) -> (Pattern' a -> m (Pattern' a)) -> b -> m bTraverse pattern.
PatternLike a (Pattern' a)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternPatternLike a b => PatternLike a (Arg b)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternPatternLike a b => PatternLike a [b]Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternPatternLike a b => PatternLike a (Named x b)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternCompute from each subpattern a value and collect them all in a monoid.
preTraversePatternM :: (PatternLike a b, Monad m)=> (Pattern' a -> m (Pattern' a))pre: Modification before recursion.
-> b-> m bTraverse pattern(s) with a modification before the recursive descent.
postTraversePatternM :: (PatternLike a b, Monad m)=> (Pattern' a -> m (Pattern' a))post: Modification after recursion.
-> b-> m bTraverse pattern(s) with a modification after the recursive descent.
countPatternVars :: a -> IntCountPatternVars (Pattern' x)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternCountPatternVars a => CountPatternVars (Arg a)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternCountPatternVars a => CountPatternVars [a]Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternCountPatternVars a => CountPatternVars (Named x a)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.Patterntype family PatVar ppatternVarModalities :: p -> [(PatVar p, Modality)]Get the list of pattern variables annotated with modalities.
PatternVarModalities (Pattern' x)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternPatternVarModalities a => PatternVarModalities (Arg a)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternPatternVarModalities a => PatternVarModalities [a]Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.PatternPatternVarModalities a => PatternVarModalities (Named s a)Defined in Agda-2.7.0.1 · Agda.Syntax.Internal.Pattern