[code cosmetics
martin.hofmann@uni-bamberg.de**20090612084543] hunk ./expl/Examples.hs 1
-{-# OPTIONS_GHC -fglasgow-exts #-}
hunk ./expl/Examples.hs 57
+lastM :: [a] -> Maybe a
+lastM [] = Nothing
+lastM [a] = Just a
+lastM [a,b] = Just b
+lastM [a,b,c] = Just c
+lastM [a,b,c,d] = Just d
+
hunk ./src/Data/GlobalConfig.hs 35
-                       else text "<none>"))
+                       else text "N/A"))
hunk ./src/Data/Rules.hs 245
-hypos2decs smplfy tgts hs =  map (rearrange.rules2decs.preprocess) hs
+hypos2decs smplfy blckl hs =  map (rearrange.rules2decs.preprocess) hs
hunk ./src/Data/Rules.hs 247
-    preprocess = if smplfy then simplify else id
+    preprocess = if smplfy then simplify blckl else id
hunk ./src/Data/Rules.hs 250
-    simplify l = uncurry replCCall $ partition isRec l
-    isRec (n,r)     = (elem n tgts) || ((>1).S.size $ r)
-
-replCCall :: [(Name,Rules)] ->  [(Name,Rules)] -> [(Name,Rules)]
-replCCall l []     = l
-replCCall l (x:xs) = on replCCall (replaceInAll cc ct) l xs
+    
+simplify blckl l = 
+    case partition isRec l of
+        (r,[])     -> r
+        (r,(x:xs)) -> let cr = head.S.toList.snd $ x
+                          (cc,ct) = (mkCall (fst x) (typeOf.rhs $ cr) (lhs cr), rhs cr)
+                      in  trace ("\nXXX " ++ (show.fst $ x) ++ "\n" ++ (show $ l)) $ simplify blckl $ replaceInAll cc ct (r ++ xs)
hunk ./src/Data/Rules.hs 258
-    cr = head.S.toList.snd $ x
-    (cc,ct) = (mkCall (fst x) (typeOf.rhs $ cr) (lhs cr), rhs cr)
+    isRec (n,r)     = (elem n blckl) || ((>1).S.size $ r)
+--    replCCall :: [(Name,Rules)] ->  [(Name,Rules)] -> [(Name,Rules)]
+--    replCCall l []     = l
+--    replCCall l (x:xs) = 
+--        let cr = head.S.toList.snd $ x
+--            (cc,ct) = (mkCall (fst x) (typeOf.rhs $ cr) (lhs cr), rhs cr)
+--        in simplify tgts $ on (++) (replaceInAll cc ct) l xs
+----    cr = head.S.toList.snd $ x
+----    (cc,ct) = (mkCall (fst x) (typeOf.rhs $ cr) (lhs cr), rhs cr)