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:
de8c33e
)
Remove legacy code that isn't used now that we require GHC >= 6.8
author
Ian Lynagh
<igloo@earth.li>
Sun, 24 May 2009 20:44:12 +0000
(20:44 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Sun, 24 May 2009 20:44:12 +0000
(20:44 +0000)
compiler/basicTypes/UniqSupply.lhs
patch
|
blob
|
history
compiler/simplCore/CoreMonad.lhs
patch
|
blob
|
history
compiler/utils/FastFunctions.lhs
patch
|
blob
|
history
compiler/utils/IOEnv.hs
patch
|
blob
|
history
diff --git
a/compiler/basicTypes/UniqSupply.lhs
b/compiler/basicTypes/UniqSupply.lhs
index
774d2d2
..
cb1a1fc
100644
(file)
--- a/
compiler/basicTypes/UniqSupply.lhs
+++ b/
compiler/basicTypes/UniqSupply.lhs
@@
-31,13
+31,7
@@
import FastTypes
import MonadUtils
import Control.Monad
import Control.Monad.Fix
import MonadUtils
import Control.Monad
import Control.Monad.Fix
-#if __GLASGOW_HASKELL__ >= 607
import GHC.IOBase (unsafeDupableInterleaveIO)
import GHC.IOBase (unsafeDupableInterleaveIO)
-#else
-import System.IO.Unsafe ( unsafeInterleaveIO )
-unsafeDupableInterleaveIO :: IO a -> IO a
-unsafeDupableInterleaveIO = unsafeInterleaveIO
-#endif
\end{code}
\end{code}
diff --git
a/compiler/simplCore/CoreMonad.lhs
b/compiler/simplCore/CoreMonad.lhs
index
90b062f
..
ae45ba4
100644
(file)
--- a/
compiler/simplCore/CoreMonad.lhs
+++ b/
compiler/simplCore/CoreMonad.lhs
@@
-125,12
+125,9
@@
instance Applicative CoreM where
-- 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
--- see instance MonadPlus IOEnv
instance MonadPlus IO => MonadPlus CoreM where
mzero = CoreM (const mzero)
m `mplus` n = CoreM (\rs -> unCoreM m rs `mplus` unCoreM n rs)
instance MonadPlus IO => MonadPlus CoreM where
mzero = CoreM (const mzero)
m `mplus` n = CoreM (\rs -> unCoreM m rs `mplus` unCoreM n rs)
-#endif
instance MonadUnique CoreM where
getUniqueSupplyM = do
instance MonadUnique CoreM where
getUniqueSupplyM = do
diff --git
a/compiler/utils/FastFunctions.lhs
b/compiler/utils/FastFunctions.lhs
index
aca5344
..
86c89bd
100644
(file)
--- a/
compiler/utils/FastFunctions.lhs
+++ b/
compiler/utils/FastFunctions.lhs
@@
-23,17
+23,9
@@
import System.IO.Unsafe
import GHC.Exts
import GHC.Word
import GHC.IOBase (IO(..))
import GHC.Exts
import GHC.Word
import GHC.IOBase (IO(..))
---why not import it at __GLASGOW_HASKELL__==606 ?
-#if __GLASGOW_HASKELL__ >= 607
import GHC.IOBase (unsafeDupableInterleaveIO)
import GHC.IOBase (unsafeDupableInterleaveIO)
-#endif
import GHC.Base (unsafeChr)
import GHC.Base (unsafeChr)
-#if __GLASGOW_HASKELL__ < 607
-unsafeDupableInterleaveIO :: IO a -> IO a
-unsafeDupableInterleaveIO = unsafeInterleaveIO
-#endif
-
-- Just like unsafePerformIO, but we inline it.
{-# INLINE inlinePerformIO #-}
inlinePerformIO :: IO a -> a
-- Just like unsafePerformIO, but we inline it.
{-# INLINE inlinePerformIO #-}
inlinePerformIO :: IO a -> a
diff --git
a/compiler/utils/IOEnv.hs
b/compiler/utils/IOEnv.hs
index
5f354f0
..
305e30e
100644
(file)
--- a/
compiler/utils/IOEnv.hs
+++ b/
compiler/utils/IOEnv.hs
@@
-139,15
+139,9
@@
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