Re: We need to add role annotations for 7.8

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
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
*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
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

2014-03-24 15:14 GMT+01:00 Mark Lentczner
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
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. [...]
Hmmm, I didn't follow role annotations at all so far, because I assumed it was of no concern to me as a library author *unless* I use some shiny new machinery in my library. Did I misunderstand that? How can I find out if I have to do something? What happens if I don't do something? What about Haskell systems which are not GHC? Do I have to #ifdef around those annotations? :-P I'm a bit clueless, and I'm guess I'm not alone... :-/ If this new feature really implies that massive amount of library code review, we should discuss first if it's really worth the trouble. The GHC release and the HP are already late... Cheers, S.
participants (2)
-
Mark Lentczner
-
Sven Panne