[commit: ghc] master: Give more informative panic for checkFamInstConsistency. (144096e)

git at git.haskell.org git at git.haskell.org
Wed Jul 22 20:03:44 UTC 2015


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

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

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

commit 144096e1da595a7a612755b5abc7604fcbeb8e6e
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Tue Jul 21 17:06:39 2015 -0700

    Give more informative panic for checkFamInstConsistency.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>


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

144096e1da595a7a612755b5abc7604fcbeb8e6e
 compiler/typecheck/FamInst.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs
index 9b7acac..3af2358 100644
--- a/compiler/typecheck/FamInst.hs
+++ b/compiler/typecheck/FamInst.hs
@@ -32,6 +32,7 @@ import Maybes
 import TcMType
 import TcType
 import Name
+import Panic
 import Control.Monad
 import Data.Map (Map)
 import qualified Data.Map as Map
@@ -134,7 +135,8 @@ checkFamInstConsistency famInstMods directlyImpMods
                -- all directly imported modules must already have been loaded.
                modIface mod =
                  case lookupIfaceByModule dflags hpt (eps_PIT eps) mod of
-                   Nothing    -> panic "FamInst.checkFamInstConsistency"
+                   Nothing    -> panicDoc "FamInst.checkFamInstConsistency"
+                                          (ppr mod $$ pprHPT hpt)
                    Just iface -> iface
 
              ; hmiModule     = mi_module . hm_iface



More information about the ghc-commits mailing list