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

Safe Haskell | None
Language | Haskell2010

Agda.TypeChecking.Reduce

Synopsis

- class Instantiate t
- instantiate' :: Instantiate t => t -> ReduceM t
- instantiate :: (Instantiate a, MonadReduce m) => a -> m a
- instantiateWhen :: (InstantiateFull a, MonadReduce m) => (MetaId -> ReduceM Bool) -> a -> m a
- class InstantiateFull t
- instantiateFull' :: InstantiateFull t => t -> ReduceM t
- instantiateFull :: (InstantiateFull a, MonadReduce m) => a -> m a
- class IsMeta a
- isMeta :: IsMeta a => a -> Maybe MetaId
- class Reduce t
- reduce' :: Reduce t => t -> ReduceM t
- reduceB' :: Reduce t => t -> ReduceM (Blocked t)
- reduce :: (Reduce a, MonadReduce m) => a -> m a
- reduceB :: (Reduce a, MonadReduce m) => a -> m (Blocked a)
- reduceWithBlocker :: (Reduce a, IsMeta a, MonadReduce m) => a -> m (Blocker, a)
- reduceIApply' :: (Term -> ReduceM (Blocked Term)) -> ReduceM (Blocked Term) -> [Elim] -> ReduceM (Blocked Term)
- reduceDefCopy :: PureTCM m => QName -> Elims -> m (Reduced () Term)
- reduceDefCopyTCM :: QName -> Elims -> TCM (Reduced () Term)
- reduceHead :: PureTCM m => Term -> m (Blocked Term)
- slowReduceTerm :: Term -> ReduceM (Blocked Term)
- unfoldCorecursion :: Term -> ReduceM (Blocked Term)
- unfoldCorecursionE :: Elim -> ReduceM (Blocked Elim)
- unfoldDefinitionE :: (Term -> ReduceM (Blocked Term)) -> Term -> QName -> Elims -> ReduceM (Blocked Term)
- unfoldDefinitionStep :: Term -> QName -> Elims -> ReduceM (Reduced (Blocked Term) Term)
- unfoldInlined :: PureTCM m => Term -> m Term
- appDef' :: QName -> Term -> [Clause] -> RewriteRules -> MaybeReducedArgs -> ReduceM (Reduced (Blocked Term) Term)
- appDefE' :: QName -> Term -> [Clause] -> RewriteRules -> MaybeReducedElims -> ReduceM (Reduced (Blocked Term) Term)
- abortIfBlocked :: (MonadReduce m, MonadBlock m, IsMeta t, Reduce t) => t -> m t
- ifBlocked :: (Reduce t, IsMeta t, MonadReduce m) => t -> (Blocker -> t -> m a) -> (NotBlocked -> t -> m a) -> m a
- isBlocked :: (Reduce t, IsMeta t, MonadReduce m) => t -> m (Maybe Blocker)
- fromBlocked :: MonadBlock m => Blocked a -> m a
- blockOnError :: MonadError TCErr m => Blocker -> m a -> m a
- class Simplify t
- simplify :: (Simplify a, MonadReduce m) => a -> m a
- simplifyBlocked' :: Simplify t => Blocked t -> ReduceM t
- class Normalise t
- normalise' :: Normalise t => t -> ReduceM t
- normalise :: (Normalise a, MonadReduce m) => a -> m a
- slowNormaliseArgs :: Term -> ReduceM Term

# Documentation

class Instantiate t Source #

Instantiate something. Results in an open meta variable or a non meta. Doesn't do any reduction, and preserves blocking tags (when blocking meta is uninstantiated).

#### Instances

Instances details

