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
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to