Pretty class as alternative for Show class

John Meacham john at repetae.net
Thu Feb 14 15:29:28 EST 2008


On Thu, Feb 14, 2008 at 09:56:15AM +0100, Christian Maeder wrote:
> John Meacham wrote:
> >> The HughesPJ output is correct:
> >>
> >> *DocLike> P.text "a" <+> (P.text "b" <$> P.text "c")
> >> a b
> >>   c
> 
> Could Daan's parser (that I only looked at) create such "correct"
> output, too?

I believe so, I generally use daan's  because I find it easier to create good
layout in and i think it is strictly more powerful. I didn't try to hard
to match up the operators exactly between the two instances but I
probably should, as I didn't use the hughespj one much. it is likely I
can get them to produce the same results with some tweaking and I might
want to add a couple more forms of line break into the class.

here is a link to his paper on his pretty printer
http://citeseer.ist.psu.edu/480959.html


-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Libraries mailing list