Good Haskell Style
Ashley Yakeley
ashley at semantic.org
Fri Aug 3 20:30:44 EDT 2007
Isaac Dupree wrote:
>> * Use explicit braces and semicolons. Use "Allman" style.
>>
>
> I'm sure you could come up with a little better convention than this,
> but here you go (or does "Allman style" refer to something particular?
> if so, what?) :
<http://en.wikipedia.org/wiki/Indent_style#Allman_style>
module Foo (bar, Baz(..)) where
{
import Prelude;
bar :: Ordering -> Bool;
bar x = case x of
{
LT -> True;
_ -> False;
};
data Baz a where
{
Oops :: Num a => Bool -> IO a -> Baz a;
Fine :: Baz ();
}
}
(but I've used spaces here)
> Oh by the way Ashley Y, have you seen my comment about the HaskellWiki
> at the end of http://haskell.org/haskellwiki/Talk:Haskell (I know this
> is off topic but I don't want to be spam-filtered or missed again!)
OK, I'll fix it...
--
Ashley Yakeley
More information about the Libraries
mailing list