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:
fe2e51d
)
Hugs now gets MonadFix(mfix) from its prelude
author
Ross Paterson
<ross@soi.city.ac.uk>
Wed, 20 Jun 2007 00:03:43 +0000
(
00:03
+0000)
committer
Ross Paterson
<ross@soi.city.ac.uk>
Wed, 20 Jun 2007 00:03:43 +0000
(
00:03
+0000)
Control/Monad/Fix.hs
patch
|
blob
|
history
diff --git
a/Control/Monad/Fix.hs
b/Control/Monad/Fix.hs
index
ea481d8
..
6196f73
100644
(file)
--- a/
Control/Monad/Fix.hs
+++ b/
Control/Monad/Fix.hs
@@
-26,7
+26,11
@@
import Prelude
import System.IO
import Control.Monad.Instances ()
import Data.Function (fix)
import System.IO
import Control.Monad.Instances ()
import Data.Function (fix)
+#ifdef __HUGS__
+import Hugs.Prelude (MonadFix(mfix))
+#endif
+#ifndef __HUGS__
-- | Monads having fixed points with a \'knot-tying\' semantics.
-- Instances of 'MonadFix' should satisfy the following laws:
--
-- | Monads having fixed points with a \'knot-tying\' semantics.
-- Instances of 'MonadFix' should satisfy the following laws:
--
@@
-51,6
+55,7
@@
class (Monad m) => MonadFix m where
-- output fed back as the input. Hence @f@ should not be strict,
-- for then @'mfix' f@ would diverge.
mfix :: (a -> m a) -> m a
-- output fed back as the input. Hence @f@ should not be strict,
-- for then @'mfix' f@ would diverge.
mfix :: (a -> m a) -> m a
+#endif /* !__HUGS__ */
-- Instances of MonadFix for Prelude monads
-- Instances of MonadFix for Prelude monads