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: [EMAIL PROTECTED]
url: http://www.cs.kuleuven.be/~toms/
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to