[Changed pretty printing of Hypos, TH.Dec only used in Ppr as ntermediate data type
martin.hofmann@uni-bamberg.de**20091210072458] hunk ./src/Igor2/Data/Rules.hs 278
-hypos2decs :: [[(Name,Rules)]] -> [[Dec]]
-hypos2decs hs =  map (rules2decs.rearrange) hs
+hypos2decs :: [[(Name,Rules)]] -> [[FunBind]]
+hypos2decs hs =  map ((map toFunB).rearrange) hs
hunk ./src/Igor2/Data/Rules.hs 330
-rules2decs :: [(Name,Rules)] -> [Dec]
-rules2decs = map rules2dec
hunk ./src/Igor2/Data/Rules.hs 331
-rules2dec :: (Name,Rules) -> Dec
-rules2dec (n,rs) = FunD n (rules2clauses rs)
-
-rules2clauses :: Rules -> [Clause]
-rules2clauses rs = map rule2clause  (sortByPatLength rs)
-    where
-    sortByPatLength = (sortBy $ on compare $ size.lhs).S.toList
-     
-rule2clause :: Rule -> Clause
-rule2clause r = Clause ((map toPat) $ lhs r) (NormalB . toExp . rhs $ r) [] 
-
-                              
-           
-toExp (TVarE n _)         = VarE n
-toExp (TWildE n _)        = VarE (mkName ('?':(show n)))
-toExp (TLitE l _)         = LitE (toLit l)
-toExp (TConE n _)         = ConE n
-toExp (TListE l _)        = ListE (map toExp l)
-toExp (TTupE l _)         = TupE (map toExp l)
-toExp (TAppE a1 a2 _)     = AppE (toExp a1) (toExp a2)                
-toExp (TInfixE e1 e2 e3 _) = 
-    InfixE (Just . toExp $ e1)(toExp e2)(Just . toExp $ e3)
-    
-toLit (Char c)   = CharL c
-toLit (String s) = StringL s
-toLit (Int i)    = IntegerL i
-toLit (Frac r)   = RationalL r
-              
-toPat (TVarE n _)         = VarP n
-toPat (TLitE l _)         = LitP (toLit l)
-toPat (TConE n _)         = ConP n []
-toPat (TListE l _)        = ListP (map toPat l)
-toPat (TTupE l _)         = TupP (map toPat l)
-toPat e@(TAppE a1 a2 _)   = 
-    let ((TConE n _):as) =  unfoldTAppE e
-    in  ConP n (map toPat as)                
-toPat (TInfixE l (TConE n _) r _) = 
-    InfixP (toPat l) n (toPat r)
-toPat e = error $ "Cannot translate to Pat: " ++ (show e) 
hunk ./src/Igor2/SynthesisEngine.hs 43
-               -> IO (Either String ([(Name,Int)],[[[Dec]]]),Log)
+               -> IO (Either String ([(Name,Int)],[[[FunBind]]]),Log)
hunk ./src/Igor2/SynthesisEngine.hs 51
-synthesise :: Context -> SCR -> [(Name,Rules)] -> [(Name,Rules)] -> LM ([(Name,Int)],[[[Dec]]])
+synthesise :: Context -> SCR -> [(Name,Rules)] -> [(Name,Rules)] -> LM ([(Name,Int)],[[[FunBind]]])
hunk ./src/Igor2/UI/UIStarter.hs 73
-modifyHistory :: EnvState -> ([Name],[Name]) -> [[[Dec]]] -> EnvState
+modifyHistory :: (Pretty a) => EnvState -> ([Name],[Name]) -> [[[a]]] -> EnvState
hunk ./src/Igor2/UI/UIStarter.hs 306
-printResult :: EnvState -> SCR -> Doc
-            -> (Either String ([(Name,Int)],[[[Dec]]]),Log) -> IO()
+printResult :: (Pretty a) =>  EnvState -> SCR -> Doc
+            -> (Either String ([(Name,Int)],[[[a]]]),Log) -> IO()
hunk ./src/Igor2/UI/UIStarter.hs 338
-resToDoc :: Int -> Doc -> Either String ([(Name,Int)],[[[Dec]]]) -> Doc
+resToDoc :: (Pretty a) => Int -> Doc -> Either String ([(Name,Int)],[[[a]]]) -> Doc
hunk ./src/Igor2/UI/UIStarter.hs 351
-printTier :: Int -> ([[Dec]],Int) ->  Doc
+printTier :: (Pretty a) => Int -> ([[a]],Int) ->  Doc
hunk ./src/Igor2/UI/UIStarter.hs 357
-printHypo :: Int -> ([Dec],Int) ->  Doc    
+printHypo :: (Pretty a) => Int -> ([a],Int) ->  Doc    