diff options
author | Shayne Fletcher <shayne@shaynefletcher.org> | 2021-02-21 11:48:17 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-03-06 19:27:04 -0500 |
commit | cf65cf16c89414273c4f6b2d090d4b2fffb90759 (patch) | |
tree | 57d893535444c2face265c12ade95f0ef3f0ceba /compiler/GHC/Parser/Errors/Ppr.hs | |
parent | 9e0c0c3a7b6cad8c08e5de7e2a27cf2cb2d2368f (diff) | |
download | haskell-cf65cf16c89414273c4f6b2d090d4b2fffb90759.tar.gz |
Implement record dot syntaxwip/joachim/bump-haddock
Diffstat (limited to 'compiler/GHC/Parser/Errors/Ppr.hs')
-rw-r--r-- | compiler/GHC/Parser/Errors/Ppr.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/GHC/Parser/Errors/Ppr.hs b/compiler/GHC/Parser/Errors/Ppr.hs index 8e083b0141..47c8104fd1 100644 --- a/compiler/GHC/Parser/Errors/Ppr.hs +++ b/compiler/GHC/Parser/Errors/Ppr.hs @@ -234,6 +234,15 @@ pp_err = \case PsErrPrecedenceOutOfRange i -> text "Precedence out of range: " <> int i + PsErrOverloadedRecordDotInvalid + -> text "Use of OverloadedRecordDot '.' not valid ('.' isn't allowed when constructing records or in record patterns)" + + PsErrOverloadedRecordUpdateNoQualifiedFields + -> text "Fields cannot be qualified when OverloadedRecordUpdate is enabled" + + PsErrOverloadedRecordUpdateNotEnabled + -> text "OverloadedRecordUpdate needs to be enabled" + PsErrInvalidDataCon t -> hang (text "Cannot parse data constructor in a data/newtype declaration:") 2 (ppr t) @@ -607,4 +616,3 @@ pp_hint = \case perhaps_as_pat :: SDoc perhaps_as_pat = text "Perhaps you meant an as-pattern, which must not be surrounded by whitespace" - |