@@ -139,6 +139,7 @@ data SimpleErrorMessage
139139 | IntOutOfRange Integer String Integer Integer
140140 | RedundantEmptyHidingImport ModuleName
141141 | ImplicitImport ModuleName [DeclarationRef]
142+ | ImplicitDctorImport ProperName [ProperName]
142143 | CaseBinderLengthDiffers Int [Binder]
143144 deriving (Show)
144145
@@ -310,6 +311,7 @@ errorCode em = case unwrapErrorMessage em of
310311 IntOutOfRange{} -> "IntOutOfRange"
311312 RedundantEmptyHidingImport{} -> "RedundantEmptyHidingImport"
312313 ImplicitImport{} -> "ImplicitImport"
314+ ImplicitDctorImport{} -> "ImplicitDctorImport"
313315 CaseBinderLengthDiffers{} -> "CaseBinderLengthDiffers"
314316
315317-- |
@@ -859,6 +861,11 @@ prettyPrintSingleError full level e = flip evalState defaultUnknownMap $ do
859861 , indent $ line $ "import " ++ runModuleName mn ++ " (" ++ intercalate ", " (map prettyPrintRef refs) ++ ")"
860862 ]
861863
864+ renderSimpleErrorMessage (ImplicitDctorImport ty ctors) =
865+ paras [ line $ "Import of type " ++ runProperName ty ++ " has unspecified data constructors, consider using the explicit form: "
866+ , indent $ line $ runProperName ty ++ " (" ++ intercalate ", " (map runProperName ctors) ++ ")"
867+ ]
868+
862869 renderSimpleErrorMessage (CaseBinderLengthDiffers l bs) =
863870 paras $ [ line $ "Binder list length differs in case alternative:"
864871 , indent $ line $ intercalate ", " $ fmap prettyPrintBinderAtom bs