Reject derivable type classes with higher-rank methods
authorsimonpj@microsoft.com <unknown>
Tue, 15 Aug 2006 07:59:28 +0000 (07:59 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 15 Aug 2006 07:59:28 +0000 (07:59 +0000)
commit4bcaad0c0fc30984282ae40b802f48b2d9dc20bb
tree32a7f10fd1102ad874ed6ece419afb01546225ed
parentc17dc70a1fbc9f376b5eab05b6a77c4af1aa7623
Reject derivable type classes with higher-rank methods

Trac #864 suggested a derivable type class with a higher-rank method.

In principle this is quite do-able, but in practice the mechanism works
by generating source code and then doing type inference.  To make this work
with higher-rank types would require impredicative polymorphism. And we
do have that, so it could probably be made to work by generating (source-level)
type annotations.  But it's real work, so I'm settling for generating a
decent error message rather than crashing.
compiler/types/Generics.lhs