diff options
| author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-03-13 13:36:38 -0400 |
|---|---|---|
| committer | David Feuer <David.Feuer@gmail.com> | 2018-03-13 13:36:39 -0400 |
| commit | 152055a19cf368439c8450040b68142f8e7d0346 (patch) | |
| tree | a2f0c29eba5ce1552e8769c55b6406134f372499 /compiler/utils/UniqFM.hs | |
| parent | ba5797937e575ce6119de6c07703e90dda2557e8 (diff) | |
| download | haskell-152055a19cf368439c8450040b68142f8e7d0346.tar.gz | |
Drop GHC 8.0 compatibility
GHC 8.4.1 is out, so now GHC's support window only extends
back to GHC 8.2. This means we can delete gobs of code that were
only used for GHC 8.0 support. Hooray!
Test Plan: ./validate
Reviewers: bgamari, erikd, dfeuer
Reviewed By: bgamari, dfeuer
Subscribers: alexbiehl, dfeuer, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4492
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 |
