emacs haskell-ghci mode hook

Christian Maeder maeder@tzi.de
Wed, 08 Jan 2003 16:58:16 +0100


running ghci (instead of hugs) in (GNU-) emacs is quite fun. But a few 
improvements could even increase the fun:

a) adding arguments to the ghci was not well documented. So I appended 
the following (and a few more paths) to my .gnu-emacs:

;(add-hook 'haskell-mode-hook 'turn-on-haskell-hugs)
(add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
(setq haskell-ghci-program-args
        '("-package data")

b) When an error occurs, the cursor jumps to the first error or warning. 
That's ok, but sometimes a warning is produced by an imported Module 
that has no errors and then this file is loaded into the buffer.

Usually, I try to avoid all warnings, but I was not able to avoid:

     Warning: Module `I' is imported, but nothing from it is used
	     (except perhaps to re-export instances visible in `I')

Indeed I want to import only instances from `I'. Maybe the warning can 
be suppressed when I explicitely write "import I()" to indicate that I 
import nothing except instances. (I don't want to switch off that import 
warning completely.)

c) Can someone supply emacs commands (and keys) to step through all the 
errors and warnings?

Regards Christian