Implement auto-specialisation of imported Ids
[ghc-hetmet.git] / compiler / utils / FiniteMap.lhs
index ca91811..3acadf1 100644 (file)
@@ -4,7 +4,7 @@ module FiniteMap (
         insertList,
         insertListWith,
         deleteList,
-        foldRightWithKey
+        foldRight, foldRightWithKey
     ) where
 
 import Data.Map (Map)
@@ -23,6 +23,8 @@ insertListWith f xs m0 = foldl (\m (k, v) -> Map.insertWith f k v m) m0 xs
 deleteList :: Ord key => [key] -> Map key elt -> Map key elt
 deleteList ks m = foldl (flip Map.delete) m ks
 
+foldRight        :: (elt -> a -> a) -> a -> Map key elt -> a
+foldRight        = Map.fold
 foldRightWithKey :: (key -> elt -> a -> a) -> a -> Map key elt -> a
 #if (MIN_VERSION_containers(0,4,0))
 foldRightWithKey = Map.foldrWithKey