Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
14019 commits behind the upstream repository.
Alp Mestanogullari's avatar
Alp Mestanogullari authored
They have type '[CommandLineOpts] -> Maybe (DynFlags -> IO DynFlags)'.
All plugins that supply a non-Nothing 'dynflagsPlugin' will see their
updates applied to the current DynFlags right after the plugins are
loaded.

One use case for this is to superseede !1580 for registering hooks
from a plugin. Frontend/parser plugins were considered to achieve this
but they respectively conflict with how this plugin is going to be used
and don't allow overriding/modifying the DynFlags, which is how hooks have
to be registered.

This commit comes with a test, 'test-hook-plugin', that registers a "fake"
meta hook that replaces TH expressions with the 0 integer literal.
900cf195
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.