summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Rules.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2020-06-26 09:34:43 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2020-06-30 10:43:50 +0100
commitffd3254d5ea70470d49a8d43ccdcb2b5c01f4e91 (patch)
tree5f9671cd5c84ab81cbd6091884362890260f2540 /compiler/GHC/Core/Rules.hs
parenta3d69dc6c2134afe239caf4f881ba5542d2c2be0 (diff)
downloadhaskell-wip/T18395.tar.gz
Improve debug tracing for substitutionwip/T18395
This patch improves debug tracing a bit (#18395) * Remove the ancient SDoc argument to substitution, replacing it with a HasDebugCallStack constraint. The latter does the same job (indicate the call site) but much better. * Add HasDebugCallStack to simpleOptExpr, exprIsConApp_maybe I needed this to help nail the lookupIdSubst panic in #18326, #17784
Diffstat (limited to 'compiler/GHC/Core/Rules.hs')
-rw-r--r--compiler/GHC/Core/Rules.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Core/Rules.hs b/compiler/GHC/Core/Rules.hs
index e8be7389b2..f80f1951ed 100644
--- a/compiler/GHC/Core/Rules.hs
+++ b/compiler/GHC/Core/Rules.hs
@@ -917,7 +917,7 @@ match_var renv@(RV { rv_tmpls = tmpls, rv_lcl = rn_env, rv_fltR = flt_env })
Var v2 | v1' == rnOccR rn_env v2
-> Just subst
- | Var v2' <- lookupIdSubst (text "match_var") flt_env v2
+ | Var v2' <- lookupIdSubst flt_env v2
, v1' == v2'
-> Just subst
@@ -965,7 +965,7 @@ match_tmpl_var renv@(RV { rv_lcl = rn_env, rv_fltR = flt_env })
where
-- e2' is the result of applying flt_env to e2
e2' | isEmptyVarSet let_bndrs = e2
- | otherwise = substExpr (text "match_tmpl_var") flt_env e2
+ | otherwise = substExpr flt_env e2
id_subst' = extendVarEnv (rs_id_subst subst) v1' e2'
-- No further renaming to do on e2',