patch applied (ghc): Improve consistency checking for derived
instances
Simon Peyton Jones
simonpj at microsoft.com
Mon Jun 26 07:18:06 EDT 2006
Mon Jun 26 03:00:34 PDT 2006 simonpj at microsoft.com
* Improve consistency checking for derived instances
This patch arranges that derived instances use the same instance-decl
checking code as user-defined instances. That gives greater consistency
in error messages.
Furthermore, the error description if this consistency check fails is now
much more explicit. For example, drvfail003 now says
Variable occurs more often in a constraint than in the instance head
in the constraint: Show (v (v a))
(Use -fallow-undecidable-instances to permit this)
In the derived instance
instance (Show (v (v a))) => Show (Square_ v w a)
M ./compiler/typecheck/TcDeriv.lhs -13 +19
M ./compiler/typecheck/TcSimplify.lhs -11 +1
More information about the Cvs-ghc
mailing list