diff options
author | Kavon Farvardin <kavon@farvard.in> | 2018-09-23 15:29:37 -0500 |
---|---|---|
committer | Kavon Farvardin <kavon@farvard.in> | 2018-09-23 15:29:37 -0500 |
commit | 84c2ad99582391005b5e873198b15e9e9eb4f78d (patch) | |
tree | caa8c2f2ec7e97fbb4977263c6817c9af5025cf4 /compiler/utils/UniqMap.hs | |
parent | 8ddb47cfcf5776e9a3c55fd37947c8a95e00fa12 (diff) | |
parent | e68b439fe5de61b9a2ca51af472185c62ccb8b46 (diff) | |
download | haskell-wip/T13904.tar.gz |
update to current master againwip/T13904
Diffstat (limited to 'compiler/utils/UniqMap.hs')
-rw-r--r-- | compiler/utils/UniqMap.hs | 14 |
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) = |