[darcs-users] Re: colour output/libcurses on windows(TM)

David Roundy droundy at abridgegame.org
Tue Apr 5 12:10:49 UTC 2005


On Mon, Apr 04, 2005 at 02:31:15PM +0200, Tommy Pettersson wrote:
> On Mon, Apr 04, 2005 at 08:19:40AM -0400, David Roundy wrote:
> > It looks like we'd probably be best off (if we seriously want color in
> > win32) modifying Printer.putDoc (and friends) to intercept the ANSI color
> > codes and make the appropriate system calls to change colors.  It's a bit
> > ugly, but I can't see any other choice.
> 
> I think the make_blue &c in ColourPrinter can be changed to insert the
> ctl calls rather than the escape sequenses in the doc data.  Will the
> monadic IO of Haskell get that right?

The trick is that we'd have to actually *make* the calls when we're
*printing* the Doc, not when we're creating it.  So we'd have to put some
sort of modification in putDocWith and friends.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list