default roles
Joachim Breitner
mail
Thu Oct 10 07:23:12 UTC 2013
Hi,
Am Mittwoch, den 09.10.2013, 23:18 -0400 schrieb Richard Eisenberg:
> On Oct 9, 2013, at 6:24 PM, Joachim Breitner <mail at 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
mail at joachim-breitner.de ? http://www.joachim-breitner.de/
Jabber: nomeata at joachim-breitner.de ? GPG-Key: 0x4743206C
Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20131010/3d075717/attachment.sig>
More information about the Glasgow-haskell-users
mailing list