summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/IOEnv.hs3
-rw-r--r--compiler/utils/Maybes.lhs3
-rw-r--r--compiler/utils/Stream.hs5
3 files changed, 10 insertions, 1 deletions
diff --git a/compiler/utils/IOEnv.hs b/compiler/utils/IOEnv.hs
index 1db15537c7..8193beb87f 100644
--- a/compiler/utils/IOEnv.hs
+++ b/compiler/utils/IOEnv.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE DeriveDataTypeable, UndecidableInstances #-}
+{-# LANGUAGE CPP #-}
--
-- (c) The University of Glasgow 2002-2006
@@ -43,7 +44,9 @@ import System.IO.Unsafe ( unsafeInterleaveIO )
import System.IO ( fixIO )
import Control.Monad
import MonadUtils
+#if __GLASGOW_HASKELL__ < 709
import Control.Applicative (Alternative(..))
+#endif
----------------------------------------------------------------------
-- Defining the monad type
diff --git a/compiler/utils/Maybes.lhs b/compiler/utils/Maybes.lhs
index d9e1762a2f..8052b1d848 100644
--- a/compiler/utils/Maybes.lhs
+++ b/compiler/utils/Maybes.lhs
@@ -4,6 +4,7 @@
%
\begin{code}
+{-# LANGUAGE CPP #-}
module Maybes (
module Data.Maybe,
@@ -17,7 +18,9 @@ module Maybes (
MaybeT(..)
) where
+#if __GLASGOW_HASKELL__ < 709
import Control.Applicative
+#endif
import Control.Monad
import Data.Maybe
diff --git a/compiler/utils/Stream.hs b/compiler/utils/Stream.hs
index 47cdee0789..edb0b0c558 100644
--- a/compiler/utils/Stream.hs
+++ b/compiler/utils/Stream.hs
@@ -5,14 +5,17 @@
-- Monadic streams
--
-- -----------------------------------------------------------------------------
-
+{-# LANGUAGE CPP #-}
module Stream (
Stream(..), yield, liftIO,
collect, fromList,
Stream.map, Stream.mapM, Stream.mapAccumL
) where
import Control.Monad
+#if __GLASGOW_HASKELL__ < 709
import Control.Applicative
+#endif
+
-- |
-- @Stream m a b@ is a computation in some Monad @m@ that delivers a sequence