ANNOUNCE: GHC version 6.10.1 - EditLine / terminal incompatibility?

Judah Jacobson judah.jacobson at
Sat Nov 8 15:33:57 EST 2008

On Fri, Nov 7, 2008 at 8:38 PM, Alexander Dunlap
<alexander.dunlap at> wrote:
> On Fri, Nov 7, 2008 at 3:13 AM, Philip K.F. Hölzenspies
> <p.k.f.holzenspies at> wrote:
> Hi all,
> I apologize if this is off-topic, but I'm having a similar (but
> distinct) problem: editline thinks that my delete key is a tilde key.
> When I type <DELETE>, it inserts a tilde. The tilde then acts
> completely like a tilde (i.e. GHCi interprets it as a tilde). I have
> been unable to find an answer by googling. Does anyone else have/know
> how to fix this problem?

First, just to make sure: do the arrow keys work or is all editing
functionality broken?  If it's the latter, then ghc probably wasn't
built with libedit and you need the libedit-devel package.

Assuming that's not the issue, and you don't get the same problem with
readline-based programs, then it sounds like editline doesn't know
about the key binding for DELETE on your system.  The simplest fix is
to edit the ~/.editrc file.  For example:

Running "ghc -e getLine", then pressing DELETE followed by RETURN, I see:

$ ghc -e getLine

This tells me the key sequence for the DELETE key in my terminal, so I
add the following line to my ~/.editrc file

bind "\e[3~" ed-delete-next-char

Hope that helps,

More information about the Glasgow-haskell-users mailing list