
29 Jun
2011
29 Jun
'11
5:58 a.m.
On Wednesday 29 June 2011, 11:37:39, Yitzchak Gale wrote:
So it's the derived Read instance in this context that is causing the problem. Here is a slightly smaller test case that triggers the bug:
{-# LANGUAGE MultiParamTypeClasses, UndecidableInstances #-} module Bug where class A a oops data D d = D d instance A a oops => Read (D a) data E e = E (D e) deriving Read
Just for the record, same panic with 7.0.2 and 7.0.4 (and deriving Show or Eq too). 6.12.3 reports: Can't derive instances where the instance context mentions type variables that are not data type parameters Offending constraint: A e oops When deriving the instance for (Read (E e)) which seems reasonable.