Re: We need to add role annotations for 7.8
Brandon Allbery <[email protected]> Mon, 24 Mar 2014 10:28:06 -0400
| Newsgroups | gmane.comp.lang.haskell.libraries,gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <CAKFCL4Xz_W9of6SyXBsFfk+6Kp4E=T7pjPt4ZhqjqqY9wsixkw@mail.gmail.com> |
--===============8863364750362884777== Content-Type: multipart/alternative; boundary=f46d043bdf9c3eed6d04f55b0b76 --f46d043bdf9c3eed6d04f55b0b76 Content-Type: text/plain; charset=UTF-8 On Mon, Mar 24, 2014 at 10:14 AM, Mark Lentczner <[email protected]>wrote: > On Fri, Mar 14, 2014 at 2:36 AM, Johan Tibell <[email protected]>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 <[email protected]> > 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! > No; if the default is representational, everything works as it did in earlier versions, potential bugs/unsafety and all. If the default is immediately switched to nominal, *then* every affected type must be reviewed immediately. My counter-proposal was to have 7.8 default to representational to give library maintainers a release cycle to add the necessary annotations, then switch the default to nominal in 7.10 to get the additional safety. -- brandon s allbery kf8nh sine nomine associates [email protected] [email protected] unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net --f46d043bdf9c3eed6d04f55b0b76 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On M= on, Mar 24, 2014 at 10:14 AM, Mark Lentczner <span dir=3D"ltr"><<a href= =3D"mailto:[email protected]" target=3D"_blank">mark.lentczner@gmail= .com</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_extra">= On Fri, Mar 14, 2014 at 2:36 AM, Johan Tibell <span dir=3D"ltr"><<a href= =3D"mailto:[email protected]" target=3D"_blank">[email protected]= </a>></span> wrote:<br> </div><div class=3D"gmail_extra"><div class=3D"gmail_quote"><div class=3D""= ><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border= -left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;= padding-left:1ex"> <div dir=3D"ltr"><div>I'm quite worried about this change though. I tho= ught the default <span>role</span> for data type was nominal, as that's= the safe default. <b>If the default is representational, every package aut= hor will <span>need</span> to be aware of this feature and update their pac= kages.</b> That's quite a high cost.</div> </div><div></div></blockquote></div></div><br>On Fri, Mar 14, 2014 at 6:00 = AM, Brandon Allbery=C2=A0<span dir=3D"ltr"><<a href=3D"mailto:allbery.b@= gmail.com" target=3D"_blank">[email protected]</a>></span>=C2=A0wrote:= <div class=3D""> <br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bor= der-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:sol= id;padding-left:1ex"> <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><div= ><b>Nominal default breaks everything that uses newtype deriving and doesn&= #39;t have role annotations, doesn't it?</b> Representational default m= eans things behave in 7.8 as they did in earlier GHCs.</div> </div></div></div></blockquote><div><br></div></div><div>Am I reading these= pair of statements correctly? It seems to imply to me that <i>every</i> pa= rameterized type that uses a type constraint on a parameter <i>must</i>=C2= =A0be reviewed and possibly annotated to work correctly, one way or the oth= er!</div> </div></div></blockquote><div><br></div><div>No; if the default is represen= tational, everything works as it did in earlier versions, potential bugs/un= safety and all. If the default is immediately switched to nominal, *then* e= very affected type must be reviewed immediately. My counter-proposal was to= have 7.8 default to representational to give library maintainers a release= cycle to add the necessary annotations, then switch the default to nominal= in 7.10 to get the additional safety.</div> <div><br></div></div>-- <br><div dir=3D"ltr"><div>brandon s allbery kf8nh = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sine nomine associates</div><div><a href=3D= "mailto:[email protected]" target=3D"_blank">[email protected]</a> =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<a href=3D"mailto:ballbery@sinenom= ine.net" target=3D"_blank">[email protected]</a></div> <div>unix, openafs, kerberos, infrastructure, xmonad =C2=A0 =C2=A0 =C2=A0 = =C2=A0<a href=3D"http://sinenomine.net" target=3D"_blank">http://sinenomine= .net</a></div></div> </div></div> --f46d043bdf9c3eed6d04f55b0b76-- --===============8863364750362884777== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/libraries --===============8863364750362884777==--