[GHC] #14597: Consider removing uses of unsafeGlobalDynFlags for -dppr-debug
GHC
ghc-devs at haskell.org
Mon Dec 18 17:54:56 UTC 2017
#14597: Consider removing uses of unsafeGlobalDynFlags for -dppr-debug
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Currently various functions in `Outputable` use `unsafeGlobalDynFlags` to
get the state of `-dppr-debug`. `unsafeGlobalDynFlags` is rather ugly,
being a blob of global state spanning both module compilations and GHC API
sessions. Consequently, we might consider removing it.
On the other hand, `-dppr-debug` is strictly a debug flag and removing
`unsafeGlobalDynFlags` would likely require a lot more piping around of
`DynFlags`. Consequently I suspect our current compromise of using
`unsafeGlobalDynFlags` is the right solution. Nevertheless, I thought I
would jot down the task.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14597>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list