
14 Dec
2017
14 Dec
'17
7:09 a.m.
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.