[commit: ghc] master: Fix Trac #7560. (851e4e7)
Richard Eisenberg <[email protected]> Tue, 08 Jan 2013 20:32:31 -0800
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <[email protected]> |
Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master http://hackage.haskell.org/trac/ghc/changeset/851e4e7619200a11cfc9bda4bee6072b0245504b >--------------------------------------------------------------- commit 851e4e7619200a11cfc9bda4bee6072b0245504b Author: Richard Eisenberg <[email protected]> Date: Tue Jan 8 23:30:16 2013 -0500 Fix Trac #7560. Code in conflictInstErr did not handle the case where some branches of a branched family instance had an error and some didn't. It was all or nothing. Now, if there are no conflicts for a given branch, conflictInstErr just ignores the branch instead of panicking. >--------------------------------------------------------------- compiler/typecheck/FamInst.lhs | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/typecheck/FamInst.lhs b/compiler/typecheck/FamInst.lhs index aba3b12..4e47a2d 100644 --- a/compiler/typecheck/FamInst.lhs +++ b/compiler/typecheck/FamInst.lhs @@ -322,8 +322,8 @@ conflictInstErr fam_inst branch conflictingMatch = addFamInstsErr (ptext (sLit "Conflicting family instance declarations:")) [(fam_inst, branch), (confInst, famInstNthBranch confInst confIndex)] - | otherwise - = pprPanic "conflictInstErr" (pprFamInstBranch (famInstAxiom fam_inst) branch) + | otherwise -- no conflict on this branch; see Trac #7560 + = return () addFamInstsErr :: SDoc -> [(FamInst Branched, FamInstBranch)] -> TcRn () addFamInstsErr herald insts