Integrating editline with ghc
Manuel M T Chakravarty
chak at cse.unsw.edu.au
Mon Jan 28 23:53:22 EST 2008
> On Jan 27, 2008 6:23 PM, Manuel M T Chakravarty
> <chak at cse.unsw.edu.au> wrote:
>> Ian Lynagh:
>>> I think GHC should just always use editline. We already need to
>>> using an in-tree editline for Windows, so we can also use it on
>>> 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
>>> 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
>> with GMP. AFAIK libedit (which is the editline port used in Linux
>> distributions - <http://www.thrysoee.dk/editline/>) 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/
>> 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 <http://www.thrysoee.dk/editline/> 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