ghci-haskeline (was: Re: ANNOUNCE: GHC version 6.10.1 - EditLine / terminal incompatibility?)

Simon Marlow marlowsd at gmail.com
Fri Nov 21 05:27:45 EST 2008


Judah Jacobson wrote:
> On Thu, Nov 20, 2008 at 7:16 AM, Ian Lynagh <igloo at earth.li> wrote:
>> Although another option would be to make GHCi a separate (GPL) frontend
>> to the (BSD) GHC API. The only downside is that (with static linking) we
>> have another large binary. Another upside is that other GHC API users
>> don't get an editline dependency.
> 
> I've actually been experimenting with something similar:
> 
> darcs get http://code.haskell.org/~judah/ghci-haskeline/
> 
> If you have ghc-6.10.1, 'cabal install'ing inside that repo will give
> you a version of ghci which uses Haskeline as its backend.
> 
> Basically, I copied 4 modules from the GHC source tree (GhciMonad,
> InteractiveUI, GhciTags and Main) and modifed them to use Haskeline;
> the rest of GHC is obtained through the API.
> 
> Current benefits over the readline/editline versions:
> - Works on Windows

I can attest to that.  Nice going Judah!

$ cabal update
$ darcs get http://code.haskell.org/~judah/ghci-haskeline/
$ cd ghci-haskeline
$ cabal install

and I have a GHCi on Windows that can do completion, history search, and 
exits when I hit ^D.  That's made my day.

BTW, your LICENSE file looks like it was copied from the GHC source tree, 
it still has various references to GHC and the University of Glasgow.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list