summaryrefslogtreecommitdiff
path: root/compiler/GHC/Types/Hint.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Types/Hint.hs')
-rw-r--r--compiler/GHC/Types/Hint.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/GHC/Types/Hint.hs b/compiler/GHC/Types/Hint.hs
index 81b5993e6d..d5ff205361 100644
--- a/compiler/GHC/Types/Hint.hs
+++ b/compiler/GHC/Types/Hint.hs
@@ -37,7 +37,11 @@ data GhcHint where
SuggestAddWhitespaceAround :: GhcHint
-- | Suggests using 'Type' from 'Data.Kind' instead of \"*\".
SuggestUseDataKindType :: GhcHint
-
+ -- | Suggests the correct syntax for a type signature declaration
+ SuggestTypeSignatureDeclaration :: GhcHint
+ -- | Suggests adding the \"qualified\" keyword in the correct position
+ -- when importing a module qualified.
+ SuggestAddQualifiedAfterModuleName :: GhcHint
instance Outputable GhcHint where
ppr = \case
@@ -75,6 +79,10 @@ instance Outputable GhcHint where
SuggestUseDataKindType
-> text "Use" <+> quotes (text "Type")
<+> text "from" <+> quotes (text "Data.Kind") <+> text "instead."
+ SuggestTypeSignatureDeclaration
+ -> text "Try using the form <variable> :: <type>"
+ SuggestAddQualifiedAfterModuleName
+ -> text "Suggested fix: place " <+> quotes (text "qualified") <+> text "after the module name."
-- | An 'InstantiationSuggestion' for a '.hsig' file. This is generated
-- by GHC in case of a 'DriverUnexpectedSignature' and suggests a way