Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class TermSize a where
- class IsProjElim e where
- isProjElim :: e -> Maybe (ProjOrigin, QName)
- data Suggestion = forall a.Suggest a => Suggestion a
- class Suggest a where
- suggestName :: a -> Maybe String
- class SgTel a where
- class TelToArgs a where
- type ListTel = ListTel' ArgName
- type ListTel' a = [Dom (a, Type)]
- data IntervalView
- data PathView
- 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
- patternVars :: b -> [Arg (Either a Term)]
- data ConPatternInfo = ConPatternInfo {
- conPInfo :: PatternInfo
- conPRecord :: Bool
- conPFallThrough :: Bool
- conPType :: Maybe (Arg Type)
- conPLazy :: Bool
- type DeBruijnPattern = Pattern' DBPatVar
- data DBPatVar = DBPatVar {}
- type Pattern = Pattern' PatVarName
- data Pattern' x
- = VarP PatternInfo x
- | DotP PatternInfo Term
- | ConP ConHead ConPatternInfo [NamedArg (Pattern' x)]
- | LitP PatternInfo Literal
- | ProjP ProjOrigin QName
- | IApplyP PatternInfo Term Term x
- | DefP PatternInfo QName [NamedArg (Pattern' x)]
- data PatOrigin
- = PatOSystem
- | PatOSplit
- | PatOVar Name
- | PatODot
- | PatOWild
- | PatOCon
- | PatORec
- | PatOLit
- | PatOAbsurd
- data PatternInfo = PatternInfo {
- patOrigin :: PatOrigin
- patAsNames :: [Name]
- type PatVarName = ArgName
- data Clause = Clause {}
- type NAPs = [NamedArg DeBruijnPattern]
- type Blocked_ = Blocked ()
- data Blocked t
- = Blocked {
- theBlockingMeta :: MetaId
- ignoreBlocking :: t
- | NotBlocked { }
- = Blocked {
- data NotBlocked
- newtype BraveTerm = BraveTerm {}
- type LevelAtom = LevelAtom' Term
- data LevelAtom' t
- = MetaLevel MetaId [Elim' t]
- | BlockedLevel MetaId t
- | NeutralLevel NotBlocked t
- | UnreducedLevel t
- type PlusLevel = PlusLevel' Term
- data PlusLevel' t = Plus Integer (LevelAtom' t)
- type Level = Level' Term
- data Level' t = Max Integer [PlusLevel' t]
- type Sort = Sort' Term
- data Sort' t
- type Telescope = Tele (Dom Type)
- data Tele a
- class LensSort a where
- type Type = Type' Term
- type Type' a = Type'' Term a
- data Type'' t a = El {}
- data Abs a
- type Elims = [Elim]
- type Elim = Elim' Term
- data Elim' a
- type ConInfo = ConOrigin
- data Term
- class LensConName a where
- getConName :: a -> QName
- setConName :: QName -> a -> a
- mapConName :: (QName -> QName) -> a -> a
- data ConHead = ConHead {}
- type NamedArgs = [NamedArg Term]
- type Args = [Arg Term]
- type Dom = Dom' Term
- data Dom' t e = Dom {}
- pattern ClosedLevel :: Integer -> Level
- argFromDom :: Dom' t a -> Arg a
- namedArgFromDom :: Dom' t a -> NamedArg a
- domFromArg :: Arg a -> Dom a
- domFromNamedArg :: NamedArg a -> Dom a
- defaultDom :: a -> Dom a
- defaultArgDom :: ArgInfo -> a -> Dom a
- defaultNamedArgDom :: ArgInfo -> String -> a -> Dom a
- stuckOn :: Elim -> NotBlocked -> NotBlocked
- clausePats :: Clause -> [Arg DeBruijnPattern]
- patVarNameToString :: PatVarName -> String
- nameToPatVarName :: Name -> PatVarName
- defaultPatternInfo :: PatternInfo
- varP :: a -> Pattern' a
- dotP :: Term -> Pattern' a
- litP :: Literal -> Pattern' a
- namedVarP :: PatVarName -> Named_ Pattern
- namedDBVarP :: Int -> PatVarName -> Named_ DeBruijnPattern
- absurdP :: Int -> DeBruijnPattern
- noConPatternInfo :: ConPatternInfo
- toConPatternInfo :: ConInfo -> ConPatternInfo
- fromConPatternInfo :: ConPatternInfo -> ConInfo
- patternInfo :: Pattern' x -> Maybe PatternInfo
- patternOrigin :: Pattern' x -> Maybe PatOrigin
- properlyMatching :: Pattern' a -> Bool
- properlyMatching' :: Bool -> Bool -> Pattern' a -> Bool
- isEqualityType :: EqualityView -> Bool
- isPathType :: PathView -> Bool
- isIOne :: IntervalView -> Bool
- absurdBody :: Abs Term
- isAbsurdBody :: Abs Term -> Bool
- absurdPatternName :: PatVarName
- isAbsurdPatternName :: PatVarName -> Bool
- var :: Nat -> Term
- dontCare :: Term -> Term
- dummyTerm' :: String -> Int -> Term
- dummyLevel' :: String -> Int -> Level
- dummyTerm :: String -> Int -> Term
- __DUMMY_TERM__ :: HasCallStack => Term
- dummyLevel :: String -> Int -> Level
- __DUMMY_LEVEL__ :: HasCallStack => Level
- dummySort :: String -> Int -> Sort
- __DUMMY_SORT__ :: HasCallStack => Sort
- dummyType :: String -> Int -> Type
- __DUMMY_TYPE__ :: HasCallStack => Type
- dummyDom :: String -> Int -> Dom Type
- __DUMMY_DOM__ :: HasCallStack => Dom Type
- atomicLevel :: LevelAtom -> Level
- unreducedLevel :: Term -> Level
- topSort :: Type
- sort :: Sort -> Type
- varSort :: Int -> Sort
- tmSort :: Term -> Sort
- levelPlus :: Integer -> Level -> Level
- levelSuc :: Level -> Level
- mkType :: Integer -> Sort
- mkProp :: Integer -> Sort
- isSort :: Term -> Maybe Sort
- impossibleTerm :: String -> Int -> Term
- 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 :: Tele (Dom t) -> [Dom (ArgName, t)]
- listTel :: Lens' ListTel Telescope
- blockingMeta :: Blocked t -> Maybe MetaId
- blocked :: MetaId -> a -> Blocked a
- notBlocked :: a -> Blocked a
- blocked_ :: MetaId -> Blocked_
- notBlocked_ :: Blocked_
- stripDontCare :: Term -> Term
- arity :: Type -> Nat
- suggests :: [Suggestion] -> String
- unSpine :: Term -> Term
- unSpine' :: (ProjOrigin -> Bool) -> Term -> Term
- hasElims :: Term -> Maybe (Elims -> Term, Elims)
- 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])
- argsFromElims :: Elims -> Args
- allProjElims :: Elims -> Maybe [(ProjOrigin, QName)]
- pDom :: LensHiding a => a -> Doc -> Doc
- prettyPrecLevelSucs :: Int -> Integer -> (Int -> Doc) -> Doc
- module Agda.Syntax.Abstract.Name
- newtype MetaId = MetaId {}
Documentation
class TermSize a where Source #
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.
class IsProjElim e where Source #
isProjElim :: e -> Maybe (ProjOrigin, QName) Source #
Instances
IsProjElim (Elim' a) Source # | |
Defined in Agda.Syntax.Internal isProjElim :: Elim' a -> Maybe (ProjOrigin, QName) Source # | |
IsProjElim e => IsProjElim (MaybeReduced e) Source # | |
Defined in Agda.TypeChecking.Monad.Base isProjElim :: MaybeReduced e -> Maybe (ProjOrigin, QName) Source # |
data Suggestion Source #
forall a.Suggest a => Suggestion a |
class Suggest a where Source #
Suggest a name if available (i.e. name is not "_")
suggestName :: a -> Maybe String Source #
Instances
Suggest String Source # | |
Defined in Agda.Syntax.Internal | |
Suggest Name Source # | |
Defined in Agda.Syntax.Internal | |
Suggest Term Source # | |
Defined in Agda.Syntax.Internal | |
Suggest (Abs b) Source # | |
Defined in Agda.Syntax.Internal |
Constructing a singleton telescope.
data IntervalView Source #
Instances
Show IntervalView Source # | |
Defined in Agda.Syntax.Internal showsPrec :: Int -> IntervalView -> ShowS # show :: IntervalView -> String # showList :: [IntervalView] -> ShowS # |
View type as path type.
data EqualityView Source #
View type as equality type.
EqualityType | |
OtherType Type | reduced |
Instances
type Substitution = Substitution' Term Source #
data Substitution' a Source #
Substitutions.
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) | Weakening 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 Source #
Extract pattern variables in left-to-right order.
A DotP
is also treated as variable (see docu for Clause
).
Instances
PatternVars a b => PatternVars a [b] Source # | |
Defined in Agda.Syntax.Internal | |
PatternVars a (NamedArg (Pattern' a)) Source # | |
Defined in Agda.Syntax.Internal | |
PatternVars a (Arg (Pattern' a)) Source # | |
Defined in Agda.Syntax.Internal |
data ConPatternInfo Source #
The ConPatternInfo
states whether the constructor belongs to
a record type (True
) or data type (False
).
In the former case, the PatOrigin
of the conPInfo
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
).
ConPatternInfo | |
|
Instances
type DeBruijnPattern = Pattern' DBPatVar Source #
Type used when numbering pattern variables.
Instances
= 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
.
VarP PatternInfo x | x |
DotP PatternInfo Term | .t |
ConP ConHead ConPatternInfo [NamedArg (Pattern' x)] |
|
LitP PatternInfo Literal | E.g. |
ProjP ProjOrigin QName | Projection copattern. Can only appear by itself. |
IApplyP PatternInfo Term Term x | Path elimination pattern, like |
DefP PatternInfo QName [NamedArg (Pattern' x)] | Used for HITs, the QName should be the one from primHComp. |
Instances
Origin of the pattern: what did the user write in this position?
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 Source # | |
Data PatOrigin Source # | |
Defined in Agda.Syntax.Internal 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 :: forall r r'. (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 Source # | |
KillRange PatOrigin Source # | |
Defined in Agda.Syntax.Internal | |
EmbPrj PatOrigin Source # | |
data PatternInfo Source #
PatternInfo | |
|
Instances
Eq PatternInfo Source # | |
Defined in Agda.Syntax.Internal (==) :: PatternInfo -> PatternInfo -> Bool # (/=) :: PatternInfo -> PatternInfo -> Bool # | |
Data PatternInfo Source # | |
Defined in Agda.Syntax.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PatternInfo -> c PatternInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PatternInfo # toConstr :: PatternInfo -> Constr # dataTypeOf :: PatternInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PatternInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PatternInfo) # gmapT :: (forall b. Data b => b -> b) -> PatternInfo -> PatternInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PatternInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PatternInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> PatternInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PatternInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo # | |
Show PatternInfo Source # | |
Defined in Agda.Syntax.Internal showsPrec :: Int -> PatternInfo -> ShowS # show :: PatternInfo -> String # showList :: [PatternInfo] -> ShowS # | |
KillRange PatternInfo Source # | |
Defined in Agda.Syntax.Internal | |
EmbPrj PatternInfo Source # | |
type PatVarName = ArgName Source #
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!
Clause | |
|
Instances
type NAPs = [NamedArg DeBruijnPattern] Source #
Named pattern arguments.
Something where a meta variable may block reduction.
Blocked | |
| |
NotBlocked | |
|
Instances
Functor Blocked Source # | |
Applicative Blocked Source # | Blocking by a meta is dominant. |
Foldable Blocked Source # | |
Defined in Agda.Syntax.Internal fold :: Monoid m => Blocked m -> m # foldMap :: Monoid m => (a -> m) -> Blocked a -> m # foldMap' :: Monoid m => (a -> m) -> Blocked a -> m # foldr :: (a -> b -> b) -> b -> Blocked a -> b # foldr' :: (a -> b -> b) -> b -> Blocked a -> b # foldl :: (b -> a -> b) -> b -> Blocked a -> b # foldl' :: (b -> a -> b) -> b -> Blocked a -> b # foldr1 :: (a -> a -> a) -> Blocked a -> a # foldl1 :: (a -> a -> a) -> Blocked a -> a # elem :: Eq a => a -> Blocked a -> Bool # maximum :: Ord a => Blocked a -> a # minimum :: Ord a => Blocked a -> a # | |
Traversable Blocked Source # | |
Semigroup Blocked_ Source # | |
Monoid Blocked_ Source # | |
EmbPrj Blocked_ Source # | |
Subst t a => Subst t (Blocked a) Source # | |
Defined in Agda.TypeChecking.Substitute applySubst :: Substitution' t -> Blocked a -> Blocked a Source # | |
Eq t => Eq (Blocked t) Source # | |
Data t => Data (Blocked t) Source # | |
Defined in Agda.Syntax.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Blocked t -> c (Blocked t) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Blocked t) # toConstr :: Blocked t -> Constr # dataTypeOf :: Blocked t -> DataType # dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Blocked t)) # dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Blocked t)) # gmapT :: (forall b. Data b => b -> b) -> Blocked t -> Blocked t # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Blocked t -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Blocked t -> r # gmapQ :: (forall d. Data d => d -> u) -> Blocked t -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Blocked t -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t) # | |
Show t => Show (Blocked t) Source # | |
KillRange a => KillRange (Blocked a) Source # | |
Defined in Agda.Syntax.Internal killRange :: KillRangeT (Blocked a) Source # | |
Apply t => Apply (Blocked t) Source # | |
TermLike a => TermLike (Blocked a) Source # | |
PrettyTCM a => PrettyTCM (Blocked a) Source # | |
Defined in Agda.TypeChecking.Pretty | |
Instantiate a => Instantiate (Blocked a) Source # | |
Defined in Agda.TypeChecking.Reduce |
data NotBlocked Source #
Even if we are not stuck on a meta during reduction we can fail to reduce a definition by pattern matching for another reason.
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
Newtypes for terms that produce a dummy, rather than crash, when applied to incompatible eliminations.
Instances
Data BraveTerm Source # | |
Defined in Agda.Syntax.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BraveTerm -> c BraveTerm # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BraveTerm # toConstr :: BraveTerm -> Constr # dataTypeOf :: BraveTerm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BraveTerm) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BraveTerm) # gmapT :: (forall b. Data b => b -> b) -> BraveTerm -> BraveTerm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BraveTerm -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BraveTerm -> r # gmapQ :: (forall d. Data d => d -> u) -> BraveTerm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> BraveTerm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm # | |
Show BraveTerm Source # | |
DeBruijn BraveTerm Source # | |
Defined in Agda.TypeChecking.Substitute | |
Apply BraveTerm Source # | |
Subst BraveTerm BraveTerm Source # | |
Defined in Agda.TypeChecking.Substitute applySubst :: Substitution' BraveTerm -> BraveTerm -> BraveTerm Source # |
type LevelAtom = LevelAtom' Term Source #
data LevelAtom' t Source #
An atomic term of type Level
.
MetaLevel MetaId [Elim' t] | A meta variable targeting |
BlockedLevel MetaId t | A term of type |
NeutralLevel NotBlocked t | A neutral term of type |
UnreducedLevel t | Introduced by |
Instances
type PlusLevel = PlusLevel' Term Source #
data PlusLevel' t Source #
Plus Integer (LevelAtom' t) |
|
Instances
A level is a maximum expression of a closed level and 0..n
PlusLevel
expressions each of which is an atom plus a number.
Max Integer [PlusLevel' t] |
Instances
Sorts.
Type (Level' t) |
|
Prop (Level' t) |
|
Inf |
|
SizeUniv |
|
PiSort (Dom' t (Type'' t t)) (Abs (Sort' t)) | Sort of the pi type. |
FunSort (Sort' t) (Sort' t) | Sort of a (non-dependent) function type. |
UnivSort (Sort' t) | Sort of another sort. |
MetaS !MetaId [Elim' t] | |
DefS QName [Elim' t] | A postulated sort. |
DummyS String | A (part of a) term or type which is only used for internal purposes.
Replaces the abuse of |
Instances
Sequence of types. An argument of the first type is bound in later types and so on.
Instances
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.
Instances
Eliminations, subsuming applications and projections.
Apply (Arg a) | Application. |
Proj ProjOrigin QName | Projection. |
IApply a a a | IApply x y r, x and y are the endpoints |
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.
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 |
Dummy String Elims | A (part of a) term or type which is only used for internal purposes.
Replaces the |
Instances
class LensConName a where Source #
getConName :: a -> QName Source #
setConName :: QName -> a -> a Source #
mapConName :: (QName -> QName) -> a -> a Source #
Instances
LensConName ConHead Source # | |
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.
ConHead | |
|
Instances
Eq ConHead Source # | |
Data ConHead Source # | |
Defined in Agda.Syntax.Internal 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 :: forall r r'. (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 Source # | |
Show ConHead Source # | |
Pretty ConHead Source # | |
KillRange ConHead Source # | |
Defined in Agda.Syntax.Internal | |
SetRange ConHead Source # | |
HasRange ConHead Source # | |
LensConName ConHead Source # | |
Defined in Agda.Syntax.Internal | |
EmbPrj ConHead Source # | |
PrettyTCM ConHead Source # | |
Defined in Agda.TypeChecking.Pretty | |
NamesIn ConHead Source # | |
InstantiateFull ConHead Source # | |
Defined in Agda.TypeChecking.Reduce |
Similar to Arg
, but we need to distinguish
an irrelevance annotation in a function domain
(the domain itself is not irrelevant!)
from an irrelevant argument.
Dom
is used in Pi
of internal syntax, in Context
and Telescope
.
Arg
is used for actual arguments (Var
, Con
, Def
etc.)
and in Abstract
syntax and other situations.
- cubical
- When
domFinite = True
for the domain of aPi
type, the elements should be compared by tabulating the domain type. Only supported in case the domain type is primIsOne, to obtain the correct equality for partial elements.
Instances
pattern ClosedLevel :: Integer -> Level Source #
Constant level n
argFromDom :: Dom' t a -> Arg a Source #
namedArgFromDom :: Dom' t a -> NamedArg a Source #
domFromArg :: Arg a -> Dom a Source #
domFromNamedArg :: NamedArg a -> Dom a Source #
defaultDom :: a -> Dom a Source #
defaultArgDom :: ArgInfo -> a -> Dom a Source #
stuckOn :: Elim -> NotBlocked -> NotBlocked Source #
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] Source #
nameToPatVarName :: Name -> PatVarName Source #
namedDBVarP :: Int -> PatVarName -> Named_ DeBruijnPattern Source #
absurdP :: Int -> DeBruijnPattern Source #
Make an absurd pattern with the given de Bruijn index.
toConPatternInfo :: ConInfo -> ConPatternInfo Source #
Build partial ConPatternInfo
from ConInfo
fromConPatternInfo :: ConPatternInfo -> ConInfo Source #
Build ConInfo
from ConPatternInfo
.
patternInfo :: Pattern' x -> Maybe PatternInfo Source #
Retrieve the PatternInfo from a pattern
properlyMatching :: Pattern' a -> Bool Source #
Does the pattern perform a match that could fail?
isEqualityType :: EqualityView -> Bool Source #
isPathType :: PathView -> Bool Source #
isIOne :: IntervalView -> Bool Source #
absurdBody :: Abs Term Source #
Absurd lambdas are internally represented as identity with variable name "()".
isAbsurdPatternName :: PatVarName -> Bool Source #
dummyTerm' :: String -> Int -> Term Source #
Aux: A dummy term to constitute a dummy termlevelsort/type.
dummyTerm :: String -> Int -> Term Source #
A dummy term created at location. Note: use macro DUMMY_TERM !
__DUMMY_TERM__ :: HasCallStack => Term Source #
dummyLevel :: String -> Int -> Level Source #
A dummy level created at location. Note: use macro DUMMY_LEVEL !
__DUMMY_LEVEL__ :: HasCallStack => Level Source #
dummySort :: String -> Int -> Sort Source #
A dummy sort created at location. Note: use macro DUMMY_SORT !
__DUMMY_SORT__ :: HasCallStack => Sort Source #
dummyType :: String -> Int -> Type Source #
A dummy type created at location. Note: use macro DUMMY_TYPE !
__DUMMY_TYPE__ :: HasCallStack => Type Source #
dummyDom :: String -> Int -> Dom Type Source #
Context entries without a type have this dummy type. Note: use macro DUMMY_DOM !
__DUMMY_DOM__ :: HasCallStack => Dom Type Source #
atomicLevel :: LevelAtom -> Level Source #
unreducedLevel :: Term -> Level Source #
mapAbsNamesM :: Applicative m => (ArgName -> m ArgName) -> Tele a -> m (Tele a) Source #
A traversal for the names in a telescope.
telFromList :: ListTel -> Telescope Source #
Convert a list telescope to a telescope.
notBlocked :: a -> Blocked a Source #
suggests :: [Suggestion] -> String Source #
unSpine' :: (ProjOrigin -> Bool) -> Term -> Term Source #
Convert Proj
projection eliminations
according to their ProjOrigin
into
Def
projection applications.
hasElims :: Term -> Maybe (Elims -> Term, Elims) Source #
A view distinguishing the neutrals Var
, Def
, and MetaV
which
can be projected.
argsFromElims :: Elims -> Args Source #
Discards Proj f
entries.
allProjElims :: Elims -> Maybe [(ProjOrigin, QName)] Source #
Drop Proj
constructors. (Safe)
module Agda.Syntax.Abstract.Name
A meta variable identifier is just a natural number.