1
1
mirror of https://github.com/google/ormolu.git synced 2024-12-04 17:12:29 +03:00
ormolu/data/examples/declaration/class/default-implementations-out.hs
Rupert Horlick 4a0e5d4e42 [#94] Improve handling of newline before match group bodies
The PR changes the body layouting to use a span that includes the last point in
the name/pattern part of a match. This forces the layout to be multiline iff the
body starts on a newline.
2019-06-19 21:38:53 +02:00

33 lines
406 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