diff options
author | Ian Lynagh <igloo@earth.li> | 2012-06-11 21:09:50 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-06-11 21:09:50 +0100 |
commit | 310ded12b731e5700b4af739a080c3e23904b41e (patch) | |
tree | be0f4b62089af8415521cc643e80addb44a2fb13 | |
parent | 5716a2f849a53c48f6171101fed7a473107f0756 (diff) | |
download | haskell-310ded12b731e5700b4af739a080c3e23904b41e.tar.gz |
Pass DynFlags around a bit more
-rw-r--r-- | compiler/main/DynFlags.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 874737143a..ccd0a75297 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -973,7 +973,7 @@ defaultFatalMessager :: FatalMessager defaultFatalMessager = hPutStrLn stderr defaultLogAction :: LogAction -defaultLogAction _ severity srcSpan style msg +defaultLogAction dflags severity srcSpan style msg = case severity of SevOutput -> printSDoc msg style SevDump -> hPrintDump stdout msg @@ -984,11 +984,11 @@ defaultLogAction _ severity srcSpan style msg -- careful (#2302): printErrs prints in UTF-8, whereas -- converting to string first and using hPutStr would -- just emit the low 8 bits of each unicode char. - where printSDoc = defaultLogActionHPrintDoc stdout - printErrs = defaultLogActionHPrintDoc stderr + where printSDoc = defaultLogActionHPrintDoc dflags stdout + printErrs = defaultLogActionHPrintDoc dflags stderr -defaultLogActionHPrintDoc :: Handle -> SDoc -> PprStyle -> IO () -defaultLogActionHPrintDoc h d sty +defaultLogActionHPrintDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO () +defaultLogActionHPrintDoc _ h d sty = do Pretty.printDoc Pretty.PageMode h (runSDoc d (initSDocContext sty)) hFlush h |