[make sure rules are properly applied to currently compiling module, rearrange some code.
John Meacham <john@repetae.net>**20061127071323] {
hunk ./E/FreeVars.hs 110
-freeVarsInfo nfo = maybe mempty freeVars (Info.lookup (Info.getInfo nfo) :: Maybe ARules)
+freeVarsInfo nfo = maybe mempty freeVars (Info.lookup nfo :: Maybe ARules)
hunk ./E/FreeVars.hs 123
+
hunk ./E/Inline.hs 164
-        prog' = prog { progStats = mempty }
hunk ./E/Inline.hs 165
-    (ds,prog'') <- g prog' [] imap $ programDecomposedDs prog
+    (ds,prog'') <- g prog { progStats = mempty } [] imap $ programDecomposedDs prog
hunk ./Ho/Type.hs 24
+import Util.SetLike
hunk ./Ho/Type.hs 76
-    {-! derive: Monoid !-}
+
+instance Monoid Ho where
+    mempty = Ho mempty mempty mempty mempty mempty mempty mempty mempty mempty mempty mempty mempty mempty mempty
+    mappend a b = Ho {
+        hoModules = hoModules a `mappend` hoModules b,
+        hoLibraries = hoLibraries a `mappend` hoLibraries b,
+        hoExports = hoExports a `mappend` hoExports b,
+        hoDefs = hoDefs a `mappend` hoDefs b,
+        hoAssumps = hoAssumps a `mappend` hoAssumps b,
+        hoFixities = hoFixities a `mappend` hoFixities b,
+        hoKinds = hoKinds a `mappend` hoKinds b,
+        hoClassHierarchy = hoClassHierarchy a `mappend` hoClassHierarchy b,
+        hoTypeSynonyms = hoTypeSynonyms a `mappend` hoTypeSynonyms b,
+        hoProps = munionWith mappend (hoProps a) (hoProps b),
+        hoDataTable = hoDataTable a `mappend` hoDataTable b,
+        hoEs = hoEs a `mappend` hoEs b,
+        hoRules = hoRules a `mappend` hoRules b,
+        hoUsedIds = hoUsedIds a `mappend` hoUsedIds b
+    }
+
hunk ./Main.hs 210
-        imapRules = fromList [ (tvrIdent v,Just (EVar v))| (v,_) <- Map.elems (hoEs accumho `mappend` hoEs ho)]
+        imapRules = fromList [ (tvrIdent v,Just (EVar v))| (v,_) <- Map.elems (hoEs accumho' `mappend` hoEs ho)]
hunk ./Main.hs 265
-    ds <- annotateDs mempty (\_ nfo -> return nfo) (\_ nfo -> return nfo) (\_ nfo -> return nfo) ds
-    wdump FD.CoreInitial $
-        mapM_ (\(v,lc) -> printCheckName'' fullDataTable v lc) ds
hunk ./Main.hs 273
+    ds <- annotateDs mempty (\_ nfo -> return nfo) (\_ nfo -> return nfo) (\_ nfo -> return nfo) ds
+    wdump FD.CoreInitial $
+        mapM_ (\(v,lc) -> printCheckName'' fullDataTable v lc) ds
hunk ./Main.hs 283
-    let allRules = hoRules allHo `mappend` rules
+    let allRules = hoRules ho `mappend` rules
hunk ./Main.hs 292
-    prog <- return $ runIdentity $ annotateProgram mempty (idann allRules allProps) letann lamann prog
+
+    ho <- return $ reprocessHo rules allProps ho
+
+    let brum = fromList [ (tvrIdent n,Just (EVar n)) | (n,_) <- Map.elems $ hoEs ho ] where
+    -- Here we substitute in all the original types, with rules and properties defined in the current module included
+    prog <- return $ runIdentity $ annotateProgram brum (idann allRules allProps) letann lamann prog
+
hunk ./Main.hs 302
-    let entryPoints = execWriter $ programMapDs_ (\ (t,_) -> when (getProperty prop_EXPORTED t || member (tvrIdent t) rfreevars) (tell [t])) prog
-        rfreevars = ruleAllFreeVars rules
+    --let entryPoints = execWriter $ programMapDs_ (\ (t,_) -> when (getProperty prop_EXPORTED t || member (tvrIdent t) rfreevars) (tell [t])) prog
+    --    rfreevars = ruleAllFreeVars rules
+    let entryPoints = execWriter $ programMapDs_ (\ (t,_) -> when (getProperty prop_EXPORTED t || getProperty prop_INSTANCE t)  (tell [t])) prog
hunk ./Main.hs 310
-    ho <- return $ reprocessHo rules allProps ho
}
