Integrating editline with ghc
Judah Jacobson
judah.jacobson at gmail.com
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: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/editline-0.1
Haddock: http://code.haskell.org/editline/dist/doc/html/editline/
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
System.Console.Readline).
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
$hardtop/libraries/editline)
- 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)?
Thanks,
-Judah
More information about the Glasgow-haskell-users
mailing list