diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-01-12 14:56:41 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-22 18:27:00 -0500 |
commit | fd0945b7bfa1e36ca79d74f8e6e0918a66d62608 (patch) | |
tree | a57bd43ad0b6d87e69f36e52802d28d9c4de5076 /testsuite/tests/plugins/hooks-plugin | |
parent | ece202297454862717cef8c06d445f8405845b28 (diff) | |
download | haskell-fd0945b7bfa1e36ca79d74f8e6e0918a66d62608.tar.gz |
Move Hooks into HscEnv
Diffstat (limited to 'testsuite/tests/plugins/hooks-plugin')
-rw-r--r-- | testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs b/testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs index 7d8a6b909c..33c1ab78be 100644 --- a/testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs +++ b/testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs @@ -15,12 +15,9 @@ plugin = defaultPlugin { driverPlugin = hooksP } hooksP :: [CommandLineOption] -> HscEnv -> IO HscEnv hooksP opts hsc_env = do - let dflags = hsc_dflags hsc_env - dflags' = dflags - { hooks = (hooks dflags) - { runMetaHook = Just (fakeRunMeta opts) } - } - hsc_env' = hsc_env { hsc_dflags = dflags' } + let hooks = hsc_hooks hsc_env + hooks' = hooks { runMetaHook = Just (fakeRunMeta opts) } + hsc_env' = hsc_env { hsc_hooks = hooks' } return hsc_env' -- This meta hook doesn't actually care running code in splices, |