feat: add isReadOnlyExprMVar

This commit is contained in:
Leonardo de Moura 2019-11-28 05:34:12 -08:00
parent be9dab41ad
commit deacb03802

View file

@ -268,6 +268,12 @@ do mctx ← getMCtx;
| some d => pure $ d.synthetic
| _ => throwEx $ Exception.unknownExprMVar mvarId
def isReadOnlyExprMVar (mvarId : Name) : MetaM Bool :=
do mctx ← getMCtx;
match mctx.findDecl mvarId with
| some d => pure $ d.depth != mctx.depth
| _ => throwEx $ Exception.unknownExprMVar mvarId
def isReadOnlyOrSyntheticExprMVar (mvarId : Name) : MetaM Bool :=
do mctx ← getMCtx;
match mctx.findDecl mvarId with