Half-width indentation for "where" keyword

Johan Tibell johan.tibell at gmail.com
Tue May 18 10:26:59 EDT 2010


On Tue, May 18, 2010 at 3:13 PM, Ivan Lazar Miljenovic <
ivan.miljenovic at gmail.com> wrote:

> Johan Tibell <johan.tibell at gmail.com> writes:
> > I'd like to change haskell-indentation (i.e. add an option) so it indents
> > the "where" keyword with half an indent (e.g. 1 space instead of two).
>
> On the other hand, you then have the problem where it might not be as
> obvious that there's an indentation (nested where clauses, etc.,
> especially with blank lines).
>
> > Example:
> >
> > myFun = do
> >     print "hi"
> >     print name
> >   where
> >     name = "Mini Me"
>
> You seem to have a 2-space indent here...
>
> > [snip]
> >
> > myFun2 = go ...
> >   where
> >     go = ...
>
> ... and here
>
> > which would look like this with the current scheme
> >
> > myFun2 = go ...
> >     where
> >         go = ...
>
> This looks like a 4-space indent to me.
>
>
To clarify, given a default indentation size w (e.g. 2 or 4 spaces) I want
where to be indented as:

myFun = do
<w>print "hi"
<w>print name
<w/2>where
<w/2><w/2>name = "Mini Me"

So the new "block" started after where (`name` above) is only indented half
an indent more than the where keyword.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.haskell.org/pipermail/haskellmode-emacs/attachments/20100518/9b55d5b3/attachment.htm 


More information about the Haskellmode-emacs mailing list