[clean up code some get rid of funcMain and funcInitCafs special cases
John Meacham <john@repetae.net>**20070510091108] hunk ./Grin/FromE.hs 79
-    (tc_Ref__,TyPtr (TyPtr TyNode)),
-    (tc_Array__,TyPtr (TyPtr TyNode)),
-    (tc_MutArray__,TyPtr (TyPtr TyNode))
+    (tc_Ref__,TyPtr tyINode),
+    (tc_Array__,TyPtr tyINode),
+    (tc_MutArray__,TyPtr tyINode)
hunk ./Grin/FromE.hs 143
---    prog <- return $ prog { progCombinators  = map stripTheWorld (progCombinators prog) }
hunk ./Grin/FromE.hs 147
+        funcMain = toAtom "b_main"
hunk ./Grin/FromE.hs 198
-        ic = (funcInitCafs,(Tup [] :-> initCafs) )
-        ds' = ic:(ds ++ fbaps)
+        ds' = ds ++ fbaps
hunk ./Grin/FromE.hs 208
-        theFuncs = (funcMain ,Tup [] :-> App funcInitCafs [] tyUnit :>>= unit :->  discardResult (App (scTag mainEntry) [] tyUnit)) : efv ++ ds'
+        theFuncs = (funcMain ,Tup [] :-> initCafs :>>= unit :->  discardResult (App (scTag mainEntry) [] tyUnit)) : efv ++ ds'
hunk ./Grin/FromE.hs 257
-    (funcInitCafs, ([],tyUnit)),
hunk ./Grin/FromE.hs 278
-    canidate e | (EVar x,as) <- fromAp e, Just vs <- mlookup x res, vs > length (ff as) = True
+    canidate e | (EVar x,as) <- fromAp e, Just vs <- mlookup x res, vs > length as = True
hunk ./Grin/FromE.hs 281
-    res = Map.fromList [ (v,length $ ff vs) | (v,vs,_) <- ds]
+    res = Map.fromList [ (v,length vs) | (v,vs,_) <- ds]
hunk ./Grin/FromE.hs 288
-    conv e | (EVar x,as) <- fromAp e, Just vs <- mlookup x res, vs > length (ff as) = Const (NodeC (partialTag (scTag x) (vs - length (ff as))) (keepIts $ map conv (ff as)))
+    conv e | (EVar x,as) <- fromAp e, Just vs <- mlookup x res, vs > length as = Const (NodeC (partialTag (scTag x) (vs - length as)) (keepIts $ map conv as))
hunk ./Grin/FromE.hs 294
-    ff x = x
-    --ff x = filter (shouldKeep . getType) x
hunk ./Grin/Grin.hs 31
+    tyINode,
+    tyDNode,
hunk ./Grin/Grin.hs 38
-    funcFetch,
-    funcInitCafs,
-    funcMain,
hunk ./Grin/Grin.hs 116
-funcFetch = toAtom "@fetch"
-funcInitCafs = toAtom "@initcafs"
-funcMain = toAtom "@main"
hunk ./Grin/Grin.hs 120
+-- lazy node sptr_t
+tyINode = TyPtr TyNode
+-- strict node wptr_t
+tyDNode = TyNode
+
hunk ./Grin/Grin.hs 217
+
hunk ./Grin/Grin.hs 397
-    | t == funcMain = return t
-    | t == funcInitCafs = return t
hunk ./Grin/Grin.hs 406
-    | t == funcMain = True
-    | t == funcInitCafs = True
hunk ./Grin/Grin.hs 466
-findType m a = case findArgsType m a of
-    Nothing -> fail $ "findType: " ++ show a
-    Just (_,x) -> return x