On Monday 27 September 2010 14:52:18, Henning Thielemann wrote:
> data Foo a b =
>      Foo    a
>    | Bar      b
>    | Foobar a b
>
> avoids this, at least for the type name "Foo".

Tastes vary, but I find that ugly. I much rather have the '=' aligned with 
the '|'.

data Foo a b
    = Foo      a
    | Bar        b
    | Foobar  a b
      deriving (Eq, Ord)

There, that looks good.

With the one exception that as a rule, in a multi-constructor type, none of 
the constructors should be identical to the type name (IMO).
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to