Retro compatibility
Mon Oct 1 15:38:10 WEST 2007 Miguel Vilaca <jmvilaca@di.uminho.pt>
* Retro compatibility
To permit compilation with GHC < 6.6
{
hunk ./html/Installation.html 57
- <br/><code>./configure
-make
+ <br/><code>./configure<br/>
+make<br/>
hunk ./src/INChecks.hs 487
- . Map.mapMaybeWithKey aux
+ . mapMaybeWithKey aux
hunk ./src/INChecks.hs 496
+
+mapMaybeWithKey :: Ord k => (k -> a -> Maybe b) -> Map k a -> Map k b
+-- In GHC 6.6:
+-- mapMaybeWithKey = Map.mapMaybeWithKey
+-- Allowing retro-compatibility with GHC 6.4
+mapMaybeWithKey f = Map.foldWithKey aux Map.empty
+ where -- aux :: k -> a -> Map k b -> Map k b
+ aux k a = case f k a of
+ Nothing -> id
+ Just b -> Map.insert k b
}