[remove final references to ARules being held in 'Info' nodes
John Meacham <john@repetae.net>**20080301022645] {
hunk ./E/Annotate.hs 101
-            as <- mapM procRules as
hunk ./E/Annotate.hs 110
-        caseBind <- procRules caseBind
hunk ./E/Annotate.hs 126
-        tvr <- procRules tvr
hunk ./E/Annotate.hs 143
-        tvr <- procRules tvr
hunk ./E/Annotate.hs 149
-        tvr <- procRules tvr
hunk ./E/Annotate.hs 155
-    mrule r = do
-        let g tvr = do
-            nfo <- lift $ idann (tvrIdent tvr) (tvrInfo tvr)
-            return (tvr { tvrInfo = nfo },minsert (tvrIdent tvr) (Just $ EVar tvr))
-        bs <- mapM g $ ruleBinds r
-        local (foldr (.) id $ snds bs) $ do
-            args <- mapM f (ruleArgs r)
-            body <- f (ruleBody r)
-            return r { ruleBinds = fsts bs, ruleBody = body, ruleArgs = args }
-    procRules tvr = case Info.lookup (tvrInfo tvr) of
-        Nothing -> return tvr
-        Just r -> do
-            r' <- mapRules mrule r
-            return tvr { tvrInfo = Info.insert r' (tvrInfo tvr) }
hunk ./E/FreeVars.hs 5
-    bindingFreeVars,
hunk ./E/FreeVars.hs 17
-import qualified Info.Info as Info
hunk ./E/FreeVars.hs 115
-freeVarsInfo nfo = maybe mempty freeVars (Info.lookup nfo :: Maybe ARules)
+freeVarsInfo nfo = mempty
hunk ./E/LetFloat.hs 141
-            (p',[p0,pv,_]) = sepByDropPoint [(frest xs), bindingFreeVars v ev, freeVars (tvrType v)] p
+            (p',[p0,pv,_]) = sepByDropPoint [(frest xs), freeVars comb, freeVars (tvrType v)] p
hunk ./E/Rules.hs 183
-dropArguments :: [(Int,E)] -> ARules -> ARules
-dropArguments os ARules { aruleRules = rs } = arules (catMaybes $  map f rs) where
+dropArguments :: [(Int,E)] -> [Rule] -> [Rule]
+dropArguments os  rs  = catMaybes $  map f rs where
hunk ./E/Type.hs 14
-import Data.Typeable
hunk ./E/Type.hs 116
-    deriving(Typeable)
hunk ./E/TypeAnalysis.hs 265
+{-
hunk ./E/TypeAnalysis.hs 269
+-}
hunk ./E/TypeAnalysis.hs 271
-specializeDef _ env  (tvr,e) | isUnused env tvr = return ((tvr,EError ("Unused Def: " ++ tvrShowName tvr) (tvrType tvr)), mempty)
-specializeDef _ _ (t,e) | getProperty prop_PLACEHOLDER t = return ((t,e), mempty)
-specializeDef True SpecEnv { senvDataTable = dataTable }  (tvr,e) | needsSpec = ans where
+specializeComb _ env  comb | isUnused env (combHead comb) = let tvr = combHead comb in
+    return (combRules_s [] . combBody_s (EError ("Unused Def: " ++ tvrShowName tvr) (tvrType tvr)) $ comb , mempty)
+specializeComb _ _ comb | getProperty prop_PLACEHOLDER comb = return (comb, mempty)
+specializeComb True SpecEnv { senvDataTable = dataTable }  comb | needsSpec = ans where
+    tvr = combHead comb
+    e = combBody comb
hunk ./E/TypeAnalysis.hs 287
-        return ((tvr { tvrType = infertype dataTable ne, tvrInfo = infoMap (dropArguments vs) (tvrInfo tvr) },ne),msingleton tvr (fsts vs))
-specializeDef _ _ (t,e) = return ((t,e),mempty)
+        let nc  = combHead_s tvr { tvrType = infertype dataTable ne }
+                . combBody_s ne
+                . combRules_u (dropArguments vs)
+                $ comb
+        return (nc,msingleton tvr (fsts vs))
+specializeComb _ _ comb = return (comb,mempty)
hunk ./E/TypeAnalysis.hs 369
-    (ds,nenv) <- mapAndUnzipM (specializeDef doSpecialize env) ds
+    (ds,nenv) <- mapAndUnzipM (specializeComb doSpecialize env) (map bindComb ds)
+    ds <- return $ map combBind ds
hunk ./E/TypeAnalysis.hs 375
-            nfo <- infoMapM (mapABodiesArgs sb) (tvrInfo t)
-            nfo <- infoMapM (return . arules . filter ( not . (`member` unusedRules) . ruleUniq) . rulesFromARules) nfo
-            return (t { tvrInfo = nfo }, e)
+            return (t,e)
hunk ./Ho/Collected.hs 66
-        minfo' = dex (undefined :: ARules) . dex (undefined :: Properties) $ minfo
+        minfo' = dex (undefined :: Properties) $ minfo
hunk ./Ho/Collected.hs 77
-        minfo' = dex (undefined :: ARules) . dex (undefined :: Properties) $ minfo
+        minfo' = dex (undefined :: Properties) $ minfo
hunk ./Main.hs 158
-idann rs ps i nfo = return (rules rs i (props ps i nfo)) where
+idann ps i nfo = return (props ps i nfo) where
hunk ./Main.hs 163
-    rules rs i = id
-    rules rs i = case getARules rs i of
-        Nothing -> id
-        Just x -> \nfo -> Info.insert (x `mappend` Info.fetch nfo) nfo
hunk ./Main.hs 198
-reprocessCho :: Rules -> IdMap Properties -> CollectedHo -> CollectedHo
-reprocessCho rules ps cho = choHoMap_u (Map.map $ hoBuild_u (hoEs_u (map f))) $ choVarMap_u (fmap h) cho where
-    f (t,e) = (tvrInfo_u (g (tvrIdent t)) t,e)
-    g id = runIdentity . idann rules ps id
-    h ~(Just (EVar t)) = Just (EVar (tvrInfo_u (g (tvrIdent t)) t))
-
-
hunk ./Main.hs 277
-    prog <- return $ runIdentity $ annotateProgram (choVarMap cho) (idann mempty theProps) letann lamann prog
+    prog <- return $ runIdentity $ annotateProgram (choVarMap cho) (idann theProps) letann lamann prog
hunk ./Main.hs 652
-    ans = do
-        prog' <- programMapDs f prog
-        return $ runIdentity $ annotateProgram mempty (\_ nfo -> return $ unsetProperty prop_HASRULE $ Info.delete (undefined :: ARules) nfo) (\_ nfo -> return nfo)  (\_ nfo -> return nfo) prog'
+    ans = do programMapDs f (progCombinators_u (map $ combRules_s []) prog)
}
