add variants of `finiteBitSize` and friends which take `Proxy`
Needs RevisionPublic

Authored by strake on Dec 8 2017, 5:18 PM.

Details

Reviewers
hvr
bgamari
RyanGlScott
mpickering
Group Reviewers
GHC
strake created this revision.Dec 8 2017, 5:18 PM
RyanGlScott requested changes to this revision.Dec 9 2017, 4:37 AM
RyanGlScott added a subscriber: RyanGlScott.

Has there been a discussion on the Haskell libraries mailing list about this topic? We typically do not accept wholesale API additions to base without some kind of community consensus that they should be added.

Moreover, the choice to only add a Proxy-fied version of bitSizeMaybe feels rather ad hoc, as that's far from the only method in base that takes a dummy argument (see http://hackage.haskell.org/package/proxied-0.1.1/docs/Data-Proxied.html for many more examples).

This revision now requires changes to proceed.Dec 9 2017, 4:37 AM

@RyanGlScott good point — we ought to introduce Proxyfied versions of all such terms in base.

strake added a comment.EditedDec 13 2017, 9:30 PM

@RyanGlScott which are these other such terms?

@RyanGlScott which are these other such terms?

Every function defined in http://hackage.haskell.org/package/proxied-0.3/docs/Data-Proxied.html is a Proxy-fied version of something from base.

(See http://hackage.haskell.org/package/proxied-0.3/docs/Data-Proxyless.html for the equivalent TypeApplications versions.)

mpickering resigned from this revision.Nov 8 2018, 4:24 PM