-
Notifications
You must be signed in to change notification settings - Fork 10
Code style guide
Irakli Safareli edited this page Jul 16, 2019
·
1 revision
data Foo = Foo
{ fooCat :: Cat
, fooDog :: Dog
}
data Foo
= Foo Bool String
| Biz Int Word32
data Foo
= Foo
{ fooDing :: Ding
, fooDong :: Dong
}
| Biz
{ bizDing :: Ding
, bizDong :: Dong
}
data Foo = Foo Bool Int
data Biz = Biz
SomeLongNameOfType
SomeLongNameOfType2
Foo
{ fooCat = fooCat
, fooDog = fooDog
}
foo =
f ...
where
f = ...
foo =
let
f = ...
in
f ...
f :: Int -> Bool
ggggg ::
( Eq a
, Show b
, ShowFooBar b
)
=> SomeLongNameOfType2
-> SomeLongNameOfType2
-> b
-> a
-> SomeLongNameOfType2
h
:: SomeLongNameOfType2
-> SomeLongNameOfType2
-> b
-> a
-> SomeLongNameOfType2
instance SomeClass Foo where singleFunction = genericSomeClass
instance OtherClass Foo where
otherFunctionWithNonGenericDefinition = ....