[Haskell-cafe] Re: Coding conventions for Haskell?

Maciej Piechotka uzytkownik2 at gmail.com
Sun Sep 26 12:31:24 EDT 2010

On Sat, 2010-09-25 at 13:44 +0200, Johan Tibell wrote:
> On Sat, Sep 25, 2010 at 11:24 AM, Petr Pudlak <deb at pudlak.name> wrote:
> > sometimes I have doubts how to structure my Haskell code - where to break
> > lines, how much to indent, how to name functions and variables etc. Are
> > there any suggested/recommended coding conventions? I searched a bit and I
> > found a few articles and discussions:
> Quite a few people follow my style guide
>     http://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
> which codifies the style used in Real World Haskell, bytestring, text,
> and a few other libraries.
> -- Johan

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100926/9758cb7d/attachment.bin

More information about the Haskell-Cafe mailing list