diff options
Diffstat (limited to 'compiler/utils/UniqFM.hs')
-rw-r--r-- | compiler/utils/UniqFM.hs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/utils/UniqFM.hs b/compiler/utils/UniqFM.hs index f0cc197b71..2a9b806178 100644 --- a/compiler/utils/UniqFM.hs +++ b/compiler/utils/UniqFM.hs @@ -20,7 +20,6 @@ and ``addToUFM\_C'' and ``Data.IntMap.insertWith'' differ in the order of arguments of combining function. -} -{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -Wall #-} @@ -79,19 +78,16 @@ import Outputable import Data.List (foldl') import qualified Data.IntMap as M -#if MIN_VERSION_containers(0,5,9) import qualified Data.IntMap.Merge.Lazy as M import Control.Applicative (Const (..)) import qualified Data.Monoid as Mon -#endif import qualified Data.IntSet as S -import Data.Typeable import Data.Data import qualified Data.Semigroup as Semi newtype UniqFM ele = UFM (M.IntMap ele) - deriving (Data, Eq, Functor, Typeable) + deriving (Data, Eq, Functor) -- We used to derive Traversable and Foldable, but they were nondeterministic -- and not obvious at the call site. You can use explicit nonDetEltsUFM -- and fold a list if needed. @@ -346,14 +342,10 @@ ufmToIntMap (UFM m) = m -- Determines whether two 'UniqFm's contain the same keys. equalKeysUFM :: UniqFM a -> UniqFM b -> Bool -#if MIN_VERSION_containers(0,5,9) equalKeysUFM (UFM m1) (UFM m2) = Mon.getAll $ getConst $ M.mergeA (M.traverseMissing (\_ _ -> Const (Mon.All False))) (M.traverseMissing (\_ _ -> Const (Mon.All False))) (M.zipWithAMatched (\_ _ _ -> Const (Mon.All True))) m1 m2 -#else -equalKeysUFM (UFM m1) (UFM m2) = M.keys m1 == M.keys m2 -#endif -- Instances |