Skip to content

Commit 0b69ca4

Browse files
committed
Normalize parentheses in constraints
1 parent 9e4f22e commit 0b69ca4

29 files changed

+65
-55
lines changed

data/examples/declaration/class/default-signatures-simple-out.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ module Main where
44
class Foo a where
55
-- | Foo
66
foo :: a -> String
7-
default foo :: Show a => a -> String
7+
default foo :: (Show a) => a -> String
88
foo = show

data/examples/declaration/instance/contexts-out.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
instance Eq a => Eq [a] where (==) _ _ = False
1+
instance (Eq a) => Eq [a] where (==) _ _ = False
22

33
instance
44
( Ord a,

data/examples/declaration/instance/newlines-between-methods-out.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
instance Num a => Num (Diff a) where
1+
instance (Num a) => Num (Diff a) where
22
D u dudx + D v dvdx = D (u + v) (dudx + dvdx)
33
D u dudx - D v dvdx = D (u - v) (dudx - dvdx)
44
D u dudx * D v dvdx = D (u * v) (u * dvdx + v * dudx)

data/examples/declaration/signature/specialize/specialize-instance-out.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ instance (Eq a) => Eq (Foo a) where
88

99
instance (Num r, V.Vector v r, Factored m r) => Num (VT v m r) where
1010
{-# SPECIALIZE instance
11-
( Factored m Int => Num (VT U.Vector m Int)
11+
( (Factored m Int) => Num (VT U.Vector m Int)
1212
)
1313
#-}
1414
VT x + VT y = VT $ V.zipWith (+) x y

data/examples/declaration/signature/specialize/specialize-out.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
foo :: Num a => a -> a
1+
foo :: (Num a) => a -> a
22
foo = id
33
{-# SPECIALIZE foo :: Int -> Int #-}
44
{-# SPECIALIZE INLINE foo :: Float -> Float #-}
55

66
{-# SPECIALIZE NOINLINE [2] bar :: Int -> Int #-}
7-
bar :: Num a => a -> a
7+
bar :: (Num a) => a -> a
88
bar = id
99

10-
baz :: Num a => a -> a
10+
baz :: (Num a) => a -> a
1111
baz = id
1212
{-# SPECIALIZE [~2] baz ::
1313
Int ->
@@ -20,5 +20,5 @@ baz = id
2020
Bool,
2121
Integer -> Bool
2222
#-}
23-
fits13Bits :: Integral a => a -> Bool
23+
fits13Bits :: (Integral a) => a -> Bool
2424
fits13Bits x = x >= -4096 && x < 4096
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{-# LANGUAGE UnicodeSyntax #-}
22

3-
foo :: forall a. Show a => a -> String
3+
foo :: forall a. (Show a) => a -> String
44
foo = const ()

data/examples/declaration/value/function/fancy-forall-0-out.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ wrapError ::
22
forall outertag innertag t outer inner m a.
33
( forall x. Coercible (t m x) (m x),
44
forall m'.
5-
HasCatch outertag outer m' =>
5+
(HasCatch outertag outer m') =>
66
HasCatch innertag inner (t m'),
77
HasCatch outertag outer m
88
) =>
9-
(forall m'. HasCatch innertag inner m' => m' a) ->
9+
(forall m'. (HasCatch innertag inner m') => m' a) ->
1010
m a

data/examples/declaration/value/function/fancy-forall-1-out.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ magnify ::
22
forall outertag innertag t outer inner m a.
33
( forall x. Coercible (t m x) (m x),
44
forall m'.
5-
HasReader outertag outer m' =>
5+
(HasReader outertag outer m') =>
66
HasReader innertag inner (t m'),
77
HasReader outertag outer m
88
) =>
9-
(forall m'. HasReader innertag inner m' => m' a) ->
9+
(forall m'. (HasReader innertag inner m') => m' a) ->
1010
m a

data/examples/declaration/value/function/let-multi-line-out.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inlineComment =
1717
() -> undefined
1818
in go
1919

20-
implicitParams :: HasCallStack => Int
20+
implicitParams :: (HasCallStack) => Int
2121
implicitParams =
2222
let ?cs = ?callstack
2323
in foo cs

data/examples/other/argument-comment-out.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ foo ::
55
foo _ = True
66

77
foo ::
8-
Foo a =>
8+
(Foo a) =>
99
-- | Foo
1010
Int ->
1111
Int
1212
foo ::
13-
Foo a =>
13+
(Foo a) =>
1414
-- | Foo
1515
Int ->
1616
Int

0 commit comments

Comments
 (0)