[commit: ghc] master: Improve extendTvSubst assertion (97cea31)

git at git.haskell.org git at git.haskell.org
Tue Jun 5 00:44:47 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/97cea3155c7161b7983625417b717239ff52e100/ghc

>---------------------------------------------------------------

commit 97cea3155c7161b7983625417b717239ff52e100
Author: Matthew Pickering <matthew.pickering at tweag.io>
Date:   Mon Jun 4 17:50:01 2018 -0400

    Improve extendTvSubst assertion
    
    Reviewers: bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4790


>---------------------------------------------------------------

97cea3155c7161b7983625417b717239ff52e100
 compiler/simplCore/SimplEnv.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/simplCore/SimplEnv.hs b/compiler/simplCore/SimplEnv.hs
index 7504fc6..18d9f57 100644
--- a/compiler/simplCore/SimplEnv.hs
+++ b/compiler/simplCore/SimplEnv.hs
@@ -319,7 +319,7 @@ extendIdSubst env@(SimplEnv {seIdSubst = subst}) var res
 
 extendTvSubst :: SimplEnv -> TyVar -> Type -> SimplEnv
 extendTvSubst env@(SimplEnv {seTvSubst = tsubst}) var res
-  = ASSERT( isTyVar var )
+  = ASSERT2( isTyVar var, ppr var $$ ppr res )
     env {seTvSubst = extendVarEnv tsubst var res}
 
 extendCvSubst :: SimplEnv -> CoVar -> Coercion -> SimplEnv



More information about the ghc-commits mailing list