[commit: ghc] wip/T9858-typeable-ben: Debugging (6d7fb04)
git at git.haskell.org
git at git.haskell.org
Wed Aug 26 14:12:45 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T9858-typeable-ben
Link : http://ghc.haskell.org/trac/ghc/changeset/6d7fb0460466de2d8bdf38c3a98e66a368607551/ghc
>---------------------------------------------------------------
commit 6d7fb0460466de2d8bdf38c3a98e66a368607551
Author: Ben Gamari <ben at smart-cactus.org>
Date: Wed Aug 26 15:29:23 2015 +0200
Debugging
>---------------------------------------------------------------
6d7fb0460466de2d8bdf38c3a98e66a368607551
compiler/typecheck/TcTyClsDecls.hs | 2 +-
compiler/typecheck/TcValidity.hs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs
index 446e461..cdf9c54 100644
--- a/compiler/typecheck/TcTyClsDecls.hs
+++ b/compiler/typecheck/TcTyClsDecls.hs
@@ -833,7 +833,7 @@ tcClassATs :: Name -- The class name (not knot-tied)
-> TcM [ClassATItem]
tcClassATs class_name cls ats at_defs
= do { -- Complain about associated type defaults for non associated-types
- sequence_ [ failWithTc (badATErr class_name n)
+ sequence_ [ failWithTc (badATErr class_name n <> ppr n <> ppr at_names)
| n <- map at_def_tycon at_defs
, not (n `elemNameSet` at_names) ]
; mapM tc_at ats }
diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs
index 122b286..6594610 100644
--- a/compiler/typecheck/TcValidity.hs
+++ b/compiler/typecheck/TcValidity.hs
@@ -1155,7 +1155,7 @@ checkConsistentFamInst Nothing _ _ _ = return ()
checkConsistentFamInst (Just (clas, mini_env)) fam_tc at_tvs at_tys
= do { -- Check that the associated type indeed comes from this class
checkTc (Just clas == tyConAssoc_maybe fam_tc)
- (badATErr (className clas) (tyConName fam_tc))
+ (badATErr (className clas) (tyConName fam_tc) <> ppr (tyConAssoc_maybe fam_tc))
-- See Note [Checking consistent instantiation] in TcTyClsDecls
-- Check right to left, so that we spot type variable
More information about the ghc-commits
mailing list