[cache whether a binding is cheap or not in the simplifier
John Meacham <john@repetae.net>**20060314064237] hunk ./E/SSimplify.hs 163
-    | IsBoundTo { bindingOccurance :: Occurance, bindingE :: E }
+    | IsBoundTo { bindingOccurance :: Occurance, bindingE :: E, bindingCheap :: Bool }
hunk ./E/SSimplify.hs 167
+isBoundTo o e = IsBoundTo {
+    bindingOccurance = o,
+    bindingE = e,
+    bindingCheap = isCheap e
+    }
+
hunk ./E/SSimplify.hs 201
-    initialB = mempty { envInScope =  Map.map (\e -> IsBoundTo Many e) (so_boundVars sopts) }
+    initialB = mempty { envInScope =  Map.map (\e -> isBoundTo Many e) (so_boundVars sopts) }
hunk ./E/SSimplify.hs 285
-                        w rs (Map.insert t (Done e') sub) (envInScope_u (Map.insert (tvrNum t') (IsBoundTo n e')) inb) ((t',e'):ds)
+                        w rs (Map.insert t (Done e') sub) (envInScope_u (Map.insert (tvrNum t') (isBoundTo n e')) inb) ((t',e'):ds)
hunk ./E/SSimplify.hs 287
-                    False -> w rs sub (if n /= LoopBreaker then (envInScope_u (Map.insert (tvrNum t') (IsBoundTo n e')) inb) else inb) ((t',e'):ds)
+                    False -> w rs sub (if n /= LoopBreaker then (envInScope_u (Map.insert (tvrNum t') (isBoundTo n e')) inb) else inb) ((t',e'):ds)
hunk ./E/SSimplify.hs 328
-        let t'' = substMap'' (Map.map (\ IsBoundTo { bindingE = e } -> e) $ Map.filter isIsBoundTo (envInScope inb)) t'  --  (Map.fromAscList [ (t,e) | (t,IsBoundTo _ e) <- Map.toAscList (envInScope inb) ]) t'
+        let t'' = substMap'' (Map.map (\ IsBoundTo { bindingE = e } -> e) $ Map.filter isIsBoundTo (envInScope inb)) t'
hunk ./E/SSimplify.hs 392
-        d' <- f d (Map.insert (tvrNum b) (Done (EVar b')) sub) (envInScope_u  (Map.insert (tvrNum b') (IsBoundTo Many e)) inb)
+        d' <- f d (Map.insert (tvrNum b) (Done (EVar b')) sub) (envInScope_u  (Map.insert (tvrNum b') (isBoundTo Many e)) inb)
hunk ./E/SSimplify.hs 419
-            mins (EVar v) e = envInScope_u (Map.insert (tvrNum v) (IsBoundTo Many e))
+            mins (EVar v) e = envInScope_u (Map.insert (tvrNum v) (isBoundTo Many e))
hunk ./E/SSimplify.hs 433
-                e' <- f e (Map.fromList [ (n,Done $ EVar nt) | (_,TVr { tvrIdent = n },nt) <- binds] `Map.union` sub)   (envInScope_u (Map.fromList [ (n,IsBoundTo Many e) | (e,_,TVr { tvrIdent = n }) <- binds] `Map.union`) inb)
+                e' <- f e (Map.fromList [ (n,Done $ EVar nt) | (_,TVr { tvrIdent = n },nt) <- binds] `Map.union` sub)   (envInScope_u (Map.fromList [ (n,isBoundTo Many e) | (e,_,TVr { tvrIdent = n }) <- binds] `Map.union`) inb)
hunk ./E/SSimplify.hs 491
-                Just (IsBoundTo n e) | forceInline v -> do
+                Just IsBoundTo { bindingE = e } | forceInline v -> do
hunk ./E/SSimplify.hs 494
-                Just (IsBoundTo OnceInLam e) | isCheap e && someBenefit v e xs' -> do
+                Just IsBoundTo { bindingOccurance = OnceInLam, bindingE = e, bindingCheap = True } | someBenefit v e xs' -> do
hunk ./E/SSimplify.hs 497
-                Just (IsBoundTo ManyBranch e) | multiInline v e xs' -> do
+                Just IsBoundTo { bindingOccurance = ManyBranch, bindingE = e } | multiInline v e xs' -> do
hunk ./E/SSimplify.hs 500
-                Just (IsBoundTo Many e) | isCheap e && multiInline v e xs' -> do
+                Just IsBoundTo { bindingOccurance = Many, bindingE = e, bindingCheap = True } | multiInline v e xs' -> do