Agda-2.5.4.1.20181027: A dependently typed functional programming language and proof assistant

Safe HaskellNone
LanguageHaskell2010

Agda.TypeChecking.Irrelevance

Contents

Description

Irrelevant function types.

Synopsis

Operations on Dom.

hideAndRelParams :: Dom a -> Dom a Source #

Prepare parts of a parameter telescope for abstraction in constructors and projections.

inverseApplyRelevance :: Relevance -> Dom a -> Dom a Source #

Used to modify context when going into a rel argument.

applyRelevance :: Relevance -> Dom a -> Dom a Source #

Compose two relevance flags. This function is used to update the relevance information on pattern variables a after a match against something rel.

Operations on Context.

workOnTypes :: TCM a -> TCM a Source #

Modify the context whenever going from the l.h.s. (term side) of the typing judgement to the r.h.s. (type side).

workOnTypes' :: Bool -> TCM a -> TCM a Source #

Internal workhorse, expects value of --experimental-irrelevance flag as argument.

applyRelevanceToContext :: MonadTCM tcm => Relevance -> tcm a -> tcm a Source #

(Conditionally) wake up irrelevant variables and make them relevant. For instance, in an irrelevant function argument otherwise irrelevant variables may be used, so they are awoken before type checking the argument.

wakeIrrelevantVars :: TCM a -> TCM a Source #

Wake up irrelevant variables and make them relevant. This is used when type checking terms in a hole, in which case you want to be able to (for instance) infer the type of an irrelevant variable. In the course of type checking an irrelevant function argument applyRelevanceToContext is used instead, which also sets the context relevance to Irrelevant. This is not the right thing to do when type checking interactively in a hole since it also marks all metas created during type checking as irrelevant (issue #2568).

class UsableRelevance a where Source #

Check whether something can be used in a position of the given relevance.

Minimal complete definition

usableRel

Methods

usableRel :: Relevance -> a -> TCM Bool Source #

Instances
UsableRelevance LevelAtom Source # 
Instance details

Defined in Agda.TypeChecking.Irrelevance

UsableRelevance PlusLevel Source # 
Instance details

Defined in Agda.TypeChecking.Irrelevance

UsableRelevance Level Source # 
Instance details

Defined in Agda.TypeChecking.Irrelevance

UsableRelevance Sort Source # 
Instance details

Defined in Agda.TypeChecking.Irrelevance

UsableRelevance Term Source # 
Instance details

Defined in Agda.TypeChecking.Irrelevance

UsableRelevance a => UsableRelevance [a] Source # 
Instance details

Defined in Agda.TypeChecking.Irrelevance

Methods

usableRel :: Relevance -> [a] -> TCM Bool Source #

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

Defined in Agda.TypeChecking.Irrelevance

Methods

usableRel :: Relevance -> Dom a -> TCM Bool Source #

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

Defined in Agda.TypeChecking.Irrelevance

Methods

usableRel :: Relevance -> Arg a -> TCM Bool Source #

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

Defined in Agda.TypeChecking.Irrelevance

(Subst t a, UsableRelevance a) => UsableRelevance (Abs a) Source # 
Instance details

Defined in Agda.TypeChecking.Irrelevance

Methods

usableRel :: Relevance -> Abs a -> TCM Bool Source #

UsableRelevance a => UsableRelevance (Elim' a) Source # 
Instance details

Defined in Agda.TypeChecking.Irrelevance

(UsableRelevance a, UsableRelevance b) => UsableRelevance (a, b) Source # 
Instance details

Defined in Agda.TypeChecking.Irrelevance

Methods

usableRel :: Relevance -> (a, b) -> TCM Bool Source #