[Haskell-cafe] Re: haskell-mode indentation

Stefan Monnier monnier at iro.umontreal.ca
Fri Mar 31 16:59:30 EST 2006


> Being an emacs-addicted person, I'm using haskell-mode for editing
> haskell code.  But its default indentation rule doesn't seem to
> be correct.  I mean when i type something like the code below, i've got
> the  following indentation:

> doSomeStuff a b c = do
>   somefunc a
>            anotherfunc b
>                        onemorefunc c

> Whereas the correct indentation (in my opinion) is as follows:

> doSomeStuff a b c = do
>   somefunc a
>   anotherfunc b
>   onemorefunc c

Yup, there's clearly a bug here (or at least misfeature).
But at least

 doSomeStuff a b c = do
   somefunc a
            anotherfunc b
            onemorefunc c

would make sense as well, if somefunc can take 5 arguments (and
haskell-mode doesn't do any kind of type-inference, so it should
conservatively allow this indentation as well).


        Stefan




More information about the Haskell-Cafe mailing list