Commit 49012a1f authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Add closedV

parent 29969878
module VectMonad (
VM,
noV, tryV, maybeV, orElseV, localV, initV,
noV, tryV, maybeV, orElseV, localV, closedV, initV,
newLocalVar, newTyVar,
Builtins(..), paDictTyCon,
......@@ -192,6 +192,14 @@ localV p = do
setLEnv env
return x
closedV :: VM a -> VM a
closedV p = do
env <- readLEnv id
setLEnv emptyLocalEnv
x <- p
setLEnv env
return x
liftDs :: DsM a -> VM a
liftDs p = VM $ \bi genv lenv -> do { x <- p; return (Yes genv lenv x) }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment