[commit: ghc] master: Fix #9085. (6a1d7f9)
git at git.haskell.org
git at git.haskell.org
Wed Jun 11 13:32:22 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6a1d7f9736098d47463a71323d28ece792a59e52/ghc
>---------------------------------------------------------------
commit 6a1d7f9736098d47463a71323d28ece792a59e52
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Tue Jun 10 15:25:36 2014 -0400
Fix #9085.
Inaccessible equations in a closed type family now leads to a
warning, not an error. This echoes what happens at the term level.
>---------------------------------------------------------------
6a1d7f9736098d47463a71323d28ece792a59e52
compiler/typecheck/TcTyClsDecls.lhs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs
index 1b7ad4c..c21631f 100644
--- a/compiler/typecheck/TcTyClsDecls.lhs
+++ b/compiler/typecheck/TcTyClsDecls.lhs
@@ -1466,8 +1466,8 @@ checkValidClosedCoAxiom (CoAxiom { co_ax_branches = branches, co_ax_tc = tc })
-- ones and hence is inaccessible
check_accessibility prev_branches cur_branch
= do { when (cur_branch `isDominatedBy` prev_branches) $
- setSrcSpan (coAxBranchSpan cur_branch) $
- addErrTc $ inaccessibleCoAxBranch tc cur_branch
+ addWarnAt (coAxBranchSpan cur_branch) $
+ inaccessibleCoAxBranch tc cur_branch
; return (cur_branch : prev_branches) }
checkFieldCompat :: Name -> DataCon -> DataCon -> TyVarSet
@@ -2167,7 +2167,7 @@ wrongNamesInInstGroup first cur
inaccessibleCoAxBranch :: TyCon -> CoAxBranch -> SDoc
inaccessibleCoAxBranch tc fi
- = ptext (sLit "Inaccessible family instance equation:") $$
+ = ptext (sLit "Overlapped type family instance equation:") $$
(pprCoAxBranch tc fi)
badRoleAnnot :: Name -> Role -> Role -> SDoc
More information about the ghc-commits
mailing list