CSE 341 - Haskell Mode for Emacs
There is a convenient emacs mode for editing Haskell. A few basics:
- Start up emacs on a Haskell program, for example by typing emacs
myprog.hs
- From within emacs, type c-c c-l (i.e. keeping the control key pressed,
first type c and then l) to open a second pane running Haskell. You can
move back and forth between the code file and the Haskell
interpreter.
- If you edit the file and want to try the changes in Haskell, save the
file and type c-c c-l to restart the interpreter.
- When writing code, pressing tab will indent a plausible number of
spaces. (It will insert spaces, not evil tabs!) Repeatedly pressing tab
will cycle through the amounts that the line might reasonably be
indented.
See the Haskell wiki page Haskell
mode for Emacs for more commands and information.
On attu or other CSE undergrad linux machines
To use this mode on the undergrad linux machines, add the following lines
to your .emacs file in your home directory:
(load "/cse/courses/cse341/common/haskell-mode-2.4/haskell-site-file")
On a Personal Machine
You can find directions and files to download on the "Haskell mode for
Emacs" page linked above.