Integrating editline with ghc

Manuel M T Chakravarty chak at
Mon Jan 28 23:53:22 EST 2008

Judah Jacobson:
> On Jan 27, 2008 6:23 PM, Manuel M T Chakravarty  
> <chak at> wrote:
>> Ian Lynagh:
>>> I think GHC should just always use editline. We already need to
>>> support
>>> using an in-tree editline for Windows, so we can also use it on  
>>> other
>>> platforms where editline isn't easily available or is too old. Also
>>> supporting readline just makes the build system more complicated for
>>> little extra benefit, and also means that there are more
>>> configurations
>>> to bitrot.
>> Sure if you want to add another library into the tree that's an
>> option.  However, I am not so sure whether it's going to be as easy  
>> as
>> with GMP.  AFAIK libedit (which is the editline port used in Linux
>> distributions - <>) needs (n)curses.
>> Their web page says somebody managed to compile on cygwin, but there
>> is no mention of mingw.  So, before committing to use editline/ 
>> libedit
>> on all platforms, it might be useful to make sure editline compiles
>> fine everywhere.
> You may have seen this already, but it looks like libedit doesn't  
> work on mingw:
> However, we already don't use readline on mingw, right? So I don't
> think that should be a strike against using editline exclusively.

Ok, that simplifies matters.

> Also, a small correction: both readline and libedit only need termcap,
> not curses (which provides a termcap interface).

At <> it says to link with

   gcc -o fileman fileman.c -ledit -lcurses

and explicitly says "Note libcurses, as well as libedit, should be  
linked to Editline enabled programs".


More information about the Libraries mailing list