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

Add orElse combinator for vectorisation monad

parent 17f080e8
......@@ -166,6 +166,9 @@ tryV (VM p) = VM $ \bi env -> do
maybeV :: VM (Maybe a) -> VM a
maybeV p = maybe noV return =<< p
orElseV :: VM a -> VM a -> VM a
orElseV p q = maybe q return =<< tryV p
liftDs :: DsM a -> VM a
liftDs p = VM $ \bi env -> do { x <- p; return (Yes env x) }
......
Markdown is supported
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