#2106: parts of Language.Haskell.TH.Ppr in wrong package?
------------------------------+---------------------------------------------
Reporter: Frederik | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: libraries/pretty | Version: 6.8.2
Severity: normal | Resolution: wontfix
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
------------------------------+---------------------------------------------
Comment (by Frederik):
Hi Igloo,
I don't have time to fix the bug, I was under the impression that
submitting it might be helpful, sorry if it is too minor... Here is what I
have for personal use, if that is worth anything:
{{{
module Fu.PrettyPrint (Pretty(..), pshow, ppr, ppr_) where
import Text.PrettyPrint
class Pretty a where
toDoc :: a -> Doc
myStyle = Style {mode=PageMode,lineLength=100,ribbonsPerLine=0.1}
pshow :: Pretty a => a -> String
pshow x = renderStyle myStyle $ toDoc x
ppr :: Pretty a => a -> IO ()
ppr x = putStrLn $ renderStyle myStyle $ toDoc x
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2106#comment:2>
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