[Update for ghc-6.10. This breaks compatibility with older versions of ghc.
Lemmih <lemmih@gmail.com>**20081117232239] hunk ./CharIO.hs 25
-flushOut = Control.Exception.catch  (IO.hFlush IO.stdout) (\_ -> return ())
+flushOut = Control.Exception.catch  (IO.hFlush IO.stdout) (\(e::SomeException) -> return ())
hunk ./CharIO.hs 41
-runMain action = Control.Exception.catch (action >> return ()) $ \x -> case x of
-        ExitException _ -> throw x
-        _ -> putErrDie $ show x
+runMain action = Control.Exception.catches (action >> return ())
+                   [ Handler $ \ (e::ExitCode) -> throw e
+                   , Handler $ \ (e::SomeException) -> putErrDie $ show e ]
hunk ./DataConstructors.hs 652
-        theKind = kind $ runIdentity (Map.lookup theTypeName km)
+        theKind = kind $ fromJust (Map.lookup theTypeName km)
hunk ./E/FromHs.hs 124
+monadicLookup k m = case Map.lookup k m of
+    Just x  -> return x
+    Nothing -> fail "key not found"
+
hunk ./E/FromHs.hs 131
-    t <- Map.lookup n assumps
+    t <- monadicLookup n assumps
hunk ./E/FromHs.hs 167
-  let funcs = runIdentity $ T.mapM (\n -> return . EVar . fst $ runEither (show n) $ Map.lookup n ds) sFuncNames
+  let funcs = runIdentity $ T.mapM (\n -> return . EVar . fst $ runEither (show n) $ monadicLookup n ds) sFuncNames
hunk ./E/TypeCheck.hs 118
+monadicLookup key m = case Map.lookup key m of
+    Just x  -> return x
+    Nothing -> fail "Key not found"
+
hunk ./E/TypeCheck.hs 132
-            Map.lookup (s1,s2) ptsRulesMap
+            monadicLookup (s1,s2) ptsRulesMap
hunk ./E/TypeCheck.hs 216
-        liftM ESort $ Map.lookup (a,b) ptsRulesMap
+        liftM ESort $ monadicLookup (a,b) ptsRulesMap
hunk ./E/TypeCheck.hs 375
-        liftM ESort $ Map.lookup (a,b) ptsRulesMap
+        liftM ESort $ monadicLookup (a,b) ptsRulesMap
hunk ./E/TypeCheck.hs 409
-        liftM ESort $ Map.lookup (a,b) ptsRulesMap
+        liftM ESort $ monadicLookup (a,b) ptsRulesMap
hunk ./FrontEnd/Class.hs 184
-    h' = [ (n,runIdentity $ Map.lookup n h) | n <- (map fst [ (cn, classSupers ss) | (cn,ss) <- Map.toList h]) ]
+    h' = [ (n,fromJust $ Map.lookup n h) | n <- (map fst [ (cn, classSupers ss) | (cn,ss) <- Map.toList h]) ]
hunk ./FrontEnd/TypeSynonyms.hs 40
-showSynonym pprint n (TypeSynonyms m) = do
-    (ns, t, _) <- Map.lookup n m
-    return $ hsep (tshow n:map tshow ns) <+> text "=" <+> pprint t
+showSynonym pprint n (TypeSynonyms m) =
+    case Map.lookup n m of
+      Just (ns, t, _) -> return $ hsep (tshow n:map tshow ns) <+> text "=" <+> pprint t
+      Nothing         -> fail "key not found"
hunk ./Grin/FromE.hs 365
-        let (nn,_,_) = runIdentity $ mlookup (tvrIdent tvr) (scMap cenv)
+        let (nn,_,_) = fromJust $ mlookup (tvrIdent tvr) (scMap cenv)
hunk ./Grin/Lint.hs 75
-        putErrLn (show e)
+        putErrLn (show (e::SomeException))
hunk ./Grin/NodeAnalyze.hs 13
+import Data.Maybe
hunk ./Grin/NodeAnalyze.hs 124
-    let cmap = Map.map (runIdentity . flip Map.lookup res) rm
+    let cmap = Map.map (fromJust . flip Map.lookup res) rm
hunk ./Grin/Show.hs 180
-    gr =   mkGraph nodes [ (n,n2,tc) | (n,(_,_ :-> l)) <- nodes, (tc,fv) <- Set.toList (freeVars l), n2 <- Map.lookup fv nodeMap ]
+    gr =   mkGraph nodes [ (n,n2,tc) | (n,(_,_ :-> l)) <- nodes, (tc,fv) <- Set.toList (freeVars l), n2 <- maybeToList $ Map.lookup fv nodeMap ]
hunk ./Ho/Build.hs 297
-            pm (join (Map.lookup m phomap)) $ do
+            pm (fromMaybe [] (Map.lookup m phomap)) $ do
hunk ./Ho/Build.hs 301
-                Map.lookup m mods >>= flip writeIORef (Right mhash)
+                writeIORef (fromJust $ Map.lookup m mods) (Right mhash)
hunk ./Info/Binary.hs 71
-            x <- Map.lookup ps binTable
-            return (ps,entryThing d,x)
+            case Map.lookup ps binTable of
+              Just x  -> return (ps,entryThing d,x)
+              Nothing -> fail "key not found"
hunk ./Interactive.hs 139
-        rx <- CE.catch ( Just `fmap` evaluate (mkRegex reg)) (\_ -> return Nothing)
+        rx <- CE.catch ( Just `fmap` evaluate (mkRegex reg)) (\(e::SomeException) -> return Nothing)
hunk ./Interactive.hs 154
-            CE.catch (runIn isStart { stateInteract = act } $ executeStatement e) $ (\e -> putStrLn $ show e)
+            CE.catch (runIn isStart { stateInteract = act } $ executeStatement e) $ (\e -> putStrLn $ show (e::SomeException))
hunk ./Main.hs 853
-        putErrLn (show e)
+        putErrLn (show (e::SomeException))
hunk ./Util/SetLike.hs 153
-    mlookup :: Monad g => k -> m -> g v
+    mlookup :: k -> m -> Maybe v
hunk ./Util/SetLike.hs 169
-    mlookup k m = case IM.lookup k m of
-        Nothing -> fail $ "IntMap: can't find " ++ show k
-        Just x -> return x
+    mlookup k m = IM.lookup k m