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

Safe Haskell | None
Language | Haskell2010

Agda.TypeChecking.SyntacticEquality

Description

A syntactic equality check that takes meta instantiations into account, but does not reduce. It replaces `(v, v') <- instantiateFull (v, v') v == v'` by a more efficient routine which only traverses and instantiates the terms as long as they are equal.

Synopsis

- class SynEq a
- checkSyntacticEquality :: SynEq a => a -> a -> ReduceM ((a, a), Bool)

# Documentation

class SynEq a #

Instantiate full as long as things are equal

Minimal complete definition

synEq

Instances

SynEq ArgInfo # |
Methods synEq :: ArgInfo -> ArgInfo -> SynEqM (ArgInfo, ArgInfo) synEq' :: ArgInfo -> ArgInfo -> SynEqM (ArgInfo, ArgInfo)
SynEq LevelAtom # |
Methods synEq :: LevelAtom -> LevelAtom -> SynEqM (LevelAtom, LevelAtom) synEq' :: LevelAtom -> LevelAtom -> SynEqM (LevelAtom, LevelAtom)
SynEq PlusLevel # |
Methods synEq :: PlusLevel -> PlusLevel -> SynEqM (PlusLevel, PlusLevel) synEq' :: PlusLevel -> PlusLevel -> SynEqM (PlusLevel, PlusLevel)
SynEq Level # |
Methods synEq :: Level -> Level -> SynEqM (Level, Level) synEq' :: Level -> Level -> SynEqM (Level, Level)
SynEq Sort # |
Methods synEq :: Sort -> Sort -> SynEqM (Sort, Sort) synEq' :: Sort -> Sort -> SynEqM (Sort, Sort)
SynEq Type # | Syntactic equality ignores sorts.
Methods synEq :: Type -> Type -> SynEqM (Type, Type) synEq' :: Type -> Type -> SynEqM (Type, Type)
SynEq Term # | Syntactic term equality ignores `DontCare` stuff.
Methods synEq :: Term -> Term -> SynEqM (Term, Term) synEq' :: Term -> Term -> SynEqM (Term, Term)
SynEq a => SynEq [a] # |
Methods synEq :: [a] -> [a] -> SynEqM ([a], [a]) synEq' :: [a] -> [a] -> SynEqM ([a], [a])
SynEq a => SynEq (Dom a) # |
Methods synEq :: Dom a -> Dom a -> SynEqM (Dom a, Dom a) synEq' :: Dom a -> Dom a -> SynEqM (Dom a, Dom a)
SynEq a => SynEq (Arg a) # |
Methods synEq :: Arg a -> Arg a -> SynEqM (Arg a, Arg a) synEq' :: Arg a -> Arg a -> SynEqM (Arg a, Arg a)
(Subst t a, SynEq a) => SynEq (Abs a) # |
Methods synEq :: Abs a -> Abs a -> SynEqM (Abs a, Abs a) synEq' :: Abs a -> Abs a -> SynEqM (Abs a, Abs a)
SynEq a => SynEq (Elim' a) # |
Methods synEq :: Elim' a -> Elim' a -> SynEqM (Elim' a, Elim' a) synEq' :: Elim' a -> Elim' a -> SynEqM (Elim' a, Elim' a)

checkSyntacticEquality :: SynEq a => a -> a -> ReduceM ((a, a), Bool) #

Syntactic equality check for terms. `checkSyntacticEquality v v' = do (v,v') <- instantiateFull (v,v') return ((v,v'), v==v')` only that `v,v'` are only fully instantiated to the depth where they are equal.