- -- instance (...) => Data (T a b)
- -- then (Data a, Data b) are among the (...) constraints
- -- Reason: that's what you need to typecheck the method
- -- dataCast1 f = gcast1 f
+ -- instance (...) => Data (T t1 t2)
+ -- IF t1:*, t2:*
+ -- THEN (Data t1, Data t2) are among the (...) constraints
+ -- Reason: when the IF holds, we generate a method
+ -- dataCast2 f = gcast2 f
+ -- and we need the Data constraints to typecheck the method