diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs index 28f3002dd8e13fa0f2dfb9abdb60b34313d233f4..5bc45f4dbc8a2d3b1338c475e6a9b21d743ff42f 100644 --- a/compiler/GHC/Hs/Binds.hs +++ b/compiler/GHC/Hs/Binds.hs @@ -537,7 +537,7 @@ ppr_monobind :: forall idL idR. ppr_monobind (PatBind { pat_lhs = pat, pat_mult = mult_ann, pat_rhs = grhss }) = ppr_mult_ann @idL mult_ann - $$ pprPatBind pat grhss + <+> pprPatBind pat grhss ppr_monobind (VarBind { var_id = var, var_rhs = rhs }) = sep [pprBndr CasePatBind var, nest 2 $ equals <+> pprExpr (unLoc rhs)] ppr_monobind (FunBind { fun_id = fun, diff --git a/testsuite/tests/linear/should_fail/LinearLet10.stderr b/testsuite/tests/linear/should_fail/LinearLet10.stderr index 6cef1fe32dcdb17118812813c8789b7eda7285f8..34294f2e440aa7b20659a21b41f84bf26099bac5 100644 --- a/testsuite/tests/linear/should_fail/LinearLet10.stderr +++ b/testsuite/tests/linear/should_fail/LinearLet10.stderr @@ -3,8 +3,4 @@ LinearLet10.hs:7:12: error: [GHC-83865] • Expected kind ‘GHC.Types.Multiplicity’, but ‘Int’ has kind ‘*’ • In the type ‘Int’ In a pattern binding: y = x - In the expression: - let - %Int - y = x - in y + In the expression: let %Int y = x in y diff --git a/testsuite/tests/linear/should_fail/LinearLet2.stderr b/testsuite/tests/linear/should_fail/LinearLet2.stderr index a1e969f745a6758ba72a52a85b1d35ae609f9423..d442c84c26d5d605cda761e9b208e73807cee239 100644 --- a/testsuite/tests/linear/should_fail/LinearLet2.stderr +++ b/testsuite/tests/linear/should_fail/LinearLet2.stderr @@ -2,14 +2,5 @@ LinearLet2.hs:5:7: error: [GHC-18872] • Couldn't match type ‘Many’ with ‘One’ arising from multiplicity of ‘y’ - • In the expression: - let - %1 - y = x - in (y, y) - In an equation for ‘f’: - f x - = let - %1 - y = x - in (y, y) + • In the expression: let %1 y = x in (y, y) + In an equation for ‘f’: f x = let %1 y = x in (y, y) diff --git a/testsuite/tests/linear/should_fail/LinearLet3.stderr b/testsuite/tests/linear/should_fail/LinearLet3.stderr index f16e1c4c322444cf51a1d7af3d8467443e1729db..e4e43dfc773dc3837b59fd8b59218c50b108de76 100644 --- a/testsuite/tests/linear/should_fail/LinearLet3.stderr +++ b/testsuite/tests/linear/should_fail/LinearLet3.stderr @@ -4,16 +4,12 @@ LinearLet3.hs:5:7: error: [GHC-18872] arising from multiplicity of ‘z’ • In the expression: let - %1 - y = x - %1 - z = y + %1 y = x + %1 z = y in (y, y) In an equation for ‘f’: f x = let - %1 - y = x - %1 - z = y + %1 y = x + %1 z = y in (y, y) diff --git a/testsuite/tests/linear/should_fail/LinearLet4.stderr b/testsuite/tests/linear/should_fail/LinearLet4.stderr index 5691620d6e533c1f6d142a7cec2f7d0d91d96072..9ba84fa3516de01bc78eb07e41a1a08db720e70f 100644 --- a/testsuite/tests/linear/should_fail/LinearLet4.stderr +++ b/testsuite/tests/linear/should_fail/LinearLet4.stderr @@ -4,16 +4,12 @@ LinearLet4.hs:7:7: error: [GHC-18872] arising from multiplicity of ‘y’ • In the expression: let - %1 - y = x - %'Many - z = y + %1 y = x + %'Many z = y in (z, z) In an equation for ‘f’: f x = let - %1 - y = x - %'Many - z = y + %1 y = x + %'Many z = y in (z, z) diff --git a/testsuite/tests/linear/should_fail/LinearLet5.stderr b/testsuite/tests/linear/should_fail/LinearLet5.stderr index bc9f7d2a90efd7b9359e9ef81932bd327467eb84..662a33e350e9d39ef1666dfd9b73d6ec3cdd2588 100644 --- a/testsuite/tests/linear/should_fail/LinearLet5.stderr +++ b/testsuite/tests/linear/should_fail/LinearLet5.stderr @@ -4,16 +4,12 @@ LinearLet5.hs:5:7: error: [GHC-18872] arising from multiplicity of ‘y’ • In the expression: let - %1 - y = x - %1 - z = y + %1 y = x + %1 z = y in (z, y) In an equation for ‘f’: f x = let - %1 - y = x - %1 - z = y + %1 y = x + %1 z = y in (z, y) diff --git a/testsuite/tests/linear/should_fail/LinearLet7.stderr b/testsuite/tests/linear/should_fail/LinearLet7.stderr index 0c4c71a77e35c4b4651c359b44469e3e10158c78..260ca28b7abbd8a82a139a41a4df12a21bbbc216 100644 --- a/testsuite/tests/linear/should_fail/LinearLet7.stderr +++ b/testsuite/tests/linear/should_fail/LinearLet7.stderr @@ -3,29 +3,11 @@ LinearLet7.hs:6:14: error: [GHC-18872] • Couldn't match type ‘Many’ with ‘One’ arising from multiplicity of ‘g’ • In a pattern binding: g = \ y -> g y - In the expression: - let - %1 - g = \ y -> ... - in g x - In an equation for ‘f’: - f x - = let - %1 - g = ... - in g x + In the expression: let %1 g = \ y -> ... in g x + In an equation for ‘f’: f x = let %1 g = ... in g x LinearLet7.hs:6:14: error: [GHC-18872] • Couldn't match type ‘Many’ with ‘One’ arising from a non-linear pattern - • In the expression: - let - %1 - g = \ y -> ... - in g x - In an equation for ‘f’: - f x - = let - %1 - g = ... - in g x + • In the expression: let %1 g = \ y -> ... in g x + In an equation for ‘f’: f x = let %1 g = ... in g x diff --git a/testsuite/tests/linear/should_fail/LinearLet9.stderr b/testsuite/tests/linear/should_fail/LinearLet9.stderr index 360b046ae206574cb2daf3f5e205c2e102654f7c..813531df69cdabe3d06b95c010c78498e957ff7d 100644 --- a/testsuite/tests/linear/should_fail/LinearLet9.stderr +++ b/testsuite/tests/linear/should_fail/LinearLet9.stderr @@ -2,17 +2,8 @@ LinearLet9.hs:11:14: error: [GHC-18872] • Couldn't match type ‘Many’ with ‘One’ arising from a non-linear pattern - • In the expression: - let - %1 - !(f, b) = ((\ y -> ...), b) - in (f x, b) - In an equation for ‘k’: - k x - = let - %1 - !(f, b) = ... - in (f x, b) + • In the expression: let %1 !(f, b) = ((\ y -> ...), b) in (f x, b) + In an equation for ‘k’: k x = let %1 !(f, b) = ... in (f x, b) LinearLet9.hs:11:16: error: [GHC-18872] • Couldn't match type ‘Many’ with ‘One’ @@ -31,17 +22,8 @@ LinearLet9.hs:11:19: error: [GHC-18872] LinearLet9.hs:18:14: error: [GHC-18872] • Couldn't match type ‘Many’ with ‘One’ arising from a non-linear pattern - • In the expression: - let - %1 - !(Just y) = x - in y - In an equation for ‘i’: - i x - = let - %1 - !(Just y) = x - in y + • In the expression: let %1 !(Just y) = x in y + In an equation for ‘i’: i x = let %1 !(Just y) = x in y LinearLet9.hs:21:3: error: [GHC-18872] • Couldn't match type ‘Many’ with ‘One’ diff --git a/testsuite/tests/patsyn/should_fail/UnliftedPSBind.stderr b/testsuite/tests/patsyn/should_fail/UnliftedPSBind.stderr index 6b4f1d8043015af825f3ec8893c2e9074ce02f04..3f76e344e44e4debd7fb3d92685ce44635eb72fb 100644 --- a/testsuite/tests/patsyn/should_fail/UnliftedPSBind.stderr +++ b/testsuite/tests/patsyn/should_fail/UnliftedPSBind.stderr @@ -2,5 +2,4 @@ UnliftedPSBind.hs:12:9: error: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra), Werror=unbanged-strict-patterns] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - P x = P 4# + Many P x = P 4# diff --git a/testsuite/tests/patsyn/should_fail/unboxed-bind.stderr b/testsuite/tests/patsyn/should_fail/unboxed-bind.stderr index cd528c547924b4c3b78c3b62ad14bf8e0621026f..53a8eb7a7934f969854252251a7d13de263228ff 100644 --- a/testsuite/tests/patsyn/should_fail/unboxed-bind.stderr +++ b/testsuite/tests/patsyn/should_fail/unboxed-bind.stderr @@ -2,5 +2,4 @@ unboxed-bind.hs:11:11: error: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra), Werror=unbanged-strict-patterns] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - P arg = x + Many P arg = x diff --git a/testsuite/tests/typecheck/should_fail/T13075.stderr b/testsuite/tests/typecheck/should_fail/T13075.stderr index 286054d9ce6a54b6ec5b68854ce13ab0528b2e83..9075f399f4b7771cca51f18c056cd6b2556377ad 100644 --- a/testsuite/tests/typecheck/should_fail/T13075.stderr +++ b/testsuite/tests/typecheck/should_fail/T13075.stderr @@ -1,5 +1,3 @@ T13075.hs:5:1: error: [GHC-48099] - Top-level strict bindings aren't allowed: - Many - !(Just x) = Nothing + Top-level strict bindings aren't allowed: Many !(Just x) = Nothing diff --git a/testsuite/tests/typecheck/should_fail/T2806.stderr b/testsuite/tests/typecheck/should_fail/T2806.stderr index 803ce205903019c0cbefab0b1e8fadf90ffd0354..79a80337c34966740331e5c65747fff8e7c67a73 100644 --- a/testsuite/tests/typecheck/should_fail/T2806.stderr +++ b/testsuite/tests/typecheck/should_fail/T2806.stderr @@ -2,5 +2,4 @@ T2806.hs:13:11: warning: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra)] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - (I# _x) = 4 + Many (I# _x) = 4 diff --git a/testsuite/tests/typecheck/should_fail/T6078.stderr b/testsuite/tests/typecheck/should_fail/T6078.stderr index 155ece8f37b7601f0244c2fde9080d6c202757ed..24a6f29a15c0aba19b78f5016c1d0c553cac4518 100644 --- a/testsuite/tests/typecheck/should_fail/T6078.stderr +++ b/testsuite/tests/typecheck/should_fail/T6078.stderr @@ -1,6 +1,5 @@ T6078.hs:8:10: error: [GHC-20036] You can't mix polymorphic and unlifted bindings: - Many - ip1p@(Ptr ip1) = Ptr ip0 `plusPtr` len + Many ip1p@(Ptr ip1) = Ptr ip0 `plusPtr` len Suggested fix: Add a type signature. diff --git a/testsuite/tests/typecheck/should_fail/tcfail203.stderr b/testsuite/tests/typecheck/should_fail/tcfail203.stderr index dae2d8976692976dfc7b3bddf2d7f67eff71aee7..85d791c39b7253a9304411923fe5531f5376c118 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail203.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail203.stderr @@ -2,47 +2,39 @@ tcfail203.hs:29:11: warning: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra)] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - (I# x) = 5 + Many (I# x) = 5 tcfail203.hs:32:11: warning: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra)] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - (b, I# x) = (True, 5) + Many (b, I# x) = (True, 5) tcfail203.hs:35:11: warning: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra)] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - (# b, I# x #) = (# True, 5 #) + Many (# b, I# x #) = (# True, 5 #) tcfail203.hs:38:11: warning: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra)] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - (# b, x #) = (# True, 5# #) + Many (# b, x #) = (# True, 5# #) tcfail203.hs:41:11: warning: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra)] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - (I# !x) = 5 + Many (I# !x) = 5 tcfail203.hs:44:11: warning: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra)] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - (b, !(I# x)) = (True, 5) + Many (b, !(I# x)) = (True, 5) tcfail203.hs:47:11: warning: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra)] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - (# b, !(I# x) #) = (# True, 5 #) + Many (# b, !(I# x) #) = (# True, 5 #) tcfail203.hs:50:11: warning: [GHC-21030] [-Wunbanged-strict-patterns (in -Wextra)] Pattern bindings containing unlifted types should use an outermost bang pattern: - Many - (# b, !x #) = (# True, 5# #) + Many (# b, !x #) = (# True, 5# #)