GHCでコンパイルできなかった問題が解決した。昨夜のエラーは
$ ghc hello.hs -o hello /usr/bin/ld: cannot find -lgmp collect2: ld はステータス 1 で終了しました
apt-getで gmp-devel をインストールしたらコンパイルできるようになった。
$ ghc hello.hs -o hello compilation IS NOT required $ ls hello* hello.hi hello.hs hello.o $ ./hello Hello, Haskell World!
GHCを使えるようになったので、昨日やらなかった haskell-ghci.el の編集をした。/usr/share/emacs-21.3/site-lisp/haskell-mode/haskell-ghci.el の haskell-ghci-mode 関数の定義の中(120行目から122行目)の
(if haskell-ghci-mode-map nil (setq haskell-ghci-mode-map (copy-keymap comint-mode-map)))
を
(if nil ;haskell-ghci-mode-map nil (setq haskell-ghci-mode-map (copy-keymap comint-mode-map)))
どうやらこれは C-c C-l でEmacsからHaskellの対話環境 ghci を起動するときのエラーを避けるためのようだ。