Consider removing uses of unsafeGlobalDynFlags for -dppr-debug
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.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.2.1 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |