mirror of
https://github.com/google/ormolu.git
synced 2024-12-11 21:09:47 +03:00
bdc8738fa8
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.
34 lines
438 B
Haskell
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
|