Half-width indentation for "where" keyword

iquiw iku.iwasa at gmail.com
Sat May 29 21:57:55 EDT 2010


Hi,

The attached patch might meet your request.

It introduces 2 new variables, haskell-indentation-where-pre-offset and
haskell-indentation-where-post-offset. Both are set to 2 as default.

They act as follows;

myFun = do
<w>print "hi"
<w>print name
<w1>where
<w1><w2>name = "Mini Me"

where
  w1 = haskell-indentation-where-pre-offset
  w2 = haskell-indentation-where-post-offset

(*) haskell-indentation-where-post-offset is used only when the
previous line is "<w1>where".

I am not an elisp programmer and do not fully understand haskell-indentation.el,
so I hope someone will confirm or correct the patch.

Regards,
iquiw

On 5/19/10, Johan Tibell <johan.tibell at gmail.com> wrote:
> On Tue, May 18, 2010 at 5:39 PM, Thomas Schilling
> <nominolo at googlemail.com>wrote:
>
>> BTW, there are two indentation modes -indent and -indentation.  Which
>> one are you using?
>>
>
> I've switched over to the latter.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: where-offset.dpatch
Type: application/octet-stream
Size: 3187 bytes
Desc: not available
Url : http://projects.haskell.org/pipermail/haskellmode-emacs/attachments/20100530/1207462c/attachment.obj 


More information about the Haskellmode-emacs mailing list