haskell / pretty

Haskell Pretty-printer library
Other
69 stars 30 forks source link

Text.PrettyPrint.Reader #6

Closed warrenharris closed 9 years ago

warrenharris commented 12 years ago

I found this wrapper code around Text.PrettyPrint.HughesPJ to be useful when wishing to do IO operations in the course of pretty-printing. It allows the pretty-printing combinators to be used in much the same way as before, but also allows lifted operations to be called for things such as db lookups.

Although this code seems generally useful to me, I'm not sure whether it belongs in haskell-proper, or in a separate library. Please let me know what you suggest.

Also, I'm not sure whether the PP type should be exposed as a synonym for ReaderT as it is now, whether ReaderT should be hidden in some way, or just used directly in the interface.

dterei commented 12 years ago

Cool. I am snowed under right now so may be a two - three weeks before I can look at this seriously. The code looks fine on first glance though, just need to make sure I think it's right to include in the package this kind of functionality.

I can do this myself but in general try to just provide one cleanly named patch.

warrenharris commented 12 years ago

Hi David,

Any thought as to whether this can go into haskell/pretty proper, or whether I should upload it as a new package to hackage? Thanks,

Warren

On Apr 16, 2012, at 3:26 PM, David Terei wrote:

Cool. I am snowed under right now so may be a two - three weeks before I can look at this seriously. The code looks fine on first glance though, just need to make sure I think it's right to include in the package this kind of functionality.

I can do this myself but in general try to just provide one cleanly named patch.


Reply to this email directly or view it on GitHub: https://github.com/haskell/pretty/pull/6#issuecomment-5164102

dterei commented 12 years ago

Hey Warren,

Sorry for the long delay here. I may get some time to look at it this week. Otherwise go ahead and release as its own package and I can always pull it into pretty at a later date when I've evaluated it more. So just let me know.

Cheers, David

dterei commented 9 years ago

Warren,

Going to close this PR as it's been a while now. I also think this is probably better released as it's own package and not core enough for including in pretty. Thanks for the code though!

Cheers, David