Fix Trac #3102: pre-matching polytypes
authorsimonpj@microsoft.com <unknown>
Mon, 30 Nov 2009 17:44:41 +0000 (17:44 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 30 Nov 2009 17:44:41 +0000 (17:44 +0000)
commitdc07de316fa7730abe8759b57bd8300e07650f3a
tree157105947f176775d8dd2cedb9741caa1bb23f44
parentdddbf3593436ac0355d907b7b759e1b44f4f3d0f
Fix Trac #3102: pre-matching polytypes

When *pre-matching* two types
     forall a. C1 => t1  ~  forall a. C2 => t2
we were matching t1~t2, but totally ignoring C1,C2
That's utterly wrong when pre-matching
       (?p::Int) => String  ~  a
because we emerge with a:=String!

All this is part of the impredicative story, which is about
to go away, but still.

Worth merging this to 6.12
compiler/typecheck/TcUnify.lhs