Integrating editline with ghc

Judah Jacobson judah.jacobson at
Wed Jan 16 16:05:12 EST 2008

Hi all,

I have managed to build ghc using the initial release of the editline package:

Hackage link:

As I've mentioned before, there are two independent modules:
- System.Console.Editline is a very basic (and experimental) interface
to the native editline APIs.
- System.Console.Editline.Readline contains the readline APIs provided
by the editline library (mostly a cut/paste of

Currently I'm using just the latter as a drop-in replacement for
System.Console.Readline in ghci.  I have added a --with-editline flag
to ghc's configure script, which has no effect if it's not specified,
and otherwise does the following:

- Throw an error (at configure time) if editline isn't present (as
- Use the editline package instead of readline when building ghc stage 2
- Use CPP to make InteractiveUI.hs (the main ghci loop) import
System.Console.Editline.Readline instead of System.Console.Readline.

Does that sound like the right way to handle this?  If so, I'll send a
darcs patch.

Also, should editline be made a boot-package or an extra-package (or neither)?


More information about the Libraries mailing list