X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Futils%2FFiniteMap.lhs;h=d00d6fed041f6fe7021bf3e9107b29ae11d944cd;hb=1fb1ab5d53a09607e7f6d2450806760688396387;hp=2f5324e556a22f35f6ec3751e34c8f284d36ba16;hpb=8f7ac3fe40d3d55743b824deab655d0797a1c55f;p=ghc-hetmet.git diff --git a/ghc/compiler/utils/FiniteMap.lhs b/ghc/compiler/utils/FiniteMap.lhs index 2f5324e..d00d6fe 100644 --- a/ghc/compiler/utils/FiniteMap.lhs +++ b/ghc/compiler/utils/FiniteMap.lhs @@ -70,8 +70,11 @@ module FiniteMap ( ) where IMPORT_DELOOPER(SpecLoop) +#if defined(USE_FAST_STRINGS) +import FastString +#endif import Maybes -import Bag ( Bag, foldBag ) +import Bag ( Bag, foldrBag ) import Outputable ( Outputable(..) ) import PprStyle ( PprStyle ) import Pretty ( SYN_IE(Pretty), PrettyRep ) @@ -215,7 +218,7 @@ unitFM key elt = Branch key elt IF_GHC(1#,1) emptyFM emptyFM listToFM = addListToFM emptyFM #ifdef COMPILING_GHC -bagToFM = foldBag plusFM (\ (k,v) -> unitFM k v) emptyFM +bagToFM = foldrBag (\(k,v) fm -> addToFM fm k v) emptyFM #endif \end{code}