Hi, Am Mittwoch, den 09.10.2013, 23:18 -0400 schrieb Richard Eisenberg: > On Oct 9, 2013, at 6:24 PM, Joachim Breitner <m...@joachim-breitner.de> 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 m...@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nome...@joachim-breitner.de • GPG-Key: 0x4743206C Debian Developer: nome...@debian.org
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users