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 /compiler/GHC/Tc/Gen/Splice.hs | |
parent | ece202297454862717cef8c06d445f8405845b28 (diff) | |
download | haskell-fd0945b7bfa1e36ca79d74f8e6e0918a66d62608.tar.gz |
Move Hooks into HscEnv
Diffstat (limited to 'compiler/GHC/Tc/Gen/Splice.hs')
-rw-r--r-- | compiler/GHC/Tc/Gen/Splice.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/GHC/Tc/Gen/Splice.hs b/compiler/GHC/Tc/Gen/Splice.hs index fab5a13c9b..ab45f3f373 100644 --- a/compiler/GHC/Tc/Gen/Splice.hs +++ b/compiler/GHC/Tc/Gen/Splice.hs @@ -870,9 +870,11 @@ runQResult show_th f runQ expr_span hval runMeta :: (MetaHook TcM -> LHsExpr GhcTc -> TcM hs_syn) -> LHsExpr GhcTc -> TcM hs_syn -runMeta unwrap e - = do { h <- getHooked runMetaHook defaultRunMeta - ; unwrap h e } +runMeta unwrap e = do + hooks <- getHooks + case runMetaHook hooks of + Nothing -> unwrap defaultRunMeta e + Just h -> unwrap h e defaultRunMeta :: MetaHook TcM defaultRunMeta (MetaE r) |