Mikan
Safe HaskellNone
LanguageHaskell2010

Mikan.Syntax.Internal.Term

Synopsis

Terms

data Term Source #

A Term in internal syntax.

Mikan's internal syntax represents terms in beta-normal form, meaning that it is impossible to represent something like (λ x → x) t. However, terms are not "delta"-normalised, and applications of defined constants that may yet reduce can be represented by the Def constructor.

Constructors

Lam ArgInfo (Abs Term)

Lambda abstraction. The ArgInfo records the visibility.

Def QName Elims

Elimination of a defined name, which may be a redex.

Con ConHead ConInfo Elims

Application of a defined constructor. The Elims should consist only of Apply or IApply elims.

If the constructor has a boundary, a Con term may be a redex.

MetaV !MetaId Elims

Elimination from a metavariable. The metavariable may be open or solved, local or remote.

Pi (Dom Type) (Abs Type)

Dependent or non-dependent function type, controlled by the Abs.

Lit Literal

Embedding of Literals.

Sort Sort

Embedding of Sorts.

Level Level

Embedding of universe Levels.

DontCare Term

Terms containing irrelevant (i.e. Prop-sorted) stuff.

DontCare wrappers are added by the elaborator, and they indicate to term traversals that whatever is inside does not matter for definitional equality.

Dummy DummyTermKind Elims

A (part of a) term or type which is only used for internal purposes.

The DummyTermKind describes why this dummy was created; typically, it is a string describing the source location that created it, but dummy terms are also used when *leaving* the type checker (through reification) to convey out-of-band information.

The second field accumulates eliminations in case we apply a dummy term to more of them. Dummy terms should never be used in places where they can affect type checking, so syntactic checks are free to ignore the eliminations, which are only there to ease debugging when a dummy term incorrectly leaks into a relevant position.

Bundled Patterns

pattern Var :: Int -> Elims -> Term

Neutral elimnation of a variable in the context (represented by its de Bruijn index).

Term variables with no eliminations are globally cached in a shared compacted array, which allows them to be pointer-equal; this is the varTable.

Instances

Instances details
Suggest Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Pretty Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Pretty PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Pretty Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Pretty Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Pretty Type Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

GetDefs Telescope Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> Telescope -> m Source #

GetDefs Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> Level -> m Source #

GetDefs PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> PlusLevel -> m Source #

GetDefs Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> Sort -> m Source #

GetDefs Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> Term -> m Source #

GetDefs Type Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> Type -> m Source #

TermLike Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Generic

Methods

traverseTermM :: Monad m => (Term -> m Term) -> Level -> m Level Source #

foldTerm :: Monoid m => (Term -> m) -> Level -> m Source #

TermLike PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Generic

Methods

traverseTermM :: Monad m => (Term -> m Term) -> PlusLevel -> m PlusLevel Source #

foldTerm :: Monoid m => (Term -> m) -> PlusLevel -> m Source #

TermLike Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Generic

Methods

traverseTermM :: Monad m => (Term -> m Term) -> Sort -> m Sort Source #

foldTerm :: Monoid m => (Term -> m) -> Sort -> m Source #

TermLike Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Generic

Methods

traverseTermM :: Monad m => (Term -> m Term) -> Term -> m Term Source #

foldTerm :: Monoid m => (Term -> m) -> Term -> m Source #

AllMetas Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.MetaVars

Methods

allMetas :: Monoid m => (MetaId -> m) -> Level -> m Source #

AllMetas PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.MetaVars

Methods

allMetas :: Monoid m => (MetaId -> m) -> PlusLevel -> m Source #

AllMetas Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.MetaVars

Methods

allMetas :: Monoid m => (MetaId -> m) -> Sort -> m Source #

AllMetas Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.MetaVars

Methods

allMetas :: Monoid m => (MetaId -> m) -> Term -> m Source #

NamesIn Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Names

Methods

namesAndMetasIn' :: Monoid m => (Either QName MetaId -> m) -> Term -> m Source #

NamesIn CompiledClauses Source # 
Instance details

Defined in Mikan.Syntax.Internal.Names

LensSort Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

TermSize Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

TermSize PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

TermSize Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

TermSize Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

KillRange Substitution Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

KillRange Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

KillRange CompiledClauses Source # 
Instance details

Defined in Mikan.TypeChecking.CompiledClause

Reify Telescope Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo Telescope 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Reify Level Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo Level 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Reify Sort Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo Sort 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Reify Term Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo Term 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Reify Type Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo Type 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

AbsTerm Level Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

absTerm :: Nat -> Term -> Level -> Level Source #

AbsTerm PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

AbsTerm Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

absTerm :: Nat -> Term -> Sort -> Sort Source #

AbsTerm Term Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

absTerm :: Nat -> Term -> Term -> Term Source #

AbsTerm Type Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

absTerm :: Nat -> Term -> Type -> Type Source #

EqualSy Level Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

equalSy :: Level -> Level -> Bool Source #

EqualSy PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

EqualSy Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

equalSy :: Sort -> Sort -> Bool Source #

EqualSy Term Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

equalSy :: Term -> Term -> Bool Source #

EqualSy Type Source #

Ignores sorts.

Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

equalSy :: Type -> Type -> Bool Source #

IsPrefixOf Args Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

IsPrefixOf Elims Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

IsPrefixOf Term Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

CheckInternal Elims Source # 
Instance details

Defined in Mikan.TypeChecking.CheckInternal

CheckInternal Level Source # 
Instance details

Defined in Mikan.TypeChecking.CheckInternal

CheckInternal PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.CheckInternal

CheckInternal Sort Source # 
Instance details

Defined in Mikan.TypeChecking.CheckInternal

CheckInternal Term Source # 
Instance details

Defined in Mikan.TypeChecking.CheckInternal

CheckInternal Type Source # 
Instance details

Defined in Mikan.TypeChecking.CheckInternal

DropArgs Telescope Source #

NOTE: This creates telescopes with unbound de Bruijn indices.

Instance details

Defined in Mikan.TypeChecking.DropArgs

DropArgs Term Source #

Use for dropping initial lambdas in clause bodies. NOTE: does not reduce term, need lambdas to be present.

Instance details

Defined in Mikan.TypeChecking.DropArgs

Methods

dropArgs :: Int -> Term -> Term Source #

DropArgs CompiledClauses Source #

To drop the first n arguments in a compiled clause, we reduce the split argument indices by n and drop n arguments from the bodies. NOTE: this only works for non-recursive functions, we are not dropping arguments to recursive calls in bodies.

Instance details

Defined in Mikan.TypeChecking.DropArgs

Free Level Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Generic

Methods

freeVars :: ComputeFree r => Level -> Reader r (Collect r) Source #

Free Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Generic

Methods

freeVars :: ComputeFree r => Sort -> Reader r (Collect r) Source #

Free Term Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Generic

Methods

freeVars :: ComputeFree r => Term -> Reader r (Collect r) Source #

PrecomputeFreeVars Level Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Precompute

PrecomputeFreeVars PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Precompute

PrecomputeFreeVars Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Precompute

PrecomputeFreeVars Term Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Precompute

PrecomputeFreeVars Type Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Precompute

ForceNotFree Level Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Reduce

Methods

forceNotFree' :: Level -> FreeRed Level

ForceNotFree PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Reduce

Methods

forceNotFree' :: PlusLevel -> FreeRed PlusLevel

ForceNotFree Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Reduce

Methods

forceNotFree' :: Sort -> FreeRed Sort

ForceNotFree Term Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Reduce

Methods

forceNotFree' :: Term -> FreeRed Term

ForceNotFree Type Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Reduce

Methods

forceNotFree' :: Type -> FreeRed Type

NoProjectedVar Term Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars

ReduceAndEtaContract Term Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars

MentionsMeta Elim Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

MentionsMeta Level Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

MentionsMeta PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

MentionsMeta Sort Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

MentionsMeta Term Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

MentionsMeta Type Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

AddContext Telescope Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => Telescope -> m a -> m a Source #

UnFreezeMeta Level Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.MetaVars

Methods

unfreezeMeta :: MonadMetaSolver m => Level -> m () Source #

UnFreezeMeta PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.MetaVars

UnFreezeMeta Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.MetaVars

Methods

