Good Haskell Style

Isaac Dupree isaacdupree at
Fri Aug 3 19:34:44 EDT 2007

Ashley Yakeley wrote:
> No layout bugs:
> * 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?) :

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 ()

Oh by the way Ashley Y, have you seen my comment about the HaskellWiki 
at the end of  (I know this 
is off topic but I don't want to be spam-filtered or missed again!)


More information about the Libraries mailing list