[Haskell-cafe] Re: Indentation woes
monnier at iro.umontreal.ca
Fri Jul 27 03:32:29 EDT 2007
> I wish to be able to indent my code like so:
>> longFunctionName various and sundry arguments
>> | guard1 = body1
>> | guard2 = body2
>> | ...
>> where declarations
> That is, with guards and where clauses indented to the same level as
> the function name.
Sounds like a generalization of the idea of allowing indentation like
if foo then bar
in `do' notation. It might probably be obtained similarly by just adding
a few optional semi-colons at the right place in the BNF rules. whether
those optional semi-colons will render the grammar significantly
more complex, I don't know.
More information about the Haskell-Cafe