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.
40 lines
413 B
Haskell
40 lines
413 B
Haskell
-- | Foo
|
|
class Foo a where
|
|
|
|
foo :: a -> a
|
|
foo a = a
|
|
|
|
-- | Bar
|
|
class Bar a where
|
|
|
|
bar
|
|
:: a
|
|
-> Int
|
|
bar = const 0
|
|
|
|
-- | Baz
|
|
class Baz a where
|
|
|
|
foobar :: a -> a
|
|
foobar a =
|
|
barbaz (bazbar a)
|
|
|
|
-- | Bar baz
|
|
barbaz
|
|
:: a -> a
|
|
|
|
-- | Baz bar
|
|
bazbar
|
|
:: a
|
|
-> a
|
|
|
|
-- First comment
|
|
barbaz a =
|
|
bazbar -- Middle comment
|
|
a
|
|
|
|
-- Last comment
|
|
bazbar a =
|
|
barbaz
|
|
a
|