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

Safe Haskell | None
Language | Haskell2010

Agda.TypeChecking.Irrelevance

Contents

- Operations on `Dom`.
- Operations on `Context`.

Description

Irrelevant function types.

Synopsis

- hideAndRelParams :: Dom a -> Dom a
- inverseApplyRelevance :: Relevance -> Dom a -> Dom a
- applyRelevance :: Relevance -> Dom a -> Dom a
- workOnTypes :: TCM a -> TCM a
- workOnTypes' :: Bool -> TCM a -> TCM a
- applyRelevanceToContext :: Relevance -> TCM a -> TCM a
- wakeIrrelevantVars :: TCM a -> TCM a

# Operations on `Dom`.

hideAndRelParams :: Dom a -> Dom a #

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

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

Used to modify context when going into a `rel` argument.

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

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 #

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 #

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

applyRelevanceToContext :: Relevance -> TCM a -> TCM a #

(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 #

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.