Proposal: add `Proxy`fied versions of `bitSizeMaybe` and `finiteBitSize`

M Farkas-Dyck strake888 at gmail.com
Thu Dec 14 07:09:00 UTC 2017


On 2017-12-13 09:37 PM, Zemyla wrote:
> I honestly think we should make it a Const Int a, instead of a
> function, so that it's a number in the typeclass dictionary and not a
> function.

I like that idea!

On 2017-12-13 09:41 PM, Tikhon Jelvis wrote:
> The Const type does not see much direct use in other common Haskell packages. (I only ever encounter it through lens.) So while that might be an elegant design, I think it will make the API more confusing for newcomers.

I doubt whether it's much more confusing than `Proxy`, and would be more efficient in cases where the typeclass dictionary can't be inline. Anyhow, if we began using it in base it would thus gain exposure; it's self-fulfilling either way.


More information about the Libraries mailing list