diff options
author | Alfredo Di Napoli <alfredo@well-typed.com> | 2021-06-28 15:42:57 +0200 |
---|---|---|
committer | Alfredo Di Napoli <alfredo@well-typed.com> | 2021-07-12 14:19:22 +0200 |
commit | a181313e9205fe289bedf6c8931eb2933490625c (patch) | |
tree | 19cb046c6fdba62f1987b49b5f6ec2821f438591 /testsuite/tests/patsyn | |
parent | c38bce737f532cec1d863d3e15bed4a8addbffd1 (diff) | |
download | haskell-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/patsyn')
-rw-r--r-- | testsuite/tests/patsyn/should_fail/export-syntax.stderr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testsuite/tests/patsyn/should_fail/export-syntax.stderr b/testsuite/tests/patsyn/should_fail/export-syntax.stderr index 8843a6a395..35858bce0d 100644 --- a/testsuite/tests/patsyn/should_fail/export-syntax.stderr +++ b/testsuite/tests/patsyn/should_fail/export-syntax.stderr @@ -1,3 +1,4 @@ export-syntax.hs:1:12: error: - Illegal export form (use PatternSynonyms to enable) + Illegal export form + Suggested fix: Perhaps you intended to use PatternSynonyms |