projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87d1ac6
)
Moved MonadPlus instance for STM from Control.Monad.STM to GHC.Conc to avoid an orpha...
author
Bas van Dijk
<v.dijk.bas@gmail.com>
Sun, 16 May 2010 16:06:51 +0000
(16:06 +0000)
committer
Bas van Dijk
<v.dijk.bas@gmail.com>
Sun, 16 May 2010 16:06:51 +0000
(16:06 +0000)
GHC/Conc.lhs
patch
|
blob
|
history
diff --git
a/GHC/Conc.lhs
b/GHC/Conc.lhs
index
715e569
..
c1b2107
100644
(file)
--- a/
GHC/Conc.lhs
+++ b/
GHC/Conc.lhs
@@
-476,6
+476,10
@@
thenSTM (STM m) k = STM ( \s ->
returnSTM :: a -> STM a
returnSTM x = STM (\s -> (# s, x #))
+instance MonadPlus STM where
+ mzero = retry
+ mplus = orElse
+
-- | Unsafely performs IO in the STM monad. Beware: this is a highly
-- dangerous thing to do.
--