diff options
author | Gabor Greif <ggreif@gmail.com> | 2014-12-17 12:49:51 +0100 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2014-12-17 12:56:01 +0100 |
commit | 75c211ecafad890854f4a1f3e527bd42b13fc516 (patch) | |
tree | 7d80be63aef5ab860a3721501af3734ab4be4051 | |
parent | c9a02287a5cd14b71ac8a97711e018e9daa0abfc (diff) | |
download | haskell-75c211ecafad890854f4a1f3e527bd42b13fc516.tar.gz |
Role problems pervent GND from happening
with GHC HEAD. Reworked using deriving instance.
-rw-r--r-- | compiler/utils/UniqFM.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/utils/UniqFM.hs b/compiler/utils/UniqFM.hs index 8f962d4f5e..e24c7173b4 100644 --- a/compiler/utils/UniqFM.hs +++ b/compiler/utils/UniqFM.hs @@ -23,7 +23,9 @@ of arguments of combining function. {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveTraversable #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE StandaloneDeriving #-} {-# OPTIONS_GHC -Wall #-} module UniqFM ( @@ -211,9 +213,11 @@ instance Monoid (UniqFM a) where -} newtype UniqFM ele = UFM (M.IntMap ele) - deriving (Data, Eq, Foldable.Foldable, Functor, Traversable.Traversable, + deriving (Data, Eq, Functor, Traversable.Traversable, Typeable) +deriving instance Foldable.Foldable UniqFM + emptyUFM = UFM M.empty isNullUFM (UFM m) = M.null m unitUFM k v = UFM (M.singleton (getKey $ getUnique k) v) |