[make unboxed enumerated types create a unique unboxed integral type to hold their values
John Meacham <john@repetae.net>**20061219002313] hunk ./DataConstructors.hs 145
+emptyConstructor = Constructor {
+                conName = error "emptyConstructor.conName",
+                conType = Unknown,
+                conSlots = [],
+                conExpr = Unknown,
+                conInhabits = error "emptyConstructor.conInhabits",
+                conDeriving = [],
+                conAlias = NotAlias,
+                conVirtual = Nothing,
+                conChildren = DataNone
+                }
+
hunk ./DataConstructors.hs 405
-        i3 = tvr { tvrIdent = 10, tvrType = tIntzh }
+        b3 = tvr { tvrIdent = 10, tvrType = tBoolzh }
hunk ./DataConstructors.hs 425
-            ib_eq = unbox (eStrictLet i3 (oper_III op (EVar i1) (EVar i2)) (ELit (litCons { litName = dc_Boolzh, litArgs = [EVar i3], litType = tBool })))
+            ib_eq = unbox (eStrictLet b3 (oper_IIB op (EVar i1) (EVar i2)) (ELit (litCons { litName = dc_Boolzh, litArgs = [EVar b3], litType = tBool })))
hunk ./DataConstructors.hs 427
-    oper_III op a b = EPrim (APrim (Operator op ["int","int"] "int") mempty) [a,b] tIntzh
+    oper_IIB op a b = EPrim (APrim (Operator op ["int","int"] "int") mempty) [a,b] tBoolzh
hunk ./DataConstructors.hs 433
+updateLit dataTable lc@LitCons { litAliasFor = Just {} } = lc
hunk ./DataConstructors.hs 471
-            f (n,vc) = vc { conExpr = ELit (litCons { litName = consName, litArgs = [ELit (LitInt (fromIntegral n) tIntzh)], litType = conType vc }), conVirtual = virt }
+            f (n,vc) = vc { conExpr = ELit (litCons { litName = consName, litArgs = [ELit (LitInt (fromIntegral n) rtype)], litType = conType vc }), conVirtual = virt }
hunk ./DataConstructors.hs 475
-            dataCons = fc { conName = consName, conType = getType (conExpr dataCons), conSlots = [tIntzh], conExpr = ELam (tVr 12 tIntzh) (ELit (litCons { litName = consName, litArgs = [EVar (tVr 12 tIntzh)], litType =  conExpr theType })) }
+            rtype = ELit litCons { litName = rtypeName, litType = eHash, litAliasFor = Just tIntzh }
+            dataCons = fc { conName = consName, conType = getType (conExpr dataCons), conSlots = [rtype], conExpr = ELam (tVr 12 rtype) (ELit (litCons { litName = consName, litArgs = [EVar (tVr 12 rtype)], litType =  conExpr theType })) }
+            rtypeCons = emptyConstructor {
+                conName = rtypeName,
+                conType = eHash,
+                conExpr = rtype,
+                conInhabits = tHash,
+                conChildren = DataEnum (length virtualCons)
+                }
hunk ./DataConstructors.hs 486
+        tell (Seq.singleton rtypeCons)
hunk ./DataConstructors.hs 496
-        theData = Constructor {
+        theData = emptyConstructor {
hunk ./DataConstructors.hs 502
-            conDeriving = [],
-            conVirtual = Nothing,
hunk ./DataConstructors.hs 530
-        theType = Constructor {
+        theType = emptyConstructor {
hunk ./DataConstructors.hs 536
-            conAlias = NotAlias,
hunk ./DataConstructors.hs 691
-primitiveAliases = [(tc_Int__,rt_int),(tc_Addr__,rt_HsPtr),(tc_Word8__,rt_uint8_t),(tc_Char__,rt_HsChar),(tc_Bool__,rt_int)]
+primitiveAliases = [
+    (tc_Int__,rt_int),
+    (tc_Addr__,rt_HsPtr),
+    (tc_Word8__,rt_uint8_t),
+    (tc_Char__,rt_HsChar),
+    (tc_Bool__,rt_int)]
hunk ./E/FromHs.hs 75
-    tv = v { tvrType = tIntzh }
-    ic = eCase (EVar tv) [Alt (LitInt 1 tIntzh) a, Alt (LitInt 0 tIntzh) b] Unknown
+    tv = v { tvrType = tBoolzh }
+    ic = eCase (EVar tv) [Alt lTruezh a, Alt lFalsezh b] Unknown
hunk ./E/FromHs.hs 79
-ifzh e a b = eCase e [Alt (LitInt 1 tIntzh) a, Alt (LitInt 0 tIntzh) b] Unknown
+ifzh e a b = eCase e [Alt lTruezh a, Alt lFalsezh b] Unknown
hunk ./E/FromHs.hs 795
-                        [z] <- newVars [tIntzh]
+                            (Just Constructor { conSlots = [rtype] }) = getConstructor vCons dataTable
+                        [z] <- newVars [rtype]
hunk ./E/Show.hs 55
+enumList = [
+    (tc_Boolzh,["False#","True#"]),
+    (toName TypeConstructor ("Jhc.Order","Ordering#"),["LT#","EQ#","GT#"])
+    ]
hunk ./E/Show.hs 68
+        f (LitInt i (ELit LitCons { litName = n })) | Just l <- lookup n enumList, i >= 0 && fromIntegral i < length l =
+            return $ atom $ (const_color (text $ l !! (fromIntegral i)))
hunk ./E/Show.hs 137
+tBoolzh = ELit litCons { litName = tc_Boolzh, litType = eHash, litAliasFor = Just tIntzh }
hunk ./E/Show.hs 147
+        f e | e == tBoolzh   = return $ atom $ text "Bool#"
hunk ./E/ToHs.hs 63
+cTypeInfoT (ELit LitCons { litAliasFor = Just af }) = cTypeInfoT af
hunk ./E/Values.hs 281
+
+tBoolzh = ELit litCons { litName = tc_Boolzh, litType = eHash, litAliasFor = Just tIntzh }
+
+lFalsezh = (LitInt 0 tBoolzh)
+lTruezh = (LitInt 1 tBoolzh)
+
hunk ./data/PrimitiveOperators-in.hs 48
+oper_aaB op ct a b = EPrim (APrim (Operator op [ct,ct] "int") mempty) [a,b] tBoolzh
hunk ./data/PrimitiveOperators-in.hs 95
-    tvrc = tVr 10 intt
+    tvrc = tVr 10 tBoolzh
hunk ./data/PrimitiveOperators-in.hs 97
-    wtd = eStrictLet tvrc (oper_aaI op ct (EVar tvra) (EVar tvrb)) (ELit (litCons { litName = dc_Boolzh, litArgs = [EVar tvrc], litType = tBool }))  -- (caseof (EVar tvrc))
+    wtd = eStrictLet tvrc (oper_aaB op ct (EVar tvra) (EVar tvrb)) (ELit (litCons { litName = dc_Boolzh, litArgs = [EVar tvrc], litType = tBool }))  -- (caseof (EVar tvrc))
hunk ./data/PrimitiveOperators-in.hs 100
-build_abs ct cn v = unbox' v cn tvra (eCase (oper_aaI "<" ct (EVar tvra) zero)  [Alt zeroI (rebox $ EVar tvra)] (fs)) where
+build_abs ct cn v = unbox' v cn tvra (eCase (oper_aaB "<" ct (EVar tvra) zero)  [Alt lFalsezh (rebox $ EVar tvra)] (fs)) where
hunk ./data/PrimitiveOperators-in.hs 110
-build_signum ct cn v = unbox' v cn tvra (eCase (EVar tvra) [Alt zero (rebox (ELit zero))] (eCase (oper_aaI "<" ct (EVar tvra) (ELit zero)) [Alt zeroI (rebox one)] (rebox negativeOne))) where
+build_signum ct cn v = unbox' v cn tvra (eCase (EVar tvra) [Alt zero (rebox (ELit zero))] (eCase (oper_aaB "<" ct (EVar tvra) (ELit zero)) [Alt lFalsezh (rebox one)] (rebox negativeOne))) where