feat: add MonadLCtx and MonadMCtx helper classes
This commit is contained in:
parent
65f1c3fe65
commit
5e582823ec
2 changed files with 18 additions and 0 deletions
|
|
@ -348,4 +348,13 @@ Id.run $ lctx.anyM p
|
|||
Id.run $ lctx.allM p
|
||||
|
||||
end LocalContext
|
||||
|
||||
class MonadLCtx (m : Type → Type) :=
|
||||
(getLCtx : m LocalContext)
|
||||
|
||||
export MonadLCtx (getLCtx)
|
||||
|
||||
instance monadLCtxTrans (m n) [MonadLCtx m] [MonadLift m n] : MonadLCtx n :=
|
||||
{ getLCtx := liftM (getLCtx : m _) }
|
||||
|
||||
end Lean
|
||||
|
|
|
|||
|
|
@ -1049,4 +1049,13 @@ let (e, s) := LevelMVarToParam.main e { paramNamePrefix := paramNamePrefix, alre
|
|||
expr := e }
|
||||
|
||||
end MetavarContext
|
||||
|
||||
class MonadMCtx (m : Type → Type) :=
|
||||
(getMCtx : m MetavarContext)
|
||||
|
||||
export MonadMCtx (getMCtx)
|
||||
|
||||
instance monadMCtxTrans (m n) [MonadMCtx m] [MonadLift m n] : MonadMCtx n :=
|
||||
{ getMCtx := liftM (getMCtx : m _) }
|
||||
|
||||
end Lean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue