[annotate now has functions that modify the info field rather than return a new one
John Meacham <john@repetae.net>**20051001012538] hunk ./E/Annotate.hs 18
-    -> (Id -> m Info)   -- ^ annotate based on Id map
-    -> (E -> m Info) -- ^ annotate letbound bindings
-    -> (E -> m Info) -- ^ annotate lambdabound bindings
+    -> (Id -> Info -> m Info)   -- ^ annotate based on Id map
+    -> (E -> Info -> m Info) -- ^ annotate letbound bindings
+    -> (E -> Info -> m Info) -- ^ annotate lambdabound bindings
hunk ./E/Annotate.hs 37
-            nfo <- lift $ letann e
-            return (t,Info.insert LetBound nfo)
+            nfo <- lift $ letann e (tvrInfo t)
+            return (tvrInfo_u (Info.insert LetBound) t { tvrInfo = nfo })
hunk ./E/Annotate.hs 49
-        (b',r) <- ntvr (Info.singleton CaseDefault) [] $ eCaseBind ec
+        let caseBind = eCaseBind ec
+        (b',r) <- ntvr [] $ caseBind { tvrInfo = Info.insert CaseDefault (tvrInfo caseBind) }
hunk ./E/Annotate.hs 54
-                (as,rs) <- liftM unzip $ mapMntvr (zip vs (repeat (Info.singleton CasePattern)))
+                (as,rs) <- liftM unzip $ mapMntvr (map (tvrInfo_u (Info.insert CasePattern)) vs)
hunk ./E/Annotate.hs 65
-        nfo <- lift $ lamann e
+        nfo <- lift $ lamann e (tvrInfo tvr)
+        nfo <- lift $ idann n nfo
hunk ./E/Annotate.hs 68
-        return $ lam (tvr { tvrIdent =  0, tvrType =  t',  tvrInfo = tvrInfo tvr `mappend` Info.insert bnd nfo}) e'
+        return $ lam (tvr { tvrIdent =  0, tvrType =  t', tvrInfo =  Info.insert bnd nfo}) e'
hunk ./E/Annotate.hs 70
-        nfo <- lift $ lamann e
-        (tv,r) <- ntvr (Info.insert bnd nfo) [] tvr
+        nfo <- lift $ lamann e (tvrInfo tvr)
+        (tv,r) <- ntvr  [] tvr { tvrInfo = nfo }
hunk ./E/Annotate.hs 76
-        f ((t,nfo):ts) rs = do
-            (t',r) <- ntvr nfo vs t
+        f (t:ts) rs = do
+            (t',r) <- ntvr vs t
hunk ./E/Annotate.hs 79
-        vs = [ tvrNum x | (x,_) <- ts ]
+        vs = [ tvrNum x | x <- ts ]
hunk ./E/Annotate.hs 81
-    ntvr nfo xs tvr@(TVr { tvrIdent = 0, tvrType =  t}) = do
+    ntvr xs tvr@(TVr { tvrIdent = 0, tvrType =  t}) = do
hunk ./E/Annotate.hs 83
-        let nvr = (tvr { tvrType =  t', tvrInfo = tvrInfo tvr `mappend` nfo})
+        nfo <- lift $ idann 0 (tvrInfo tvr)
+        let nvr = (tvr { tvrType =  t', tvrInfo = nfo})
hunk ./E/Annotate.hs 86
-    ntvr nfo xs tvr@(TVr {tvrIdent = i, tvrType =  t}) = do
+    ntvr xs tvr@(TVr {tvrIdent = i, tvrType =  t}) = do
hunk ./E/Annotate.hs 89
-        nfo' <- lift $ idann i
+        nfo' <- lift $ idann i (tvrInfo tvr)
hunk ./E/Annotate.hs 91
-        let nvr = (tvr { tvrIdent =  i', tvrType =  t', tvrInfo = tvrInfo tvr `mappend` nfo `mappend` nfo'})
+        let nvr = (tvr { tvrIdent =  i', tvrType =  t', tvrInfo =  nfo'})
hunk ./Info/Types.hs 80
+setProperties :: HasProperties a => [Atom] -> a -> a
+setProperties [] nfo = nfo
+setProperties (p:ps) nfo = setProperty p (setProperties ps nfo)
+
hunk ./Main.hs 112
-lamann _ = return mempty
-letann e = return (Info.singleton $ manifestLambdas e)
-idann rs ps i = return (props ps i `mappend` rules rs i) where
+lamann _ nfo = return nfo
+letann e nfo = return (Info.insert (manifestLambdas e) nfo)
+idann rs ps i nfo = return (props ps i nfo `mappend` rules rs i) where
hunk ./Main.hs 117
-            Just ps ->  Info.singleton (Properties $ Set.fromList ps)
-            Nothing ->  mempty
-        Nothing -> mempty
+            Just ps ->  setProperties ps
+            Nothing ->  id
+        Nothing -> id
hunk ./Main.hs 123
-    ts = [ let Identity x = idann rs ps (tvrIdent t) in t { tvrInfo = x `mappend` tvrInfo t } | t <-methodNames ch ]
+    ts = [ let Identity x = idann rs ps (tvrIdent t) (tvrInfo t) in t { tvrInfo = x  } | t <-methodNames ch ]
hunk ./Main.hs 166
-        nfo <- idann (hoRules ho') (hoProps ho') (tvrIdent v)
-        v <- return  v { tvrInfo = nfo `mappend` tvrInfo v }
+        nfo <- idann (hoRules ho') (hoProps ho') (tvrIdent v) (tvrInfo v)
+        v <- return  v { tvrInfo = nfo }
hunk ./Main.hs 176
-        lc <- mangle False ("Annotate") (annotate annmap (idann (hoRules ho `mappend` hoRules ho') (hoProps ho `mappend` hoProps ho')) letann (\_ -> return mempty)) lc
+        lc <- mangle False ("Annotate") (annotate annmap (idann (hoRules ho `mappend` hoRules ho') (hoProps ho `mappend` hoProps ho')) letann lamann) lc
hunk ./Main.hs 186
-        nfo <- letann lc
+        nfo <- letann lc (tvrInfo v)
hunk ./Main.hs 188
-        v <- return $ v { tvrInfo = Info.insert LetBound nfo `mappend` tvrInfo v }
+        v <- return $ v { tvrInfo = Info.insert LetBound nfo }