rename Equal.Env to CmpContext
This commit is contained in:
parent
cba6dafc58
commit
d71ac8c34d
1 changed files with 9 additions and 9 deletions
|
@ -9,23 +9,23 @@ import Data.Maybe
|
||||||
|
|
||||||
|
|
||||||
public export
|
public export
|
||||||
record Env where
|
record CmpContext where
|
||||||
constructor MakeEnv
|
constructor MkCmpContext
|
||||||
mode : EqMode
|
mode : EqMode
|
||||||
|
|
||||||
|
|
||||||
public export
|
public export
|
||||||
0 HasEnv : (Type -> Type) -> Type
|
0 HasCmpContext : (Type -> Type) -> Type
|
||||||
HasEnv = MonadReader Env
|
HasCmpContext = MonadReader CmpContext
|
||||||
|
|
||||||
public export
|
public export
|
||||||
0 CanEqual : (q : Type) -> (Type -> Type) -> Type
|
0 CanEqual : (q : Type) -> (Type -> Type) -> Type
|
||||||
CanEqual q m = (HasErr q m, HasEnv m)
|
CanEqual q m = (HasErr q m, HasCmpContext m)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private %inline
|
private %inline
|
||||||
mode : HasEnv m => m EqMode
|
mode : HasCmpContext m => m EqMode
|
||||||
mode = asks mode
|
mode = asks mode
|
||||||
|
|
||||||
private %inline
|
private %inline
|
||||||
|
@ -287,7 +287,7 @@ parameters {auto _ : (HasDefs' q _ m, HasErr q m, Eq q)} (ctx : TyContext q d n)
|
||||||
compare : (ty, s, t : Term q d n) -> m ()
|
compare : (ty, s, t : Term q d n) -> m ()
|
||||||
compare ty s t = do
|
compare ty s t = do
|
||||||
defs <- ask
|
defs <- ask
|
||||||
runReaderT {m} (MakeEnv {mode}) $
|
runReaderT {m} (MkCmpContext {mode}) $
|
||||||
for_ (splits ctx.dctx) $ \th =>
|
for_ (splits ctx.dctx) $ \th =>
|
||||||
compare0 defs (map (/// th) ctx.tctx)
|
compare0 defs (map (/// th) ctx.tctx)
|
||||||
(ty /// th) (s /// th) (t /// th)
|
(ty /// th) (s /// th) (t /// th)
|
||||||
|
@ -296,7 +296,7 @@ parameters {auto _ : (HasDefs' q _ m, HasErr q m, Eq q)} (ctx : TyContext q d n)
|
||||||
compareType : (s, t : Term q d n) -> m ()
|
compareType : (s, t : Term q d n) -> m ()
|
||||||
compareType s t = do
|
compareType s t = do
|
||||||
defs <- ask
|
defs <- ask
|
||||||
runReaderT {m} (MakeEnv {mode}) $
|
runReaderT {m} (MkCmpContext {mode}) $
|
||||||
for_ (splits ctx.dctx) $ \th =>
|
for_ (splits ctx.dctx) $ \th =>
|
||||||
compareType defs (map (/// th) ctx.tctx) (s /// th) (t /// th)
|
compareType defs (map (/// th) ctx.tctx) (s /// th) (t /// th)
|
||||||
|
|
||||||
|
@ -307,7 +307,7 @@ parameters {auto _ : (HasDefs' q _ m, HasErr q m, Eq q)} (ctx : TyContext q d n)
|
||||||
compare : (e, f : Elim q d n) -> m ()
|
compare : (e, f : Elim q d n) -> m ()
|
||||||
compare e f = do
|
compare e f = do
|
||||||
defs <- ask
|
defs <- ask
|
||||||
runReaderT {m} (MakeEnv {mode}) $
|
runReaderT {m} (MkCmpContext {mode}) $
|
||||||
for_ (splits ctx.dctx) $ \th =>
|
for_ (splits ctx.dctx) $ \th =>
|
||||||
compare0 defs (map (/// th) ctx.tctx) (e /// th) (f /// th)
|
compare0 defs (map (/// th) ctx.tctx) (e /// th) (f /// th)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue