1
1
mirror of https://github.com/google/ormolu.git synced 2024-12-11 21:09:47 +03:00
ormolu/data/examples/declaration/class/default-signatures-out.hs
yumiova bdc8738fa8 Add newlines between most declarations in a type class
Certain other kinds of declarations (such as associated type signatures and
bindings) are grouped together without newlines. The process for determining
which declarations are grouped reuses the same logic as for modules.
2019-06-25 23:26:43 +02:00

34 lines
438 B
Haskell

{-# LANGUAGE DefaultSignatures #-}
-- | Something.
class Foo a where
-- | Foo
foo :: a -> String
default foo :: Show a => a -> String
foo = show
-- | Something else.
class Bar a where
-- | Bar
bar
:: String
-> String
-> a
-- Pointless comment
default bar
:: ( Read a
, Semigroup a
)
=> a
-> a
-> a
-- Even more pointless comment
bar
a
b =
read a <> read b