[drop coercions in the core mangler rather than when converting to grin
John Meacham <john@repetae.net>**20060316102952] hunk ./Grin/FromE.hs 235
-    conv e | Just (a,_) <- from_unsafeCoerce e = conv a
hunk ./Grin/FromE.hs 277
-dropCoerce e | Just (x,_) <- from_unsafeCoerce e = x
-dropCoerce x = x
hunk ./Grin/FromE.hs 292
-    --ce e | getType e == tWorld__ = return $ Return unit
-    ce (EVar tvr@(TVr { tvrType = (ELit (LitCons n [] _))})) | RawType <- nameType n = do
+    ce (EVar tvr) | isUnboxed (getType tvr) = do
hunk ./Grin/FromE.hs 294
-    ce e |  (v,as) <- fromAp e, EVar v <- dropCoerce v = do
+    ce e |  (EVar v,as) <- fromAp e = do
hunk ./Grin/FromE.hs 324
-    ce e | Just (a,_) <- from_unsafeCoerce e = ce a
hunk ./Grin/FromE.hs 476
-    cc e |  (v,as) <- fromAp e, EVar v <- dropCoerce v = do
+    cc e |  (EVar v,as) <- fromAp e = do
hunk ./Grin/FromE.hs 493
-    cc e | Just (x,_) <- from_unsafeCoerce e = cc x
hunk ./Grin/FromE.hs 535
-        f e | Just (x,_) <- from_unsafeCoerce e = f x
hunk ./Grin/FromE.hs 562
-    constant e | Just (a,_) <- from_unsafeCoerce e = constant a
hunk ./Grin/MangleE.hs 5
+-- currently it:
+--  removes all type coercions.
+--  looks for unused types and gets rid of those.
+--  atomizes any complex types left in argument position
+--
hunk ./Grin/MangleE.hs 29
+import E.Values
hunk ./Grin/MangleE.hs 55
-    --[ (t,as,e) <- progCombinators prog ]
hunk ./Grin/MangleE.hs 59
-
hunk ./Grin/MangleE.hs 60
-
+    prog <- programMapBodies dropCoercions prog
hunk ./Grin/MangleE.hs 65
+dropCoercions e = f e where
+    f e = emapE f (dropCoerce e)
+    dropCoerce e | Just (x,_) <- from_unsafeCoerce e = dropCoerce x
+    dropCoerce x = x
+