[darcs-users] Replace src/Printer.lhs with an external library?

Nicolas Pouillard nicolas.pouillard at gmail.com
Thu Mar 26 14:06:28 UTC 2009

Excerpts from trentbuck's message of Thu Mar 26 13:47:35 +0100 2009:
> Eric Kow <kowey at darcs.net> writes:
> > On Thu, Mar 26, 2009 at 10:01:51 +0100, Nicolas Pouillard wrote:
> >> I think that one advantage of Darcs' printer was performances, some minor
> >> others are colors, escapings, and tunable policies.
> >
> > Would it make sense to turn this into a general purpose library of our
> > own?  Would anybody else have a use for this?  Ian wrote large chunks of
> > this (at least the ColorPrinter module, if I remember), maybe he would
> > be inclined to comment, for example, on the feasibility of a general
> > printer library that darcs and camp could share?
> Dunno if it's relevant, but there are a couple of problems with colour
> at the moment:
>   #1083  DARCS_DO_COLOR_LINES=True fights with \XX escape color
>   #1339  DARCS_DO_COLOR_LINES=True darcs rollback --edit injects ^

That's not a problem with colors like 'hunk' written in blue or escapes
written in red... It's more a problem with wide (multiline) coloration
that is related to DARCS_DO_COLOR_LINES which is a feature I've added and
I'm too lazy to debug this stuffs.

So from that point of view I would prefer to switch on a cleaner
pretty-printing library like the Wadler/Leijen one that is pretty nice,
in particular the one with colors [1].

[1]: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ansi-wl-pprint

Nicolas Pouillard

More information about the darcs-users mailing list