[Haskell-cafe] emacs haskell-mode indentation
Nathan Weston
elbows at spamcop.net
Tue Jun 1 19:04:56 EDT 2004
I am learning haskell from "The Haskell School of Expression", and finding the
indentation in the emacs mode rather unhelpful. When I try to type in the
following example from the book:
main = runGraphics (
do w <- openWindow "Graphics" (300,300)
drawInWindow w (text(100,200) "Hello, world!")
k <- getKey w
closeWindow w
)
emacs wants to indent it like so:
main = runGraphics (
do w <- openWindow "Graphics" (300,300)
drawInWindow w (text(100,200) "Hello, world!")
k <- getKey w
closeWindow w
)
(For those not using a fixed-width font, in the first example, everything
lines up under the 'w <-', in the second, everything lines up under the 'do')
If I let emacs have its way, I get a syntax error.
Am I doing something wrong here? Is the emacs mode broken?
Thanks,
Nathan
More information about the Haskell-Cafe
mailing list