[Haskell-cafe] question about indentation conventions
tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Mon Jul 1 09:43:01 CEST 2013
On Mon, Jul 01, 2013 at 05:18:39PM +1200, Richard A. O'Keefe wrote:
> On 1/07/2013, at 1:04 PM, Richard Cobbe wrote:
> > I should have been clearer in my original question: I'm curious about what
> > to do when a multi-argument function application gets split across lines.
> > That wiki page dicsusses how the layout rule interacts with various special
> > forms (let, where, if, do, case), but it doesn't seem to address function
> > applications, beyond implying that it's ok to indent the continuing lines
> > of a function application.
> It looked pretty explicit to me:
> The golden rule of indentation
> you will do fairly well if you just remember a single rule:
> Code which is part of some expression should be indented
> further in than the beginning of that expression (even if
> the expression is not the leftmost element of the line).
> This means for example that
> f (g x
> is OK but
> f (g x
> y z)
> is not.
It seems to me that this means
f x1 x2
is not. The OP was initially asking about this situation.
More information about the Haskell-Cafe