We need to add role annotations for 7.8
Mark Lentczner
mark.lentczner at gmail.com
Mon Mar 24 14:14:23 UTC 2014
Speaking from the vantage point of platform.... This pair of comments
(emphasis mine) have my alarm index on high:
On Fri, Mar 14, 2014 at 2:36 AM, Johan Tibell <johan.tibell at gmail.com>wrote:
> I'm quite worried about this change though. I thought the default rolefor data type was nominal, as that's the safe default. *If
> the default is representational, every package author will need to be aware
> of this feature and update their packages.* That's quite a high cost.
>
On Fri, Mar 14, 2014 at 6:00 AM, Brandon Allbery <allbery.b at gmail.com>
wrote:
> *Nominal default breaks everything that uses newtype deriving and doesn't
> have role annotations, doesn't it?* Representational default means things
> behave in 7.8 as they did in earlier GHCs.
>
Am I reading these pair of statements correctly? It seems to imply to me
that *every* parameterized type that uses a type constraint on a parameter
*must* be reviewed and possibly annotated to work correctly, one way or the
other!
Seems so:
On Fri, Mar 14, 2014 at 7:22 AM, Richard Eisenberg <eir at cis.upenn.edu>
wrote:
> So, the best thing we came up with is this: Libraries that wish to export
> abstract data types must do two things:
> 1. Manage export lists carefully.
> *2. Use role annotations.*
>
This is huge order, and one that will produce significant strain on the
ecosystem. For one, this will set back Haskell Platform months: We have
250k lines of Haskell by 30+ authors that will need to be reviewed and
updated.
And all of this is so that data types can be coerced more safely? While I'm
all for safely, the number of places where coercion is that important seems
very small... and this addition to the language and burden on the libraries
very high.
If this feature cannot be added safely without reviewing 1/4 million lines
of library code (not to mention all of hackage)... Then I think it isn't
ready and shouldn't be released in 7.8.
- Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140324/93401ab0/attachment.html>
More information about the Libraries
mailing list