diff options
Diffstat (limited to 'testsuite')
27 files changed, 105 insertions, 19 deletions
diff --git a/testsuite/tests/module/mod48.stderr b/testsuite/tests/module/mod48.stderr index d2e2652403..96e8f7cf62 100644 --- a/testsuite/tests/module/mod48.stderr +++ b/testsuite/tests/module/mod48.stderr @@ -1,4 +1,4 @@ -mod48.hs:5:3: error: +mod48.hs:5:3: error: [GHC-69248] Pattern bindings (except simple variables) not allowed in class declaration: (x, y) = error "foo" diff --git a/testsuite/tests/module/mod68.stderr b/testsuite/tests/module/mod68.stderr index 754124f15c..4d40083a44 100644 --- a/testsuite/tests/module/mod68.stderr +++ b/testsuite/tests/module/mod68.stderr @@ -1,5 +1,5 @@ -mod68.hs:4:1: +mod68.hs:4:1: error: [GHC-31744] Duplicate type signatures for ‘f’ at mod68.hs:3:1 mod68.hs:4:1 diff --git a/testsuite/tests/parser/should_fail/OpaqueParseFail4.stderr b/testsuite/tests/parser/should_fail/OpaqueParseFail4.stderr index 413b4fcc0c..529eb5f2ac 100644 --- a/testsuite/tests/parser/should_fail/OpaqueParseFail4.stderr +++ b/testsuite/tests/parser/should_fail/OpaqueParseFail4.stderr @@ -1,4 +1,5 @@ -OpaqueParseFail4.hs:6:12: error: + +OpaqueParseFail4.hs:6:12: error: [GHC-31744] Duplicate INLINE pragmas for ‘f’ at OpaqueParseFail4.hs:5:12 OpaqueParseFail4.hs:6:12 diff --git a/testsuite/tests/patsyn/should_fail/T12165.stderr b/testsuite/tests/patsyn/should_fail/T12165.stderr index 881e46905e..0787b79f1a 100644 --- a/testsuite/tests/patsyn/should_fail/T12165.stderr +++ b/testsuite/tests/patsyn/should_fail/T12165.stderr @@ -1,5 +1,5 @@ -T12165.hs:5:9: error: +T12165.hs:5:9: error: [GHC-31744] Duplicate pattern synonym signatures for ‘P’ at T12165.hs:4:9 T12165.hs:5:9 diff --git a/testsuite/tests/patsyn/should_fail/T13349.stderr b/testsuite/tests/patsyn/should_fail/T13349.stderr index 5bf91cbaa4..29b258870f 100644 --- a/testsuite/tests/patsyn/should_fail/T13349.stderr +++ b/testsuite/tests/patsyn/should_fail/T13349.stderr @@ -1,5 +1,5 @@ -T13349.hs:5:1: error: +T13349.hs:5:1: error: [GHC-93961] • Orphan COMPLETE pragmas not supported A COMPLETE pragma must mention at least one data constructor or pattern synonym defined in the same module. diff --git a/testsuite/tests/patsyn/should_fail/T9705-1.stderr b/testsuite/tests/patsyn/should_fail/T9705-1.stderr index 595b70362b..bf89d60be5 100644 --- a/testsuite/tests/patsyn/should_fail/T9705-1.stderr +++ b/testsuite/tests/patsyn/should_fail/T9705-1.stderr @@ -1,4 +1,4 @@ -T9705-1.hs:3:5: error: +T9705-1.hs:3:5: error: [GHC-69248] Pattern synonyms not allowed in class declaration: pattern P = () diff --git a/testsuite/tests/patsyn/should_fail/T9705-2.stderr b/testsuite/tests/patsyn/should_fail/T9705-2.stderr index 520480b2f9..60c75a36bb 100644 --- a/testsuite/tests/patsyn/should_fail/T9705-2.stderr +++ b/testsuite/tests/patsyn/should_fail/T9705-2.stderr @@ -1,4 +1,4 @@ -T9705-2.hs:6:5: error: +T9705-2.hs:6:5: error: [GHC-69248] Pattern synonyms not allowed in instance declaration: pattern P = () diff --git a/testsuite/tests/rename/should_compile/rn049.stderr b/testsuite/tests/rename/should_compile/rn049.stderr index 77df012628..5c13eb3936 100644 --- a/testsuite/tests/rename/should_compile/rn049.stderr +++ b/testsuite/tests/rename/should_compile/rn049.stderr @@ -1,4 +1,5 @@ -rn049.hs:12:6: Warning: - accepting non-standard pattern guards (use PatternGuards to suppress this message) +rn049.hs:12:6: warning: [GHC-59119] + accepting non-standard pattern guards x <- 1 * 2 + 3 * 4 + Suggested fix: Perhaps you intended to use PatternGuards diff --git a/testsuite/tests/rename/should_fail/RnDefaultSigFail.hs b/testsuite/tests/rename/should_fail/RnDefaultSigFail.hs new file mode 100644 index 0000000000..29a5f6a7e5 --- /dev/null +++ b/testsuite/tests/rename/should_fail/RnDefaultSigFail.hs @@ -0,0 +1,6 @@ +module RnDefaultSigFail where + +class C a where + m :: a + default m :: Num a => a + m = 0 diff --git a/testsuite/tests/rename/should_fail/RnDefaultSigFail.stderr b/testsuite/tests/rename/should_fail/RnDefaultSigFail.stderr new file mode 100644 index 0000000000..fa58838e88 --- /dev/null +++ b/testsuite/tests/rename/should_fail/RnDefaultSigFail.stderr @@ -0,0 +1,4 @@ + +RnDefaultSigFail.hs:5:3: error: [GHC-40700] + Unexpected default signature: default m :: Num a => a + Suggested fix: Perhaps you intended to use DefaultSignatures diff --git a/testsuite/tests/rename/should_fail/RnEmptyCaseFail.hs b/testsuite/tests/rename/should_fail/RnEmptyCaseFail.hs new file mode 100644 index 0000000000..4ba8082d6c --- /dev/null +++ b/testsuite/tests/rename/should_fail/RnEmptyCaseFail.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE NoEmptyCase #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE Arrows #-} +module RnEmptyCaseFail where + +f = case () of + +g = \case + +h = \cases + +j = proc x -> do \case + +k = proc x -> do case () of diff --git a/testsuite/tests/rename/should_fail/RnEmptyCaseFail.stderr b/testsuite/tests/rename/should_fail/RnEmptyCaseFail.stderr new file mode 100644 index 0000000000..d611567a6e --- /dev/null +++ b/testsuite/tests/rename/should_fail/RnEmptyCaseFail.stderr @@ -0,0 +1,19 @@ + +RnEmptyCaseFail.hs:6:5: error: [GHC-48010] + Empty list of alternatives in case expression + Suggested fix: Perhaps you intended to use EmptyCase + +RnEmptyCaseFail.hs:8:5: error: [GHC-48010] + Empty list of alternatives in \case expression + Suggested fix: Perhaps you intended to use EmptyCase + +RnEmptyCaseFail.hs:10:5: error: [GHC-48010] + Empty list of alternatives is not allowed in \cases expression + +RnEmptyCaseFail.hs:12:18: error: [GHC-48010] + Empty list of alternatives in \case command + Suggested fix: Perhaps you intended to use EmptyCase + +RnEmptyCaseFail.hs:14:18: error: [GHC-48010] + Empty list of alternatives in case command + Suggested fix: Perhaps you intended to use EmptyCase diff --git a/testsuite/tests/rename/should_fail/RnMultipleFixityFail.hs b/testsuite/tests/rename/should_fail/RnMultipleFixityFail.hs new file mode 100644 index 0000000000..039e6151a7 --- /dev/null +++ b/testsuite/tests/rename/should_fail/RnMultipleFixityFail.hs @@ -0,0 +1,7 @@ +module RnMultipleFixityFail where + + +($$) = ($) + +infixr 4 $$ +infixl 6 $$ diff --git a/testsuite/tests/rename/should_fail/RnMultipleFixityFail.stderr b/testsuite/tests/rename/should_fail/RnMultipleFixityFail.stderr new file mode 100644 index 0000000000..73c3314a2e --- /dev/null +++ b/testsuite/tests/rename/should_fail/RnMultipleFixityFail.stderr @@ -0,0 +1,4 @@ + +RnMultipleFixityFail.hs:6:10: error: [GHC-50419] + Multiple fixity declarations for ‘$$’ + also at RnMultipleFixityFail.hs:7:1-11 diff --git a/testsuite/tests/rename/should_fail/RnMultipleMinimalPragmaFail.hs b/testsuite/tests/rename/should_fail/RnMultipleMinimalPragmaFail.hs new file mode 100644 index 0000000000..b28a6b4a6b --- /dev/null +++ b/testsuite/tests/rename/should_fail/RnMultipleMinimalPragmaFail.hs @@ -0,0 +1,9 @@ +module RnMultipleMinimalPragmaFail where + +class C a where + {-# MINIMAL m1 | m2 #-} + m1 :: a + m2 :: a + m2 = m1 + m1 = m2 + {-# MINIMAL m1 | m2 #-} diff --git a/testsuite/tests/rename/should_fail/RnMultipleMinimalPragmaFail.stderr b/testsuite/tests/rename/should_fail/RnMultipleMinimalPragmaFail.stderr new file mode 100644 index 0000000000..b613af6206 --- /dev/null +++ b/testsuite/tests/rename/should_fail/RnMultipleMinimalPragmaFail.stderr @@ -0,0 +1,6 @@ + +RnMultipleMinimalPragmaFail.hs:4:3: error: [GHC-85346] + Multiple minimal complete definitions + at RnMultipleMinimalPragmaFail.hs:4:3-25 + RnMultipleMinimalPragmaFail.hs:9:3-25 + Combine alternative minimal complete definitions with `|' diff --git a/testsuite/tests/rename/should_fail/RnPatternSynonymFail.hs b/testsuite/tests/rename/should_fail/RnPatternSynonymFail.hs new file mode 100644 index 0000000000..fd3c06e02c --- /dev/null +++ b/testsuite/tests/rename/should_fail/RnPatternSynonymFail.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE TemplateHaskell #-} +module RnPatternSynonymFail where + +import Language.Haskell.TH + +$(pure [ PatSynD (mkName "None") (PrefixPatSyn []) ImplBidir (ConP 'Nothing [] [])]) diff --git a/testsuite/tests/rename/should_fail/RnPatternSynonymFail.stderr b/testsuite/tests/rename/should_fail/RnPatternSynonymFail.stderr new file mode 100644 index 0000000000..0bf8f16f04 --- /dev/null +++ b/testsuite/tests/rename/should_fail/RnPatternSynonymFail.stderr @@ -0,0 +1,4 @@ + +RnPatternSynonymFail.hs:6:2: error: [GHC-41507] + Illegal pattern synonym declaration + Suggested fix: Perhaps you intended to use PatternSynonyms diff --git a/testsuite/tests/rename/should_fail/T18138.stderr b/testsuite/tests/rename/should_fail/T18138.stderr index dea2871a51..afd11678f1 100644 --- a/testsuite/tests/rename/should_fail/T18138.stderr +++ b/testsuite/tests/rename/should_fail/T18138.stderr @@ -1,4 +1,4 @@ -T18138.hs:4:1: error: +T18138.hs:4:1: error: [GHC-87866] Misplaced SPECIALISE instance pragma: {-# SPECIALISE instance Eq (T Int) #-} diff --git a/testsuite/tests/rename/should_fail/T19781.stderr b/testsuite/tests/rename/should_fail/T19781.stderr index 1e468715aa..ffe4a4d329 100644 --- a/testsuite/tests/rename/should_fail/T19781.stderr +++ b/testsuite/tests/rename/should_fail/T19781.stderr @@ -1,6 +1,6 @@ -T19781_A.hs-boot:4:1: error: +T19781_A.hs-boot:4:1: error: [GHC-11247] Bindings in hs-boot files are not allowed -T19781_A.hs-boot:7:1: error: +T19781_A.hs-boot:7:1: error: [GHC-11247] Bindings in hs-boot files are not allowed diff --git a/testsuite/tests/rename/should_fail/T5589.stderr b/testsuite/tests/rename/should_fail/T5589.stderr index f3e5e8d05c..591a51dc74 100644 --- a/testsuite/tests/rename/should_fail/T5589.stderr +++ b/testsuite/tests/rename/should_fail/T5589.stderr @@ -1,5 +1,5 @@ -T5589.hs:4:1: +T5589.hs:4:1: error: [GHC-31744] Duplicate type signatures for ‘aaa’ at T5589.hs:3:6-8 T5589.hs:4:1-3 diff --git a/testsuite/tests/rename/should_fail/T7338.stderr b/testsuite/tests/rename/should_fail/T7338.stderr index ceb6753a22..138d1f2838 100644 --- a/testsuite/tests/rename/should_fail/T7338.stderr +++ b/testsuite/tests/rename/should_fail/T7338.stderr @@ -1,5 +1,5 @@ -T7338.hs:4:1: +T7338.hs:4:1: error: [GHC-31744] Duplicate type signatures for ‘a’ at T7338.hs:3:1 T7338.hs:3:4 diff --git a/testsuite/tests/rename/should_fail/T7338a.stderr b/testsuite/tests/rename/should_fail/T7338a.stderr index 8d6d00097c..01acd0582b 100644 --- a/testsuite/tests/rename/should_fail/T7338a.stderr +++ b/testsuite/tests/rename/should_fail/T7338a.stderr @@ -1,10 +1,10 @@ -T7338a.hs:7:4: +T7338a.hs:7:4: error: [GHC-31744] Duplicate type signatures for ‘a’ at T7338a.hs:3:1 T7338a.hs:7:4 -T7338a.hs:10:1: +T7338a.hs:10:1: error: [GHC-31744] Duplicate type signatures for ‘c’ at T7338a.hs:7:1 T7338a.hs:10:1 diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index c25ba747e7..eee582db2b 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -184,3 +184,8 @@ test('T21605b', normal, compile_fail, ['']) test('T21605c', normal, compile_fail, ['']) test('T21605d', normal, compile_fail, ['']) test('T22839', normal, compile_fail, ['']) +test('RnPatternSynonymFail', normal, compile_fail, ['']) +test('RnMultipleFixityFail', normal, compile_fail, ['']) +test('RnEmptyCaseFail', normal, compile_fail, ['']) +test('RnDefaultSigFail', normal, compile_fail, ['']) +test('RnMultipleMinimalPragmaFail', normal, compile_fail, ['']) diff --git a/testsuite/tests/rename/should_fail/rnfail048.stderr b/testsuite/tests/rename/should_fail/rnfail048.stderr index 64955c3982..bd616596b2 100644 --- a/testsuite/tests/rename/should_fail/rnfail048.stderr +++ b/testsuite/tests/rename/should_fail/rnfail048.stderr @@ -1,5 +1,5 @@ -rnfail048.hs:11:12: +rnfail048.hs:11:12: error: [GHC-31744] Duplicate INLINE pragmas for ‘foo’ at rnfail048.hs:6:17-19 rnfail048.hs:7:18-20 diff --git a/testsuite/tests/typecheck/should_fail/tcfail021.stderr b/testsuite/tests/typecheck/should_fail/tcfail021.stderr index 03a1efc328..59f91cff67 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail021.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail021.stderr @@ -1,4 +1,4 @@ -tcfail021.hs:8:5: error: +tcfail021.hs:8:5: error: [GHC-69248] Pattern bindings (except simple variables) not allowed in instance declaration: ((==), (/=)) = (\ x -> \ y -> True, \ x -> \ y -> False) diff --git a/testsuite/tests/warnings/minimal/WarnMinimalFail1.stderr b/testsuite/tests/warnings/minimal/WarnMinimalFail1.stderr index 43145384e1..9acca4db07 100644 --- a/testsuite/tests/warnings/minimal/WarnMinimalFail1.stderr +++ b/testsuite/tests/warnings/minimal/WarnMinimalFail1.stderr @@ -1,3 +1,3 @@ -WarnMinimalFail1.hs:5:1: +WarnMinimalFail1.hs:5:1: error: [GHC-87866] Misplaced MINIMAL pragma: {-# MINIMAL global #-} |