summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-06-11 17:43:46 +0100
committerIan Lynagh <igloo@earth.li>2012-06-11 17:43:46 +0100
commit65152943e6fe80dc5314e897dbf910137b01c47b (patch)
tree5f68d960e94ef95e1caad7f0b67f03368a93446d /compiler
parent2de63e5a912f2abbda44a8125f374b19e8c3a0ff (diff)
downloadhaskell-65152943e6fe80dc5314e897dbf910137b01c47b.tar.gz
Pass DynFlags to prettyPrintGhcErrors
We don't use it yet
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/ErrUtils.lhs21
1 files changed, 11 insertions, 10 deletions
diff --git a/compiler/main/ErrUtils.lhs b/compiler/main/ErrUtils.lhs
index 7de0232e96..a89293fb61 100644
--- a/compiler/main/ErrUtils.lhs
+++ b/compiler/main/ErrUtils.lhs
@@ -334,15 +334,16 @@ debugTraceMsg :: DynFlags -> Int -> MsgDoc -> IO ()
debugTraceMsg dflags val msg
= ifVerbose dflags val (log_action dflags SevInfo noSrcSpan defaultDumpStyle msg)
-prettyPrintGhcErrors :: ExceptionMonad m => m a -> m a
-prettyPrintGhcErrors = ghandle $ \e -> case e of
- PprPanic str doc ->
- pprDebugAndThen panic str doc
- PprSorry str doc ->
- pprDebugAndThen sorry str doc
- PprProgramError str doc ->
- pprDebugAndThen pgmError str doc
- _ ->
- throw e
+prettyPrintGhcErrors :: ExceptionMonad m => DynFlags -> m a -> m a
+prettyPrintGhcErrors _
+ = ghandle $ \e -> case e of
+ PprPanic str doc ->
+ pprDebugAndThen panic str doc
+ PprSorry str doc ->
+ pprDebugAndThen sorry str doc
+ PprProgramError str doc ->
+ pprDebugAndThen pgmError str doc
+ _ ->
+ throw e
\end{code}