summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorAlfredo Di Napoli <alfredo@well-typed.com>2021-01-19 09:42:13 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-22 15:00:47 -0500
commitc36a4f6389e5607b1608682c2fcdb0866cac31d0 (patch)
treeeb76e2665ea6a5b87caded5745edfab99e280cae /testsuite
parenta64f21e9f6bd949847d3c8fa1e427e5c763ccd7f (diff)
downloadhaskell-c36a4f6389e5607b1608682c2fcdb0866cac31d0.tar.gz
Fix tests relying on same-line diagnostic ordering
This commit fixes 19 tests which were failing due to the use of `consBag` / `snocBag`, which have been now replaced by `addMessage`. This means that now GHC would output things in different order but only for /diagnostics on the same line/, so this is just reflecting that. The "normal" order of messages is still guaranteed.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/dependent/should_fail/T11334b.stderr9
-rw-r--r--testsuite/tests/driver/recomp005/recomp005.stderr7
-rw-r--r--testsuite/tests/module/T11970.stderr9
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/T14953.stderr21
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01.stderr5
-rw-r--r--testsuite/tests/parser/should_fail/T12811.stderr5
-rw-r--r--testsuite/tests/patsyn/should_fail/export-ps-rec-sel.stderr5
-rw-r--r--testsuite/tests/pmcheck/should_compile/T11822.stderr15
-rw-r--r--testsuite/tests/pmcheck/should_compile/T18572.stderr9
-rw-r--r--testsuite/tests/pmcheck/should_compile/TooManyDeltas.stderr14
-rw-r--r--testsuite/tests/rename/should_compile/T2600.stderr7
-rw-r--r--testsuite/tests/rename/should_fail/rn_dup.stderr8
-rw-r--r--testsuite/tests/th/T10267.stderr24
-rw-r--r--testsuite/tests/th/T16133.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T11974b.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T15552a.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T6018failclosed.stderr14
17 files changed, 90 insertions, 77 deletions
diff --git a/testsuite/tests/dependent/should_fail/T11334b.stderr b/testsuite/tests/dependent/should_fail/T11334b.stderr
index effdf20828..57045d6df1 100644
--- a/testsuite/tests/dependent/should_fail/T11334b.stderr
+++ b/testsuite/tests/dependent/should_fail/T11334b.stderr
@@ -1,7 +1,7 @@
T11334b.hs:8:14: error:
- • Cannot default kind variable ‘f0’
- of kind: k0 -> *
+ • Cannot default kind variable ‘a0’
+ of kind: k10
Perhaps enable PolyKinds or add a kind signature
• In an expression type signature: Proxy 'Compose
In the expression: Proxy :: Proxy 'Compose
@@ -16,9 +16,10 @@ T11334b.hs:8:14: error:
In an equation for ‘p’: p = Proxy :: Proxy 'Compose
T11334b.hs:8:14: error:
- • Cannot default kind variable ‘a0’
- of kind: k10
+ • Cannot default kind variable ‘f0’
+ of kind: k0 -> *
Perhaps enable PolyKinds or add a kind signature
• In an expression type signature: Proxy 'Compose
In the expression: Proxy :: Proxy 'Compose
In an equation for ‘p’: p = Proxy :: Proxy 'Compose
+
diff --git a/testsuite/tests/driver/recomp005/recomp005.stderr b/testsuite/tests/driver/recomp005/recomp005.stderr
index 66b61f5c84..f1c81418a2 100644
--- a/testsuite/tests/driver/recomp005/recomp005.stderr
+++ b/testsuite/tests/driver/recomp005/recomp005.stderr
@@ -1,8 +1,9 @@
C.hs:7:11: warning: [-Winline-rule-shadowing (in -Wdefault)]
+ Rule "f/g" may never fire because ‘g’ might inline first
+ Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘g’
+
+C.hs:7:11: warning: [-Winline-rule-shadowing (in -Wdefault)]
Rule "f/g" may never fire because ‘f’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘f’
-C.hs:7:11: warning: [-Winline-rule-shadowing (in -Wdefault)]
- Rule "f/g" may never fire because ‘g’ might inline first
- Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘g’
diff --git a/testsuite/tests/module/T11970.stderr b/testsuite/tests/module/T11970.stderr
index c6799a1898..246dd7db4c 100644
--- a/testsuite/tests/module/T11970.stderr
+++ b/testsuite/tests/module/T11970.stderr
@@ -1,12 +1,13 @@
T11970.hs:6:40: error:
- • The type constructor ‘C’ is not the parent of the data constructor ‘B’.
- Data constructors can only be exported with their parent type constructor.
+ • The type constructor ‘C’ is not the parent of the record selector ‘recSel’.
+ Record selectors can only be exported with their parent type constructor.
Parent: B
• In the export: C(C, P, x, Q, B, recSel)
T11970.hs:6:40: error:
- • The type constructor ‘C’ is not the parent of the record selector ‘recSel’.
- Record selectors can only be exported with their parent type constructor.
+ • The type constructor ‘C’ is not the parent of the data constructor ‘B’.
+ Data constructors can only be exported with their parent type constructor.
Parent: B
• In the export: C(C, P, x, Q, B, recSel)
+
diff --git a/testsuite/tests/overloadedrecflds/should_fail/T14953.stderr b/testsuite/tests/overloadedrecflds/should_fail/T14953.stderr
index dc2249750e..e698d005fc 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/T14953.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/T14953.stderr
@@ -3,13 +3,13 @@
[3 of 3] Compiling T14953 ( T14953.hs, T14953.o )
T14953.hs:2:33: error:
- Conflicting exports for ‘R’:
- ‘module T14953_A’ exports ‘T14953_A.R’
+ Conflicting exports for ‘unR’:
+ ‘module T14953_A’ exports ‘unR’
imported from ‘T14953_A’ at T14953.hs:3:1-15
- (and originally defined at T14953_A.hs:3:1-23)
- ‘module T14953_B’ exports ‘T14953_B.R’
+ (and originally defined at T14953_A.hs:3:13-15)
+ ‘module T14953_B’ exports ‘unR’
imported from ‘T14953_B’ at T14953.hs:4:1-15
- (and originally defined at T14953_B.hs:3:1-23)
+ (and originally defined at T14953_B.hs:3:13-15)
T14953.hs:2:33: error:
Conflicting exports for ‘R’:
@@ -21,10 +21,11 @@ T14953.hs:2:33: error:
(and originally defined at T14953_B.hs:3:10-23)
T14953.hs:2:33: error:
- Conflicting exports for ‘unR’:
- ‘module T14953_A’ exports ‘unR’
+ Conflicting exports for ‘R’:
+ ‘module T14953_A’ exports ‘T14953_A.R’
imported from ‘T14953_A’ at T14953.hs:3:1-15
- (and originally defined at T14953_A.hs:3:13-15)
- ‘module T14953_B’ exports ‘unR’
+ (and originally defined at T14953_A.hs:3:1-23)
+ ‘module T14953_B’ exports ‘T14953_B.R’
imported from ‘T14953_B’ at T14953.hs:4:1-15
- (and originally defined at T14953_B.hs:3:13-15)
+ (and originally defined at T14953_B.hs:3:1-23)
+
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01.stderr
index 4f51a6f6a9..a7eb1debd1 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01.stderr
@@ -10,13 +10,14 @@ overloadedrecfldsfail01.hs:14:10: error:
In an equation for ‘upd2’: upd2 r = r {x = 3, y = True, z = False}
overloadedrecfldsfail01.hs:17:10: error:
- ‘w’ is not a (visible) field of type ‘U’
+ ‘x’ is not a (visible) field of type ‘U’
In the expression: r {w = True, x = 3, y = True} :: U
In an equation for ‘upd3’:
upd3 r = r {w = True, x = 3, y = True} :: U
overloadedrecfldsfail01.hs:17:10: error:
- ‘x’ is not a (visible) field of type ‘U’
+ ‘w’ is not a (visible) field of type ‘U’
In the expression: r {w = True, x = 3, y = True} :: U
In an equation for ‘upd3’:
upd3 r = r {w = True, x = 3, y = True} :: U
+
diff --git a/testsuite/tests/parser/should_fail/T12811.stderr b/testsuite/tests/parser/should_fail/T12811.stderr
index a1550357d4..fab39d73cc 100644
--- a/testsuite/tests/parser/should_fail/T12811.stderr
+++ b/testsuite/tests/parser/should_fail/T12811.stderr
@@ -1,6 +1,7 @@
-T12811.hs:4:15: error: Not in scope: type constructor or class ‘.’
-
T12811.hs:4:15: error:
Illegal operator ‘.’ in type ‘foral a . a’
Use TypeOperators to allow operators in types
+
+T12811.hs:4:15: error: Not in scope: type constructor or class ‘.’
+
diff --git a/testsuite/tests/patsyn/should_fail/export-ps-rec-sel.stderr b/testsuite/tests/patsyn/should_fail/export-ps-rec-sel.stderr
index 7ba9a42000..4b3bdd0ea1 100644
--- a/testsuite/tests/patsyn/should_fail/export-ps-rec-sel.stderr
+++ b/testsuite/tests/patsyn/should_fail/export-ps-rec-sel.stderr
@@ -2,11 +2,12 @@
export-ps-rec-sel.hs:2:13: error:
Pattern synonyms can only be bundled with matching type constructors
Couldn't match expected type of ‘R’ with actual type of ‘Q’
- In the pattern synonym: P
+ In the pattern synonym record selector: x
In the export: R(P, x)
export-ps-rec-sel.hs:2:13: error:
Pattern synonyms can only be bundled with matching type constructors
Couldn't match expected type of ‘R’ with actual type of ‘Q’
- In the pattern synonym record selector: x
+ In the pattern synonym: P
In the export: R(P, x)
+
diff --git a/testsuite/tests/pmcheck/should_compile/T11822.stderr b/testsuite/tests/pmcheck/should_compile/T11822.stderr
index e7472626bf..8ad52e6de4 100644
--- a/testsuite/tests/pmcheck/should_compile/T11822.stderr
+++ b/testsuite/tests/pmcheck/should_compile/T11822.stderr
@@ -1,11 +1,4 @@
-T11822.hs:33:1: warning:
- Pattern match checker ran into -fmax-pmcheck-models=30 limit, so
- • Redundant clauses might not be reported at all
- • Redundant clauses might be reported as inaccessible
- • Patterns reported as unmatched might actually be matched
- Increase the limit or resolve the warnings to suppress this message.
-
T11822.hs:33:1: warning: [-Wincomplete-patterns (in -Wextra)]
Pattern match(es) are non-exhaustive
In an equation for ‘mkTreeNode’:
@@ -20,3 +13,11 @@ T11822.hs:33:1: warning: [-Wincomplete-patterns (in -Wextra)]
_ (Data.Sequence.Internal.Seq (Data.Sequence.Internal.Single _))
Data.Set.Internal.Tip (Depth _)
...
+
+T11822.hs:33:1: warning:
+ Pattern match checker ran into -fmax-pmcheck-models=30 limit, so
+ • Redundant clauses might not be reported at all
+ • Redundant clauses might be reported as inaccessible
+ • Patterns reported as unmatched might actually be matched
+ Increase the limit or resolve the warnings to suppress this message.
+
diff --git a/testsuite/tests/pmcheck/should_compile/T18572.stderr b/testsuite/tests/pmcheck/should_compile/T18572.stderr
index 7fa14f7127..a6ed65e677 100644
--- a/testsuite/tests/pmcheck/should_compile/T18572.stderr
+++ b/testsuite/tests/pmcheck/should_compile/T18572.stderr
@@ -7,11 +7,12 @@ T18572.hs:12:1: warning: [-Winaccessible-code (in -Wdefault)]
• In the pattern: STrue
In a pattern binding: STrue = SFalse
-T18572.hs:12:1: warning: [-Woverlapping-patterns (in -Wdefault)]
- Pattern match is redundant
- In a pattern binding: STrue = ...
-
T18572.hs:12:1: warning: [-Wincomplete-uni-patterns (in -Wall)]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ‘SBool 'False’ not matched: SFalse
+
+T18572.hs:12:1: warning: [-Woverlapping-patterns (in -Wdefault)]
+ Pattern match is redundant
+ In a pattern binding: STrue = ...
+
diff --git a/testsuite/tests/pmcheck/should_compile/TooManyDeltas.stderr b/testsuite/tests/pmcheck/should_compile/TooManyDeltas.stderr
index e8c992b527..cb65b8cab4 100644
--- a/testsuite/tests/pmcheck/should_compile/TooManyDeltas.stderr
+++ b/testsuite/tests/pmcheck/should_compile/TooManyDeltas.stderr
@@ -1,11 +1,4 @@
-TooManyDeltas.hs:14:1: warning:
- Pattern match checker ran into -fmax-pmcheck-models=0 limit, so
- • Redundant clauses might not be reported at all
- • Redundant clauses might be reported as inaccessible
- • Patterns reported as unmatched might actually be matched
- Increase the limit or resolve the warnings to suppress this message.
-
TooManyDeltas.hs:14:1: warning: [-Wincomplete-patterns (in -Wextra)]
Pattern match(es) are non-exhaustive
In an equation for ‘f’:
@@ -15,6 +8,13 @@ TooManyDeltas.hs:14:1: warning: [-Wincomplete-patterns (in -Wextra)]
B A
B B
+TooManyDeltas.hs:14:1: warning:
+ Pattern match checker ran into -fmax-pmcheck-models=0 limit, so
+ • Redundant clauses might not be reported at all
+ • Redundant clauses might be reported as inaccessible
+ • Patterns reported as unmatched might actually be matched
+ Increase the limit or resolve the warnings to suppress this message.
+
TooManyDeltas.hs:19:1: warning:
Pattern match checker ran into -fmax-pmcheck-models=0 limit, so
• Redundant clauses might not be reported at all
diff --git a/testsuite/tests/rename/should_compile/T2600.stderr b/testsuite/tests/rename/should_compile/T2600.stderr
index 91f594ff9e..ca675475cf 100644
--- a/testsuite/tests/rename/should_compile/T2600.stderr
+++ b/testsuite/tests/rename/should_compile/T2600.stderr
@@ -1,10 +1,11 @@
T2600.hs:16:1: warning: [-Winline-rule-shadowing (in -Wdefault)]
Rule "myrule" may never fire
- because rule "Class op tmap" for ‘tmap’ might fire first
+ because rule "Class op to" for ‘to’ might fire first
Probable fix: add phase [n] or [~n] to the competing rule
T2600.hs:16:1: warning: [-Winline-rule-shadowing (in -Wdefault)]
Rule "myrule" may never fire
- because rule "Class op to" for ‘to’ might fire first
- Probable fix: add phase [n] or [~n] to the competing rule \ No newline at end of file
+ because rule "Class op tmap" for ‘tmap’ might fire first
+ Probable fix: add phase [n] or [~n] to the competing rule
+
diff --git a/testsuite/tests/rename/should_fail/rn_dup.stderr b/testsuite/tests/rename/should_fail/rn_dup.stderr
index ba8a9a56dc..5c4246d8b6 100644
--- a/testsuite/tests/rename/should_fail/rn_dup.stderr
+++ b/testsuite/tests/rename/should_fail/rn_dup.stderr
@@ -1,22 +1,22 @@
rn_dup.hs:9:10: error:
Multiple declarations of ‘MkT’
- Declared at: rn_dup.hs:7:10
+ Declared at: rn_dup.hs:7:16
rn_dup.hs:9:10
rn_dup.hs:9:10: error:
Multiple declarations of ‘MkT’
- Declared at: rn_dup.hs:7:16
+ Declared at: rn_dup.hs:7:10
rn_dup.hs:9:10
rn_dup.hs:12:16: error:
Multiple declarations of ‘rf’
- Declared at: rn_dup.hs:11:16
+ Declared at: rn_dup.hs:11:27
rn_dup.hs:12:16
rn_dup.hs:12:16: error:
Multiple declarations of ‘rf’
- Declared at: rn_dup.hs:11:27
+ Declared at: rn_dup.hs:11:16
rn_dup.hs:12:16
rn_dup.hs:17:3: error:
diff --git a/testsuite/tests/th/T10267.stderr b/testsuite/tests/th/T10267.stderr
index 2f5598fa1d..f97ccf0a1f 100644
--- a/testsuite/tests/th/T10267.stderr
+++ b/testsuite/tests/th/T10267.stderr
@@ -1,17 +1,5 @@
T10267.hs:8:1: error:
- • Found hole: _ :: a
- Where: ‘a’ is a rigid type variable bound by
- the type signature for:
- j :: forall a. a -> a
- at T10267.hs:(8,1)-(12,14)
- • In an equation for ‘j’: j x = _
- • Relevant bindings include
- x :: a (bound at T10267.hs:8:1)
- j :: a -> a (bound at T10267.hs:8:1)
- Valid hole fits include x :: a (bound at T10267.hs:8:1)
-
-T10267.hs:8:1: error:
• Found hole: _foo :: a -> a
Where: ‘a’ is a rigid type variable bound by
the type signature for:
@@ -29,3 +17,15 @@ T10267.hs:8:1: error:
with id @a
(imported from ‘Prelude’ at T10267.hs:3:8-13
(and originally defined in ‘GHC.Base’))
+
+T10267.hs:8:1: error:
+ • Found hole: _ :: a
+ Where: ‘a’ is a rigid type variable bound by
+ the type signature for:
+ j :: forall a. a -> a
+ at T10267.hs:(8,1)-(12,14)
+ • In an equation for ‘j’: j x = _
+ • Relevant bindings include
+ x :: a (bound at T10267.hs:8:1)
+ j :: a -> a (bound at T10267.hs:8:1)
+ Valid hole fits include x :: a (bound at T10267.hs:8:1)
diff --git a/testsuite/tests/th/T16133.stderr b/testsuite/tests/th/T16133.stderr
index 3901f4d491..3a9b9f7480 100644
--- a/testsuite/tests/th/T16133.stderr
+++ b/testsuite/tests/th/T16133.stderr
@@ -1,8 +1,9 @@
T16133.hs:10:2: error:
- Illegal visible kind application ‘@Type’
+ Illegal visible type application ‘@Int’
Perhaps you intended to use TypeApplications
T16133.hs:10:2: error:
- Illegal visible type application ‘@Int’
+ Illegal visible kind application ‘@Type’
Perhaps you intended to use TypeApplications
+
diff --git a/testsuite/tests/typecheck/should_fail/T11974b.stderr b/testsuite/tests/typecheck/should_fail/T11974b.stderr
index d9ee113fe8..db91ac98ea 100644
--- a/testsuite/tests/typecheck/should_fail/T11974b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T11974b.stderr
@@ -1,6 +1,6 @@
T11974b.hs:5:1: error:
- • The default type ‘Either’ is not an instance of
+ • The default type ‘Blah’ is not an instance of
‘Num’ or ‘Show’ or ‘Eq’ or ‘Ord’ or ‘Foldable’ or ‘Traversable’
• When checking the types in a default declaration
@@ -10,6 +10,7 @@ T11974b.hs:5:1: error:
• When checking the types in a default declaration
T11974b.hs:5:1: error:
- • The default type ‘Blah’ is not an instance of
+ • The default type ‘Either’ is not an instance of
‘Num’ or ‘Show’ or ‘Eq’ or ‘Ord’ or ‘Foldable’ or ‘Traversable’
• When checking the types in a default declaration
+
diff --git a/testsuite/tests/typecheck/should_fail/T15552a.stderr b/testsuite/tests/typecheck/should_fail/T15552a.stderr
index f24c6d1285..9f44248ae2 100644
--- a/testsuite/tests/typecheck/should_fail/T15552a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T15552a.stderr
@@ -1,6 +1,6 @@
T15552a.hs:25:9: error:
- • Illegal nested type family application ‘EntryOfValKey
+ • Illegal nested type family application ‘GetEntryOfVal
(FirstEntryOfVal v kvs)’
(Use UndecidableInstances to permit this)
• In the equations for closed type family ‘FirstEntryOfVal’
@@ -14,8 +14,9 @@ T15552a.hs:25:9: error:
In the type family declaration for ‘FirstEntryOfVal’
T15552a.hs:25:9: error:
- • Illegal nested type family application ‘GetEntryOfVal
+ • Illegal nested type family application ‘EntryOfValKey
(FirstEntryOfVal v kvs)’
(Use UndecidableInstances to permit this)
• In the equations for closed type family ‘FirstEntryOfVal’
In the type family declaration for ‘FirstEntryOfVal’
+
diff --git a/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr b/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
index 50df2777ce..bd953629b9 100644
--- a/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
+++ b/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
@@ -7,19 +7,19 @@ T6018failclosed.hs:11:5: error:
In the type family declaration for ‘IdProxyClosed’
T6018failclosed.hs:19:5: error:
- • Type family equation violates the family's injectivity annotation.
- RHS of injective type family equation is a bare type variable
- but these LHS type and kind patterns are not bare variables: ‘'Z’
+ • Type family equation right-hand sides overlap; this violates
+ the family's injectivity annotation:
PClosed 'Z m = m -- Defined at T6018failclosed.hs:19:5
+ PClosed ('S n) m = 'S (PClosed n m)
+ -- Defined at T6018failclosed.hs:20:5
• In the equations for closed type family ‘PClosed’
In the type family declaration for ‘PClosed’
T6018failclosed.hs:19:5: error:
- • Type family equation right-hand sides overlap; this violates
- the family's injectivity annotation:
+ • Type family equation violates the family's injectivity annotation.
+ RHS of injective type family equation is a bare type variable
+ but these LHS type and kind patterns are not bare variables: ‘'Z’
PClosed 'Z m = m -- Defined at T6018failclosed.hs:19:5
- PClosed ('S n) m = 'S (PClosed n m)
- -- Defined at T6018failclosed.hs:20:5
• In the equations for closed type family ‘PClosed’
In the type family declaration for ‘PClosed’