summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Errors.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Driver/Errors.hs')
-rw-r--r--compiler/GHC/Driver/Errors.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/GHC/Driver/Errors.hs b/compiler/GHC/Driver/Errors.hs
index f980502f5d..777761f201 100644
--- a/compiler/GHC/Driver/Errors.hs
+++ b/compiler/GHC/Driver/Errors.hs
@@ -9,7 +9,7 @@ import GHC.Driver.Session
import GHC.Driver.Errors.Types
import GHC.Data.Bag
import GHC.Prelude
-import GHC.Parser.Errors ( PsError(..) )
+import GHC.Parser.Errors.Types
import GHC.Types.SrcLoc
import GHC.Types.SourceError
import GHC.Types.Error
@@ -64,7 +64,5 @@ printOrThrowDiagnostics logger dflags msgs
-- for dealing with parse errors when the driver is doing dependency analysis.
-- Defined here to avoid module loops between GHC.Driver.Error.Types and
-- GHC.Driver.Error.Ppr
-mkDriverPsHeaderMessage :: PsError -> MsgEnvelope DriverMessage
-mkDriverPsHeaderMessage ps_err
- = mkPlainErrorMsgEnvelope (errLoc ps_err) $
- DriverPsHeaderMessage (errDesc ps_err) (errHints ps_err)
+mkDriverPsHeaderMessage :: MsgEnvelope PsMessage -> MsgEnvelope DriverMessage
+mkDriverPsHeaderMessage = fmap DriverPsHeaderMessage