diff options
author | Ian Lynagh <igloo@earth.li> | 2010-12-16 19:06:05 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-12-16 19:06:05 +0000 |
commit | 8f8b434cfe55d949b54ad97eac5231198fa8df7a (patch) | |
tree | ce082b479af9d728eeb6e5d742db4952686c1264 | |
parent | 4c415f933a099cc968d4928ddd646dabed83934e (diff) | |
download | haskell-8f8b434cfe55d949b54ad97eac5231198fa8df7a.tar.gz |
Remove redundant HpcMap and HpcSet wrappers around Data.{Map,Set}
-rw-r--r-- | utils/hpc/HpcCombine.hs | 4 | ||||
-rw-r--r-- | utils/hpc/HpcDraft.hs | 4 | ||||
-rw-r--r-- | utils/hpc/HpcFlags.hs | 2 | ||||
-rw-r--r-- | utils/hpc/HpcMap.hs | 32 | ||||
-rw-r--r-- | utils/hpc/HpcMarkup.hs | 2 | ||||
-rw-r--r-- | utils/hpc/HpcOverlay.hs | 2 | ||||
-rw-r--r-- | utils/hpc/HpcReport.hs | 2 | ||||
-rw-r--r-- | utils/hpc/HpcSet.hs | 39 | ||||
-rw-r--r-- | utils/hpc/HpcShowTix.hs | 2 | ||||
-rw-r--r-- | utils/hpc/HpcUtils.hs | 2 | ||||
-rw-r--r-- | utils/hpc/ghc.mk | 4 |
11 files changed, 12 insertions, 83 deletions
diff --git a/utils/hpc/HpcCombine.hs b/utils/hpc/HpcCombine.hs index 57c698a8ca..190a727a5f 100644 --- a/utils/hpc/HpcCombine.hs +++ b/utils/hpc/HpcCombine.hs @@ -11,8 +11,8 @@ import Trace.Hpc.Util import HpcFlags import Control.Monad -import qualified HpcSet as Set -import qualified HpcMap as Map +import qualified Data.Set as Set +import qualified Data.Map as Map ------------------------------------------------------------------------------ sum_options :: FlagOptSeq diff --git a/utils/hpc/HpcDraft.hs b/utils/hpc/HpcDraft.hs index 3527fdf216..7b43352228 100644 --- a/utils/hpc/HpcDraft.hs +++ b/utils/hpc/HpcDraft.hs @@ -6,8 +6,8 @@ import Trace.Hpc.Util import HpcFlags -import qualified HpcSet as Set -import qualified HpcMap as Map +import qualified Data.Set as Set +import qualified Data.Map as Map import HpcUtils import Data.Tree diff --git a/utils/hpc/HpcFlags.hs b/utils/hpc/HpcFlags.hs index 30cc40175c..f5d699a04c 100644 --- a/utils/hpc/HpcFlags.hs +++ b/utils/hpc/HpcFlags.hs @@ -3,7 +3,7 @@ module HpcFlags where import System.Console.GetOpt -import qualified HpcSet as Set +import qualified Data.Set as Set import Data.Char import Trace.Hpc.Tix import Trace.Hpc.Mix diff --git a/utils/hpc/HpcMap.hs b/utils/hpc/HpcMap.hs deleted file mode 100644 index 873fc5073b..0000000000 --- a/utils/hpc/HpcMap.hs +++ /dev/null @@ -1,32 +0,0 @@ -module HpcMap ( module HpcMap ) where - -#if __GLASGOW_HASKELL__ < 604 -import qualified Data.FiniteMap as Map -#else -import qualified Data.Map as Map -#endif - - -lookup :: Ord key => key -> Map key elt -> Maybe elt -fromList :: Ord key => [(key,elt)] -> Map key elt -fromListWith :: Ord k => (a -> a -> a) -> [(k, a)] -> Map k a -toList :: Ord key => Map key elt -> [(key,elt)] - -#if __GLASGOW_HASKELL__ < 604 -type Map key elt = Map.FiniteMap key elt - -lookup = flip Map.lookupFM -fromList = Map.listToFM -fromListWith f xs = Map.addListToFM_C f Map.emptyFM xs -toList = Map.fmToList - -#else - -type Map key elt = Map.Map key elt - -lookup = Map.lookup -fromList = Map.fromList -toList = Map.toList -fromListWith = Map.fromListWith - -#endif diff --git a/utils/hpc/HpcMarkup.hs b/utils/hpc/HpcMarkup.hs index f734f65bd9..46e17090f4 100644 --- a/utils/hpc/HpcMarkup.hs +++ b/utils/hpc/HpcMarkup.hs @@ -18,7 +18,7 @@ import Data.Maybe(fromJust) import Data.Array import Data.Monoid import Control.Monad -import qualified HpcSet as Set +import qualified Data.Set as Set ------------------------------------------------------------------------------ diff --git a/utils/hpc/HpcOverlay.hs b/utils/hpc/HpcOverlay.hs index e415578c07..a074d6c7fa 100644 --- a/utils/hpc/HpcOverlay.hs +++ b/utils/hpc/HpcOverlay.hs @@ -6,7 +6,7 @@ import HpcUtils import Trace.Hpc.Tix import Trace.Hpc.Mix import Trace.Hpc.Util -import HpcMap as Map +import qualified Data.Map as Map import Data.Tree overlay_options :: FlagOptSeq diff --git a/utils/hpc/HpcReport.hs b/utils/hpc/HpcReport.hs index 5d8c714692..d3e3ef0723 100644 --- a/utils/hpc/HpcReport.hs +++ b/utils/hpc/HpcReport.hs @@ -11,7 +11,7 @@ import HpcFlags import Trace.Hpc.Mix import Trace.Hpc.Tix import Control.Monad hiding (guard) -import qualified HpcSet as Set +import qualified Data.Set as Set notExpecting :: String -> a notExpecting s = error ("not expecting "++s) diff --git a/utils/hpc/HpcSet.hs b/utils/hpc/HpcSet.hs deleted file mode 100644 index d5dfe38fc7..0000000000 --- a/utils/hpc/HpcSet.hs +++ /dev/null @@ -1,39 +0,0 @@ -module HpcSet ( module HpcSet ) where - -import qualified Data.Set as Set - -type Set a = Set.Set a - -empty :: Set a -insert :: (Ord a) => a -> Set a -> Set a -member :: (Ord a) => a -> Set a -> Bool -null :: Set a -> Bool -intersection :: Ord a => Set a -> Set a -> Set a -fromList :: Ord a => [a] -> Set a -toList :: Set a -> [a] -union :: Ord a => Set a -> Set a -> Set a - -#if __GLASGOW_HASKELL__ < 604 - -empty = Set.emptySet -insert = flip Set.addToSet -member = Set.elementOf -null = Set.isEmptySet -intersection = Set.intersect -fromList = Set.mkSet -toList = Set.setToList -union = Set.union - -#else - -empty = Set.empty -insert = Set.insert -member = Set.member -null = Set.null -intersection = Set.intersection -fromList = Set.fromList -toList = Set.toList -union = Set.union - -#endif - diff --git a/utils/hpc/HpcShowTix.hs b/utils/hpc/HpcShowTix.hs index efeb19e275..7fd651550a 100644 --- a/utils/hpc/HpcShowTix.hs +++ b/utils/hpc/HpcShowTix.hs @@ -5,7 +5,7 @@ import Trace.Hpc.Tix import HpcFlags -import qualified HpcSet as Set +import qualified Data.Set as Set showtix_options :: FlagOptSeq showtix_options diff --git a/utils/hpc/HpcUtils.hs b/utils/hpc/HpcUtils.hs index 0f56629782..397a041965 100644 --- a/utils/hpc/HpcUtils.hs +++ b/utils/hpc/HpcUtils.hs @@ -1,7 +1,7 @@ module HpcUtils where import Trace.Hpc.Util -import qualified HpcMap as Map +import qualified Data.Map as Map -- turns \n into ' ' -- | grab's the text behind a HpcPos; diff --git a/utils/hpc/ghc.mk b/utils/hpc/ghc.mk index abc3a54595..164dacffb8 100644 --- a/utils/hpc/ghc.mk +++ b/utils/hpc/ghc.mk @@ -10,8 +10,8 @@ # # ----------------------------------------------------------------------------- -utils/hpc_dist_MODULES = Main HpcCombine HpcDraft HpcFlags HpcLexer HpcMap \ - HpcMarkup HpcOverlay HpcParser HpcReport HpcSet \ +utils/hpc_dist_MODULES = Main HpcCombine HpcDraft HpcFlags HpcLexer \ + HpcMarkup HpcOverlay HpcParser HpcReport \ HpcShowTix HpcUtils utils/hpc_dist_HC_OPTS = -cpp -package hpc utils/hpc_dist_INSTALL = YES |