summaryrefslogtreecommitdiff
path: root/testsuite/tests/th
diff options
context:
space:
mode:
authorElton <eltonp3103@gmail.com>2022-01-16 13:28:03 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-01 12:28:49 -0500
commitfdda93b03e9be56122dd8445e7ee0f1d0f933a19 (patch)
tree40ce0148efd213a9c5bb5cf64ed86cc8eba4e03c /testsuite/tests/th
parent60ac73002fc6fb717f1838a2bb3cee6535ff77c9 (diff)
downloadhaskell-fdda93b03e9be56122dd8445e7ee0f1d0f933a19.tar.gz
Use braces in TH LambdaCase and where clauses
This patch ensures that the pretty printer formats LambdaCase and where clauses using braces (instead of layout) to remain consistent with the formatting of other statements (like `do` and `case`)
Diffstat (limited to 'testsuite/tests/th')
-rw-r--r--testsuite/tests/th/T10891.stderr10
-rw-r--r--testsuite/tests/th/T11797.stderr2
-rw-r--r--testsuite/tests/th/T14888.stderr4
-rw-r--r--testsuite/tests/th/T4135.stderr2
-rw-r--r--testsuite/tests/th/T7064.stdout4
-rw-r--r--testsuite/tests/th/T9064.stderr4
-rw-r--r--testsuite/tests/th/TH_reifyDecl1.stderr8
-rw-r--r--testsuite/tests/th/TH_reifyExplicitForAllFams.stderr2
-rw-r--r--testsuite/tests/th/TH_repUnboxedTuples.stderr6
9 files changed, 21 insertions, 21 deletions
diff --git a/testsuite/tests/th/T10891.stderr b/testsuite/tests/th/T10891.stderr
index 6b382e61d9..a73b663f6f 100644
--- a/testsuite/tests/th/T10891.stderr
+++ b/testsuite/tests/th/T10891.stderr
@@ -1,10 +1,10 @@
class T10891.C (a_0 :: *)
- where T10891.f :: a_0 -> GHC.Types.Int
+ where {T10891.f :: a_0 -> GHC.Types.Int}
class T10891.C' (a_0 :: *)
- where type T10891.F (a_0 :: *) :: *
- type T10891.F a_0 = a_0
- T10891.f' :: a_0 -> GHC.Types.Int
+ where {type T10891.F (a_0 :: *) :: *;
+ type T10891.F a_0 = a_0;
+ T10891.f' :: a_0 -> GHC.Types.Int}
instance T10891.C' GHC.Types.Int
class T10891.C'' (a_0 :: *)
- where data T10891.Fd (a_0 :: *) :: *
+ where {data T10891.Fd (a_0 :: *) :: *}
instance T10891.C'' GHC.Types.Int
diff --git a/testsuite/tests/th/T11797.stderr b/testsuite/tests/th/T11797.stderr
index b978e63aff..c46f61d852 100644
--- a/testsuite/tests/th/T11797.stderr
+++ b/testsuite/tests/th/T11797.stderr
@@ -1,2 +1,2 @@
class Foo_0 a_1
- where meth_2 :: a_1 -> b_3 -> a_1
+ where {meth_2 :: a_1 -> b_3 -> a_1}
diff --git a/testsuite/tests/th/T14888.stderr b/testsuite/tests/th/T14888.stderr
index f58d0c8b45..fe77220edc 100644
--- a/testsuite/tests/th/T14888.stderr
+++ b/testsuite/tests/th/T14888.stderr
@@ -5,6 +5,6 @@ T14888.hs:18:22-60: Splicing expression
reify ''Functor' >>= stringE . pprint
======>
"class T14888.Functor' (f_0 :: * -> *)
- where T14888.fmap' :: forall (a_1 :: *) (b_2 :: *) .
- (a_1 -> b_2) -> f_0 a_1 -> f_0 b_2
+ where {T14888.fmap' :: forall (a_1 :: *) (b_2 :: *) .
+ (a_1 -> b_2) -> f_0 a_1 -> f_0 b_2}
instance T14888.Functor' ((->) r_3)"
diff --git a/testsuite/tests/th/T4135.stderr b/testsuite/tests/th/T4135.stderr
index 3a4c6084d4..a8cdcd8965 100644
--- a/testsuite/tests/th/T4135.stderr
+++ b/testsuite/tests/th/T4135.stderr
@@ -1,2 +1,2 @@
instance Bug.C (GHC.Maybe.Maybe a_0)
- where type Bug.T (GHC.Maybe.Maybe a_0) = GHC.Types.Char
+ where {type Bug.T (GHC.Maybe.Maybe a_0) = GHC.Types.Char}
diff --git a/testsuite/tests/th/T7064.stdout b/testsuite/tests/th/T7064.stdout
index d9790f79e9..b5f8c47103 100644
--- a/testsuite/tests/th/T7064.stdout
+++ b/testsuite/tests/th/T7064.stdout
@@ -13,8 +13,8 @@ g3_0 x_1 = 3
GHC.Types.Int -> GHC.Types.Int #-}
data T_0 a_1 = T_2 a_1
instance GHC.Classes.Eq a_0 => GHC.Classes.Eq (T_1 a_0)
- where {-# SPECIALISE instance GHC.Classes.Eq (T_1 GHC.Types.Int) #-}
- (GHC.Classes.==) (T_2 x_3) (T_2 y_4) = x_3 GHC.Classes.== y_4
+ where {{-# SPECIALISE instance GHC.Classes.Eq (T_1 GHC.Types.Int) #-};
+ (GHC.Classes.==) (T_2 x_3) (T_2 y_4) = x_3 GHC.Classes.== y_4}
{-# RULES "rule1"
GHC.Real.fromIntegral
= GHC.Base.id :: a_0 -> a_0 #-}
diff --git a/testsuite/tests/th/T9064.stderr b/testsuite/tests/th/T9064.stderr
index c7f3df187c..1e027d35bf 100644
--- a/testsuite/tests/th/T9064.stderr
+++ b/testsuite/tests/th/T9064.stderr
@@ -1,4 +1,4 @@
class T9064.C (a_0 :: *)
- where T9064.foo :: a_0 -> GHC.Base.String
- default T9064.foo :: GHC.Show.Show a_0 => a_0 -> GHC.Base.String
+ where {T9064.foo :: a_0 -> GHC.Base.String;
+ default T9064.foo :: GHC.Show.Show a_0 => a_0 -> GHC.Base.String}
instance T9064.C T9064.Bar
diff --git a/testsuite/tests/th/TH_reifyDecl1.stderr b/testsuite/tests/th/TH_reifyDecl1.stderr
index 1984d85075..c9b295ec83 100644
--- a/testsuite/tests/th/TH_reifyDecl1.stderr
+++ b/testsuite/tests/th/TH_reifyDecl1.stderr
@@ -14,13 +14,13 @@ Constructor from TH_reifyDecl1.Tree: TH_reifyDecl1.Leaf :: forall {k_0 :: *} (a_
Class op from TH_reifyDecl1.C1: TH_reifyDecl1.m1 :: forall (a_0 :: *) . TH_reifyDecl1.C1 a_0 =>
a_0 -> GHC.Types.Int
class TH_reifyDecl1.C1 (a_0 :: *)
- where TH_reifyDecl1.m1 :: a_0 -> GHC.Types.Int
+ where {TH_reifyDecl1.m1 :: a_0 -> GHC.Types.Int}
class TH_reifyDecl1.C2 (a_0 :: *)
- where TH_reifyDecl1.m2 :: a_0 -> GHC.Types.Int
+ where {TH_reifyDecl1.m2 :: a_0 -> GHC.Types.Int}
instance TH_reifyDecl1.C2 GHC.Types.Int
class TH_reifyDecl1.C3 (a_0 :: k_1)
- where type TH_reifyDecl1.AT1 (a_0 :: k_1) :: *
- data TH_reifyDecl1.AT2 (a_0 :: k_1) :: *
+ where {type TH_reifyDecl1.AT1 (a_0 :: k_1) :: *;
+ data TH_reifyDecl1.AT2 (a_0 :: k_1) :: *}
instance TH_reifyDecl1.C3 GHC.Types.Int
type family TH_reifyDecl1.AT1 (a_0 :: k_1) :: *
type instance TH_reifyDecl1.AT1 GHC.Types.Int = GHC.Types.Bool
diff --git a/testsuite/tests/th/TH_reifyExplicitForAllFams.stderr b/testsuite/tests/th/TH_reifyExplicitForAllFams.stderr
index 673f09e2e0..be0bf5ad86 100644
--- a/testsuite/tests/th/TH_reifyExplicitForAllFams.stderr
+++ b/testsuite/tests/th/TH_reifyExplicitForAllFams.stderr
@@ -2,7 +2,7 @@ data family TH_reifyExplicitForAllFams.F (a_0 :: *) :: *
data instance forall (a_1 :: *). TH_reifyExplicitForAllFams.F (GHC.Maybe.Maybe a_1)
= TH_reifyExplicitForAllFams.MkF a_1
class TH_reifyExplicitForAllFams.C (a_0 :: *)
- where type TH_reifyExplicitForAllFams.G (a_0 :: *) (b_1 :: *) :: *
+ where {type TH_reifyExplicitForAllFams.G (a_0 :: *) (b_1 :: *) :: *}
instance TH_reifyExplicitForAllFams.C ([a_2])
type family TH_reifyExplicitForAllFams.G (a_0 :: *) (b_1 :: *) :: *
type instance forall (a_2 :: *)
diff --git a/testsuite/tests/th/TH_repUnboxedTuples.stderr b/testsuite/tests/th/TH_repUnboxedTuples.stderr
index b8bedac854..1d58620d34 100644
--- a/testsuite/tests/th/TH_repUnboxedTuples.stderr
+++ b/testsuite/tests/th/TH_repUnboxedTuples.stderr
@@ -1,5 +1,5 @@
CaseE (UnboxedTupE [Just (LitE (CharL 'b')),Just (ConE GHC.Types.False)]) [Match (UnboxedTupP [LitP (CharL 'a'),ConP GHC.Types.True [] []]) (NormalB (UnboxedTupE [Just (LitE (StringL "One")),Just (LitE (IntegerL 1))])) [],Match (UnboxedTupP [LitP (CharL 'b'),ConP GHC.Types.False [] []]) (NormalB (UnboxedTupE [Just (LitE (StringL "Two")),Just (LitE (IntegerL 2))])) [],Match (UnboxedTupP [WildP,WildP]) (NormalB (UnboxedTupE [Just (LitE (StringL "Three")),Just (LitE (IntegerL 3))])) []]
case (# 'b', GHC.Types.False #) of
- (# 'a', GHC.Types.True #) -> (# "One", 1 #)
- (# 'b', GHC.Types.False #) -> (# "Two", 2 #)
- (# _, _ #) -> (# "Three", 3 #)
+{(# 'a', GHC.Types.True #) -> (# "One", 1 #);
+ (# 'b', GHC.Types.False #) -> (# "Two", 2 #);
+ (# _, _ #) -> (# "Three", 3 #)}