Use "-perm -u+x" rather than "-executable" to find executables
[ghc-hetmet.git] / utils / hpc / HpcMap.hs
1 module HpcMap ( module HpcMap ) where
2
3 #if __GLASGOW_HASKELL__ < 604
4 import qualified Data.FiniteMap as Map
5 #else
6 import qualified Data.Map as Map
7 #endif
8
9
10 lookup :: Ord key => key -> Map key elt -> Maybe elt
11 fromList :: Ord key => [(key,elt)] -> Map key elt
12 fromListWith :: Ord k => (a -> a -> a) -> [(k, a)] -> Map k a
13 toList :: Ord key => Map key elt -> [(key,elt)]
14
15 #if __GLASGOW_HASKELL__ < 604
16 type Map key elt = Map.FiniteMap key elt
17
18 lookup = flip Map.lookupFM
19 fromList = Map.listToFM 
20 fromListWith f xs = Map.addListToFM_C f Map.emptyFM xs
21 toList = Map.fmToList
22
23 #else
24
25 type Map key elt = Map.Map key elt
26
27 lookup = Map.lookup
28 fromList = Map.fromList
29 toList   = Map.toList
30 fromListWith = Map.fromListWith
31
32 #endif