| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Agda.Syntax.Internal
Synopsis
- class TermSize a where
- class IsProjElim e where
- class Suggest a b where
- class SgTel a where
- class TelToArgs a where
- type ListTel = ListTel' ArgName
- type ListTel' a = [Dom (a, Type)]
- data EqualityView
- type PatternSubstitution = Substitution' DeBruijnPattern
- type Substitution = Substitution' Term
- data Substitution' a
- = IdS
- | EmptyS Empty
- | a :# (Substitution' a)
- | Strengthen Empty (Substitution' a)
- | Wk !Int (Substitution' a)
- | Lift !Int (Substitution' a)
- class PatternVars a b | b -> a where
- data ConPatternInfo = ConPatternInfo {}
- type DeBruijnPattern = Pattern' DBPatVar
- data DBPatVar = DBPatVar {}
- type Pattern = Pattern' PatVarName
- data Pattern' x
- data PatOrigin
- = PatOSystem
- | PatOSplit
- | PatOVar Name
- | PatODot
- | PatOWild
- | PatOCon
- | PatORec
- | PatOLit
- | PatOAbsurd
- type PatVarName = ArgName
- data Clause = Clause {}
- type Blocked_ = Blocked ()
- data Blocked t
- = Blocked {
- theBlockingMeta :: MetaId
- ignoreBlocking :: t
- | NotBlocked { }
- = Blocked {
- data NotBlocked
- data LevelAtom
- data PlusLevel
- newtype Level = Max [PlusLevel]
- data Sort
- type Telescope = Tele (Dom Type)
- data Tele a
- class LensSort a where
- type Type = Type' Term
- data Type' a = El {}
- data Abs a
- type ArgName = String
- type Elims = [Elim]
- type Elim = Elim' Term
- data Elim' a
- = Apply (Arg a)
- | Proj ProjOrigin QName
- type ConInfo = ConOrigin
- data Term
- class LensConName a where
- data ConHead = ConHead {}
- type NamedArgs = [NamedArg Term]
- type Args = [Arg Term]
- argNameToString :: ArgName -> String
- stringToArgName :: String -> ArgName
- appendArgNames :: ArgName -> ArgName -> ArgName
- nameToArgName :: Name -> ArgName
- stuckOn :: Elim -> NotBlocked -> NotBlocked
- clausePats :: Clause -> [Arg DeBruijnPattern]
- patVarNameToString :: PatVarName -> String
- nameToPatVarName :: Name -> PatVarName
- varP :: a -> Pattern' a
- dotP :: Term -> Pattern' a
- namedVarP :: PatVarName -> Named_ Pattern
- namedDBVarP :: Int -> PatVarName -> Named_ DeBruijnPattern
- noConPatternInfo :: ConPatternInfo
- toConPatternInfo :: ConInfo -> ConPatternInfo
- fromConPatternInfo :: ConPatternInfo -> ConInfo
- patternOrigin :: Pattern' x -> Maybe PatOrigin
- properlyMatching :: DeBruijnPattern -> Bool
- isEqualityType :: EqualityView -> Bool
- absurdBody :: Abs Term
- isAbsurdBody :: Abs Term -> Bool
- absurdPatternName :: PatVarName
- isAbsurdPatternName :: PatVarName -> Bool
- var :: Nat -> Term
- dontCare :: Term -> Term
- typeDontCare :: Type
- topSort :: Type
- sort :: Sort -> Type
- varSort :: Int -> Sort
- levelSuc :: Level -> Level
- mkType :: Integer -> Sort
- isSort :: Term -> Maybe Sort
- impossibleTerm :: String -> Int -> Term
- hackReifyToMeta :: Term
- isHackReifyToMeta :: Term -> Bool
- mapAbsNamesM :: Applicative m => (ArgName -> m ArgName) -> Tele a -> m (Tele a)
- mapAbsNames :: (ArgName -> ArgName) -> Tele a -> Tele a
- replaceEmptyName :: ArgName -> Tele a -> Tele a
- telFromList' :: (a -> ArgName) -> ListTel' a -> Telescope
- telFromList :: ListTel -> Telescope
- telToList :: Telescope -> ListTel
- blockingMeta :: Blocked t -> Maybe MetaId
- blocked :: MetaId -> a -> Blocked a
- notBlocked :: a -> Blocked a
- stripDontCare :: Term -> Term
- arity :: Type -> Nat
- notInScopeName :: ArgName -> ArgName
- unNotInScopeName :: ArgName -> ArgName
- unSpine :: Term -> Term
- unSpine' :: (ProjOrigin -> Bool) -> Term -> Term
- hasElims :: Term -> Maybe (Elims -> Term, Elims)
- argFromElim :: Elim' a -> Arg a
- isApplyElim :: Elim' a -> Maybe (Arg a)
- isApplyElim' :: Empty -> Elim' a -> Arg a
- allApplyElims :: [Elim' a] -> Maybe [Arg a]
- splitApplyElims :: [Elim' a] -> ([Arg a], [Elim' a])
- dropProjElims :: IsProjElim e => [e] -> [e]
- argsFromElims :: Elims -> Args
- allProjElims :: Elims -> Maybe [(ProjOrigin, QName)]
- pDom :: LensHiding a => a -> Doc -> Doc
- module Agda.Syntax.Abstract.Name
- newtype MetaId = MetaId {}
Documentation
The size of a term is roughly the number of nodes in its syntax tree. This number need not be precise for logical correctness of Agda, it is only used for reporting (and maybe decisions regarding performance).
Not counting towards the term size are:
- sort and color annotations,
- projections.
Minimal complete definition
class IsProjElim e where #
Minimal complete definition
Methods
isProjElim :: e -> Maybe (ProjOrigin, QName) #
Instances
| IsProjElim Elim # | |
Defined in Agda.Syntax.Internal Methods isProjElim :: Elim -> Maybe (ProjOrigin, QName) # | |
| IsProjElim e => IsProjElim (MaybeReduced e) # | |
Defined in Agda.TypeChecking.Monad.Base Methods isProjElim :: MaybeReduced e -> Maybe (ProjOrigin, QName) # | |
Pick the better name suggestion, i.e., the one that is not just underscore.
Minimal complete definition
Constructing a singleton telescope.
Minimal complete definition
Drop the types from a telescope.
Minimal complete definition
data EqualityView #
View type as equality type.
Constructors
| EqualityType | |
| OtherType Type | reduced |
Instances
type Substitution = Substitution' Term #
data Substitution' a #
Substitutions.
Constructors
| IdS | Identity substitution.
|
| EmptyS Empty | Empty substitution, lifts from the empty context. First argument is |
| a :# (Substitution' a) infixr 4 | Substitution extension, ` |
| Strengthen Empty (Substitution' a) | Strengthening substitution. First argument is |
| Wk !Int (Substitution' a) | Weakning substitution, lifts to an extended context.
|
| Lift !Int (Substitution' a) | Lifting substitution. Use this to go under a binder.
|
Instances
class PatternVars a b | b -> a where #
Extract pattern variables in left-to-right order.
A DotP is also treated as variable (see docu for Clause).
Minimal complete definition
Methods
patternVars :: b -> [Arg (Either a Term)] #
Instances
| PatternVars a b => PatternVars a [b] # | |
Defined in Agda.Syntax.Internal Methods patternVars :: [b] -> [Arg (Either a Term)] # | |
| PatternVars a (NamedArg (Pattern' a)) # | |
Defined in Agda.Syntax.Internal | |
| PatternVars a (Arg (Pattern' a)) # | |
Defined in Agda.Syntax.Internal | |
data ConPatternInfo #
The ConPatternInfo states whether the constructor belongs to
a record type (Just) or data type (Nothing).
In the former case, the PatOrigin says whether the record pattern
orginates from the expansion of an implicit pattern.
The Type is the type of the whole record pattern.
The scope used for the type is given by any outer scope
plus the clause's telescope (clauseTel).
Constructors
| ConPatternInfo | |
Fields
| |
Instances
type DeBruijnPattern = Pattern' DBPatVar #
Type used when numbering pattern variables.
Constructors
| DBPatVar | |
Fields | |
Instances
Arguments
| = Pattern' PatVarName | The |
Patterns are variables, constructors, or wildcards.
QName is used in ConP rather than Name since
a constructor might come from a particular namespace.
This also meshes well with the fact that values (i.e.
the arguments we are matching with) use QName.
Constructors
| VarP PatOrigin x | x |
| DotP PatOrigin Term | .t |
| ConP ConHead ConPatternInfo [NamedArg (Pattern' x)] |
|
| LitP Literal | E.g. |
| ProjP ProjOrigin QName | Projection copattern. Can only appear by itself. |
Instances
Origin of the pattern: what did the user write in this position?
Constructors
| PatOSystem | Pattern inserted by the system |
| PatOSplit | Pattern generated by case split |
| PatOVar Name | User wrote a variable pattern |
| PatODot | User wrote a dot pattern |
| PatOWild | User wrote a wildcard pattern |
| PatOCon | User wrote a constructor pattern |
| PatORec | User wrote a record pattern |
| PatOLit | User wrote a literal pattern |
| PatOAbsurd | User wrote an absurd pattern |
Instances
| Eq PatOrigin # | |
| Data PatOrigin # | |
Defined in Agda.Syntax.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PatOrigin -> c PatOrigin # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PatOrigin # toConstr :: PatOrigin -> Constr # dataTypeOf :: PatOrigin -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PatOrigin) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PatOrigin) # gmapT :: (forall b. Data b => b -> b) -> PatOrigin -> PatOrigin # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PatOrigin -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PatOrigin -> r # gmapQ :: (forall d. Data d => d -> u) -> PatOrigin -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PatOrigin -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin # | |
| Show PatOrigin # | |
| KillRange PatOrigin # | |
Defined in Agda.Syntax.Internal Methods | |
| EmbPrj PatOrigin # | |
type PatVarName = ArgName #
Pattern variables.
A clause is a list of patterns and the clause body.
The telescope contains the types of the pattern variables and the de Bruijn indices say how to get from the order the variables occur in the patterns to the order they occur in the telescope. The body binds the variables in the order they appear in the telescope.
clauseTel ~ permute clausePerm (patternVars namedClausePats)
Terms in dot patterns are valid in the clause telescope.
For the purpose of the permutation and the body dot patterns count as variables. TODO: Change this!
Constructors
| Clause | |
Fields
| |
Instances
Something where a meta variable may block reduction.
Constructors
| Blocked | |
Fields
| |
| NotBlocked | |
Fields
| |
Instances
data NotBlocked #
Even if we are not stuck on a meta during reduction we can fail to reduce a definition by pattern matching for another reason.
Constructors
| StuckOn Elim | The |
| Underapplied | Not enough arguments were supplied to complete the matching. |
| AbsurdMatch | We matched an absurd clause, results in a neutral |
| MissingClauses | We ran out of clauses, all considered clauses produced an actual mismatch. This can happen when try to reduce a function application but we are still missing some function clauses. See Agda.TypeChecking.Patterns.Match. |
| ReallyNotBlocked | Reduction was not blocked, we reached a whnf
which can be anything but a stuck |
Instances
| Eq NotBlocked # | |
Defined in Agda.TypeChecking.Substitute | |
| Data NotBlocked # | |
Defined in Agda.Syntax.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NotBlocked -> c NotBlocked # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NotBlocked # toConstr :: NotBlocked -> Constr # dataTypeOf :: NotBlocked -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NotBlocked) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NotBlocked) # gmapT :: (forall b. Data b => b -> b) -> NotBlocked -> NotBlocked # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NotBlocked -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NotBlocked -> r # gmapQ :: (forall d. Data d => d -> u) -> NotBlocked -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NotBlocked -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked # | |
| Show NotBlocked # | |
Defined in Agda.Syntax.Internal Methods showsPrec :: Int -> NotBlocked -> ShowS # show :: NotBlocked -> String # showList :: [NotBlocked] -> ShowS # | |
| Semigroup NotBlocked # |
|
Defined in Agda.Syntax.Internal Methods (<>) :: NotBlocked -> NotBlocked -> NotBlocked # sconcat :: NonEmpty NotBlocked -> NotBlocked # stimes :: Integral b => b -> NotBlocked -> NotBlocked # | |
| Monoid NotBlocked # | |
Defined in Agda.Syntax.Internal Methods mempty :: NotBlocked # mappend :: NotBlocked -> NotBlocked -> NotBlocked # mconcat :: [NotBlocked] -> NotBlocked # | |
An atomic term of type Level.
Constructors
| MetaLevel MetaId Elims | A meta variable targeting |
| BlockedLevel MetaId Term | A term of type |
| NeutralLevel NotBlocked Term | A neutral term of type |
| UnreducedLevel Term | Introduced by |
Instances
Constructors
| ClosedLevel Integer |
|
| Plus Integer LevelAtom |
|
Instances
A level is a maximum expression of 0..n PlusLevel expressions
each of which is a number or an atom plus a number.
The empty maximum is the canonical representation for level 0.
Instances
Sorts.
Constructors
| Type Level |
|
| Prop | Dummy sort. |
| Inf |
|
| SizeUniv |
|
| PiSort Sort (Abs Sort) | Sort of the pi type. |
| UnivSort Sort | Sort of another sort. |
| MetaS !MetaId Elims |
Instances
Sequence of types. An argument of the first type is bound in later types and so on.
Instances
| Functor Tele # | |
| Foldable Tele # | |
Defined in Agda.Syntax.Internal Methods fold :: Monoid m => Tele m -> m # foldMap :: Monoid m => (a -> m) -> Tele a -> m # foldr :: (a -> b -> b) -> b -> Tele a -> b # foldr' :: (a -> b -> b) -> b -> Tele a -> b # foldl :: (b -> a -> b) -> b -> Tele a -> b # foldl' :: (b -> a -> b) -> b -> Tele a -> b # foldr1 :: (a -> a -> a) -> Tele a -> a # foldl1 :: (a -> a -> a) -> Tele a -> a # elem :: Eq a => a -> Tele a -> Bool # maximum :: Ord a => Tele a -> a # | |
| Traversable Tele # | |
| TelToArgs Telescope # | |
| Abstract Telescope # | |
| TeleNoAbs Telescope # | |
| PrettyTCM Telescope # | |
| DropArgs Telescope # | NOTE: This creates telescopes with unbound de Bruijn indices. |
| AddContext Telescope # | |
Defined in Agda.TypeChecking.Monad.Context Methods addContext :: (MonadTCM tcm, MonadDebug tcm) => Telescope -> tcm a -> tcm a # contextSize :: Telescope -> Nat # | |
| Reduce Telescope # | |
| Instantiate Telescope # | |
Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Telescope -> ReduceM Telescope # | |
| Reify Telescope Telescope # | |
Defined in Agda.Syntax.Translation.InternalToAbstract | |
| Subst t a => Subst t (Tele a) # | |
Defined in Agda.TypeChecking.Substitute Methods applySubst :: Substitution' t -> Tele a -> Tele a # | |
| (Subst t a, Eq a) => Eq (Tele a) # | |
| Data a => Data (Tele a) # | |
Defined in Agda.Syntax.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tele a -> c (Tele a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Tele a) # toConstr :: Tele a -> Constr # dataTypeOf :: Tele a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Tele a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tele a)) # gmapT :: (forall b. Data b => b -> b) -> Tele a -> Tele a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tele a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tele a -> r # gmapQ :: (forall d. Data d => d -> u) -> Tele a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Tele a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tele a -> m (Tele a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tele a -> m (Tele a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tele a -> m (Tele a) # | |
| (Subst t a, Ord a) => Ord (Tele a) # | |
| Show a => Show (Tele a) # | |
| Null (Tele a) # | |
| Pretty a => Pretty (Tele (Dom a)) # | |
| Sized (Tele a) # | The size of a telescope is its length (as a list). |
Defined in Agda.Syntax.Internal | |
| KillRange a => KillRange (Tele a) # | |
Defined in Agda.Syntax.Internal Methods killRange :: KillRangeT (Tele a) # | |
| Free a => Free (Tele a) # | |
| Subst Term a => Apply (Tele a) # | |
| Free a => Free (Tele a) # | |
Defined in Agda.TypeChecking.Free.Old | |
| EmbPrj a => EmbPrj (Tele a) # | |
| NamesIn a => NamesIn (Tele a) # | |
| AddContext (KeepNames Telescope) # | |
Defined in Agda.TypeChecking.Monad.Context Methods addContext :: (MonadTCM tcm, MonadDebug tcm) => KeepNames Telescope -> tcm a -> tcm a # contextSize :: KeepNames Telescope -> Nat # | |
| MentionsMeta a => MentionsMeta (Tele a) # | |
Defined in Agda.TypeChecking.MetaVars.Mention Methods mentionsMeta :: MetaId -> Tele a -> Bool # | |
| (Subst t a, InstantiateFull a) => InstantiateFull (Tele a) # | |
Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Tele a -> ReduceM (Tele a) # | |
| (Subst t a, Normalise a) => Normalise (Tele a) # | |
Defined in Agda.TypeChecking.Reduce Methods normalise' :: Tele a -> ReduceM (Tele a) # | |
| (Subst t a, Simplify a) => Simplify (Tele a) # | |
| ComputeOccurrences a => ComputeOccurrences (Tele a) # | |
Defined in Agda.TypeChecking.Positivity Methods occurrences :: Tele a -> OccM OccurrencesBuilder # | |
Minimal complete definition
Types are terms with a sort annotation.
Instances
Binder.
Abs: The bound variable might appear in the body.
NoAbs is pseudo-binder, it does not introduce a fresh variable,
similar to the const of Haskell.
Constructors
| Abs | The body has (at least) one free variable.
Danger: |
| NoAbs | |
Instances
| Functor Abs # | |
| Foldable Abs # | |
Defined in Agda.Syntax.Internal Methods fold :: Monoid m => Abs m -> m # foldMap :: Monoid m => (a -> m) -> Abs a -> m # foldr :: (a -> b -> b) -> b -> Abs a -> b # foldr' :: (a -> b -> b) -> b -> Abs a -> b # foldl :: (b -> a -> b) -> b -> Abs a -> b # foldl' :: (b -> a -> b) -> b -> Abs a -> b # foldr1 :: (a -> a -> a) -> Abs a -> a # foldl1 :: (a -> a -> a) -> Abs a -> a # elem :: Eq a => a -> Abs a -> Bool # maximum :: Ord a => Abs a -> a # | |
| Traversable Abs # | |
| Decoration Abs # | |
| Suggest String (Abs b) # | |
| Suggest Name (Abs b) # | |
| Subst t a => Subst t (Abs a) # | |
Defined in Agda.TypeChecking.Substitute Methods applySubst :: Substitution' t -> Abs a -> Abs a # | |
| Conversion MOT a b => Conversion MOT (Abs a) (Abs b) # | |
| (Subst t a, Eq a) => Eq (Abs a) # | Equality of binders relies on weakening which is a special case of renaming which is a special case of substitution. |
| Data a => Data (Abs a) # | |
Defined in Agda.Syntax.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Abs a -> c (Abs a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Abs a) # dataTypeOf :: Abs a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Abs a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Abs a)) # gmapT :: (forall b. Data b => b -> b) -> Abs a -> Abs a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r # gmapQ :: (forall d. Data d => d -> u) -> Abs a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Abs a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Abs a -> m (Abs a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Abs a -> m (Abs a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Abs a -> m (Abs a) # | |
| (Subst t a, Ord a) => Ord (Abs a) # | |
| Show a => Show (Abs a) # | |
| Sized a => Sized (Abs a) # | |
Defined in Agda.Syntax.Internal | |
| KillRange a => KillRange (Abs a) # | |
Defined in Agda.Syntax.Internal Methods killRange :: KillRangeT (Abs a) # | |
| LensSort a => LensSort (Abs a) # | |
| PrecomputeFreeVars a => PrecomputeFreeVars (Abs a) # | |
Defined in Agda.TypeChecking.Free.Precompute Methods precomputeFreeVars :: Abs a -> FV (Abs a) # | |
| Free a => Free (Abs a) # | |
| TermLike a => TermLike (Abs a) # | |
| GetDefs a => GetDefs (Abs a) # | |
Defined in Agda.Syntax.Internal.Defs Methods getDefs :: MonadGetDefs m => Abs a -> m () # | |
| Free a => Free (Abs a) # | |
Defined in Agda.TypeChecking.Free.Old | |
| EmbPrj a => EmbPrj (Abs a) # | |
| NamesIn a => NamesIn (Abs a) # | |
| UnFreezeMeta a => UnFreezeMeta (Abs a) # | |
Defined in Agda.TypeChecking.Monad.MetaVars Methods unfreezeMeta :: Abs a -> TCM () # | |
| IsInstantiatedMeta a => IsInstantiatedMeta (Abs a) # | Does not worry about raising. |
Defined in Agda.TypeChecking.Monad.MetaVars Methods isInstantiatedMeta :: Abs a -> TCM Bool # | |
| MentionsMeta t => MentionsMeta (Abs t) # | |
Defined in Agda.TypeChecking.MetaVars.Mention Methods mentionsMeta :: MetaId -> Abs t -> Bool # | |
| (Subst t a, InstantiateFull a) => InstantiateFull (Abs a) # | |
Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Abs a -> ReduceM (Abs a) # | |
| (Subst t a, Normalise a) => Normalise (Abs a) # | |
Defined in Agda.TypeChecking.Reduce Methods normalise' :: Abs a -> ReduceM (Abs a) # | |
| (Subst t a, Simplify a) => Simplify (Abs a) # | |
| (Subst t a, Reduce a) => Reduce (Abs a) # | |
| Instantiate t => Instantiate (Abs t) # | |
Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Abs t -> ReduceM (Abs t) # | |
| (Subst t a, SynEq a) => SynEq (Abs a) # | |
| HasPolarity a => HasPolarity (Abs a) # | |
Defined in Agda.TypeChecking.Polarity | |
| (Subst t a, UsableRelevance a) => UsableRelevance (Abs a) # | |
| ComputeOccurrences a => ComputeOccurrences (Abs a) # | |
Defined in Agda.TypeChecking.Positivity Methods occurrences :: Abs a -> OccM OccurrencesBuilder # | |
| (Subst t a, FoldRigid a) => FoldRigid (Abs a) # | |
| (Occurs a, Subst t a) => Occurs (Abs a) # | |
Defined in Agda.TypeChecking.MetaVars.Occurs | |
| (Subst Term a, AbsTerm a) => AbsTerm (Abs a) # | |
| Suggest (Abs a) (Abs b) # | |
| (Match a b, Subst t1 a, Subst t2 b) => Match (Abs a) (Abs b) # | |
| PatternFrom a b => PatternFrom (Abs a) (Abs b) # | |
Defined in Agda.TypeChecking.Rewriting.NonLinMatch | |
| (Free i, Reify i a) => Reify (Abs i) (Name, a) # | |
Eliminations, subsuming applications and projections.
Constructors
| Apply (Arg a) | Application. |
| Proj ProjOrigin QName | Projection. |
Instances
Raw values.
Def is used for both defined and undefined constants.
Assume there is a type declaration and a definition for
every constant, even if the definition is an empty
list of clauses.
Constructors
| Var !Int Elims |
|
| Lam ArgInfo (Abs Term) | Terms are beta normal. Relevance is ignored |
| Lit Literal | |
| Def QName Elims |
|
| Con ConHead ConInfo Elims |
|
| Pi (Dom Type) (Abs Type) | dependent or non-dependent function space |
| Sort Sort | |
| Level Level | |
| MetaV !MetaId Elims | |
| DontCare Term | Irrelevant stuff in relevant position, but created
in an irrelevant context. Basically, an internal
version of the irrelevance axiom |
Instances
class LensConName a where #
Minimal complete definition
Methods
getConName :: a -> QName #
setConName :: QName -> a -> a #
mapConName :: (QName -> QName) -> a -> a #
Instances
| LensConName ConHead # | |
Defined in Agda.Syntax.Internal | |
Store the names of the record fields in the constructor. This allows reduction of projection redexes outside of TCM. For instance, during substitution and application.
Constructors
| ConHead | |
Instances
| Eq ConHead # | |
| Data ConHead # | |
Defined in Agda.Syntax.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConHead -> c ConHead # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ConHead # toConstr :: ConHead -> Constr # dataTypeOf :: ConHead -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ConHead) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConHead) # gmapT :: (forall b. Data b => b -> b) -> ConHead -> ConHead # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConHead -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConHead -> r # gmapQ :: (forall d. Data d => d -> u) -> ConHead -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConHead -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConHead -> m ConHead # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConHead -> m ConHead # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConHead -> m ConHead # | |
| Ord ConHead # | |
Defined in Agda.Syntax.Internal | |
| Show ConHead # | |
| Pretty ConHead # | |
Defined in Agda.Syntax.Internal | |
| KillRange ConHead # | |
Defined in Agda.Syntax.Internal Methods | |
| SetRange ConHead # | |
| HasRange ConHead # | |
Defined in Agda.Syntax.Internal | |
| LensConName ConHead # | |
Defined in Agda.Syntax.Internal | |
| EmbPrj ConHead # | |
| PrettyTCM ConHead # | |
| NamesIn ConHead # | |
| InstantiateFull ConHead # | |
Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: ConHead -> ReduceM ConHead # | |
argNameToString :: ArgName -> String #
stringToArgName :: String -> ArgName #
appendArgNames :: ArgName -> ArgName -> ArgName #
nameToArgName :: Name -> ArgName #
stuckOn :: Elim -> NotBlocked -> NotBlocked #
When trying to reduce f es, on match failed on one
elimination e ∈ es that came with info r :: NotBlocked.
stuckOn e r produces the new NotBlocked info.
MissingClauses must be propagated, as this is blockage
that can be lifted in the future (as more clauses are added).
is also propagated, since it provides more
precise information as StuckOn e0StuckOn e (as e0 is the original
reason why reduction got stuck and usually a subterm of e).
An information like StuckOn (Apply (Arg info (Var i [])))
(stuck on a variable) could be used by the lhs/coverage checker
to trigger a split on that (pattern) variable.
In the remaining cases for r, we are terminally stuck
due to StuckOn e. Propagating does not
seem useful.AbsurdMatch
Underapplied must not be propagated, as this would mean
that f es is underapplied, which is not the case (it is stuck).
Note that Underapplied can only arise when projection patterns were
missing to complete the original match (in e).
(Missing ordinary pattern would mean the e is of function type,
but we cannot match against something of function type.)
clausePats :: Clause -> [Arg DeBruijnPattern] #
patVarNameToString :: PatVarName -> String #
nameToPatVarName :: Name -> PatVarName #
namedVarP :: PatVarName -> Named_ Pattern #
namedDBVarP :: Int -> PatVarName -> Named_ DeBruijnPattern #
toConPatternInfo :: ConInfo -> ConPatternInfo #
Build partial ConPatternInfo from ConInfo
fromConPatternInfo :: ConPatternInfo -> ConInfo #
Build ConInfo from ConPatternInfo.
patternOrigin :: Pattern' x -> Maybe PatOrigin #
Retrieve the origin of a pattern
properlyMatching :: DeBruijnPattern -> Bool #
Does the pattern perform a match that could fail?
isEqualityType :: EqualityView -> Bool #
absurdBody :: Abs Term #
Absurd lambdas are internally represented as identity with variable name "()".
isAbsurdBody :: Abs Term -> Bool #
isAbsurdPatternName :: PatVarName -> Bool #
typeDontCare :: Type #
A dummy type.
impossibleTerm :: String -> Int -> Term #
hackReifyToMeta :: Term #
isHackReifyToMeta :: Term -> Bool #
mapAbsNamesM :: Applicative m => (ArgName -> m ArgName) -> Tele a -> m (Tele a) #
A traversal for the names in a telescope.
replaceEmptyName :: ArgName -> Tele a -> Tele a #
telFromList' :: (a -> ArgName) -> ListTel' a -> Telescope #
telFromList :: ListTel -> Telescope #
Convert a list telescope to a telescope.
blockingMeta :: Blocked t -> Maybe MetaId #
notBlocked :: a -> Blocked a #
stripDontCare :: Term -> Term #
Removing a topmost DontCare constructor.
notInScopeName :: ArgName -> ArgName #
Make a name that is not in scope.
unNotInScopeName :: ArgName -> ArgName #
Remove the dot from a notInScopeName. This is used when printing function types that have abstracted over not-in-scope names.
unSpine' :: (ProjOrigin -> Bool) -> Term -> Term #
Convert Proj projection eliminations
according to their ProjOrigin into
Def projection applications.
hasElims :: Term -> Maybe (Elims -> Term, Elims) #
A view distinguishing the neutrals Var, Def, and MetaV which
can be projected.
argFromElim :: Elim' a -> Arg a #
Drop Apply constructor. (Unsafe!)
isApplyElim' :: Empty -> Elim' a -> Arg a #
dropProjElims :: IsProjElim e => [e] -> [e] #
Discard Proj f entries.
argsFromElims :: Elims -> Args #
Discards Proj f entries.
allProjElims :: Elims -> Maybe [(ProjOrigin, QName)] #
Drop Proj constructors. (Safe)
pDom :: LensHiding a => a -> Doc -> Doc #
module Agda.Syntax.Abstract.Name
A meta variable identifier is just a natural number.