Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/851e4e7619200a11cfc9bda4bee6072b0245504b

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

commit 851e4e7619200a11cfc9bda4bee6072b0245504b
Author: Richard Eisenberg <e...@cis.upenn.edu>
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



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to