Bad control characters in GHCi 6.6 (Mac OS X PPC)

Björn Buckwalter bjorn.buckwalter at
Sat Oct 14 10:28:00 EDT 2006

Dear all,

I downloaded the GHC 6.6 tarballs, built and installed them on my mac
(Tiger, PPC) using the documented procedure:
  make install

The build and install was fairly smooth. However, ghci will not
recognize "control characters", e.g. delete/backspace, arrow keys,
ctrl-a, ctrl-d et c. It seems to recognize ctrl-c for cancelling a
line but will print the ^C first. A typical session may look like:

   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __  / /___| |
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.
Prelude> 1 + 2
Prelude> Arrow keys ^[[D^[[A^[[B^[[C
<interactive>:1:11: lexical error at character '\ESC'
Prelude> Delete ^?
<interactive>:1:7: lexical error at character '\DEL'
Prelude> Control C ^CPrelude> Ok, command was terminated but no
newline... now backa^?space ^?^?^?
<interactive>:1:2: parse error on input `,'
Prelude> ^D
<interactive>:1:0: lexical error at character '\EOT'
Prelude> :q
Leaving GHCi.

My previous installation of GHC (6.4.2 from darwinports) didn't have
these problems. I realize that this may be due to my lack of unix
skills rather than pertinent to GHC. Any help would be appreciated.

Bjorn Buckwalter

More information about the Glasgow-haskell-users mailing list