summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsUtils.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/deSugar/DsUtils.lhs')
-rw-r--r--compiler/deSugar/DsUtils.lhs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/deSugar/DsUtils.lhs b/compiler/deSugar/DsUtils.lhs
index 5473edf216..52944e8347 100644
--- a/compiler/deSugar/DsUtils.lhs
+++ b/compiler/deSugar/DsUtils.lhs
@@ -76,6 +76,7 @@ import Outputable
import SrcLoc
import Util
import ListSetOps
+import DynFlags
import FastString
import Control.Monad ( zipWithM )
@@ -439,8 +440,9 @@ mkErrorAppDs :: Id -- The error function
mkErrorAppDs err_id ty msg = do
src_loc <- getSrcSpanDs
+ dflags <- getDynFlags
let
- full_msg = showSDoc (hcat [ppr src_loc, text "|", msg])
+ full_msg = showSDoc dflags (hcat [ppr src_loc, text "|", msg])
core_msg = Lit (mkMachString full_msg)
-- mkMachString returns a result of type String#
return (mkApps (Var err_id) [Type ty, core_msg])