unfreezeMeta :: MonadMetaSolver m => Sort -> m () Source #

UnFreezeMeta Term Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.MetaVars

Methods

unfreezeMeta :: MonadMetaSolver m => Term -> m () Source #

UnFreezeMeta Type Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.MetaVars

Methods

unfreezeMeta :: MonadMetaSolver m => Type -> m () Source #

PrettyTCM Telescope Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

PrettyTCM Elim Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Elim -> m Doc Source #

PrettyTCM Level Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Level -> m Doc Source #

PrettyTCM Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Sort -> m Doc Source #

PrettyTCM Term Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Term -> m Doc Source #

PrettyTCM Type Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Type -> m Doc Source #

PrimTerm Type Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

Methods

primTerm :: Type -> TCM Term Source #

PrimType Type Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

Methods

primType_ :: Type -> TCM Type Source #

ToTerm Term Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

Methods

toTerm :: TCM (Term -> ReduceM Term) Source #

ToTerm Type Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

Methods

toTerm :: TCM (Type -> ReduceM Term) Source #

Instantiate Level Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Instantiate Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Instantiate Term Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

InstantiateFull Level Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

InstantiateFull PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

InstantiateFull Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

InstantiateFull Substitution Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

InstantiateFull Term Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

InstantiateFull CompiledClauses Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

IsMeta Term Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Normalise Level Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Normalise PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Normalise Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Normalise Term Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce Telescope Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce Elim Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce Level Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce Term Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce Type Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Simplify Level Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Simplify PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Simplify Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

simplify' :: Sort -> ReduceM Sort

Simplify Term Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

simplify' :: Term -> ReduceM Term

EmbPrj Blocked_ Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

EmbPrj Level Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

EmbPrj NotBlocked Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

EmbPrj PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

EmbPrj Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

EmbPrj Term Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

EmbPrj CompiledClauses Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

TeleNoAbs ListTel Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

teleNoAbs :: ListTel -> Term -> Term Source #

TeleNoAbs Telescope Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Abstract Telescope Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Abstract Term Source #

Abstract over a telescope in a term, producing lambdas. Dumb abstraction: Always produces Abs, never NoAbs.

The implementation is sound because Telescope does not use NoAbs.

Instance details

Defined in Mikan.TypeChecking.Substitute

Abstract Type Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Abstract CompiledClauses Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Apply Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

apply :: Sort -> Args -> Sort Source #

applyE :: Sort -> Elims -> Sort Source #

Apply Term Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

apply :: Term -> Args -> Term Source #

applyE :: Term -> Elims -> Term Source #

Apply CompiledClauses Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Subst Term Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Associated Types

type SubstArg Term 
Instance details

Defined in Mikan.TypeChecking.Substitute

Subst Boundary Source #

Substitution into a Boundary a priori creates a TmBoundary which we convert back via varBoundary. A priori, this is a partial operation.

Instance details

Defined in Mikan.TypeChecking.Telescope

Associated Types

type SubstArg Boundary 
Instance details

Defined in Mikan.TypeChecking.Telescope

Subst TmBoundary Source # 
Instance details

Defined in Mikan.TypeChecking.Telescope

Associated Types

type SubstArg TmBoundary 
Instance details

Defined in Mikan.TypeChecking.Telescope

DeBruijn Level Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute.DeBruijn

DeBruijn PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute.DeBruijn

DeBruijn Term Source #

We can substitute Terms for variables.

Instance details

Defined in Mikan.TypeChecking.Substitute.DeBruijn

SynEq Level Source #

Returns levels in canonical form.

Instance details

Defined in Mikan.TypeChecking.SyntacticEquality

Methods

synEq :: Level -> Level -> SynEqA Level

SynEq PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.SyntacticEquality

Methods

synEq :: PlusLevel -> PlusLevel -> SynEqA PlusLevel

SynEq Sort Source # 
Instance details

Defined in Mikan.TypeChecking.SyntacticEquality

Methods

synEq :: Sort -> Sort -> SynEqA Sort

SynEq Term Source # 
Instance details

Defined in Mikan.TypeChecking.SyntacticEquality

Methods

synEq :: Term -> Term -> SynEqA Term

SynEq Type Source #

Syntactic equality ignores sorts.

Instance details

Defined in Mikan.TypeChecking.SyntacticEquality

Methods

synEq :: Type -> Type -> SynEqA Type

PiApplyArgs Term Source # 
Instance details

Defined in Mikan.TypeChecking.Telescope

Methods

toPiArgs :: Term -> [Term] Source #

NFData Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: Level -> () #

NFData PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: PlusLevel -> () #

NFData Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: Sort -> () #

NFData Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: Term -> () #

NFData Type Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: Type -> () #

Show Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

showsPrec :: Int -> Term -> ShowS #

show :: Term -> String #

showList :: [Term] -> ShowS #

Eq Level Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

(==) :: Level -> Level -> Bool #

(/=) :: Level -> Level -> Bool #

Eq NotBlocked Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Eq PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Eq Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

(==) :: Sort -> Sort -> Bool #

(/=) :: Sort -> Sort -> Bool #

Eq Substitution Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Eq Term Source #

Syntactic Term equality, ignores stuff below DontCare and sharing.

Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

(==) :: Term -> Term -> Bool #

(/=) :: Term -> Term -> Bool #

Eq SingleLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Level

Ord Level Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

compare :: Level -> Level -> Ordering #

(<) :: Level -> Level -> Bool #

(<=) :: Level -> Level -> Bool #

(>) :: Level -> Level -> Bool #

(>=) :: Level -> Level -> Bool #

max :: Level -> Level -> Level #

min :: Level -> Level -> Level #

Ord PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Ord Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

compare :: Sort -> Sort -> Ordering #

(<) :: Sort -> Sort -> Bool #

(<=) :: Sort -> Sort -> Bool #

(>) :: Sort -> Sort -> Bool #

(>=) :: Sort -> Sort -> Bool #

max :: Sort -> Sort -> Sort #

min :: Sort -> Sort -> Sort #

Ord Substitution Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Ord Term Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

compare :: Term -> Term -> Ordering #

(<) :: Term -> Term -> Bool #

(<=) :: Term -> Term -> Bool #

(>) :: Term -> Term -> Bool #

(>=) :: Term -> Term -> Bool #

max :: Term -> Term -> Term #

min :: Term -> Term -> Term #

