projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
904addb
)
disable MonadPlus instance that doesn't compile with 6.6
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 6 Nov 2008 10:04:11 +0000
(10:04 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 6 Nov 2008 10:04:11 +0000
(10:04 +0000)
compiler/utils/IOEnv.hs
patch
|
blob
|
history
diff --git
a/compiler/utils/IOEnv.hs
b/compiler/utils/IOEnv.hs
index
305e30e
..
5f354f0
100644
(file)
--- a/
compiler/utils/IOEnv.hs
+++ b/
compiler/utils/IOEnv.hs
@@
-139,9
+139,15
@@
unsafeInterleaveM (IOEnv m) = IOEnv (\ env -> unsafeInterleaveIO (m env))
-- For use if the user has imported Control.Monad.Error from MTL
-- Requires UndecidableInstances
-- For use if the user has imported Control.Monad.Error from MTL
-- Requires UndecidableInstances
+#if __GLASGOW_HASKELL__ > 606
+-- for some reason, this doesn't compile with GHC 6.6:
+-- utils/IOEnv.hs:144:33:
+-- No instance for (MonadPlus IO)
+-- arising from use of `mplus' at utils/IOEnv.hs:144:33-67
instance MonadPlus IO => MonadPlus (IOEnv env) where
mzero = IOEnv (const mzero)
m `mplus` n = IOEnv (\env -> unIOEnv m env `mplus` unIOEnv n env)
instance MonadPlus IO => MonadPlus (IOEnv env) where
mzero = IOEnv (const mzero)
m `mplus` n = IOEnv (\env -> unIOEnv m env `mplus` unIOEnv n env)
+#endif
----------------------------------------------------------------------
-- Accessing input/output
----------------------------------------------------------------------
-- Accessing input/output