[include loop count in result
martin.hofmann@uni-bamberg.de**20090612052355] hunk ./src/Data/IgorMonad.hs 152
-loopsCount :: IM Int
+loopsCount :: IM [(Name,Int)]
hunk ./src/SynthesisEngine.hs 30
-startSynthesis :: Config -> [(Name,Rules)] -> [(Name,Rules)] -> (Either String [[Dec]],Log)
+startSynthesis :: Config -> [(Name,Rules)] -> [(Name,Rules)]
+               -> (Either String ([(Name,Int)],[[Dec]]),Log)
hunk ./src/SynthesisEngine.hs 34
-synthesise :: Config -> [(Name,Rules)] -> [(Name,Rules)] -> LM [[Dec]]
+synthesise :: Config -> [(Name,Rules)] -> [(Name,Rules)] -> LM ([(Name,Int)],[[Dec]])
hunk ./src/SynthesisEngine.hs 44
-    result <- (runIM ( synthesiseTargets (cnf_tgts conf)) igordata)
-    return $ hypos2decs (cnf_simplify conf)(cnf_tgts conf) result       
+    (r,l) <- (runIM (synthesiseTargets (cnf_tgts conf) >>= \r -> 
+                      loopsCount >>= \l -> 
+                       return (r,l)) igordata)
+    return $ (,) l $ hypos2decs (cnf_simplify conf)(cnf_tgts conf) r
hunk ./src/UI/UIStarter.hs 258
-            let s' = either (const s) (modifyHistory s (tgts,bgks)) (fst res) 
+            let s' = either (const s) ((modifyHistory s (tgts,bgks)).snd) (fst $ res) 
hunk ./src/UI/UIStarter.hs 285
-printResult :: EnvState -> Config -> String -> (Either String [[Dec]],Log) -> IO()
+printResult :: EnvState -> Config -> String
+            -> (Either String ([(Name,Int)],[[Dec]]),Log) -> IO()
hunk ./src/UI/UIStarter.hs 315
-              indent 6 (bold (text "- - - - - - FINISHED WITH" <+> 
-                              text "- - - - -"))
+              indent 6 (bold (text "- - - - - - - FINISHED" <+> 
+                              text "- - - - - - -"))
hunk ./src/UI/UIStarter.hs 318
-resToDoc :: Int -> Either String [[Dec]] -> Doc
+resToDoc :: Int -> Either String ([(Name,Int)],[[Dec]]) -> Doc
hunk ./src/UI/UIStarter.hs 321
-resToDoc w (Right ds) =
-    vcat $ map (printHypo (length ds)) (zip ds [1..])
+resToDoc w (Right (ls,ds)) = vcat $
+    (foldl printLoop (text "    loops" ) ls) :
+    (map (printHypo (length ds)) (zip ds [1..]))
+    where
+    printLoop d (n,i) = linebreak <> 
+                        indent 13 (fill 12 (pretty n) <+>text "in" <+> int i) <+> d