summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/GHC/Types/Unique/DFM.hs8
-rw-r--r--compiler/GHC/Types/Unique/DSet.hs4
2 files changed, 1 insertions, 11 deletions
diff --git a/compiler/GHC/Types/Unique/DFM.hs b/compiler/GHC/Types/Unique/DFM.hs
index f3009de2a2..f143af2b58 100644
--- a/compiler/GHC/Types/Unique/DFM.hs
+++ b/compiler/GHC/Types/Unique/DFM.hs
@@ -77,7 +77,6 @@ import Data.Data
import Data.Functor.Classes (Eq1 (..))
import Data.List (sortBy)
import Data.Function (on)
-import qualified Data.Semigroup as Semi
import GHC.Types.Unique.FM (UniqFM, nonDetUFMToList, ufmToIntMap, unsafeIntMapToUFM)
import Unsafe.Coerce
@@ -412,13 +411,6 @@ anyUDFM p (UDFM m _i) = M.foldr ((||) . p . taggedFst) False m
allUDFM :: (elt -> Bool) -> UniqDFM key elt -> Bool
allUDFM p (UDFM m _i) = M.foldr ((&&) . p . taggedFst) True m
-instance Semi.Semigroup (UniqDFM key a) where
- (<>) = plusUDFM
-
-instance Monoid (UniqDFM key a) where
- mempty = emptyUDFM
- mappend = (Semi.<>)
-
-- This should not be used in committed code, provided for convenience to
-- make ad-hoc conversions when developing
alwaysUnsafeUfmToUdfm :: UniqFM key elt -> UniqDFM key elt
diff --git a/compiler/GHC/Types/Unique/DSet.hs b/compiler/GHC/Types/Unique/DSet.hs
index 0ce46ab083..d4d555f83b 100644
--- a/compiler/GHC/Types/Unique/DSet.hs
+++ b/compiler/GHC/Types/Unique/DSet.hs
@@ -8,7 +8,6 @@
--
-- Basically, the things need to be in class 'Uniquable'.
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
module GHC.Types.Unique.DSet (
@@ -46,14 +45,13 @@ import GHC.Types.Unique
import Data.Coerce
import Data.Data
-import qualified Data.Semigroup as Semi
-- See Note [UniqSet invariant] in GHC.Types.Unique.Set for why we want a newtype here.
-- Beyond preserving invariants, we may also want to 'override' typeclass
-- instances.
newtype UniqDSet a = UniqDSet {getUniqDSet' :: UniqDFM a a}
- deriving (Data, Semi.Semigroup, Monoid)
+ deriving (Data)
emptyUniqDSet :: UniqDSet a
emptyUniqDSet = UniqDSet emptyUDFM