[add unboxed tag support
John Meacham <john@repetae.net>**20051002063414] hunk ./E/Pretty.hs 110
+rawType s  = ELit (LitCons (toName RawType s) [] eStar)
hunk ./E/Pretty.hs 112
---(eDoc,tvrDoc) :: Monad m => E -> m Doc,Mona
hunk ./E/Pretty.hs 120
-    --symbol x = atom (col 1 x)
hunk ./E/Pretty.hs 127
---    prettylit pbind (LitFrac f _) = atom $ (col 94 (text (show f)))
+    prettylit pbind (LitCons n [] t) | t == rawType "tag#" = atom $ (col "blue" (text $ show n))
hunk ./E/Values.hs 3
-import CanType
hunk ./E/Values.hs 4
+import Control.Monad.Identity
+import qualified Data.Set as Set
+import Ratio
+
+import CanType
hunk ./E/Values.hs 15
+import Info.Types
hunk ./E/Values.hs 17
-import qualified Data.Set as Set
-import Ratio
hunk ./E/Values.hs 18
-import Info.Types
hunk ./E/Values.hs 124
+tTag = rawType "tag#"
+vTag n = ELit $ LitCons n [] tTag
+
hunk ./E/Values.hs 130
+prim_toTag e = f e where
+    f (ELit (LitCons n _ _)) = vTag n
+    f (ELit (LitInt {})) = error "toTag applied to integer"
+    f (ELetRec ds e) = ELetRec ds (prim_toTag e)
+    f (EError err _) = EError err tTag
+    f ec@ECase {} = nx where
+        Identity nx = caseBodiesMapM (return . prim_toTag) ec
+    f e = EPrim (primPrim "toTag") [e] tTag
+
+-- prim_fromTag e t = EPrim (primPrim "fromTag") [e] t
+
hunk ./E/Values.hs 155
+    f n ec@ECase {} t = (n,nx,id) where
+        Identity nx = caseBodiesMapM (return . flip prim_unsafeCoerce t) ec
hunk ./FlagOpts.flags 9
+cpr do CPR analysis
hunk ./Main.hs 263
-    --(lc,_) <- return $ E.CPR.cprAnalyze mempty lc
-    --sequence_ [ putStrLn $ (tvrShowName t) <+> show (maybe E.CPR.Top id (Info.lookup (tvrInfo t)) ::  E.CPR.Val) | (t,_,_) <- scCombinators $ eToSC dataTable lc ]
hunk ./Main.hs 264
+    (lc,_) <- return $ E.CPR.cprAnalyze mempty lc
+    sequence_ [ putStrLn $ (tvrShowName t) <+> show (maybe E.CPR.Top id (Info.lookup (tvrInfo t)) ::  E.CPR.Val) | (t,_,_) <- scCombinators $ eToSC dataTable lc ]
hunk ./Main.hs 406
+