Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
e8ebfa82
Commit
e8ebfa82
authored
Jul 09, 2007
by
rl@cse.unsw.edu.au
Browse files
Add orElse combinator for vectorisation monad
parent
17f080e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/vectorise/Vectorise.hs
View file @
e8ebfa82
...
...
@@ -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
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment