summaryrefslogtreecommitdiff
path: root/compiler/utils/UniqMap.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/UniqMap.hs')
-rw-r--r--compiler/utils/UniqMap.hs14
1 files changed, 5 insertions, 9 deletions
diff --git a/compiler/utils/UniqMap.hs b/compiler/utils/UniqMap.hs
index 012409b8c2..1bd51c2b38 100644
--- a/compiler/utils/UniqMap.hs
+++ b/compiler/utils/UniqMap.hs
@@ -1,6 +1,5 @@
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE TupleSections #-}
-{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# OPTIONS_GHC -Wall #-}
@@ -45,32 +44,29 @@ module UniqMap (
-- Non-deterministic functions omitted
) where
+import GhcPrelude
+
import UniqFM
import Unique
import Outputable
-#if __GLASGOW_HASKELL__ > 710
-import Data.Semigroup ( Semigroup(..) )
-#endif
+import Data.Semigroup as Semi ( Semigroup(..) )
import Data.Coerce
import Data.Maybe
-import Data.Typeable
import Data.Data
-- | Maps indexed by 'Uniquable' keys
newtype UniqMap k a = UniqMap (UniqFM (k, a))
- deriving (Data, Eq, Functor, Typeable)
+ deriving (Data, Eq, Functor)
type role UniqMap nominal representational
-#if __GLASGOW_HASKELL__ > 710
instance Semigroup (UniqMap k a) where
(<>) = plusUniqMap
-#endif
instance Monoid (UniqMap k a) where
mempty = emptyUniqMap
- mappend = plusUniqMap
+ mappend = (Semi.<>)
instance (Outputable k, Outputable a) => Outputable (UniqMap k a) where
ppr (UniqMap m) =