Re: We need to add role annotations for 7.8

Brandon Allbery <[email protected]> Mon, 24 Mar 2014 10:57:17 -0400
Newsgroups gmane.comp.lang.haskell.libraries,gmane.comp.lang.haskell.cvs.ghc
Message-ID <CAKFCL4XspBHdeyCz_=mJk4+Jd09xbFF5KRW+hY=+KCLKmWjmMw@mail.gmail.com>
--===============1129374717304329833==
Content-Type: multipart/alternative; boundary=f46d043bdf9ca690f804f55b739d

--f46d043bdf9ca690f804f55b739d
Content-Type: text/plain; charset=UTF-8

On Mon, Mar 24, 2014 at 10:44 AM, Mark Lentczner
<[email protected]>wrote:

> On Mon, Mar 24, 2014 at 7:28 AM, Brandon Allbery <[email protected]>wrote:
>
>> 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.
>>
>
> This is unworkable. How much conditional code do you want library writers
> to have to have? Library writers strive to have code which works with n
> prior releases where n is commonly 3. Having code that works with 7.6, 7.8,
> and 7.10 would be a nighmare!
>

No? Immediately switching to nominal requires those annotations
immediately. No immediate change is needed if we keep the current default;
if you have problems with conditional code, you will have them no matter
what with roles --- the only question is when. Also see SPJ's response.


> On Mon, Mar 24, 2014 at 7:32 AM, Brandon Allbery <[email protected]>
>  wrote:
>
> perhaps there should be some mechanism to specify to ghc 7.8 whether a
>> compile should default to representational or nominal so that authors have
>> a way to test their code / look for problems.
>>
>
> Also unworkable... now we need a conditional flag for the state of the
> default so the code can
>
be written to work with either based on a GHC flag? And how is that
> supposed to work with
>

Nope; in fact, code containing this flag should be rejected by hackage the
same way some other options are rejected. It exists ONLY to help library
authors with the transition, and should never be used with released code,
only for maintainer debugging/testing.

It would be nice if it could be forced to only work in sandboxes, but that
would require a rather unhealthy level of ghc / cabal-install interaction.
I expect such testing will end up requiring hsenv. There's just no good way
of handling this whole role annotations thing; it's a massive sledgehammer.

-- 
brandon s allbery kf8nh                               sine nomine associates
[email protected]                                  [email protected]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

--f46d043bdf9ca690f804f55b739d
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:44 AM, Mark Lentczner <span dir=3D"ltr">&lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">mark.lentczner@gmail=
.com</a>&gt;</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">=
<div class=3D"gmail_quote"><div class=3D"">On Mon, Mar 24, 2014 at 7:28 AM,=
 Brandon Allbery <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]=
m" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br>


<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;p=
adding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"=
gmail_quote">


<div>My counter-proposal was to have 7.8 default to representational to giv=
e library maintainers a release cycle to add the necessary annotations, the=
n switch the default to nominal in 7.10 to get the additional safety.<br>
</div></div></div></div></blockquote></div><div class=3D""><div><br></div><=
/div><div>This is unworkable. How much conditional code do you want library=
 writers to have to have? Library writers strive to have code which works w=
ith n prior releases where n is commonly 3. Having code that works with 7.6=
, 7.8, and 7.10 would be a nighmare!</div>
</div></div></div></blockquote><div><br></div><div>No? Immediately switchin=
g to nominal requires those annotations immediately. No immediate change is=
 needed if we keep the current default; if you have problems with condition=
al code, you will have them no matter what with roles --- the only question=
 is when. Also see SPJ&#39;s response.</div>
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=
=3D"gmail_extra"><div class=3D"gmail_quote"><div></div><div>On Mon, Mar 24,=
 2014 at 7:32 AM, Brandon Allbery=C2=A0<span dir=3D"ltr">&lt;<a href=3D"mai=
lto:[email protected]" target=3D"_blank">[email protected]</a>&gt;</spa=
n>=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>perhaps there should be some mechanism to specify to ghc 7.8 whether a=
 compile should default to representational or nominal so that authors have=
 a way to test their code / look for problems.=C2=A0</div></blockquote><div=
>


<br></div></div><div>Also unworkable... now we need a conditional flag for =
the state of the default so the code can</div></div></div></div></div></blo=
ckquote><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><div=
><div> be written to work with either based on a GHC flag? And how is that =
supposed to work with </div></div></div></div></div></blockquote><div><br><=
/div>
<div>Nope; in fact, code containing this flag should be rejected by hackage=
 the same way some other options are rejected. It exists ONLY to help libra=
ry authors with the transition, and should never be used with released code=
, only for maintainer debugging/testing.</div>
<div><br></div><div>It would be nice if it could be forced to only work in =
sandboxes, but that would require a rather unhealthy level of ghc / cabal-i=
nstall interaction. I expect such testing will end up requiring hsenv. Ther=
e&#39;s just no good way of handling this whole role annotations thing; it&=
#39;s a massive sledgehammer.</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>

--f46d043bdf9ca690f804f55b739d--

--===============1129374717304329833==
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

--===============1129374717304329833==--