Signature type variables must not be instantiated with tycons
authorsimonpj@microsoft.com <unknown>
Mon, 19 Feb 2007 17:52:48 +0000 (17:52 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 19 Feb 2007 17:52:48 +0000 (17:52 +0000)
commitad17cf6e34b6ab03f19914e7d2c1262b073db3fa
treea56c29025660cf18c4ac44f8b3b7256fbc9a2a3d
parent67f8c4685920582ad82000e7840a1ffe91682f35
Signature type variables must not be instantiated with tycons

An egregious bug in the type checker meant that it was possible for a
"signature type variable" (a MetaTv of SigTv form) to be instantatiated
with a type-constructor application.  This destroys the invariant for
SigTv.

The fix is easy; adding the predicate TcType.isTyConableTyVar

Fixes Trac #1153
compiler/typecheck/TcSimplify.lhs
compiler/typecheck/TcType.lhs
compiler/typecheck/TcUnify.lhs