Difference between revisions of "GHCi in colour"
Jump to navigation
Jump to search
DonStewart (talk | contribs) (ui) |
(note this is already kinda possible with HsColour) |
||
Line 20: | Line 20: | ||
An existing tool, [http://www.cs.york.ac.uk/fp/darcs/hscolour/ HsColour], |
An existing tool, [http://www.cs.york.ac.uk/fp/darcs/hscolour/ HsColour], |
||
− | could be modified to operate interactively. |
+ | could be modified to operate interactively. In fact, HsColour is already interactive, and |
+ | with a small patch added on 2006-12-14 to control ouput buffering better, this works |
||
+ | relatively nicely: |
||
+ | |||
+ | ghci 2>&1 | HsColour -tty |
||
=== GuiHaskell === |
=== GuiHaskell === |
Revision as of 17:17, 14 December 2006
This page documents efforts to colourise GHCi output.
Example
Or a type error:
Output like this would be the result of running, for example:
ghci --colour
and would appear in the console/xterm as ansi terminal coloured output.
Implementation
Using HsColour
An existing tool, HsColour, could be modified to operate interactively. In fact, HsColour is already interactive, and with a small patch added on 2006-12-14 to control ouput buffering better, this works relatively nicely:
ghci 2>&1 | HsColour -tty
GuiHaskell
Neil Mitchell has a prototype gui haskell wrapper, based on gtk. Does this contain a reasonable ghci wrapper we could steal?
If you have an idea of how to do this nicely, add your proposal here.