[make grin typechecker deal with local functions properly, after dead code removal, regenerate function properties.
John Meacham <john@repetae.net>**20060816130339] hunk ./Grin/DeadCode.hs 182
-    f lt@Let { expDefs = defs }  = return lt { expDefs = [ df { funcDefBody = margs name body } | df@FuncDef { funcDefName = name, funcDefBody = body } <- defs ] }
+    f lt@Let { expDefs = defs }  = return lt { expDefs = [ updateFuncDefProps df { funcDefBody = margs name body } | df@FuncDef { funcDefName = name, funcDefBody = body } <- defs ] }
hunk ./Grin/FromE.hs 229
+shouldKeep e | e == unboxedTyUnit = False
hunk ./Grin/Grin.hs 215
-createFuncDef local name body@(args :-> rest)  = updateFuncDefProps FuncDef { funcDefName = name, funcDefBody = body, funcDefCall = call, funcDefProps = funcProps } where
-    call = Item name (TyCall (if local then LocalFunction else Function) (map getType (fromTuple args)) (getType rest))
+createFuncDef local name body@(Tup args :-> rest)  = updateFuncDefProps FuncDef { funcDefName = name, funcDefBody = body, funcDefCall = call, funcDefProps = funcProps } where
+    call = Item name (TyCall (if local then LocalFunction else Function) (map getType args) (getType rest))
hunk ./Grin/Grin.hs 219
-updateFuncDefProps fd@FuncDef { funcDefBody = body@(args :-> rest) } =  fd { funcDefProps = props } where
-    props = (funcDefProps fd) { funcFreeVars = freeVars body, funcTags = freeVars body, funcType = (map getType (fromTuple args),getType rest) }
+updateFuncDefProps fd@FuncDef { funcDefBody = body@(Tup args :-> rest) } =  fd { funcDefProps = props } where
+    props = (funcDefProps fd) { funcFreeVars = freeVars body, funcTags = freeVars body, funcType = (map getType args,getType rest) }
hunk ./Grin/Grin.hs 556
-        mapM_ (typecheck te) [ b | FuncDef { funcDefBody = _ :-> b } <- defs ]
-        typecheck te body
+        let nte = extendTyEnv defs te
+        mapM_ (typecheck nte) [ b | FuncDef { funcDefBody = _ :-> b } <- defs ]
+        typecheck nte body
hunk ./data/jhc_rts.c 121
+
+struct jhc_continuation {
+    void *argument;
+    jmp_buf jump_buf;
+};
+