Instantiate EqualityView Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: EqualityView -> ReduceM EqualityView Source #
Instantiate Level Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Level -> ReduceM Level Source #
Instantiate Sort Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Sort -> ReduceM Sort Source #
Instantiate Term Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Term -> ReduceM Term Source #
Instantiate Blocker Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Blocker -> ReduceM Blocker Source #
Instantiate Candidate Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Candidate -> ReduceM Candidate Source #
Instantiate CompareAs Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: CompareAs -> ReduceM CompareAs Source #
Instantiate Constraint Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Constraint -> ReduceM Constraint Source #
Instantiate () Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: () -> ReduceM () Source #
Instantiate t => Instantiate (Arg t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Arg t -> ReduceM (Arg t) Source #
Instantiate t => Instantiate (Abs t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Abs t -> ReduceM (Abs t) Source #
Instantiate a => Instantiate (Blocked a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Blocked a -> ReduceM (Blocked a) Source #
Instantiate t => Instantiate (PlusLevel' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: PlusLevel' t -> ReduceM (PlusLevel' t) Source #
Instantiate t => Instantiate (Tele t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Tele t -> ReduceM (Tele t) Source #
Instantiate t => Instantiate (Type' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Type' t -> ReduceM (Type' t) Source #
Instantiate t => Instantiate (Elim' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Elim' t -> ReduceM (Elim' t) Source #
Instantiate a => Instantiate (Closure a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Closure a -> ReduceM (Closure a) Source #
Instantiate t => Instantiate (IPBoundary' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: IPBoundary' t -> ReduceM (IPBoundary' t) Source #
Instantiate t => Instantiate (List1 t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: List1 t -> ReduceM (List1 t) Source #
Instantiate t => Instantiate (Maybe t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Maybe t -> ReduceM (Maybe t) Source #
Instantiate t => Instantiate (Maybe t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Maybe t -> ReduceM (Maybe t) Source #
Instantiate t => Instantiate [t] Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: [t] -> ReduceM [t] Source #
(Instantiate t, Instantiate e) => Instantiate (Dom' t e) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Dom' t e -> ReduceM (Dom' t e) Source #
Instantiate t => Instantiate (Map k t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: Map k t -> ReduceM (Map k t) Source #
(Instantiate a, Instantiate b) => Instantiate (a, b) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: (a, b) -> ReduceM (a, b) Source #
(Instantiate a, Instantiate b, Instantiate c) => Instantiate (a, b, c) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiate' :: (a, b, c) -> ReduceM (a, b, c) Source #

instantiate' :: Instantiate t => t -> ReduceM t Source #

instantiate :: (Instantiate a, MonadReduce m) => a -> m a Source #

instantiateWhen :: (InstantiateFull a, MonadReduce m) => (MetaId -> ReduceM Bool) -> a -> m a Source #

A variant of `instantiateFull` that only instantiates those meta-variables that satisfy the predicate.

class InstantiateFull t Source #

`instantiateFull'` `instantiate`s metas everywhere (and recursively) but does not `reduce`.

#### Instances

Instances details

InstantiateFull ModuleName Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: ModuleName -> ReduceM ModuleName Source #
InstantiateFull Name Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Name -> ReduceM Name Source #
InstantiateFull QName Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: QName -> ReduceM QName Source #
InstantiateFull PrimitiveId Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: PrimitiveId -> ReduceM PrimitiveId Source #
InstantiateFull Clause Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Clause -> ReduceM Clause Source #
InstantiateFull ConHead Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: ConHead -> ReduceM ConHead Source #
InstantiateFull ConPatternInfo Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: ConPatternInfo -> ReduceM ConPatternInfo Source #
InstantiateFull DBPatVar Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: DBPatVar -> ReduceM DBPatVar Source #
InstantiateFull EqualityView Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: EqualityView -> ReduceM EqualityView Source #
InstantiateFull Level Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Level -> ReduceM Level Source #
InstantiateFull PlusLevel Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: PlusLevel -> ReduceM PlusLevel Source #
InstantiateFull Sort Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Sort -> ReduceM Sort Source #
InstantiateFull Substitution Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Substitution -> ReduceM Substitution Source #
InstantiateFull Term Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Term -> ReduceM Term Source #
InstantiateFull Scope Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Scope -> ReduceM Scope Source #
InstantiateFull CompiledClauses Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: CompiledClauses -> ReduceM CompiledClauses Source #
InstantiateFull Candidate Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Candidate -> ReduceM Candidate Source #
InstantiateFull CompareAs Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: CompareAs -> ReduceM CompareAs Source #
InstantiateFull Constraint Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Constraint -> ReduceM Constraint Source #
InstantiateFull Definition Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Definition -> ReduceM Definition Source #
InstantiateFull Defn Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Defn -> ReduceM Defn Source #
InstantiateFull DisplayForm Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: DisplayForm -> ReduceM DisplayForm Source #
InstantiateFull DisplayTerm Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: DisplayTerm -> ReduceM DisplayTerm Source #
InstantiateFull ExtLamInfo Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: ExtLamInfo -> ReduceM ExtLamInfo Source #
InstantiateFull FunctionInverse Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: FunctionInverse -> ReduceM FunctionInverse Source #
InstantiateFull Instantiation Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Instantiation -> ReduceM Instantiation Source #
InstantiateFull Interface Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Interface -> ReduceM Interface Source #
InstantiateFull LetBinding Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: LetBinding -> ReduceM LetBinding Source #
InstantiateFull NLPSort Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: NLPSort -> ReduceM NLPSort Source #
InstantiateFull NLPType Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: NLPType -> ReduceM NLPType Source #
InstantiateFull NLPat Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: NLPat -> ReduceM NLPat Source #
InstantiateFull ProblemConstraint Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: ProblemConstraint -> ReduceM ProblemConstraint Source #
InstantiateFull RemoteMetaVariable Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: RemoteMetaVariable -> ReduceM RemoteMetaVariable Source #
InstantiateFull RewriteRule Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: RewriteRule -> ReduceM RewriteRule Source #
InstantiateFull Section Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Section -> ReduceM Section Source #
InstantiateFull Signature Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Signature -> ReduceM Signature Source #
InstantiateFull System Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: System -> ReduceM System Source #
InstantiateFull ContextEntry Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: ContextEntry -> ReduceM ContextEntry Source #
InstantiateFull LHSResult Source # |
Instance details Defined in Agda.TypeChecking.Rules.LHS Methods instantiateFull' :: LHSResult -> ReduceM LHSResult Source #
InstantiateFull AsBinding Source # |
Instance details Defined in Agda.TypeChecking.Rules.LHS.Problem Methods instantiateFull' :: AsBinding -> ReduceM AsBinding Source #
InstantiateFull Bool Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Bool -> ReduceM Bool Source #
InstantiateFull Char Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Char -> ReduceM Char Source #
InstantiateFull Int Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Int -> ReduceM Int Source #
InstantiateFull t => InstantiateFull (Arg t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Arg t -> ReduceM (Arg t) Source #
(Subst a, InstantiateFull a) => InstantiateFull (Abs a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Abs a -> ReduceM (Abs a) Source #
InstantiateFull a => InstantiateFull (Pattern' a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Pattern' a -> ReduceM (Pattern' a) Source #
(Subst a, InstantiateFull a) => InstantiateFull (Tele a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Tele a -> ReduceM (Tele a) Source #
InstantiateFull t => InstantiateFull (Type' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Type' t -> ReduceM (Type' t) Source #
InstantiateFull t => InstantiateFull (Elim' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Elim' t -> ReduceM (Elim' t) Source #
InstantiateFull a => InstantiateFull (Case a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Case a -> ReduceM (Case a) Source #
InstantiateFull t => InstantiateFull (WithArity t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: WithArity t -> ReduceM (WithArity t) Source #
InstantiateFull a => InstantiateFull (Builtin a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Builtin a -> ReduceM (Builtin a) Source #
InstantiateFull a => InstantiateFull (Closure a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Closure a -> ReduceM (Closure a) Source #
InstantiateFull t => InstantiateFull (IPBoundary' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: IPBoundary' t -> ReduceM (IPBoundary' t) Source #
InstantiateFull (Judgement MetaId) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Judgement MetaId -> ReduceM (Judgement MetaId) Source #
InstantiateFull t => InstantiateFull (Open t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Open t -> ReduceM (Open t) Source #
InstantiateFull t => InstantiateFull (List1 t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: List1 t -> ReduceM (List1 t) Source #
InstantiateFull t => InstantiateFull (Maybe t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Maybe t -> ReduceM (Maybe t) Source #
InstantiateFull t => InstantiateFull (Maybe t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Maybe t -> ReduceM (Maybe t) Source #
InstantiateFull t => InstantiateFull [t] Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: [t] -> ReduceM [t] Source #
InstantiateFull t => InstantiateFull (Named name t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Named name t -> ReduceM (Named name t) Source #
(InstantiateFull t, InstantiateFull e) => InstantiateFull (Dom' t e) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Dom' t e -> ReduceM (Dom' t e) Source #
InstantiateFull t => InstantiateFull (Map k t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: Map k t -> ReduceM (Map k t) Source #
InstantiateFull t => InstantiateFull (HashMap k t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: HashMap k t -> ReduceM (HashMap k t) Source #
(InstantiateFull a, InstantiateFull b) => InstantiateFull (a, b) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: (a, b) -> ReduceM (a, b) Source #
(InstantiateFull a, InstantiateFull b, InstantiateFull c) => InstantiateFull (a, b, c) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: (a, b, c) -> ReduceM (a, b, c) Source #
(InstantiateFull a, InstantiateFull b, InstantiateFull c, InstantiateFull d) => InstantiateFull (a, b, c, d) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods instantiateFull' :: (a, b, c, d) -> ReduceM (a, b, c, d) Source #

instantiateFull' :: InstantiateFull t => t -> ReduceM t Source #

instantiateFull :: (InstantiateFull a, MonadReduce m) => a -> m a Source #

class IsMeta a Source #

Is something (an elimination of) a meta variable? Does not perform any reductions.

Minimal complete definition

isMeta

#### Instances

Instances details

IsMeta Term Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods isMeta :: Term -> Maybe MetaId Source #
IsMeta CompareAs Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods isMeta :: CompareAs -> Maybe MetaId Source #
IsMeta a => IsMeta (Arg a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods isMeta :: Arg a -> Maybe MetaId Source #
IsMeta a => IsMeta (Level' a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods isMeta :: Level' a -> Maybe MetaId Source #
IsMeta a => IsMeta (PlusLevel' a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods isMeta :: PlusLevel' a -> Maybe MetaId Source #
IsMeta a => IsMeta (Sort' a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods isMeta :: Sort' a -> Maybe MetaId Source #
IsMeta a => IsMeta (Elim' a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods isMeta :: Elim' a -> Maybe MetaId Source #
IsMeta a => IsMeta (Type'' t a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods isMeta :: Type'' t a -> Maybe MetaId Source #

isMeta :: IsMeta a => a -> Maybe MetaId Source #

class Reduce t Source #

Minimal complete definition

reduce' | reduceB'

#### Instances

Instances details

Reduce DeBruijnPattern Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: DeBruijnPattern -> ReduceM DeBruijnPattern Source # reduceB' :: DeBruijnPattern -> ReduceM (Blocked DeBruijnPattern) Source #
Reduce Elim Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Elim -> ReduceM Elim Source # reduceB' :: Elim -> ReduceM (Blocked Elim) Source #
Reduce EqualityView Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: EqualityView -> ReduceM EqualityView Source # reduceB' :: EqualityView -> ReduceM (Blocked EqualityView) Source #
Reduce Level Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Level -> ReduceM Level Source # reduceB' :: Level -> ReduceM (Blocked Level) Source #
Reduce PlusLevel Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: PlusLevel -> ReduceM PlusLevel Source # reduceB' :: PlusLevel -> ReduceM (Blocked PlusLevel) Source #
Reduce Sort Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Sort -> ReduceM Sort Source # reduceB' :: Sort -> ReduceM (Blocked Sort) Source #
Reduce Telescope Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Telescope -> ReduceM Telescope Source # reduceB' :: Telescope -> ReduceM (Blocked Telescope) Source #
Reduce Term Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Term -> ReduceM Term Source # reduceB' :: Term -> ReduceM (Blocked Term) Source #
Reduce Type Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Type -> ReduceM Type Source # reduceB' :: Type -> ReduceM (Blocked Type) Source #
Reduce Candidate Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Candidate -> ReduceM Candidate Source # reduceB' :: Candidate -> ReduceM (Blocked Candidate) Source #
Reduce CompareAs Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: CompareAs -> ReduceM CompareAs Source # reduceB' :: CompareAs -> ReduceM (Blocked CompareAs) Source #
Reduce Constraint Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Constraint -> ReduceM Constraint Source # reduceB' :: Constraint -> ReduceM (Blocked Constraint) Source #
Reduce UnifyState Source # | Don't ever reduce the whole `varTel`, as it will destroy readability of the context in interactive editing! To make sure this insight is not lost, the following dummy instance should prevent a proper `Reduce` instance for `UnifyState`.
Instance details Defined in Agda.TypeChecking.Rules.LHS.Unify.Types Methods reduce' :: UnifyState -> ReduceM UnifyState Source # reduceB' :: UnifyState -> ReduceM (Blocked UnifyState) Source #
Reduce t => Reduce (Arg t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Arg t -> ReduceM (Arg t) Source # reduceB' :: Arg t -> ReduceM (Blocked (Arg t)) Source #
(Subst a, Reduce a) => Reduce (Abs a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Abs a -> ReduceM (Abs a) Source # reduceB' :: Abs a -> ReduceM (Blocked (Abs a)) Source #
Reduce t => Reduce (Dom t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Dom t -> ReduceM (Dom t) Source # reduceB' :: Dom t -> ReduceM (Blocked (Dom t)) Source #
Reduce a => Reduce (Closure a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Closure a -> ReduceM (Closure a) Source # reduceB' :: Closure a -> ReduceM (Blocked (Closure a)) Source #
Reduce t => Reduce (IPBoundary' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: IPBoundary' t -> ReduceM (IPBoundary' t) Source # reduceB' :: IPBoundary' t -> ReduceM (Blocked (IPBoundary' t)) Source #
Reduce a => Reduce (FamilyOrNot a) Source # |
Instance details Defined in Agda.TypeChecking.Primitive.Cubical.Base Methods reduce' :: FamilyOrNot a -> ReduceM (FamilyOrNot a) Source # reduceB' :: FamilyOrNot a -> ReduceM (Blocked (FamilyOrNot a)) Source #
Reduce t => Reduce (Maybe t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Maybe t -> ReduceM (Maybe t) Source # reduceB' :: Maybe t -> ReduceM (Blocked (Maybe t)) Source #
Reduce t => Reduce [t] Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: [t] -> ReduceM [t] Source # reduceB' :: [t] -> ReduceM (Blocked [t]) Source #
Reduce e => Reduce (Map k e) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: Map k e -> ReduceM (Map k e) Source # reduceB' :: Map k e -> ReduceM (Blocked (Map k e)) Source #
(Reduce a, Reduce b) => Reduce (a, b) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: (a, b) -> ReduceM (a, b) Source # reduceB' :: (a, b) -> ReduceM (Blocked (a, b)) Source #
(Reduce a, Reduce b, Reduce c) => Reduce (a, b, c) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods reduce' :: (a, b, c) -> ReduceM (a, b, c) Source # reduceB' :: (a, b, c) -> ReduceM (Blocked (a, b, c)) Source #

reduce' :: Reduce t => t -> ReduceM t Source #

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

reduce :: (Reduce a, MonadReduce m) => a -> m a Source #

reduceB :: (Reduce a, MonadReduce m) => a -> m (Blocked a) Source #

reduceWithBlocker :: (Reduce a, IsMeta a, MonadReduce m) => a -> m (Blocker, a) Source #

reduceIApply' :: (Term -> ReduceM (Blocked Term)) -> ReduceM (Blocked Term) -> [Elim] -> ReduceM (Blocked Term) Source #

reduceDefCopy :: PureTCM m => QName -> Elims -> m (Reduced () Term) Source #

Reduce a non-primitive definition if it is a copy linking to another def.

reduceDefCopyTCM :: QName -> Elims -> TCM (Reduced () Term) Source #

Specialized version to put in boot file.

reduceHead :: PureTCM m => Term -> m (Blocked Term) Source #

Reduce simple (single clause) definitions.

slowReduceTerm :: Term -> ReduceM (Blocked Term) Source #

unfoldCorecursion :: Term -> ReduceM (Blocked Term) Source #

unfoldCorecursionE :: Elim -> ReduceM (Blocked Elim) Source #

unfoldDefinitionE :: (Term -> ReduceM (Blocked Term)) -> Term -> QName -> Elims -> ReduceM (Blocked Term) Source #

unfoldDefinitionStep :: Term -> QName -> Elims -> ReduceM (Reduced (Blocked Term) Term) Source #

unfoldInlined :: PureTCM m => Term -> m Term Source #

Unfold as many copies as possible, and then potentially a single inline function.

appDef' :: QName -> Term -> [Clause] -> RewriteRules -> MaybeReducedArgs -> ReduceM (Reduced (Blocked Term) Term) Source #

Apply a defined function to it's arguments, using the original clauses.

appDefE' :: QName -> Term -> [Clause] -> RewriteRules -> MaybeReducedElims -> ReduceM (Reduced (Blocked Term) Term) Source #

abortIfBlocked :: (MonadReduce m, MonadBlock m, IsMeta t, Reduce t) => t -> m t Source #

Throw pattern violation if blocked or a meta.

ifBlocked :: (Reduce t, IsMeta t, MonadReduce m) => t -> (Blocker -> t -> m a) -> (NotBlocked -> t -> m a) -> m a Source #

Case on whether a term is blocked on a meta (or is a meta). That means it can change its shape when the meta is instantiated.

isBlocked :: (Reduce t, IsMeta t, MonadReduce m) => t -> m (Maybe Blocker) Source #

fromBlocked :: MonadBlock m => Blocked a -> m a Source #

Throw a pattern violation if the argument is `Blocked`, otherwise return the value embedded in the `NotBlocked`.

blockOnError :: MonadError TCErr m => Blocker -> m a -> m a Source #

Run the given computation but turn any errors into blocked computations with the given blocker

class Simplify t Source #

Only unfold definitions if this leads to simplification which means that a constructor/literal pattern is matched. We include reduction of IApply patterns, as `p i0` is akin to matcing on the `i0` constructor of interval.

#### Instances

Instances details

Simplify EqualityView Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: EqualityView -> ReduceM EqualityView
Simplify Level Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Level -> ReduceM Level
Simplify PlusLevel Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: PlusLevel -> ReduceM PlusLevel
Simplify Sort Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Sort -> ReduceM Sort
Simplify Term Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Term -> ReduceM Term
Simplify Candidate Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Candidate -> ReduceM Candidate
Simplify CompareAs Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: CompareAs -> ReduceM CompareAs
Simplify Constraint Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Constraint -> ReduceM Constraint
Simplify DisplayForm Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: DisplayForm -> ReduceM DisplayForm
Simplify ProblemConstraint Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: ProblemConstraint -> ReduceM ProblemConstraint
Simplify Bool Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Bool -> ReduceM Bool
Simplify t => Simplify (Arg t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Arg t -> ReduceM (Arg t)
(Subst a, Simplify a) => Simplify (Abs a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Abs a -> ReduceM (Abs a)
Simplify t => Simplify (Dom t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Dom t -> ReduceM (Dom t)
(Subst a, Simplify a) => Simplify (Tele a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Tele a -> ReduceM (Tele a)
Simplify t => Simplify (Type' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Type' t -> ReduceM (Type' t)
Simplify t => Simplify (Elim' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Elim' t -> ReduceM (Elim' t)
Simplify a => Simplify (Closure a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Closure a -> ReduceM (Closure a)
Simplify t => Simplify (IPBoundary' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: IPBoundary' t -> ReduceM (IPBoundary' t)
Simplify t => Simplify (Maybe t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Maybe t -> ReduceM (Maybe t)
Simplify t => Simplify (Maybe t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Maybe t -> ReduceM (Maybe t)
Simplify t => Simplify [t] Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: [t] -> ReduceM [t]
Simplify t => Simplify (Named name t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Named name t -> ReduceM (Named name t)
Simplify t => Simplify (Map k t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: Map k t -> ReduceM (Map k t)
(Simplify a, Simplify b) => Simplify (a, b) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: (a, b) -> ReduceM (a, b)
(Simplify a, Simplify b, Simplify c) => Simplify (a, b, c) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods simplify' :: (a, b, c) -> ReduceM (a, b, c)

simplify :: (Simplify a, MonadReduce m) => a -> m a Source #

simplifyBlocked' :: Simplify t => Blocked t -> ReduceM t Source #

class Normalise t Source #

#### Instances

Instances details

Normalise ConPatternInfo Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: ConPatternInfo -> ReduceM ConPatternInfo Source #
Normalise DBPatVar Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: DBPatVar -> ReduceM DBPatVar Source #
Normalise EqualityView Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: EqualityView -> ReduceM EqualityView Source #
Normalise Level Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Level -> ReduceM Level Source #
Normalise PlusLevel Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: PlusLevel -> ReduceM PlusLevel Source #
Normalise Sort Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Sort -> ReduceM Sort Source #
Normalise Term Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Term -> ReduceM Term Source #
Normalise Candidate Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Candidate -> ReduceM Candidate Source #
Normalise CompareAs Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: CompareAs -> ReduceM CompareAs Source #
Normalise Constraint Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Constraint -> ReduceM Constraint Source #
Normalise DisplayForm Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: DisplayForm -> ReduceM DisplayForm Source #
Normalise ProblemConstraint Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: ProblemConstraint -> ReduceM ProblemConstraint Source #
Normalise Bool Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Bool -> ReduceM Bool Source #
Normalise Char Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Char -> ReduceM Char Source #
Normalise Int Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Int -> ReduceM Int Source #
Normalise t => Normalise (Arg t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Arg t -> ReduceM (Arg t) Source #
Normalise t => Normalise (Ranged t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Ranged t -> ReduceM (Ranged t) Source #
Normalise t => Normalise (WithHiding t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: WithHiding t -> ReduceM (WithHiding t) Source #
(Subst a, Normalise a) => Normalise (Abs a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Abs a -> ReduceM (Abs a) Source #
Normalise t => Normalise (Dom t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Dom t -> ReduceM (Dom t) Source #
Normalise a => Normalise (Pattern' a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Pattern' a -> ReduceM (Pattern' a) Source #
(Subst a, Normalise a) => Normalise (Tele a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Tele a -> ReduceM (Tele a) Source #
Normalise t => Normalise (Type' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Type' t -> ReduceM (Type' t) Source #
Normalise t => Normalise (Elim' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Elim' t -> ReduceM (Elim' t) Source #
Normalise a => Normalise (Closure a) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Closure a -> ReduceM (Closure a) Source #
Normalise t => Normalise (IPBoundary' t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: IPBoundary' t -> ReduceM (IPBoundary' t) Source #
Normalise t => Normalise (List1 t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: List1 t -> ReduceM (List1 t) Source #
Normalise t => Normalise (Maybe t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Maybe t -> ReduceM (Maybe t) Source #
Normalise t => Normalise (Maybe t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Maybe t -> ReduceM (Maybe t) Source #
Normalise t => Normalise [t] Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: [t] -> ReduceM [t] Source #
Normalise t => Normalise (Named name t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Named name t -> ReduceM (Named name t) Source #
Normalise t => Normalise (Map k t) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: Map k t -> ReduceM (Map k t) Source #
(Normalise a, Normalise b) => Normalise (a, b) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: (a, b) -> ReduceM (a, b) Source #
(Normalise a, Normalise b, Normalise c) => Normalise (a, b, c) Source # |
Instance details Defined in Agda.TypeChecking.Reduce Methods normalise' :: (a, b, c) -> ReduceM (a, b, c) Source #

normalise' :: Normalise t => t -> ReduceM t Source #

normalise :: (Normalise a, MonadReduce m) => a -> m a Source #

slowNormaliseArgs :: Term -> ReduceM Term Source #