DeBruijn (Pattern' a) => TermToPattern Term (Pattern' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Patterns.Internal

Pretty a => Pretty (Blocked a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

GetDefs a => GetDefs (Dom a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> Dom a -> m Source #

TermLike a => TermLike (Blocked a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Generic

Methods

traverseTermM :: Monad m => (Term -> m Term) -> Blocked a -> m (Blocked a) Source #

foldTerm :: Monoid m => (Term -> m) -> Blocked a -> m Source #

LensSort a => LensSort (Dom a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

LensSort (Type' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

KillRange a => KillRange (Blocked a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Reify i => Reify (Dom i) Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo (Dom i) 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type ReifiesTo (Dom i) = Arg (ReifiesTo i)

Methods

reify :: MonadReify m => Dom i -> m (ReifiesTo (Dom i)) Source #

reifyWhen :: MonadReify m => Bool -> Dom i -> m (ReifiesTo (Dom i)) Source #

AbsTerm a => AbsTerm (Dom a) Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

absTerm :: Nat -> Term -> Dom a -> Dom a Source #

EqualSy a => EqualSy (Dom a) Source #

Ignore the tactic.

Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

equalSy :: Dom a -> Dom a -> Bool Source #

Free t => Free (Dom t) Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Generic

Methods

freeVars :: ComputeFree r => Dom t -> Reader r (Collect r) Source #

Free t => Free (Type' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Generic

Methods

freeVars :: ComputeFree r => Type' t -> Reader r (Collect r) Source #

PrecomputeFreeVars a => PrecomputeFreeVars (Dom a) Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Precompute

Methods

precomputeFreeVars :: Dom a -> FV (Dom a) Source #

(Reduce a, ForceNotFree a, TermSubst a) => ForceNotFree (Dom a) Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Reduce

Methods

forceNotFree' :: Dom a -> FreeRed (Dom a)

MentionsMeta t => MentionsMeta (Dom t) Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

AddContext (KeepNames Telescope) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => KeepNames Telescope -> m a -> m a Source #

PrettyTCM (Arg Term) Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Arg Term -> m Doc Source #

PrettyTCM (Arg Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Arg Type -> m Doc Source #

PrettyTCM (NamedArg Term) Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

PrettyTCM (Named_ Term) Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

PrettyTCM a => PrettyTCM (Blocked a) Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Blocked a -> m Doc Source #

PrettyTCM (Dom Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Dom Type -> m Doc Source #

ToTerm (Dom Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

Instantiate a => Instantiate (Blocked a) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Instantiate e => Instantiate (Dom e) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

instantiate' :: Dom e -> ReduceM (Dom e) Source #

Instantiate t => Instantiate (Type' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

instantiate' :: Type' t -> ReduceM (Type' t) Source #

InstantiateFull e => InstantiateFull (Dom e) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

instantiateFull' :: Dom e -> ReduceM (Dom e) Source #

InstantiateFull t => InstantiateFull (Type' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Normalise t => Normalise (Dom t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

normalise' :: Dom t -> ReduceM (Dom t) Source #

Normalise t => Normalise (Type' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

normalise' :: Type' t -> ReduceM (Type' t) Source #

Reduce t => Reduce (Dom t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

reduce' :: Dom t -> ReduceM (Dom t) Source #

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

Simplify t => Simplify (Dom t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

simplify' :: Dom t -> ReduceM (Dom t)

Simplify t => Simplify (Type' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

simplify' :: Type' t -> ReduceM (Type' t)

EmbPrj a => EmbPrj (Dom a) Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Dom a -> S Word32 Source #

icod_ :: Dom a -> S Word32 Source #

value :: Word32 -> R (Dom a) Source #

EmbPrj a => EmbPrj (Type' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Type' a -> S Word32 Source #

icod_ :: Type' a -> S Word32 Source #

value :: Word32 -> R (Type' a) Source #

Apply t => Apply (Blocked t) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

apply :: Blocked t -> Args -> Blocked t Source #

applyE :: Blocked t -> Elims -> Blocked t Source #

Subst a => Subst (Blocked a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Associated Types

type SubstArg (Blocked a) 
Instance details

Defined in Mikan.TypeChecking.Substitute

SynEq a => SynEq (Dom a) Source #

Ignores tactic argument annotations.

Instance details

Defined in Mikan.TypeChecking.SyntacticEquality

Methods

synEq :: Dom a -> Dom a -> SynEqA (Dom a)

Unquote a => Unquote (Dom a) Source # 
Instance details

Defined in Mikan.TypeChecking.Unquote

Methods

unquote :: Term -> UnquoteM (Dom a) Source #

Eq (DomInfo Term) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Eq t => Eq (Blocked t) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

(==) :: Blocked t -> Blocked t -> Bool #

(/=) :: Blocked t -> Blocked t -> Bool #

Eq a => Eq (Type' a) Source #

Syntactic Type equality, ignores sort annotations.

Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

(==) :: Type' a -> Type' a -> Bool #

(/=) :: Type' a -> Type' a -> Bool #

Ord (DomInfo Term) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Ord a => Ord (Dom a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

compare :: Dom a -> Dom a -> Ordering #

(<) :: Dom a -> Dom a -> Bool #

(<=) :: Dom a -> Dom a -> Bool #

(>) :: Dom a -> Dom a -> Bool #

(>=) :: Dom a -> Dom a -> Bool #

max :: Dom a -> Dom a -> Dom a #

min :: Dom a -> Dom a -> Dom a #

Ord a => Ord (Type' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

compare :: Type' a -> Type' a -> Ordering #

(<) :: Type' a -> Type' a -> Bool #

(<=) :: Type' a -> Type' a -> Bool #

(>) :: Type' a -> Type' a -> Bool #

(>=) :: Type' a -> Type' a -> Bool #

max :: Type' a -> Type' a -> Type' a #

min :: Type' a -> Type' a -> Type' a #

(ToAbstract r, AbsOfRef r ~ Expr) => ToAbstract (Dom r, Name) Source # 
Instance details

Defined in Mikan.Syntax.Translation.ReflectedToAbstract

Associated Types

type AbsOfRef (Dom r, Name) 
Instance details

Defined in Mikan.Syntax.Translation.ReflectedToAbstract

t ~ Term => AddContext (Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => Dom' t Type -> m a -> m a Source #

t ~ Term => AddContext (Dom' t (Name, Type)) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => Dom' t (Name, Type) -> m a -> m a Source #

t ~ Term => AddContext (Dom' t (ShortText, Type)) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => Dom' t (ShortText, Type) -> m a -> m a Source #

t ~ Term => AddContext (Name, Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (Name, Dom' t Type) -> m a -> m a Source #

t ~ Term => AddContext (KeepNames ShortText, Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (KeepNames ShortText, Dom' t Type) -> m a -> m a Source #

t ~ Term => AddContext (List1 Name, Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (List1 Name, Dom' t Type) -> m a -> m a Source #

AddContext (List1 (Arg Name), Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (List1 (Arg Name), Type) -> m a -> m a Source #

AddContext (List1 (NamedArg Name), Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (List1 (NamedArg Name), Type) -> m a -> m a Source #

AddContext (List1 (WithHiding Name), Dom Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (List1 (WithHiding Name), Dom Type) -> m a -> m a Source #

t ~ Term => AddContext (List1 (Dom' t Name), Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (List1 (Dom' t Name), Type) -> m a -> m a Source #

t ~ Term => AddContext (ShortText, Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (ShortText, Dom' t Type) -> m a -> m a Source #

t ~ Term => AddContext ([Name], Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => ([Name], Dom' t Type) -> m a -> m a Source #

AddContext ([Arg Name], Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => ([Arg Name], Type) -> m a -> m a Source #

AddContext ([NamedArg Name], Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => ([NamedArg Name], Type) -> m a -> m a Source #

AddContext ([WithHiding Name], Dom Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => ([WithHiding Name], Dom Type) -> m a -> m a Source #

t ~ Term => AddContext ([Dom' t Name], Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => ([Dom' t Name], Type) -> m a -> m a Source #

type TypeOf Elims Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Elims = (Type, Elims -> Term)
type TypeOf Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Level = ()
type TypeOf PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf PlusLevel = ()
type TypeOf Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Sort = ()
type TypeOf Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Type Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Type = ()
type ReifiesTo Telescope Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type ReifiesTo Level Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type ReifiesTo Sort Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type ReifiesTo Term Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type ReifiesTo Type Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type SubstArg Term Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

type SubstArg Boundary Source # 
Instance details

Defined in Mikan.TypeChecking.Telescope

type SubstArg TmBoundary Source # 
Instance details

Defined in Mikan.TypeChecking.Telescope

type TypeOf (Abs Term) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf (Abs Term) = (Dom Type, Abs Type)
type TypeOf (Abs Type) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf (Dom a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf (Dom a) = TypeOf a
type TypeOf [PlusLevel] Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf [PlusLevel] = ()
type ReifiesTo (Dom i) Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type ReifiesTo (Dom i) = Arg (ReifiesTo i)
type SubstArg (Blocked a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

type AbsOfRef (Dom r, Name) Source # 
Instance details

Defined in Mikan.Syntax.Translation.ReflectedToAbstract

dontCare :: Term -> Term Source #

Add an outer DontCare only if the given Term is not already a DontCare.

stripDontCare :: Term -> Term Source #

Removing a topmost DontCare constructor.

Variable sharing

var :: Nat -> Term Source #

An unapplied variable.

unsharedVar :: Nat -> Elims -> Term Source #

Create a neutral elimnation of a variable without going through the global variable cache.

The main use of unsharedVar is when you know statically that a variable *must* have eliminations.

varTable :: Array Term Source #

A lifted array of globally-shared Term variables with no eliminations.

Variables with de Bruijn index less than varTableSize should be drawn from this table instead of constructed. This is handled automatically by the Var pattern synonym and var smart constructor.

Constructors

data ConHead Source #

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 

Fields

Instances

Instances details
LensConName ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

CopatternMatchingAllowed ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

Pretty ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

NamesIn ConHead Source # 
Instance details

Defined in Mikan.Syntax.Internal.Names

Methods

namesAndMetasIn' :: Monoid m => (Either QName MetaId -> m) -> ConHead -> m Source #

HasRange ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

KillRange ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

SetRange ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

PrettyTCM ConHead Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => ConHead -> m Doc Source #

InstantiateFull ConHead Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

EmbPrj ConHead Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

NFData ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

Methods

rnf :: ConHead -> () #

Generic ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

Associated Types

type Rep ConHead 
Instance details

Defined in Mikan.Syntax.Abstract.Name

type Rep ConHead = D1 ('MetaData "ConHead" "Mikan.Syntax.Abstract.Name" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) (C1 ('MetaCons "ConHead" 'PrefixI 'True) ((S1 ('MetaSel ('Just "conName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QName) :*: S1 ('MetaSel ('Just "conDataRecord") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataOrRecord)) :*: (S1 ('MetaSel ('Just "conInductive") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Induction) :*: S1 ('MetaSel ('Just "conFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [QName]))))

Methods

from :: ConHead -> Rep ConHead x #

to :: Rep ConHead x -> ConHead #

Show ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

Eq ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

Methods

(==) :: ConHead -> ConHead -> Bool #

(/=) :: ConHead -> ConHead -> Bool #

Ord ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

type Rep ConHead Source # 
Instance details

Defined in Mikan.Syntax.Abstract.Name

type Rep ConHead = D1 ('MetaData "ConHead" "Mikan.Syntax.Abstract.Name" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) (C1 ('MetaCons "ConHead" 'PrefixI 'True) ((S1 ('MetaSel ('Just "conName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QName) :*: S1 ('MetaSel ('Just "conDataRecord") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataOrRecord)) :*: (S1 ('MetaSel ('Just "conInductive") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Induction) :*: S1 ('MetaSel ('Just "conFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [QName]))))

class LensConName a where Source #

Minimal complete definition

Nothing

Dummies

data DummyTermKind Source #

Terms used for internal purposes

Constructors

DummyNamed String

Generic dummy term, the String generally describes where the term was generated (as well as giving a disambiguator).

Should not be used to convey actual information.

DummyBrave Term

Collects applications to a BraveTerm.

DummyDisplay

An underscore in the right-hand side of a DISPLAY pragma.

This renders as an underscore when reified but it has the property of matching arbitrary patterns in display form matching.

Can be used to allow chaining display forms for projections into display forms for copies, when the parameters can't be reconstructed.

Arguments and eliminations

type Args = [Arg Term] Source #

Type of argument lists.

type Elims = [Elim] Source #

Spined forms

data SpineHead' Source #

A Term head that can be applied to some Elims.

Constructors

SHVar !Int

A Term headed by a variable.

SHDef !QName

A Term headed by a defined symbol.

SHMetaV !MetaId

A Term headed by a metavariable.

unSpine :: Term -> Term Source #

Convert top-level postfix projections into prefix projections.

hasElims :: Term -> Maybe (Elims -> Term, Elims) Source #

A view picking out those Terms built out of a head form that supports eliminations (Var, Def, MetaV).

Types

data Type'' t a Source #

Constructors

El 

Fields

Instances

Instances details
Pretty Type Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

GetDefs Telescope Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> Telescope -> m Source #

GetDefs Type Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> Type -> m Source #

Reify Telescope Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo Telescope 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Reify Type Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo Type 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

AbsTerm Type Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

absTerm :: Nat -> Term -> Type -> Type Source #

EqualSy Type Source #

Ignores sorts.

Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

equalSy :: Type -> Type -> Bool Source #

CheckInternal Type Source # 
Instance details

Defined in Mikan.TypeChecking.CheckInternal

DropArgs Telescope Source #

NOTE: This creates telescopes with unbound de Bruijn indices.

Instance details

Defined in Mikan.TypeChecking.DropArgs

PrecomputeFreeVars Type Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Precompute

ForceNotFree Type Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Reduce

Methods

forceNotFree' :: Type -> FreeRed Type

MentionsMeta Type Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

AddContext Telescope Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => Telescope -> m a -> m a Source #

UnFreezeMeta Type Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.MetaVars

Methods

unfreezeMeta :: MonadMetaSolver m => Type -> m () Source #

PrettyTCM Telescope Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

PrettyTCM Type Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Type -> m Doc Source #

PrimTerm Type Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

Methods

primTerm :: Type -> TCM Term Source #

PrimType Type Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

Methods

primType_ :: Type -> TCM Type Source #

ToTerm Type Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

Methods

toTerm :: TCM (Type -> ReduceM Term) Source #

Reduce Telescope Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce Type Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

TeleNoAbs ListTel Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

teleNoAbs :: ListTel -> Term -> Term Source #

TeleNoAbs Telescope Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Abstract Telescope Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Abstract Type Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

SynEq Type Source #

Syntactic equality ignores sorts.

Instance details

Defined in Mikan.TypeChecking.SyntacticEquality

Methods

synEq :: Type -> Type -> SynEqA Type

NFData Type Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: Type -> () #

LensSort (Type' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Free t => Free (Type' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Generic

Methods

freeVars :: ComputeFree r => Type' t -> Reader r (Collect r) Source #

AddContext (KeepNames Telescope) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => KeepNames Telescope -> m a -> m a Source #

PrettyTCM (Arg Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Arg Type -> m Doc Source #

PrettyTCM (Dom Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Dom Type -> m Doc Source #

ToTerm (Dom Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

Instantiate t => Instantiate (Type' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

instantiate' :: Type' t -> ReduceM (Type' t) Source #

InstantiateFull t => InstantiateFull (Type' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Normalise t => Normalise (Type' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

normalise' :: Type' t -> ReduceM (Type' t) Source #

Simplify t => Simplify (Type' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

simplify' :: Type' t -> ReduceM (Type' t)

EmbPrj a => EmbPrj (Type' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

Methods

icode :: Type' a -> S Word32 Source #

icod_ :: Type' a -> S Word32 Source #

value :: Word32 -> R (Type' a) Source #

Decoration (Type'' t) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

traverseF :: Functor m => (a -> m b) -> Type'' t a -> m (Type'' t b) Source #

distributeF :: Functor m => Type'' t (m a) -> m (Type'' t a) Source #

Functor (Type'' t) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

fmap :: (a -> b) -> Type'' t a -> Type'' t b #

(<$) :: a -> Type'' t b -> Type'' t a #

Foldable (Type'' t) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

fold :: Monoid m => Type'' t m -> m #

foldMap :: Monoid m => (a -> m) -> Type'' t a -> m #

foldMap' :: Monoid m => (a -> m) -> Type'' t a -> m #

foldr :: (a -> b -> b) -> b -> Type'' t a -> b #

foldr' :: (a -> b -> b) -> b -> Type'' t a -> b #

foldl :: (b -> a -> b) -> b -> Type'' t a -> b #

foldl' :: (b -> a -> b) -> b -> Type'' t a -> b #

foldr1 :: (a -> a -> a) -> Type'' t a -> a #

foldl1 :: (a -> a -> a) -> Type'' t a -> a #

toList :: Type'' t a -> [a] #

null :: Type'' t a -> Bool #

length :: Type'' t a -> Int #

elem :: Eq a => a -> Type'' t a -> Bool #

maximum :: Ord a => Type'' t a -> a #

minimum :: Ord a => Type'' t a -> a #

sum :: Num a => Type'' t a -> a #

product :: Num a => Type'' t a -> a #

Traversable (Type'' t) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

traverse :: Applicative f => (a -> f b) -> Type'' t a -> f (Type'' t b) #

sequenceA :: Applicative f => Type'' t (f a) -> f (Type'' t a) #

mapM :: Monad m => (a -> m b) -> Type'' t a -> m (Type'' t b) #

sequence :: Monad m => Type'' t (m a) -> m (Type'' t a) #

Eq a => Eq (Type' a) Source #

Syntactic Type equality, ignores sort annotations.

Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

(==) :: Type' a -> Type' a -> Bool #

(/=) :: Type' a -> Type' a -> Bool #

Ord a => Ord (Type' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

compare :: Type' a -> Type' a -> Ordering #

(<) :: Type' a -> Type' a -> Bool #

(<=) :: Type' a -> Type' a -> Bool #

(>) :: Type' a -> Type' a -> Bool #

(>=) :: Type' a -> Type' a -> Bool #

max :: Type' a -> Type' a -> Type' a #

min :: Type' a -> Type' a -> Type' a #

TermLike b => TermLike (Type'' a b) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Generic

Methods

traverseTermM :: Monad m => (Term -> m Term) -> Type'' a b -> m (Type'' a b) Source #

foldTerm :: Monoid m => (Term -> m) -> Type'' a b -> m Source #

(TermLike a, TermLike b) => AllMetas (Type'' a b) Source # 
Instance details

Defined in Mikan.Syntax.Internal.MetaVars

Methods

allMetas :: Monoid m => (MetaId -> m) -> Type'' a b -> m Source #

(NamesIn a, NamesIn b) => NamesIn (Type'' a b) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Names

Methods

namesAndMetasIn' :: Monoid m => (Either QName MetaId -> m) -> Type'' a b -> m Source #

(KillRange a, KillRange b) => KillRange (Type'' a b) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

t ~ Term => AddContext (Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => Dom' t Type -> m a -> m a Source #

t ~ Term => AddContext (Dom' t (Name, Type)) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => Dom' t (Name, Type) -> m a -> m a Source #

t ~ Term => AddContext (Dom' t (ShortText, Type)) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => Dom' t (ShortText, Type) -> m a -> m a Source #

t ~ Term => AddContext (Name, Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (Name, Dom' t Type) -> m a -> m a Source #

t ~ Term => AddContext (KeepNames ShortText, Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (KeepNames ShortText, Dom' t Type) -> m a -> m a Source #

t ~ Term => AddContext (List1 Name, Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (List1 Name, Dom' t Type) -> m a -> m a Source #

AddContext (List1 (Arg Name), Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (List1 (Arg Name), Type) -> m a -> m a Source #

AddContext (List1 (NamedArg Name), Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (List1 (NamedArg Name), Type) -> m a -> m a Source #

AddContext (List1 (WithHiding Name), Dom Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (List1 (WithHiding Name), Dom Type) -> m a -> m a Source #

t ~ Term => AddContext (List1 (Dom' t Name), Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (List1 (Dom' t Name), Type) -> m a -> m a Source #

t ~ Term => AddContext (ShortText, Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => (ShortText, Dom' t Type) -> m a -> m a Source #

t ~ Term => AddContext ([Name], Dom' t Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => ([Name], Dom' t Type) -> m a -> m a Source #

AddContext ([Arg Name], Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => ([Arg Name], Type) -> m a -> m a Source #

AddContext ([NamedArg Name], Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => ([NamedArg Name], Type) -> m a -> m a Source #

AddContext ([WithHiding Name], Dom Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => ([WithHiding Name], Dom Type) -> m a -> m a Source #

t ~ Term => AddContext ([Dom' t Name], Type) Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Context

Methods

addContext :: MonadAddContext m => ([Dom' t Name], Type) -> m a -> m a Source #

IsMeta a => IsMeta (Type'' t a) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

isMeta :: Type'' t a -> Maybe MetaId Source #

(Subst a, Subst b, SubstArg a ~ SubstArg b) => Subst (Type'' a b) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Associated Types

type SubstArg (Type'' a b) 
Instance details

Defined in Mikan.TypeChecking.Substitute

type SubstArg (Type'' a b) = SubstArg a

Methods

applySubst :: Substitution' (SubstArg (Type'' a b)) -> Type'' a b -> Type'' a b Source #

(Show t, Show a) => Show (Type'' t a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

showsPrec :: Int -> Type'' t a -> ShowS #

show :: Type'' t a -> String #

showList :: [Type'' t a] -> ShowS #

type TypeOf Type Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Type = ()
type ReifiesTo Telescope Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type ReifiesTo Type Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type TypeOf (Abs Type) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type SubstArg (Type'' a b) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

type SubstArg (Type'' a b) = SubstArg a

type Type' a = Type'' Term a Source #

Domains

Sorts

data Sort' t Source #

Sorts.

The three sort constructors MetaS, DefS and DummyS are the sort equivalents of the term constructors Meta, Def and Dummy.

Constructors

Univ Univ (Level' t)

Prop ℓ, Type ℓ, SSet ℓ.

Inf Univ !Integer

Propωᵢ, Typeωᵢ, SSetωᵢ.

LevelUniv

LevelUniv, a sort inhabited by type Level.

When --level-universe isn't on, this universe reduces to Univ UType (ClosedLevel 0).

IntervalUniv

IntervalUniv, a sort inhabited by the cubical interval.

CofUniv

CofUniv, a sort inhabited by the IsOne predicate.

CofUniv is definitionally irrelevant and small (like Univ UProp), but non-fibrant.

PiSort (Dom' t t) (Sort' t) (Abs (Sort' t))

Sort of a pi type, as a function of the sort of its domain and the sort of its codomain (which may depend on the domain).

FunSort (Sort' t) (Sort' t)

Sort of a (non-dependent) function type.

UnivSort (Sort' t)

Sort of another sort.

MetaS !MetaId [Elim' t]

An unsolved sort metavariable.

DefS QName [Elim' t]

A postulated sort, used for unsolved sort metavariables left open in a module checked with --allow-unsolved-metas.

DummyS String

A dummy sort, like a Dummy Term.

The String typically describes where this dummy was created. Use the __DUMMY_SORT__ macro.

Bundled Patterns

pattern Prop :: Level' t -> Sort' t 
pattern SSet :: Level' t -> Sort' t 
pattern Type :: Level' t -> Sort' t 

Instances

Instances details
Pretty Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

GetDefs Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> Sort -> m Source #

TermLike Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Generic

Methods

traverseTermM :: Monad m => (Term -> m Term) -> Sort -> m Sort Source #

foldTerm :: Monoid m => (Term -> m) -> Sort -> m Source #

AllMetas Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.MetaVars

Methods

allMetas :: Monoid m => (MetaId -> m) -> Sort -> m Source #

LensSort Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

TermSize Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Reify Sort Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo Sort 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

AbsTerm Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

absTerm :: Nat -> Term -> Sort -> Sort Source #

EqualSy Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

equalSy :: Sort -> Sort -> Bool Source #

CheckInternal Sort Source # 
Instance details

Defined in Mikan.TypeChecking.CheckInternal

Free Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Generic

Methods

freeVars :: ComputeFree r => Sort -> Reader r (Collect r) Source #

PrecomputeFreeVars Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Precompute

ForceNotFree Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Reduce

Methods

forceNotFree' :: Sort -> FreeRed Sort

MentionsMeta Sort Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

UnFreezeMeta Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.MetaVars

Methods

unfreezeMeta :: MonadMetaSolver m => Sort -> m () Source #

PrettyTCM Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Sort -> m Doc Source #

Instantiate Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

InstantiateFull Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Normalise Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Simplify Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

simplify' :: Sort -> ReduceM Sort

EmbPrj Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

Apply Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

apply :: Sort -> Args -> Sort Source #

applyE :: Sort -> Elims -> Sort Source #

SynEq Sort Source # 
Instance details

Defined in Mikan.TypeChecking.SyntacticEquality

Methods

synEq :: Sort -> Sort -> SynEqA Sort

NFData Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: Sort -> () #

Eq Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

(==) :: Sort -> Sort -> Bool #

(/=) :: Sort -> Sort -> Bool #

Ord Sort Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

compare :: Sort -> Sort -> Ordering #

(<) :: Sort -> Sort -> Bool #

(<=) :: Sort -> Sort -> Bool #

(>) :: Sort -> Sort -> Bool #

(>=) :: Sort -> Sort -> Bool #

max :: Sort -> Sort -> Sort #

min :: Sort -> Sort -> Sort #

NamesIn a => NamesIn (Sort' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Names

Methods

namesAndMetasIn' :: Monoid m => (Either QName MetaId -> m) -> Sort' a -> m Source #

KillRange a => KillRange (Sort' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

IsMeta (Sort' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

isMeta :: Sort' a -> Maybe MetaId Source #

Subst a => Subst (Sort' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Associated Types

type SubstArg (Sort' a) 
Instance details

Defined in Mikan.TypeChecking.Substitute

type SubstArg (Sort' a) = SubstArg a
Show t => Show (Sort' t) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

showsPrec :: Int -> Sort' t -> ShowS #

show :: Sort' t -> String #

showList :: [Sort' t] -> ShowS #

type TypeOf Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Sort = ()
type ReifiesTo Sort Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type SubstArg (Sort' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

type SubstArg (Sort' a) = SubstArg a

data UnivSize Source #

Constructors

USmall

PropTypeSSet ℓ.

ULarge

(PropTypeSSet)ωᵢ.

Instances

Instances details
Show UnivSize Source # 
Instance details

Defined in Mikan.Syntax.Internal.Univ

Eq UnivSize Source # 
Instance details

Defined in Mikan.Syntax.Internal.Univ

isProp :: Sort' t -> Bool Source #

Is this a universe of definitionally irrelevant types? Answers are yes (True) or maybe (False).

isStrictDataSort :: Sort' t -> Bool Source #

Is this a strict universe inhabitable by data types?

propToType :: Sort' t -> Sort' t Source #

Turn a known UProp sort into a UType sort, leave others unchanged.

sortUniv :: Sort' t -> Maybe Univ Source #

Get the flavor of the universe. Nothing could also mean "don't know".

class LensSort a where Source #

Minimal complete definition

Nothing

Methods

lensSort :: Lens' a Sort Source #

default lensSort :: forall (f :: Type -> Type) x. (a ~ f x, Decoration f, LensSort x) => Lens' a Sort Source #

getSort :: a -> Sort Source #

Instances

Instances details
LensSort Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

LensSort a => LensSort (Arg a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

LensSort a => LensSort (Dom a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

LensSort (Type' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Universe levels

data Level' t Source #

A level is a maximum expression of a closed level and 0..n PlusLevel expressions each of which is an atom plus a number.

Constructors

Max !Integer [PlusLevel' t] 

Bundled Patterns

pattern ClosedLevel :: Integer -> Level

Constant level n

Instances

Instances details
Pretty Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

GetDefs Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> Level -> m Source #

TermLike Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Generic

Methods

traverseTermM :: Monad m => (Term -> m Term) -> Level -> m Level Source #

foldTerm :: Monoid m => (Term -> m) -> Level -> m Source #

AllMetas Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.MetaVars

Methods

allMetas :: Monoid m => (MetaId -> m) -> Level -> m Source #

TermSize Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Reify Level Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo Level 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

AbsTerm Level Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

absTerm :: Nat -> Term -> Level -> Level Source #

EqualSy Level Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

Methods

equalSy :: Level -> Level -> Bool Source #

CheckInternal Level Source # 
Instance details

Defined in Mikan.TypeChecking.CheckInternal

Free Level Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Generic

Methods

freeVars :: ComputeFree r => Level -> Reader r (Collect r) Source #

PrecomputeFreeVars Level Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Precompute

ForceNotFree Level Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Reduce

Methods

forceNotFree' :: Level -> FreeRed Level

MentionsMeta Level Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

UnFreezeMeta Level Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.MetaVars

Methods

unfreezeMeta :: MonadMetaSolver m => Level -> m () Source #

PrettyTCM Level Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => Level -> m Doc Source #

Instantiate Level Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

InstantiateFull Level Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Normalise Level Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce Level Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Simplify Level Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

EmbPrj Level Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

DeBruijn Level Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute.DeBruijn

SynEq Level Source #

Returns levels in canonical form.

Instance details

Defined in Mikan.TypeChecking.SyntacticEquality

Methods

synEq :: Level -> Level -> SynEqA Level

NFData Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: Level -> () #

Functor Level' Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

fmap :: (a -> b) -> Level' a -> Level' b #

(<$) :: a -> Level' b -> Level' a #

Foldable Level' Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

fold :: Monoid m => Level' m -> m #

foldMap :: Monoid m => (a -> m) -> Level' a -> m #

foldMap' :: Monoid m => (a -> m) -> Level' a -> m #

foldr :: (a -> b -> b) -> b -> Level' a -> b #

foldr' :: (a -> b -> b) -> b -> Level' a -> b #

foldl :: (b -> a -> b) -> b -> Level' a -> b #

foldl' :: (b -> a -> b) -> b -> Level' a -> b #

foldr1 :: (a -> a -> a) -> Level' a -> a #

foldl1 :: (a -> a -> a) -> Level' a -> a #

toList :: Level' a -> [a] #

null :: Level' a -> Bool #

length :: Level' a -> Int #

elem :: Eq a => a -> Level' a -> Bool #

maximum :: Ord a => Level' a -> a #

minimum :: Ord a => Level' a -> a #

sum :: Num a => Level' a -> a #

product :: Num a => Level' a -> a #

Traversable Level' Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

traverse :: Applicative f => (a -> f b) -> Level' a -> f (Level' b) #

sequenceA :: Applicative f => Level' (f a) -> f (Level' a) #

mapM :: Monad m => (a -> m b) -> Level' a -> m (Level' b) #

sequence :: Monad m => Level' (m a) -> m (Level' a) #

Eq Level Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

(==) :: Level -> Level -> Bool #

(/=) :: Level -> Level -> Bool #

Ord Level Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Methods

compare :: Level -> Level -> Ordering #

(<) :: Level -> Level -> Bool #

(<=) :: Level -> Level -> Bool #

(>) :: Level -> Level -> Bool #

(>=) :: Level -> Level -> Bool #

max :: Level -> Level -> Level #

min :: Level -> Level -> Level #

NamesIn a => NamesIn (Level' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Names

Methods

namesAndMetasIn' :: Monoid m => (Either QName MetaId -> m) -> Level' a -> m Source #

KillRange a => KillRange (Level' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

IsMeta a => IsMeta (Level' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Methods

isMeta :: Level' a -> Maybe MetaId Source #

Subst a => Subst (Level' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Associated Types

type SubstArg (Level' a) 
Instance details

Defined in Mikan.TypeChecking.Substitute

type SubstArg (Level' a) = SubstArg a
Show t => Show (Level' t) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

showsPrec :: Int -> Level' t -> ShowS #

show :: Level' t -> String #

showList :: [Level' t] -> ShowS #

type TypeOf Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Level = ()
type ReifiesTo Level Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type SubstArg (Level' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

type SubstArg (Level' a) = SubstArg a

data PlusLevel' t Source #

Constructors

Plus !Integer t 

Instances

Instances details
Pretty PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

GetDefs PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> PlusLevel -> m Source #

TermLike PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Generic

Methods

traverseTermM :: Monad m => (Term -> m Term) -> PlusLevel -> m PlusLevel Source #

foldTerm :: Monoid m => (Term -> m) -> PlusLevel -> m Source #

AllMetas PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.MetaVars

Methods

allMetas :: Monoid m => (MetaId -> m) -> PlusLevel -> m Source #

TermSize PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

AbsTerm PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

EqualSy PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Abstract

CheckInternal PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.CheckInternal

PrecomputeFreeVars PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Precompute

ForceNotFree PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Reduce

Methods

forceNotFree' :: PlusLevel -> FreeRed PlusLevel

MentionsMeta PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.MetaVars.Mention

UnFreezeMeta PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.MetaVars

InstantiateFull PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Normalise PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Reduce PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Simplify PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

EmbPrj PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

DeBruijn PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute.DeBruijn

SynEq PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.SyntacticEquality

Methods

synEq :: PlusLevel -> PlusLevel -> SynEqA PlusLevel

NFData PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: PlusLevel -> () #

Functor PlusLevel' Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

fmap :: (a -> b) -> PlusLevel' a -> PlusLevel' b #

(<$) :: a -> PlusLevel' b -> PlusLevel' a #

Foldable PlusLevel' Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

fold :: Monoid m => PlusLevel' m -> m #

foldMap :: Monoid m => (a -> m) -> PlusLevel' a -> m #

foldMap' :: Monoid m => (a -> m) -> PlusLevel' a -> m #

foldr :: (a -> b -> b) -> b -> PlusLevel' a -> b #

foldr' :: (a -> b -> b) -> b -> PlusLevel' a -> b #

foldl :: (b -> a -> b) -> b -> PlusLevel' a -> b #

foldl' :: (b -> a -> b) -> b -> PlusLevel' a -> b #

foldr1 :: (a -> a -> a) -> PlusLevel' a -> a #

foldl1 :: (a -> a -> a) -> PlusLevel' a -> a #

toList :: PlusLevel' a -> [a] #

null :: PlusLevel' a -> Bool #

length :: PlusLevel' a -> Int #

elem :: Eq a => a -> PlusLevel' a -> Bool #

maximum :: Ord a => PlusLevel' a -> a #

minimum :: Ord a => PlusLevel' a -> a #

sum :: Num a => PlusLevel' a -> a #

product :: Num a => PlusLevel' a -> a #

Traversable PlusLevel' Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

traverse :: Applicative f => (a -> f b) -> PlusLevel' a -> f (PlusLevel' b) #

sequenceA :: Applicative f => PlusLevel' (f a) -> f (PlusLevel' a) #

mapM :: Monad m => (a -> m b) -> PlusLevel' a -> m (PlusLevel' b) #

sequence :: Monad m => PlusLevel' (m a) -> m (PlusLevel' a) #

Eq PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Ord PlusLevel Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

NamesIn a => NamesIn (PlusLevel' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Names

Methods

namesAndMetasIn' :: Monoid m => (Either QName MetaId -> m) -> PlusLevel' a -> m Source #

KillRange a => KillRange (PlusLevel' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Free t => Free (PlusLevel' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Generic

Instantiate t => Instantiate (PlusLevel' t) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

IsMeta a => IsMeta (PlusLevel' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Subst a => Subst (PlusLevel' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Associated Types

type SubstArg (PlusLevel' a) 
Instance details

Defined in Mikan.TypeChecking.Substitute

Show t => Show (PlusLevel' t) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf PlusLevel = ()
type TypeOf [PlusLevel] Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf [PlusLevel] = ()
type SubstArg (PlusLevel' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

levelPlus :: Integer -> Level -> Level Source #

Given a constant m and level l, compute m + l

Substitutions

data Substitution' a Source #

Substitutions.

Constructors

IdS

Identity substitution.

  Γ ⊢ IdS : Γ
EmptyS Impossible

Empty substitution, lifts from the empty context. Apply this to closed terms you want to use in a non-empty context.

  Γ ⊢ EmptyS : ()

The Impossible argument stores where this substitution was created. It is used for reporting an internal error when applying this substitution to a term that was not actually closed.

a :# !(Substitution' a) infixr 4

Substitution extension, "cons".

  Γ ⊢ u : Aρ  Γ ⊢ ρ : Δ
  ---------------------
    Γ ⊢ u :# ρ : Δ, A
Strengthen Impossible !Int !(Substitution' a)

Strengthening substitution. In Strengthen err n ρ, the number n must be non-negative. This substitution should only be applied to values t for which none of the variables 0 up to n - 1 are free in t[ρ], and in that case n is subtracted from all free de Bruijn indices in t[ρ].

      Γ ⊢ ρ : Δ   |Θ| = n
  ---------------------------
   Γ ⊢ Strengthen n ρ : Δ, Θ

The Impossible argument stores where this substitution was created. It is used for reporting an internal error when applying this substitution to a term that mentions a variable j <= n.

Wk !Int !(Substitution' a)

Weakening substitution, lifts to an extended context.

       Γ ⊢ ρ : Δ
  -------------------
  Γ, Ψ ⊢ Wk |Ψ| ρ : Δ
Lift !Int !(Substitution' a)

Lifting substitution. Use this to go under a binder. Lift 1 ρ == var 0 :# Wk 1 ρ.

          Γ ⊢ ρ : Δ
  -------------------------
  Γ, Ψρ ⊢ Lift |Ψ| ρ : Δ, Ψ

Instances

Instances details
KillRange Substitution Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

InstantiateFull Substitution Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

Functor Substitution' Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

fmap :: (a -> b) -> Substitution' a -> Substitution' b #

(<$) :: a -> Substitution' b -> Substitution' a #

Foldable Substitution' Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

fold :: Monoid m => Substitution' m -> m #

foldMap :: Monoid m => (a -> m) -> Substitution' a -> m #

foldMap' :: Monoid m => (a -> m) -> Substitution' a -> m #

foldr :: (a -> b -> b) -> b -> Substitution' a -> b #

foldr' :: (a -> b -> b) -> b -> Substitution' a -> b #

foldl :: (b -> a -> b) -> b -> Substitution' a -> b #

foldl' :: (b -> a -> b) -> b -> Substitution' a -> b #

foldr1 :: (a -> a -> a) -> Substitution' a -> a #

foldl1 :: (a -> a -> a) -> Substitution' a -> a #

toList :: Substitution' a -> [a] #

null :: Substitution' a -> Bool #

length :: Substitution' a -> Int #

elem :: Eq a => a -> Substitution' a -> Bool #

maximum :: Ord a => Substitution' a -> a #

minimum :: Ord a => Substitution' a -> a #

sum :: Num a => Substitution' a -> a #

product :: Num a => Substitution' a -> a #

Traversable Substitution' Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

traverse :: Applicative f => (a -> f b) -> Substitution' a -> f (Substitution' b) #

sequenceA :: Applicative f => Substitution' (f a) -> f (Substitution' a) #

mapM :: Monad m => (a -> m b) -> Substitution' a -> m (Substitution' b) #

sequence :: Monad m => Substitution' (m a) -> m (Substitution' a) #

Eq Substitution Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Ord Substitution Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Pretty a => Pretty (Substitution' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

NamesIn a => NamesIn (Substitution' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Names

TermSize a => TermSize (Substitution' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

(Pretty a, PrettyTCM a, EndoSubst a) => PrettyTCM (Substitution' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

EmbPrj a => EmbPrj (Substitution' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Internal

EndoSubst a => Subst (Substitution' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

Associated Types

type SubstArg (Substitution' a) 
Instance details

Defined in Mikan.TypeChecking.Substitute

type SubstArg (Substitution' a) = a
Null (Substitution' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

NFData a => NFData (Substitution' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: Substitution' a -> () #

Generic (Substitution' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Associated Types

type Rep (Substitution' a) 
Instance details

Defined in Mikan.Syntax.Internal.Term

type Rep (Substitution' a) = D1 ('MetaData "Substitution'" "Mikan.Syntax.Internal.Term" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) ((C1 ('MetaCons "IdS" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EmptyS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Impossible)) :+: C1 ('MetaCons ":#" ('InfixI 'RightAssociative 4) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Substitution' a))))) :+: (C1 ('MetaCons "Strengthen" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Impossible) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Substitution' a)))) :+: (C1 ('MetaCons "Wk" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Substitution' a))) :+: C1 ('MetaCons "Lift" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Substitution' a))))))
Show a => Show (Substitution' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type SubstArg (Substitution' a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute

type SubstArg (Substitution' a) = a
type Rep (Substitution' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type Rep (Substitution' a) = D1 ('MetaData "Substitution'" "Mikan.Syntax.Internal.Term" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) ((C1 ('MetaCons "IdS" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EmptyS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Impossible)) :+: C1 ('MetaCons ":#" ('InfixI 'RightAssociative 4) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Substitution' a))))) :+: (C1 ('MetaCons "Strengthen" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Impossible) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Substitution' a)))) :+: (C1 ('MetaCons "Wk" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Substitution' a))) :+: C1 ('MetaCons "Lift" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Substitution' a))))))

newtype NoSubst t a Source #

Wrapper for types that do not contain variables (so applying a substitution is the identity). Useful if you have a structure of types that support substitution mixed with types that don't and need to apply a substitution to the full structure.

Constructors

NoSubst 

Fields

Instances

Instances details
Functor (NoSubst t) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

fmap :: (a -> b) -> NoSubst t a -> NoSubst t b #

(<$) :: a -> NoSubst t b -> NoSubst t a #

Pretty a => Pretty (NoSubst t a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

pretty :: NoSubst t a -> Doc Source #

prettyPrec :: Int -> NoSubst t a -> Doc Source #

prettyList :: [NoSubst t a] -> Doc Source #

DeBruijn t => Subst (NoSubst t a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute.Class

Associated Types

type SubstArg (NoSubst t a) 
Instance details

Defined in Mikan.TypeChecking.Substitute.Class

type SubstArg (NoSubst t a) = t
NFData a => NFData (NoSubst t a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

rnf :: NoSubst t a -> () #

Generic (NoSubst t a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Associated Types

type Rep (NoSubst t a) 
Instance details

Defined in Mikan.Syntax.Internal.Term

type Rep (NoSubst t a) = D1 ('MetaData "NoSubst" "Mikan.Syntax.Internal.Term" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'True) (C1 ('MetaCons "NoSubst" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNoSubst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from :: NoSubst t a -> Rep (NoSubst t a) x #

to :: Rep (NoSubst t a) x -> NoSubst t a #

type SubstArg (NoSubst t a) Source # 
Instance details

Defined in Mikan.TypeChecking.Substitute.Class

type SubstArg (NoSubst t a) = t
type Rep (NoSubst t a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type Rep (NoSubst t a) = D1 ('MetaData "NoSubst" "Mikan.Syntax.Internal.Term" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'True) (C1 ('MetaCons "NoSubst" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNoSubst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

newtype BraveTerm Source #

Newtype for terms that produce a dummy when applied to incompatible eliminations, instead of crashing.

Constructors

BraveTerm 

Fields

Blocked terms

type Blocked_ = Blocked () Source #

Blocked' a without the a.

Basic traversals

class TermSize a where Source #

The size of a term is roughly the number of nodes in its syntax tree.

This number is only used for heuristics, so it does not need to be accurately computed. Things like sort annotations may be skipped.

Minimal complete definition

tsize

Methods

termSize :: a -> Int Source #

tsize :: a -> Sum Int Source #

Instances

Instances details
TermSize Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

TermSize PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

TermSize Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

TermSize Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

TermSize a => TermSize (Substitution' a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

(Foldable t, TermSize a) => TermSize (t a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

Methods

termSize :: t a -> Int Source #

tsize :: t a -> Sum Int Source #

type family TypeOf a Source #

Instances

Instances details
type TypeOf Elims Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Elims = (Type, Elims -> Term)
type TypeOf Level Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Level = ()
type TypeOf PlusLevel Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf PlusLevel = ()
type TypeOf Sort Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Sort = ()
type TypeOf Term Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Type Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf Type = ()
type TypeOf (Arg a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf (Arg a) = Dom (TypeOf a)
type TypeOf (Abs Term) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf (Abs Term) = (Dom Type, Abs Type)
type TypeOf (Abs Type) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf (Dom a) Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf (Dom a) = TypeOf a
type TypeOf [PlusLevel] Source # 
Instance details

Defined in Mikan.Syntax.Internal.Term

type TypeOf [PlusLevel] = ()

Reexports

data MetaId Source #

Meta-variable identifiers use the same structure as NameIds.

Constructors

MetaId 

Instances

Instances details
EncodeTCM MetaId Source # 
Instance details

Defined in Mikan.Interaction.JSONTop

Pretty MetaId Source # 
Instance details

Defined in Mikan.Syntax.Common

GetDefs MetaId Source # 
Instance details

Defined in Mikan.Syntax.Internal.Defs

Methods

getDefs :: (Monoid m, ExpandCase LiftedRep m) => (MetaId -> Maybe Term) -> (QName -> m) -> MetaId -> m Source #

NamesIn MetaId Source # 
Instance details

Defined in Mikan.Syntax.Internal.Names

Methods

namesAndMetasIn' :: Monoid m => (Either QName MetaId -> m) -> MetaId -> m Source #

Reify MetaId Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

Associated Types

type ReifiesTo MetaId 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

HasFresh MetaId Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Base

UnFreezeMeta MetaId Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.MetaVars

Methods

unfreezeMeta :: MonadMetaSolver m => MetaId -> m () Source #

PrettyTCM MetaId Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

Methods

prettyTCM :: MonadPretty m => MetaId -> m Doc Source #

FromTerm MetaId Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

PrimTerm MetaId Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

PrimType MetaId Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

ToTerm MetaId Source # 
Instance details

Defined in Mikan.TypeChecking.Primitive

EmbPrj MetaId Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Common

Unquote MetaId Source # 
Instance details

Defined in Mikan.TypeChecking.Unquote

ToJSON MetaId Source # 
Instance details

Defined in Mikan.Interaction.JSONTop

NFData MetaId Source # 
Instance details

Defined in Mikan.Syntax.Common

Methods

rnf :: MetaId -> () #

Enum MetaId Source # 
Instance details

Defined in Mikan.Syntax.Common

Generic MetaId Source # 
Instance details

Defined in Mikan.Syntax.Common

Associated Types

type Rep MetaId 
Instance details

Defined in Mikan.Syntax.Common

type Rep MetaId = D1 ('MetaData "MetaId" "Mikan.Syntax.Common" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) (C1 ('MetaCons "MetaId" 'PrefixI 'True) (S1 ('MetaSel ('Just "metaId") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "metaModule") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 ModuleNameHash)))

Methods

from :: MetaId -> Rep MetaId x #

to :: Rep MetaId x -> MetaId #

Show MetaId Source #

The record selectors are not included in the resulting strings.

Instance details

Defined in Mikan.Syntax.Common

Eq MetaId Source # 
Instance details

Defined in Mikan.Syntax.Common

Methods

(==) :: MetaId -> MetaId -> Bool #

(/=) :: MetaId -> MetaId -> Bool #

Ord MetaId Source # 
Instance details

Defined in Mikan.Syntax.Common

Hashable MetaId Source # 
Instance details

Defined in Mikan.Syntax.Common

Methods

hashWithSalt :: Int -> MetaId -> Int #

hash :: MetaId -> Int #

Singleton MetaId MetaSet Source # 
Instance details

Defined in Mikan.TypeChecking.Free.Base

InstantiateFull (Judgement MetaId) Source # 
Instance details

Defined in Mikan.TypeChecking.Reduce

type ReifiesTo MetaId Source # 
Instance details

Defined in Mikan.Syntax.Translation.InternalToAbstract

type Rep MetaId Source # 
Instance details

Defined in Mikan.Syntax.Common

type Rep MetaId = D1 ('MetaData "MetaId" "Mikan.Syntax.Common" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) (C1 ('MetaCons "MetaId" 'PrefixI 'True) (S1 ('MetaSel ('Just "metaId") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "metaModule") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 ModuleNameHash)))

newtype ProblemId Source #

A "problem" consists of a set of constraints and the same constraint can be part of multiple problems.

Constructors

ProblemId Word64 

Instances

Instances details
EncodeTCM ProblemId Source # 
Instance details

Defined in Mikan.Interaction.JSONTop

Pretty ProblemId Source # 
Instance details

Defined in Mikan.Syntax.Common

HasFresh ProblemId Source # 
Instance details

Defined in Mikan.TypeChecking.Monad.Base

PrettyTCM ProblemId Source # 
Instance details

Defined in Mikan.TypeChecking.Pretty

EmbPrj ProblemId Source # 
Instance details

Defined in Mikan.TypeChecking.Serialise.Instances.Common

ToJSON ProblemId Source # 
Instance details

Defined in Mikan.Interaction.JSONTop

NFData ProblemId Source # 
Instance details

Defined in Mikan.Syntax.Common

Methods

rnf :: ProblemId -> () #

Enum ProblemId Source # 
Instance details

Defined in Mikan.Syntax.Common

Num ProblemId Source # 
Instance details

Defined in Mikan.Syntax.Common

Integral ProblemId Source # 
Instance details

Defined in Mikan.Syntax.Common

Real ProblemId Source # 
Instance details

Defined in Mikan.Syntax.Common

Show ProblemId Source # 
Instance details

Defined in Mikan.Syntax.Common

Eq ProblemId Source # 
Instance details

Defined in Mikan.Syntax.Common

Ord ProblemId Source # 
Instance details

Defined in Mikan.Syntax.Common