[add unique integer to boxen
John Meacham <john@repetae.net>**20051209073821] hunk ./FrontEnd/Representation.hs 71
-           | TBox { typeKind :: Kind, typeBox :: IORef Type }     -- ^ used only in typechecker
+           | TBox { typeKind :: Kind, typeSeq :: !Int, typeBox :: IORef Type }     -- ^ used only in typechecker
hunk ./FrontEnd/Representation.hs 167
-            ft (TBox _ box) = do
+            ft (TBox _ _ box) = do
hunk ./FrontEnd/Representation.hs 254
-           TBox Star _ -> text "_"
-           TBox k _ -> return $ parens $ text "_ :: " <> pprint k
+           TBox Star i _ -> text "_" <> tshow i
+           TBox k i _ -> return $ parens $ text "_" <> tshow i <> text " :: " <> pprint k
hunk ./FrontEnd/Tc/Main.hs 120
-    let lam (p:ps) e (TBox _ box) rs = do -- ABS2
+    let lam (p:ps) e TBox { typeBox = box} rs = do -- ABS2
hunk ./FrontEnd/Tc/Monad.hs 181
+    u <- newUniq
hunk ./FrontEnd/Tc/Monad.hs 183
-    return (liftIO $ readIORef r, TBox k r)
+    return (liftIO $ readIORef r, TBox k u r)
hunk ./FrontEnd/Tc/Unify.hs 5
-import qualified Data.Map as Map
+import qualified Text.PrettyPrint.HughesPJ as P
hunk ./FrontEnd/Tc/Unify.hs 7
+import Doc.PPrint
+import Doc.DocLike
hunk ./FrontEnd/Tc/Unify.hs 13
+pretty vv = show ( pprint vv :: P.Doc)
+ppretty vv = parens (pretty vv)
+
hunk ./FrontEnd/Tc/Unify.hs 20
+    liftIO $ putStrLn $ "subsumes: " <> ppretty s1 <+> ppretty s2
hunk ./FrontEnd/Tc/Unify.hs 24
-    sub (TBox k a) b = boxyMatch (TBox k a) b
+    sub tb@TBox {} b = boxyMatch tb b
hunk ./FrontEnd/Tc/Unify.hs 44
-    sub t@(TArrow s1 s2) (TBox _ box) = do
+    sub t@(TArrow s1 s2) (TBox { typeBox = box}) = do
hunk ./FrontEnd/Tc/Unify.hs 54
-        (TBox _ b) -> fillBox b a
+        (TBox {typeBox = b}) -> fillBox b a
hunk ./FrontEnd/Tc/Unify.hs 65
+    liftIO $ putStrLn $ "boxyMatch: " <> ppretty s1 <+> ppretty s2
hunk ./FrontEnd/Tc/Unify.hs 68
+        liftIO $ putStrLn $ "boxyMatch: " <> ppretty s2 <+> ppretty s1
hunk ./FrontEnd/Tc/Unify.hs 74
-    bm (TBox k1 ba) (TBox k2 bb) = do
+    bm TBox { typeKind = k1, typeBox = ba} TBox { typeKind = k2, typeBox = bb} = do
hunk ./FrontEnd/Tc/Unify.hs 82
-    bm (TArrow s1 s2) (TBox _ box) = do
+    bm (TArrow s1 s2) TBox { typeBox = box} = do
hunk ./FrontEnd/Tc/Unify.hs 116
-    bm (TForAll vs (ps :=> t)) (TBox k box) = do
+    bm (TForAll vs (ps :=> t)) (TBox { typeKind = k, typeBox = box }) = do
hunk ./FrontEnd/Tc/Unify.hs 136
-        (TBox _ b) -> fillBox b a >> return False
+        (TBox { typeBox = b}) -> fillBox b a >> return False
hunk ./FrontEnd/Type.hs 100
-  kind (TBox k _) = k
+  kind (TBox { typeKind = k }) = k