diff options
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/Pair.lhs | 6 | ||||
-rw-r--r-- | compiler/utils/UniqFM.lhs | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/compiler/utils/Pair.lhs b/compiler/utils/Pair.lhs index ca7c2a7f8e..529ba669ea 100644 --- a/compiler/utils/Pair.lhs +++ b/compiler/utils/Pair.lhs @@ -10,10 +10,12 @@ module Pair ( Pair(..), unPair, toPair, swap ) where #include "HsVersions.h" import Outputable -import Data.Monoid import Control.Applicative +#if __GLASGOW_HASKELL__ < 709 import Data.Foldable +import Data.Monoid import Data.Traversable +#endif data Pair a = Pair { pFst :: a, pSnd :: a } -- Note that Pair is a *unary* type constructor @@ -46,4 +48,4 @@ toPair (x,y) = Pair x y swap :: Pair a -> Pair a swap (Pair x y) = Pair y x -\end{code}
\ No newline at end of file +\end{code} diff --git a/compiler/utils/UniqFM.lhs b/compiler/utils/UniqFM.lhs index d8e08f599a..c941ce8884 100644 --- a/compiler/utils/UniqFM.lhs +++ b/compiler/utils/UniqFM.lhs @@ -20,7 +20,10 @@ and ``addToUFM\_C'' and ``Data.IntMap.insertWith'' differ in the order of arguments of combining function. \begin{code} -{-# LANGUAGE DeriveTraversable, DeriveDataTypeable, GeneralizedNewtypeDeriving #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveTraversable #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -Wall #-} module UniqFM ( @@ -76,7 +79,9 @@ import qualified Data.Foldable as Foldable import qualified Data.Traversable as Traversable import Data.Typeable import Data.Data +#if __GLASGOW_HASKELL__ < 709 import Data.Monoid +#endif \end{code} %************************************************************************ |