diff options
Diffstat (limited to 'compiler/GHC/Tc/Errors/Ppr.hs')
-rw-r--r-- | compiler/GHC/Tc/Errors/Ppr.hs | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Errors/Ppr.hs b/compiler/GHC/Tc/Errors/Ppr.hs index a9b1084914..fe5b9c91c2 100644 --- a/compiler/GHC/Tc/Errors/Ppr.hs +++ b/compiler/GHC/Tc/Errors/Ppr.hs @@ -1726,9 +1726,7 @@ instance Diagnostic TcRnMessage where nest 4 (text "in the section:" <+> quotes (ppr section))] TcRnUnexpectedPatSigType ty - -> mkSimpleDecorated $ - hang (text "Illegal type signature:" <+> quotes (ppr ty)) - 2 (text "Type signatures are only allowed in patterns with ScopedTypeVariables") + -> mkSimpleDecorated $ text "Illegal type signature:" <+> quotes (ppr ty) TcRnIllegalKindSignature ty -> mkSimpleDecorated $ text "Illegal kind signature:" <+> quotes (ppr ty) @@ -1882,6 +1880,14 @@ instance Diagnostic TcRnMessage where TcRnNonCanonicalDefinition reason inst_ty -> mkSimpleDecorated $ pprNonCanonicalDefinition inst_ty reason + TcRnImplicitForAll fvars -> mkSimpleDecorated $ + text "Unbound type variable" <> plural fvars <> text ":" + <+> pprQuotedList fvars + + TcRnPatternSignatureBinds fvars -> mkSimpleDecorated $ + sep [text "Type variable binding" <> plural fvars + , text "in pattern signature:" <+> pprQuotedList fvars + ] TcRnUnexpectedDeclarationSplice {} -> mkSimpleDecorated $ text "Declaration splices are not permitted" <+> @@ -2542,6 +2548,10 @@ instance Diagnostic TcRnMessage where -> WarningWithFlag Opt_WarnNonCanonicalMonadInstances TcRnUnexpectedDeclarationSplice {} -> ErrorWithoutFlag + TcRnImplicitForAll{} + -> ErrorWithoutFlag + TcRnPatternSignatureBinds{} + -> WarningWithFlag Opt_WarnPatternSignatureBinds TcRnImplicitImportOfPrelude {} -> WarningWithFlag Opt_WarnImplicitPrelude TcRnMissingMain {} @@ -3151,7 +3161,7 @@ instance Diagnostic TcRnMessage where TcRnSectionPrecedenceError{} -> noHints TcRnUnexpectedPatSigType{} - -> [suggestExtension LangExt.ScopedTypeVariables] + -> [suggestExtension LangExt.PatternSignatures] TcRnIllegalKindSignature{} -> [suggestExtension LangExt.KindSignatures] TcRnUnusedQuantifiedTypeVar{} @@ -3221,6 +3231,10 @@ instance Diagnostic TcRnMessage where -> noHints TcRnNonCanonicalDefinition reason _ -> suggestNonCanonicalDefinition reason + TcRnImplicitForAll{} + -> [suggestExtension LangExt.ImplicitForAll] + TcRnPatternSignatureBinds{} + -> noHints TcRnUnexpectedDeclarationSplice {} -> noHints TcRnImplicitImportOfPrelude {} |