From: Simon Marlow Date: Fri, 3 Sep 2010 10:51:31 +0000 (+0000) Subject: update for containers-0.4 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=6f259e0eefc27e2c9fcdce99b0c760769b6fe435 update for containers-0.4 --- diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 741f4c7..c9b219f 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -68,7 +68,7 @@ Library process >= 1 && < 1.1, bytestring >= 0.9 && < 0.10, old-time >= 1 && < 1.1, - containers >= 0.1 && < 0.4, + containers >= 0.1 && < 0.5, array >= 0.1 && < 0.4 Build-Depends: filepath >= 1 && < 1.3 diff --git a/compiler/utils/FiniteMap.lhs b/compiler/utils/FiniteMap.lhs index 011a00c..28c9620 100644 --- a/compiler/utils/FiniteMap.lhs +++ b/compiler/utils/FiniteMap.lhs @@ -170,7 +170,11 @@ delListFromFM = foldl delFromFM plusFM (FM x) (FM y) = FM (M.union y x) plusFM_C f (FM x) (FM y) = FM (M.unionWith f x y) minusFM (FM x) (FM y) = FM (M.difference x y) +#if MIN_VERSION_containers(0,4,0) +foldFM k z (FM m) = M.foldrWithKey k z m +#else foldFM k z (FM m) = M.foldWithKey k z m +#endif intersectFM (FM x) (FM y) = FM (M.intersection x y) intersectFM_C f (FM x) (FM y) = FM (M.intersectionWith f x y)