Skip to content
Snippets Groups Projects
Commit 16c40113 authored by Austin Seipp's avatar Austin Seipp
Browse files

Nuke {save,restore}StaticFlagGlobals.


As discussed in #8276, this code was somewhat broken because while you
could always revert the actual argument list, you can never revert the
CAFs upon which they are based - so really this didn't buy you much.

However, Haddock in particular expects to be able to parse GHC flags,
including static flags, and used this code to do so. In its place, we
instead have discardStaticFlags, which will safely remove any of the
remaining 5 flags from a list of arguments. Haddock instead discards
these, as they aren't related to anything it does anyway (mostly
controlling debugging output and some basic optimizer phases.)

This fixes #8276. In the future, we will eventually completely remove
the remaining StaticFlags, removing the need for this fix. Unfortunately
these changes will be quite invasive and require more time.

Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent 99cf4594
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment