RE: [Haskell-cafe] hacking ghci

2007-01-09 Thread Simon Peyton-Jones
I'd suggest #2.  It's exactly the reason that GHC is available as a library, 
and it makes your work much more independent of GHC.  If you find it doesn't 
have the API you need, we can work to improve it.

Simon

| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
| Walter Moreira
| Sent: 08 January 2007 06:21
| To: haskell-cafe@haskell.org
| Subject: [Haskell-cafe] hacking ghci
|
| Hi Haskellers. A short while ago I asked about the possibility to have
| the output of ghci in color.  Thanks to Donald Stewart who set up a
| wiki page to continue the attempt. Other people suggested HsColour and
| GUI's (thanks too). I'm not so interested in highlighting the snippets
| of code which ghci displays, but to use different colors for the
| different types of output: different colors for the prompt, input,
| warnings, exceptions, normal output, etc.
|
| Are any of these ideas viable?:
|
| 1. Hack the code of Interactive.hs in the GHC distribution and
|substitute the calls to 'putStr[Ln]' by some thin wrapper which can
|write with colors, according to a command line option (--color or
|--colour, for example), maybe using HsColour. This looks easy
|enough and I'd be willing to do it, but it's intrusive, and one has
|to mantain a different version of ghci in parallel with the main
|ghci.
|
| 2. Use GHC as library (from 6.6 on) and write a similar application as
|ghci, with more emphasis in the 'interactive' part of the name (in
|the same way as the relation between Python and the IPython
|extended shell). This is more work and more duplicate efforts, but
|it may be worthly, perhaps.
|
| 3. Write a wrapper which communicates with ghci via pipes. I read some
|attempts about this somewhere, and people suggested an approach as
|in #2.
|
| I haven't mentioned the GUI applications, since I would like to just
| have something in the spirit of ghci (command line oriented), but with
| colors or with configurable output.  Which approach do you people
| think it is best?
|
| Sorry for the long message. Cheers,
| Walter
| ___
| Haskell-Cafe mailing list
| Haskell-Cafe@haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hacking ghci

2007-01-07 Thread Dan Mead

a carrot indicator like java does would also be a nice addition.

On 1/8/07, Walter Moreira [EMAIL PROTECTED] wrote:


Hi Haskellers. A short while ago I asked about the possibility to have
the output of ghci in color.  Thanks to Donald Stewart who set up a
wiki page to continue the attempt. Other people suggested HsColour and
GUI's (thanks too). I'm not so interested in highlighting the snippets
of code which ghci displays, but to use different colors for the
different types of output: different colors for the prompt, input,
warnings, exceptions, normal output, etc.

Are any of these ideas viable?:

1. Hack the code of Interactive.hs in the GHC distribution and
   substitute the calls to 'putStr[Ln]' by some thin wrapper which can
   write with colors, according to a command line option (--color or
   --colour, for example), maybe using HsColour. This looks easy
   enough and I'd be willing to do it, but it's intrusive, and one has
   to mantain a different version of ghci in parallel with the main
   ghci.

2. Use GHC as library (from 6.6 on) and write a similar application as
   ghci, with more emphasis in the 'interactive' part of the name (in
   the same way as the relation between Python and the IPython
   extended shell). This is more work and more duplicate efforts, but
   it may be worthly, perhaps.

3. Write a wrapper which communicates with ghci via pipes. I read some
   attempts about this somewhere, and people suggested an approach as
   in #2.

I haven't mentioned the GUI applications, since I would like to just
have something in the spirit of ghci (command line oriented), but with
colors or with configurable output.  Which approach do you people
think it is best?

Sorry for the long message. Cheers,
Walter
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe