cvs commit: fptools/ghc/compiler/typecheck TcUnify.lhs
Simon Peyton Jones
simonpj at haskell.org
Wed Jul 27 04:04:03 EDT 2005
simonpj 2005/07/27 01:04:03 PDT
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.
Revision Changes Path
1.71 +24 -10 fptools/ghc/compiler/typecheck/TcUnify.lhs
More information about the Cvs-ghc