diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-02-03 21:17:11 +0100 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-02-12 23:58:52 +0100 |
commit | df08468113ab46832b7ac0a7311b608d1b418c4d (patch) | |
tree | de3a0ed40b58162976e4831625471b5702b2121f /testsuite/tests/patsyn | |
parent | 6c2585e0816cb49487fa6a2be5b8e3f191cf3438 (diff) | |
download | haskell-df08468113ab46832b7ac0a7311b608d1b418c4d.tar.gz |
Always display inferred variables using braces
We now always show "forall {a}. T" for inferred variables,
previously this was controlled by -fprint-explicit-foralls.
This implements part 1 of https://github.com/ghc-proposals/ghc-proposals/pull/179.
Part of GHC ticket #16320.
Furthermore, when printing a levity restriction error, we now display
the HsWrap of the expression. This lets users see the full elaboration with
-fprint-typechecker-elaboration (see also #17670)
Diffstat (limited to 'testsuite/tests/patsyn')
4 files changed, 19 insertions, 19 deletions
diff --git a/testsuite/tests/patsyn/should_compile/T11213.stderr b/testsuite/tests/patsyn/should_compile/T11213.stderr index 212e3e9334..8d65044ec6 100644 --- a/testsuite/tests/patsyn/should_compile/T11213.stderr +++ b/testsuite/tests/patsyn/should_compile/T11213.stderr @@ -4,48 +4,48 @@ T11213.hs:19:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] T11213.hs:20:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern Pe :: () => forall a. a -> Ex + pattern Pe :: () => forall {a}. a -> Ex T11213.hs:21:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern Pu :: forall p. p -> p + pattern Pu :: forall {p}. p -> p T11213.hs:22:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern Pue :: forall a. () => forall a1. a -> a1 -> (a, Ex) + pattern Pue :: forall {a}. () => forall {a1}. a -> a1 -> (a, Ex) T11213.hs:23:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern Pur :: forall a. (Eq a, Num a) => a -> [a] + pattern Pur :: forall {a}. (Eq a, Num a) => a -> [a] T11213.hs:24:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern Purp :: forall a1 a2. + pattern Purp :: forall {a1} {a2}. (Eq a1, Num a1) => Show a2 => a1 -> a2 -> ([a1], UnivProv a2) T11213.hs:25:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern Pure :: forall a. + pattern Pure :: forall {a}. (Eq a, Num a) => - forall a1. a -> a1 -> ([a], Ex) + forall {a1}. a -> a1 -> ([a], Ex) T11213.hs:26:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern Purep :: forall a. + pattern Purep :: forall {a}. (Eq a, Num a) => - forall a1. Show a1 => a -> a1 -> ([a], ExProv) + forall {a1}. Show a1 => a -> a1 -> ([a], ExProv) T11213.hs:27:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern Pep :: () => forall a. Show a => a -> ExProv + pattern Pep :: () => forall {a}. Show a => a -> ExProv T11213.hs:28:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern Pup :: forall a. () => Show a => a -> UnivProv a + pattern Pup :: forall {a}. () => Show a => a -> UnivProv a T11213.hs:29:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern Puep :: forall b. + pattern Puep :: forall {b}. () => - forall a. Show a => a -> b -> (ExProv, b) + forall {a}. Show a => a -> b -> (ExProv, b) diff --git a/testsuite/tests/patsyn/should_compile/T12484.stderr b/testsuite/tests/patsyn/should_compile/T12484.stderr index d51b6fe393..6e73612518 100644 --- a/testsuite/tests/patsyn/should_compile/T12484.stderr +++ b/testsuite/tests/patsyn/should_compile/T12484.stderr @@ -1,4 +1,4 @@ T12484.hs:6:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern RP :: forall a. a -> (a, Bool) + pattern RP :: forall {a}. a -> (a, Bool) diff --git a/testsuite/tests/patsyn/should_compile/T14394.stdout b/testsuite/tests/patsyn/should_compile/T14394.stdout index f59f62cb78..83e745c60a 100644 --- a/testsuite/tests/patsyn/should_compile/T14394.stdout +++ b/testsuite/tests/patsyn/should_compile/T14394.stdout @@ -1,7 +1,7 @@ pattern Foo :: () => (b ~ a) => a :~~: b -- Defined at <interactive>:5:1 pattern Bar - :: forall k1 k2 (a :: k1) (b :: k2). + :: forall {k1} {k2} {a :: k1} {b :: k2}. () => (k2 ~ k1, b ~~ a) => a :~~: b diff --git a/testsuite/tests/patsyn/should_fail/T11053.stderr b/testsuite/tests/patsyn/should_fail/T11053.stderr index 5e50a9143f..7aaf7ff26c 100644 --- a/testsuite/tests/patsyn/should_fail/T11053.stderr +++ b/testsuite/tests/patsyn/should_fail/T11053.stderr @@ -4,16 +4,16 @@ T11053.hs:7:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] T11053.hs:9:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern J :: forall a. a -> Maybe a + pattern J :: forall {a}. a -> Maybe a T11053.hs:11:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern J1 :: forall a. a -> Maybe a + pattern J1 :: forall {a}. a -> Maybe a T11053.hs:13:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern J2 :: forall a. a -> Maybe a + pattern J2 :: forall {a}. a -> Maybe a T11053.hs:15:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] Pattern synonym with no type signature: - pattern J3 :: forall a. a -> Maybe a + pattern J3 :: forall {a}. a -> Maybe a |