small hiccup in new GND check

Simon Peyton-Jones simonpj at microsoft.com
Tue Oct 22 06:43:34 UTC 2013


I think that's ok.  It's the situation right now.

Simon

From: Richard Eisenberg [mailto:eir at cis.upenn.edu]
Sent: 21 October 2013 18:08
To: ghc-devs Devs; Simon Peyton-Jones; Edward Kmett
Subject: small hiccup in new GND check

Hi all,

The implementation of the new GND check is done and was rather straightforward. But, it brings up a new design issue: With the old check, a writer of a class C could say `type role C nominal` to prevent GND use with that class. Now, all classes have nominal parameters, and there is no (clean) way for a class writer to stop the use of GND. Perhaps this is OK -- classes can't in general be abstract -- but I thought we should pause a moment to reflect on this consequence of the design.

For the curious, you can see the code in my github fork at https://raw.github.com/goldfirere/ghc/master/compiler/typecheck/TcDeriv.lhs (search for `role_errs`). An example of the new error message is in https://github.com/goldfirere/testsuite/blob/master/tests/roles/should_fail/Roles10.stderr

I'm running further tests now, so wibbles to the above may happen.

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20131022/85f69fa4/attachment.html>


More information about the ghc-devs mailing list