summaryrefslogtreecommitdiff
path: root/testsuite/tests/warnings
diff options
context:
space:
mode:
authorAlfredo Di Napoli <alfredo@well-typed.com>2021-06-28 15:42:57 +0200
committerAlfredo Di Napoli <alfredo@well-typed.com>2021-07-12 14:19:22 +0200
commita181313e9205fe289bedf6c8931eb2933490625c (patch)
tree19cb046c6fdba62f1987b49b5f6ec2821f438591 /testsuite/tests/warnings
parentc38bce737f532cec1d863d3e15bed4a8addbffd1 (diff)
downloadhaskell-a181313e9205fe289bedf6c8931eb2933490625c.tar.gz
Add proper GHCHints for most PsMessage constructorswip/adinapoli-issue-20055
This commit adds proper hints to most diagnostic types in the `GHC.Parser.Errors.Types` module. By "proper" we mean that previous to this commit the hints were bundled together with the diagnostic message, whereas now we moved most of them as proper `[GhcHint]` in the implementation of `diagnosticHints`. More specifically, this is the list of constructors which now has proper hints: * PsErrIllegalBangPattern * PsWarnOperatorWhitespaceExtConflict * PsErrLambdaCase * PsErrIllegalPatSynExport * PsWarnOperatorWhitespace * PsErrMultiWayIf * PsErrIllegalQualifiedDo * PsErrNumUnderscores * PsErrLinearFunction * PsErrIllegalTraditionalRecordSyntax * PsErrIllegalExplicitNamespace * PsErrOverloadedRecordUpdateNotEnabled * PsErrIllegalDataTypeContext * PsErrSemiColonsInCondExpr * PsErrSemiColonsInCondCmd * PsWarnStarIsType * PsWarnImportPreQualified * PsErrImportPostQualified * PsErrEmptyDoubleQuotes * PsErrIllegalRoleName * PsWarnStarBinder For some reason, this patch increases the peak_megabyte_allocated of the T11545 test to 90 (from a baseline of 80) but that particular test doesn't emit any parsing diagnostic or hint and the metric increase happens only for the `aarch64-linux-deb10`. Metric Increase: T11545
Diffstat (limited to 'testsuite/tests/warnings')
-rw-r--r--testsuite/tests/warnings/should_compile/StarBinder.stderr6
1 files changed, 4 insertions, 2 deletions
diff --git a/testsuite/tests/warnings/should_compile/StarBinder.stderr b/testsuite/tests/warnings/should_compile/StarBinder.stderr
index a8bdc9b6e5..64bd8a3fbc 100644
--- a/testsuite/tests/warnings/should_compile/StarBinder.stderr
+++ b/testsuite/tests/warnings/should_compile/StarBinder.stderr
@@ -1,10 +1,12 @@
StarBinder.hs:6:14: warning: [-Wstar-binder (in -Wdefault)]
Found binding occurrence of ‘*’ yet StarIsType is enabled.
- NB. To use (or export) this operator in modules with StarIsType,
+ Suggested fix:
+ To use (or export) this operator in modules with StarIsType,
including the definition module, you must qualify it.
StarBinder.hs:6:30: warning: [-Wstar-binder (in -Wdefault)]
Found binding occurrence of ‘*’ yet StarIsType is enabled.
- NB. To use (or export) this operator in modules with StarIsType,
+ Suggested fix:
+ To use (or export) this operator in modules with StarIsType,
including the definition module, you must qualify it.