[improve type error messages, make boxy steps more verbose.
John Meacham <john@repetae.net>**20060214084643] hunk ./FrontEnd/Tc/Monad.hs 35
+import Control.Monad.Error
hunk ./FrontEnd/Tc/Monad.hs 38
-import Control.Monad.Error
+import Data.FunctorM
hunk ./FrontEnd/Tc/Monad.hs 41
-import Data.FunctorM
hunk ./FrontEnd/Tc/Monad.hs 45
+import System
hunk ./FrontEnd/Tc/Monad.hs 57
-import Options
-import qualified FlagDump as FD
hunk ./FrontEnd/Tc/Monad.hs 60
+import Options
+import qualified FlagDump as FD
hunk ./FrontEnd/Tc/Monad.hs 180
-throwError s t1 t2 = do
-    diagnosis <- getErrorContext
-    typeError (Unification $ "attempted to unify " ++ prettyPrintType t1 ++ " with " ++ prettyPrintType t2) diagnosis
hunk ./FrontEnd/Tc/Monad.hs 184
-    typeError (Unification $ "attempted to unify " ++ prettyPrintType t1 ++ " with " ++ prettyPrintType t2) diagnosis
+    let Left msg = typeError (Unification $ "attempted to unify " ++ prettyPrintType t1 ++ " with " ++ prettyPrintType t2) diagnosis
+    liftIO $ processIOErrors
+    liftIO $ putErrLn msg
+    liftIO $ exitFailure
hunk ./FrontEnd/Tc/Unify.hs 61
+        printRule "F1"
hunk ./FrontEnd/Tc/Unify.hs 66
+        printRule "F2"
hunk ./FrontEnd/Tc/Unify.hs 127
+        --printRule $ "CEQ1: " ++ pprint a
hunk ./FrontEnd/Tc/Unify.hs 133
+        --printRule $ "CEQ1: " ++ pprint a
hunk ./FrontEnd/Tc/Unify.hs 143
-        -- False -> fail $ "constructor mismatch: " ++ show (a,b)
hunk ./FrontEnd/Tc/Unify.hs 145
-            printRule "CEQ2"
+            printRule $ "CEQ2: " ++ pprint ca
hunk ./FrontEnd/Tc/Unify.hs 147
-        -- _ ->   fail $ "constructor args mismatch: " ++ show (a,b)
hunk ./FrontEnd/Tc/Unify.hs 165
-    -- XXX app
- --   bm a b | (t1,as1@(_:_)) <- fromTAp a, (t2,as2) <- fromTAp b = case sameLength as1 as2 of
- --       False -> unificationError a b
- --       True -> do
- --           t1 `boxyMatch` t2
- --           sequence_ [boxyMatch x y | x <- as1 | y <- as2] >> return False
- --           printRule "XXX Apps"
- --           return False
hunk ./FrontEnd/Tc/Unify.hs 166
-        printRule "XXX App"
+        printRule "APP"