[project @ 2005-07-27 08:04:02 by simonpj]
authorsimonpj <unknown>
Wed, 27 Jul 2005 08:04:02 +0000 (08:04 +0000)
committersimonpj <unknown>
Wed, 27 Jul 2005 08:04:02 +0000 (08:04 +0000)
commitc73c85ac3da4483a430064901b8417ae92554d1b
tree329c8fb56dbf881b5fc1c84a6903a1913483eb2e
parent73b34b81cee865973da94dfb5010c078a656d994
[project @ 2005-07-27 08:04:02 by simonpj]
Try MERGE to STABLE

GHC does not do type subsumption in patterns.  But it should be fine if
the expected type and the pattern have the same type, even if they
are polymorphic.  But that test (in TcUnify.tcSubPat) wasn't implemented
right, which gave rise to perplexing messages like:

   Couldn't match `forall a. a -> b' against `forall a. a -> b'

This fixes the bug.
tc198 tests it, while tcfail145 tests the non-matching case.
ghc/compiler/typecheck/TcUnify.lhs