projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a note about the interruptibility of throwTo.
[ghc-base.git]
/
Control
/
Monad
/
Fix.hs
diff --git
a/Control/Monad/Fix.hs
b/Control/Monad/Fix.hs
index
c1b4fe1
..
57308bf
100644
(file)
--- a/
Control/Monad/Fix.hs
+++ b/
Control/Monad/Fix.hs
@@
-29,6
+29,9
@@
import Data.Function (fix)
#ifdef __HUGS__
import Hugs.Prelude (MonadFix(mfix))
#endif
#ifdef __HUGS__
import Hugs.Prelude (MonadFix(mfix))
#endif
+#if defined(__GLASGOW_HASKELL__)
+import GHC.ST
+#endif
#ifndef __HUGS__
-- | Monads having fixed points with a \'knot-tying\' semantics.
#ifndef __HUGS__
-- | Monads having fixed points with a \'knot-tying\' semantics.
@@
-77,3
+80,9
@@
instance MonadFix IO where
instance MonadFix ((->) r) where
mfix f = \ r -> let a = f a r in a
instance MonadFix ((->) r) where
mfix f = \ r -> let a = f a r in a
+
+#if defined(__GLASGOW_HASKELL__)
+instance MonadFix (ST s) where
+ mfix = fixST
+#endif
+