summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Gen/Splice.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc/Gen/Splice.hs')
-rw-r--r--compiler/GHC/Tc/Gen/Splice.hs8
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)