#2106: parts of Language.Haskell.TH.Ppr in wrong package?
-------------------------+--------------------------------------------------
    Reporter:  Frederik  |       Owner:                  
        Type:  bug       |      Status:  new             
    Priority:  normal    |   Component:  libraries/pretty
     Version:  6.8.2     |    Severity:  normal          
    Keywords:            |    Testcase:                  
Architecture:  Unknown   |          Os:  Unknown         
-------------------------+--------------------------------------------------
 Hello, should the following functions (and possibly others) from
 'template' be in the 'pretty' package instead?

 {{{
 pprint :: Ppr a => a -> String
 pprint x = render $ to_HPJ_Doc $ ppr x

 class Ppr a where
     ppr :: a -> Doc
     ppr_list :: [a] -> Doc
     ppr_list = vcat . map ppr

 instance Ppr a => Ppr [a] where
     ppr x = ppr_list x
 }}}

 I guess they can't be moved exactly as they are because the Doc type is
 different between the packages, however, I was looking for a class of
 "pretty-printable" values and it is strange that the only such class seems
 to be Ppr in the 'template' package...

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2106>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to