summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Backpack.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Driver/Backpack.hs')
-rw-r--r--compiler/GHC/Driver/Backpack.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/GHC/Driver/Backpack.hs b/compiler/GHC/Driver/Backpack.hs
index 30289129c4..e0e5b183ab 100644
--- a/compiler/GHC/Driver/Backpack.hs
+++ b/compiler/GHC/Driver/Backpack.hs
@@ -809,9 +809,8 @@ summariseDecl _pn hsc_src lmodname@(L loc modname) Nothing
Nothing -- GHC API buffer support not supported
[] -- No exclusions
case r of
- Nothing -> throwOneError $ mkPlainErrorMsgEnvelope loc $
- GhcDriverMessage $ DriverUnknownMessage $ mkPlainError $
- (text "module" <+> ppr modname <+> text "was not found")
+ Nothing -> throwOneError $ fmap GhcDriverMessage
+ $ mkPlainErrorMsgEnvelope loc (DriverBackpackModuleNotFound modname)
Just (Left err) -> throwErrors (fmap GhcDriverMessage err)
Just (Right summary) -> return summary