[get rid of old hardcoded tBox type
John Meacham <john@repetae.net>**20080319193358] hunk ./DataConstructors.hs 255
-tbox = emptyConstructor {
-            conName = tc_Box,
-            conType = eStar,
-            conExpr = tBox,
-            conInhabits = tStar,
-            conChildren = DataAbstract
-    }
hunk ./DataConstructors.hs 460
-dataTablePrims = DataTable $ Map.fromList ([ (conName x,x) | x <- tbox:tarrow:primitiveTable ])
+dataTablePrims = DataTable $ Map.fromList ([ (conName x,x) | x <- tarrow:primitiveTable ])
hunk ./DataConstructors.hs-boot 13
+mktBox :: E -> E
hunk ./E/E.hs 66
-tBox = ELit (litCons { litName = tc_Box, litArgs = [], litType = eStar })
hunk ./E/TypeCheck.hs 113
-canBeBox x | getType x == eStar = True
+canBeBox x | getType (getType x) == ESort EStarStar = True
hunk ./E/TypeCheck.hs 116
+tBox = mktBox eStar
+
hunk ./E/TypeCheck.hs 132
---    getType (EAp a _) | a == tBox = getType a
-    getType e@(EAp (ELit LitCons {}) b) = error $ "getType: application of type alias " ++ (render $ ePretty e)
hunk ./E/TypeCheck.hs 133
-    getType (EAp a b) = if isUnknown typa then Unknown else eAp typa b where typa = getType a
+    getType e@(EAp a b) = ans where
+        ans = if isUnknown typa then Unknown else if a == tBox || typa == tBox then tBox else (case a of
+            (ELit LitCons {}) -> error $ "getType: application of type alias " ++ (render $ ePretty e)
+            _ -> eAp typa b)
+        typa = getType a
hunk ./E/TypeCheck.hs 224
-            strong' $ eAp a' b
+            if a' == tBox then return tBox else strong' (eAp a' b)
hunk ./E/TypeCheck.hs 382
-        strong' (eAp a' b)
+        if a' == tBox then return tBox else strong' (eAp a' b)
hunk ./E/TypeCheck.hs 416
-        strong' (eAp a' b)
+        if a' == tBox then return tBox else strong' (eAp a' b)
hunk ./Main.hs 661
-    boxify v@(EAp _ _) | canBeBox v = mktBox (getType v)
+--    boxify v@(EAp _ _) | canBeBox v = mktBox (getType v)
hunk ./Main.hs 663
-    boxify (EAp a b) = EAp (boxify a) b -- TODO there should be no applications at the type level by now (boxify b)
+ --   boxify (EAp a b) = EAp (boxify a) b -- TODO there should be no applications at the type level by now (boxify b)
+    boxify (EAp a b) = EAp (boxify a) (boxify b)
hunk ./Name/Names.hs 63
-tc_Box = toName TypeConstructor    ("Jhc@","Box")