Hi, Am Mittwoch, den 09.10.2013, 23:18 -0400 schrieb Richard Eisenberg: > On Oct 9, 2013, at 6:24 PM, Joachim Breitner <[email protected]> wrote: > > > > So the conclusion is indeed: Let type class constraints have a nominal > > role, and all is fine. > > But, then it would seem that any class with a superclass wouldn't be > compatible with GND. Do you see that detail as a consequence of this > design? > > I think this approach might work, but I'm not yet convinced.
given that we coerce the fields individually already, and are not going to change that, I don’t think there is a problem with superclasses. Even more so: The instance datatype of the subclass will have a field that contains the instance _datatype_ of the superclass, not a field with a type class constraint (because as soon as we talk about dictionaries, we are in Core, where the instance _type functions_ have already been resolved), which would be representational. It probably is confusing that (IIRC) the same TyCon is used for both uses of classes: At the Haskell level, as a function on types; at the core level, as a regular datatype. Greetings, Joachim -- Joachim “nomeata” Breitner [email protected] • http://www.joachim-breitner.de/ Jabber: [email protected] • GPG-Key: 0x4743206C Debian Developer: [email protected]
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Glasgow-haskell-users mailing list [email protected] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
