[make points to analysis understand local functions
John Meacham <john@repetae.net>**20060815054422] hunk ./Grin/PointsToAnalysis.hs 337
+        g lt@Let { expDefs = defs, expBody = body } = do
+            body' <- g body
+            ds <- sequence [ f l >>= return . (,) n | FuncDef { funcDefName = n, funcDefBody = l } <- defs ]
+            return lt { expDefs = map (uncurry $ createFuncDef True) ds, expBody = body' }
hunk ./Grin/PointsToAnalysis.hs 395
-                Just (ts,_) = findArgsType te atom
+                ts = case findArgsType te atom of
+                    Just (ts,_) -> ts
+                    _ -> []
hunk ./Grin/PointsToAnalysis.hs 400
-    return grin { grinPhase = PostInlineEval, grinFunctions = funcs, grinArgTags = convertArgs $ ptFuncArgs pt, grinReturnTags = Map.mapWithKey (funcReturn te pt) $ ptFunc pt }
+    return grin {
+        grinPhase = PostInlineEval,
+        grinFunctions = funcs,
+        grinArgTags = convertArgs $ ptFuncArgs pt,
+        grinReturnTags = Map.mapWithKey (funcReturn te pt) $ ptFunc pt
+        }
hunk ./Grin/PointsToAnalysis.hs 411
-    Nothing     -> error ("funcReturn: "++show fn)
+    Nothing     -> valueSetToItem te pt TyUnknown vs -- error ("funcReturn: "++show fn)
hunk ./Grin/PointsToAnalysis.hs 491
+    g Let { expDefs = defs, expBody = body } = do
+        mapM_ (uncurry collectM) [ (funcDefName d, funcDefBody d) | d <- defs]
+        f body