Commit 851e4e76 authored by eir@cis.upenn.edu's avatar eir@cis.upenn.edu
Browse files

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.
parent 0a24be00
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment