Bernard James POPE <[EMAIL PROTECTED]> writes:
> When pretty printing this haskell code:
>
> case x of
> -1 -> x
>
> The pretty printer in PPSemiColon mode produces something like:
>
> case x of
> {- 1
>
> thus making a false comment, due to the brace crashing into the
> negative sign.
Thanks for the report. Fixed in CVS.
> Also, while I'm on the topic of the pretty printer I wonder whether
> it would be possible (and considered a good idea) to add an argument
> to PPHsMode that allows for wider lines of code, I think currently it is
> starting to get flustered around 100 columns or so. Perhaps there is already
> a good way of doing this and I'm just missing it?
Text.PrettyPrint.HughesPJ has a hook for this and more (Style), but it
wasn't exported by Language.Haskell.Pretty. I don't think it belongs
in PPHsMode, because those are parameters that govern the conversion of
a syntactic object into a Doc, while Style governs the conversion from
Doc to String. I've added a new function prettyPrintStyleMode that
takes both parameters.
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs