
7 Mar
2008
7 Mar
'08
2:07 a.m.
Am I correct in thinking this would have worked if it were an associated type instead of an associated type synonym?
ie,
class C a where data T a val :: T a
Yes, you are. Associate data type constructors (as well as ordinary algebraic data constructors) are injective. So we have: forall a b . T a = T b <=> a = b Cheers, Tom -- Tom Schrijvers Department of Computer Science K.U. Leuven Celestijnenlaan 200A B-3001 Heverlee Belgium tel: +32 16 327544 e-mail: tom.schrijvers@cs.kuleuven.be url: http://www.cs.kuleuven.be/~toms/