[Haskell-cafe] Re: Coding conventions for Haskell?
ok at cs.otago.ac.nz
Mon Sep 27 00:20:23 EDT 2010
On Sep 27, 2010, at 5:31 AM, Maciej Piechotka wrote:
> May I ask clarification about formatting (according to your convention)
> doSomething :: (a -> a -> a) -> a -> a -> a
> doSomething f x = f y y
> where y = f x x
> i.e. single line function+where
There is a meta-rule that I use for indentation in a wide range of
languages: where the line breaks are may depend on identifier spelling,
but what the indentation is should not.
In Haskell I sometimes violate that, but I usually end up regretting it.
More information about the Haskell-Cafe