[get free variables from attached rules too
John Meacham <john@repetae.net>**20051002020551] hunk ./E/Inline.hs 1
---module E.Inline(TravM, newVarName, lookupBinding, newBinding, traverse,Binding(..),emapE,emapE', TravOptions(..),travOptions ) where
-module E.Inline(inlineDecompose, basicDecompose, emapE, emapE',emapEG,emapE_) where
+module E.Inline(inlineDecompose, basicDecompose, emapE, emapE',emapEG, emapE_, bindingFreeVars) where
hunk ./E/Inline.hs 3
+import Control.Monad.Writer
+import Data.FunctorM
+import Data.Monoid
hunk ./E/Inline.hs 10
-
-import Control.Monad.Writer
-import Data.Monoid
-import Util.Graph
-import Util.HasSize
hunk ./E/Inline.hs 12
-import Data.FunctorM
-import qualified Data.Set as Set
+import Info.Info as Info
+import Util.Graph
+import Util.HasSize
hunk ./E/Inline.hs 19
+
+bindingFreeVars t e = freeVars (tvrType t) `mappend` freeVars e `mappend` freeVars (Info.fetch (tvrInfo t) :: ARules)
hunk ./E/Inline.hs 35
-    zs = [ ((t,e), tvrNum t, freeVars (tvrType t) `mappend` freeVars e `mappend` Set.toList (ruleFreeVars rules t)) |  (t,e) <- ds ]
+    zs = [ ((t,e), tvrNum t, bindingFreeVars t e ) |  (t,e) <- ds ]
hunk ./Main.hs 7
+import Data.Monoid
hunk ./Main.hs 20
-import Data.Monoid
hunk ./Main.hs 59
-import Util.Once
hunk ./Main.hs 170
+        lc <- mangle False ("Annotate") (annotate annmap (idann (hoRules ho `mappend` hoRules ho') (hoProps ho `mappend` hoProps ho')) letann lamann) lc
hunk ./Main.hs 176
-        lc <- mangle False ("Annotate") (annotate annmap (idann (hoRules ho `mappend` hoRules ho') (hoProps ho `mappend` hoProps ho')) letann lamann) lc
hunk ./Main.hs 230
+
+    let initMap = Map.fromList [ (tvrIdent t, Just (EVar t)) | (t,_) <- (Map.elems (hoEs ho))]
hunk ./Main.hs 233
+    let Identity (ELetRec es'' (ESort 0)) = annotate initMap (idann (hoRules ho) (hoProps ho) ) letann lamann (ELetRec [ (y,z) | (x,y,z) <- es']  eStar)
hunk ./Main.hs 235
-    es' <- return [ (x,y,floatInward rules z) | (x,y,z) <- es' ]
+    es' <- return [ (x,y,floatInward rules z) | (x,_,_) <- es' | (y,z) <- es'' ]
hunk ./Main.hs 241
-    let ds' = reachable (newGraph ds (tvrNum . fst) (\(t,e) -> freeVars e `mappend` Set.toList (ruleFreeVars rules t)) ) [tvrNum main]
+    let ds' = reachable (newGraph ds (tvrNum . fst) (\ (t,e) -> Set.toList $ freeVars e `mappend` freeVars (Info.fetch (tvrInfo t) :: ARules))) [tvrNum main]