mirror of
https://github.com/google/ormolu.git
synced 2024-12-04 06:32:12 +03:00
32 lines
480 B
Haskell
32 lines
480 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
|