Fix Trac #3409: type synonyms that discard their arguments
authorsimonpj@microsoft.com <unknown>
Thu, 13 Aug 2009 16:11:54 +0000 (16:11 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 13 Aug 2009 16:11:54 +0000 (16:11 +0000)
commit2d1262b6acb5aac55777000806fc1b0e5ea57906
tree6968a4d9c555a598be36d741e36765aac430d878
parent2476249a77bde34ea2052910f111a3424c366db6
Fix Trac #3409: type synonyms that discard their arguments

Type synonyms that don't mention one of their type parameters on the
RHS are a pain in the neck.  This patch fixes a long-standing bug (that
simply has not appeared before) in that exprType could return a type
mentioning an existentially-quantified variable (in one of those ignored
argument positions).

See CoreUtils Note [Existential variables and silly type synonyms]

The fix is not entirely beautiful, but it works, and is very localised.
compiler/coreSyn/CoreUtils.lhs
compiler/types/Type.lhs