|Works here like a charm.
From http://www.haskell.org/ghc/docs/6.10.4/ ... mands.html :
Opens an editor to edit the file file, or the most recently loaded module if file is omitted. The editor to invoke is taken from the EDITOR environment variable, or a default editor on your system if EDITOR is not set. You can change the editor using :set editor.
Does update-alternatives change $TERM for you? Check it by using echo $TERM.