Only delete instances when merging when there is an exact match.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Fri, 14 Oct 2016 07:11:10 +0000 (00:11 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 20 Oct 2016 19:45:40 +0000 (12:45 -0700)
commit9df4ce4f89b6d999822ae30ff777bdaf26665c06
tree03016e5127a1f3d8f74a2fe19c1aceaf7148cc4e
parent7e77c4b2ee08d7f88df8ba47537640ec1bd70bfe
Only delete instances when merging when there is an exact match.

Summary:
Previously, we deleted if the heads matched, which meant that
we effectively were picking an arbitrary instance if there
were incompatible instances.  The new behavior makes more sense,
although without incoherent instances you are unlikely to
be able to do anything useful with the instances.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate

Reviewers: austin, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2596
compiler/backpack/RnModIface.hs
compiler/typecheck/TcBackpack.hs
compiler/types/InstEnv.hs