Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
310ded12
Commit
310ded12
authored
Jun 11, 2012
by
Ian Lynagh
Browse files
Pass DynFlags around a bit more
parent
5716a2f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/main/DynFlags.hs
View file @
310ded12
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment