T5287.hs:6:10: error: • Could not deduce (A a oops0) from the context: A a oops bound by an instance declaration: A a oops => Read (D a) at T5287.hs:6:10-31 The type variable ‘oops0’ is ambiguous • In the ambiguity check for an instance declaration To defer the ambiguity check to use sites, enable AllowAmbiguousTypes In the instance declaration for ‘Read (D a)’