diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-06-26 09:34:43 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2020-06-30 10:43:50 +0100 |
commit | ffd3254d5ea70470d49a8d43ccdcb2b5c01f4e91 (patch) | |
tree | 5f9671cd5c84ab81cbd6091884362890260f2540 /compiler/GHC/Core/Opt/SpecConstr.hs | |
parent | a3d69dc6c2134afe239caf4f881ba5542d2c2be0 (diff) | |
download | haskell-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/Opt/SpecConstr.hs')
-rw-r--r-- | compiler/GHC/Core/Opt/SpecConstr.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Opt/SpecConstr.hs b/compiler/GHC/Core/Opt/SpecConstr.hs index c3135de28f..7cd753a42c 100644 --- a/compiler/GHC/Core/Opt/SpecConstr.hs +++ b/compiler/GHC/Core/Opt/SpecConstr.hs @@ -860,7 +860,7 @@ lookupHowBound :: ScEnv -> Id -> Maybe HowBound lookupHowBound env id = lookupVarEnv (sc_how_bound env) id scSubstId :: ScEnv -> Id -> CoreExpr -scSubstId env v = lookupIdSubst (text "scSubstId") (sc_subst env) v +scSubstId env v = lookupIdSubst (sc_subst env) v scSubstTy :: ScEnv -> Type -> Type scSubstTy env ty = substTy (sc_subst env) ty |