[have so_boundvars be in choCombinators form, build rules table
John Meacham <john@repetae.net>**20080229125044] hunk ./E/SSimplify.hs 285
-    so_boundVars :: IdMap (TVr,E),         -- ^ bound variables
-    so_rules     :: IdMap ARules,
+    so_boundVars :: IdMap Comb,         -- ^ bound variables
hunk ./E/SSimplify.hs 292
-cacheSimpOpts opts
-    = opts { so_boundVarsCache = idMapToIdSet (so_boundVars opts)
-           , so_cachedScope = cacheSubst (extendScope initScope mempty { envSubst = mapMaybeIdMap bb  (so_boundVars opts), envRules = so_rules opts })
-           }
-    where bb (_,e) | isFullyConst e = Just (Done e)
-          bb _ = Nothing
-          initScope = fmap (\ (t,e) -> fixInline (so_finalPhase opts) t $ isBoundTo noUseInfo e) (so_boundVars opts)
+cacheSimpOpts opts = opts {
+    so_boundVarsCache = idMapToIdSet (so_boundVars opts),
+    so_cachedScope = cacheSubst (extendScope initScope mempty { envSubst = mapMaybeIdMap bb  (so_boundVars opts), envRules = rules })
+   } where
+    bb Comb { combBody = e } | isFullyConst e = Just (Done e)
+    bb _ = Nothing
+    initScope = fmap (\ c -> fixInline (so_finalPhase opts) (combHead c) $ isBoundTo noUseInfo (combBody c)) (so_boundVars opts)
+    rules = mapMaybeIdMap f (so_boundVars opts)
+    f Comb { combRules = rs } = if null rs then Nothing else Just $ arules rs
hunk ./E/SSimplify.hs 468
-        return (map bindComb dsOut)
+        return [ combRules_s rs $ bindComb (t,e) | (t,e) <- dsOut, rs <- [ combRules c | c <- dsIn, combHead c == t]]
hunk ./E/SSimplify.hs 778
-            Nothing | fopts FO.Rules -> applyRules lup (Info.fetch (tvrInfo v)) xs
+            Nothing | fopts FO.Rules -> applyRules lup (mfindWithDefault mempty (tvrIdent v) $ envRules inb) xs
hunk ./Main.hs 309
-            SS.so_boundVars = fromList [ (tvrIdent v,(v,e)) | (v,e) <- hoEs $ hoBuild ho],
+            SS.so_boundVars = choCombinators cho,
hunk ./Main.hs 388
-            sopt = SS.cacheSimpOpts mempty {  SS.so_boundVars = smap,
-                                              SS.so_boundVarsCache = idMapToIdSet smap,
-                                              SS.so_dataTable = progDataTable mprog }
+            sopt = SS.cacheSimpOpts mempty {
+                SS.so_boundVars = smap,
+                SS.so_dataTable = progDataTable mprog
+                }
hunk ./Main.hs 420
-        put $ fromList [ (tvrIdent v,(v,lc)) | (v,lc) <- programDs mprog] `S.union` smap
+        put $ fromList [ (combIdent c,c) | c <- progCombinators mprog] `S.union` smap