summaryrefslogtreecommitdiff
path: root/compiler/GHC/Cmm/Monad.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Cmm/Monad.hs')
-rw-r--r--compiler/GHC/Cmm/Monad.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Cmm/Monad.hs b/compiler/GHC/Cmm/Monad.hs
index edb4c5f9d6..7cee74cd34 100644
--- a/compiler/GHC/Cmm/Monad.hs
+++ b/compiler/GHC/Cmm/Monad.hs
@@ -26,6 +26,8 @@ import Control.Monad
import GHC.Driver.Session
import GHC.Parser.Lexer
+import GHC.Parser.Errors
+import GHC.Types.SrcLoc
newtype PD a = PD { unPD :: DynFlags -> PState -> ParseResult a }
@@ -42,7 +44,7 @@ instance Monad PD where
liftP :: P a -> PD a
liftP (P f) = PD $ \_ s -> f s
-failMsgPD :: String -> PD a
+failMsgPD :: (SrcSpan -> Error) -> PD a
failMsgPD = liftP . failMsgP
returnPD :: a -> PD a