diff options
Diffstat (limited to 'compiler/GHC/Tc/Errors/Ppr.hs')
-rw-r--r-- | compiler/GHC/Tc/Errors/Ppr.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/GHC/Tc/Errors/Ppr.hs b/compiler/GHC/Tc/Errors/Ppr.hs index 034f04f91b..c8ed6a04eb 100644 --- a/compiler/GHC/Tc/Errors/Ppr.hs +++ b/compiler/GHC/Tc/Errors/Ppr.hs @@ -84,6 +84,8 @@ instance Diagnostic TcRnMessage where hsep [text "duplicate field name", quotes (ppr (NE.head dups)), text "in record", pprRecordFieldPart fld_part] + TcRnIllegalViewPattern pat + -> mkSimpleDecorated $ vcat [text "Illegal view pattern: " <+> ppr pat] diagnosticReason = \case TcRnUnknownMessage m @@ -123,6 +125,8 @@ instance Diagnostic TcRnMessage where -> ErrorWithoutFlag TcRnDuplicateFieldName{} -> ErrorWithoutFlag + TcRnIllegalViewPattern{} + -> ErrorWithoutFlag diagnosticHints = \case TcRnUnknownMessage m @@ -162,6 +166,8 @@ instance Diagnostic TcRnMessage where -> [SuggestExtension LangExt.RecordWildCards] TcRnDuplicateFieldName{} -> noHints + TcRnIllegalViewPattern{} + -> [SuggestExtension LangExt.ViewPatterns] messageWithInfoDiagnosticMessage :: UnitState -> ErrInfo |