bitSize both required and deprecated

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bitSize both required and deprecated

chessai .
All,

In Data.Bits.Bits, `bitSize` has been marked deprecated for a while.
but in 4.12, it was also given a default implementation. The issue is
that it is in the minimal pragma as a required method. So, if I define
it, I get a deprecation warning, but if I don't define it, I get a
warning about missing implementations.

Is this the intended behaviour?

Thanks
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: bitSize both required and deprecated

Ben Gamari-3


On November 1, 2019 7:07:36 AM EDT, "chessai ." <[hidden email]> wrote:

>All,
>
>In Data.Bits.Bits, `bitSize` has been marked deprecated for a while.
>but in 4.12, it was also given a default implementation. The issue is
>that it is in the minimal pragma as a required method. So, if I define
>it, I get a deprecation warning, but if I don't define it, I get a
>warning about missing implementations.
>
>Is this the intended behaviour?
>
I doubt it.

I would argue that we should just schedule it for removal in 8.12. As you point out, it has been deprecated for quite some time.

Cheers,

- Ben
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: bitSize both required and deprecated

Herbert Valerio Riedel-3
In reply to this post by chessai .

The default impl was added in the course of



with the intention of facilitating its eventual removal by providing a smoother migration path over a 3-year compat-window. 

What I can't explain is why the `MINIMAL` pragma wasn't adapted to take into account that `bitSize` now has a default impl; 

But then again, https://phabricator.haskell.org/D4857 also states there was no code review logged:

This revision was not accepted when it landed; it landed in state Needs Review.

... :-)

 


On Fri, Nov 1, 2019 at 12:08 PM chessai . <[hidden email]> wrote:
All,

In Data.Bits.Bits, `bitSize` has been marked deprecated for a while.
but in 4.12, it was also given a default implementation. The issue is
that it is in the minimal pragma as a required method. So, if I define
it, I get a deprecation warning, but if I don't define it, I get a
warning about missing implementations.

Is this the intended behaviour?

Thanks
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: bitSize both required and deprecated

Ben Gamari-2
Herbert Valerio Riedel <[hidden email]> writes:

> The default impl was added in the course of
>
> https://phabricator.haskell.org/D4857
>
> https://ghc.haskell.org/trac/ghc/ticket/12970
>
> with the intention of facilitating its eventual removal by providing a
> smoother migration path over a 3-year compat-window.
>
> What I can't explain is why the `MINIMAL` pragma wasn't adapted to take
> into account that `bitSize` now has a default impl;
>
It sounds like the next step is obvious in this case; remove bitSize
from the MINIMAL pragma.

Alternatively, I wouldn't be opposed to removing it in 8.8 given that we
were already discussing removing it in 8.6 two years ago.

Cheers,

- Ben

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

signature.asc (497 bytes) Download Attachment