[commit: ghc] wip/new-flatten-skolems-Oct14: Minor refactoring (no change in functionality) (f132ea5)
git at git.haskell.org
git at git.haskell.org
Thu Oct 30 12:54:36 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/new-flatten-skolems-Oct14
Link : http://ghc.haskell.org/trac/ghc/changeset/f132ea5db80e89ec8108594751c09242820be276/ghc
>---------------------------------------------------------------
commit f132ea5db80e89ec8108594751c09242820be276
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Oct 29 17:51:41 2014 +0000
Minor refactoring (no change in functionality)
>---------------------------------------------------------------
f132ea5db80e89ec8108594751c09242820be276
compiler/typecheck/TcErrors.lhs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/compiler/typecheck/TcErrors.lhs b/compiler/typecheck/TcErrors.lhs
index d2d8133..927f522 100644
--- a/compiler/typecheck/TcErrors.lhs
+++ b/compiler/typecheck/TcErrors.lhs
@@ -989,7 +989,9 @@ mkDictErr ctxt cts
= ASSERT( not (null cts) )
do { inst_envs <- tcGetInstEnvs
; fam_envs <- tcGetFamInstEnvs
- ; lookups <- mapM (lookup_cls_inst inst_envs) cts
+ ; let (ct1:_) = cts -- ct1 just for its location
+ min_cts = elim_superclasses cts
+ ; lookups <- mapM (lookup_cls_inst inst_envs) min_cts
; let (no_inst_cts, overlap_cts) = partition is_no_inst lookups
-- Report definite no-instance errors,
@@ -1000,8 +1002,6 @@ mkDictErr ctxt cts
; (ctxt, err) <- mk_dict_err fam_envs ctxt (head (no_inst_cts ++ overlap_cts))
; mkErrorMsg ctxt ct1 err }
where
- ct1:_ = elim_superclasses cts
-
no_givens = null (getUserGivens ctxt)
is_no_inst (ct, (matches, unifiers, _))
More information about the ghc-commits
mailing list