Consider removing uses of unsafeGlobalDynFlags for -dppr-debug
Currently various functions in
unsafeGlobalDynFlags to get the state of
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.