[commit: ghc] master: Improve panicking output (e19e58c)

git at git.haskell.org git at git.haskell.org
Mon Mar 21 20:10:40 UTC 2016


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

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

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

commit e19e58ced6fb410c8aa79b2193513258c58a38bd
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Sun Mar 20 23:15:13 2016 -0400

    Improve panicking output


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

e19e58ced6fb410c8aa79b2193513258c58a38bd
 compiler/types/Type.hs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs
index d78c7f7..e3d3c88 100644
--- a/compiler/types/Type.hs
+++ b/compiler/types/Type.hs
@@ -854,7 +854,7 @@ piResultTy ty arg
           empty_subst = mkEmptyTCvSubst $ mkInScopeSet $
                         tyCoVarsOfTypes [arg,res]
   | otherwise
-  = panic "piResultTys"
+  = pprPanic "piResultTy" (ppr ty $$ ppr arg)
 
 -- | (piResultTys f_ty [ty1, .., tyn]) gives the type of (f ty1 .. tyn)
 --   where f :: f_ty
@@ -889,7 +889,7 @@ piResultTys ty orig_args@(arg:args)
       Named tv _ -> go (extendVarEnv emptyTvSubstEnv tv arg) res args
 
   | otherwise
-  = panic "piResultTys"
+  = pprPanic "piResultTys1" (ppr ty $$ ppr orig_args)
   where
     go :: TvSubstEnv -> Type -> [Type] -> Type
     go tv_env ty [] = substTy (mkTvSubst in_scope tv_env) ty
@@ -911,7 +911,7 @@ piResultTys ty orig_args@(arg:args)
       = piResultTys ty' all_args
 
       | otherwise
-      = panic "piResultTys"
+      = pprPanic "piResultTys2" (ppr ty $$ ppr orig_args $$ ppr all_args)
 
 {-
 ---------------------------------------------------------------------



More information about the ghc-commits mailing list