[turn simple recursive calls into non-recursive ones with a local definiton so inlining may take place.
John Meacham <john@repetae.net>**20060430044409] hunk ./Main.hs 33
+import E.Subst(subst)
hunk ./Main.hs 201
+annotateId mn x = case fromId x of
+    Just y -> toId (toName Val (mn,'f':show y))
+    Nothing -> toId (toName Val (mn,'f':show x))
+
hunk ./Main.hs 305
+        let sRec mprog = case (rec,ns) of
+                (True,[(t,v@ELam {})]) | tvrIdent t `member` (freeVars v :: IdSet) -> do
+                    let nname = annotateId "R@" (tvrIdent t)
+                        tvr' = tvr { tvrIdent = nname, tvrType = tvrType t }
+                        (_,as) = fromLam v
+                        ne' = foldr ELam (ELetRec [(tvr',subst t (EVar tvr') v)]  (foldl EAp (EVar tvr') (map EVar as))) as
+                    putStrLn $ "\nSimple Recursive: " ++ pprint t
+                    return $ programSetDs [(t,ne')] mprog
+                _ -> return mprog
+        mprog <- transformProgram "Simple Recursive" DontIterate (dump FD.CoreMini) sRec mprog