Proposal: relax type of asProxyTypeOf

Edward Kmett ekmett at gmail.com
Mon Nov 7 01:08:01 UTC 2016


The code in `tagged` has been generalized for a couple of years now, but
Data.Proxy either forked off of it before we made that generalization or
simply didn't get the more generalized type when it was moved into base.

I'm strongly +1 on this generalization for consistency with the tagged
package and with the other combinators already in base.

-Edward

On Sun, Nov 6, 2016 at 2:31 PM, David Feuer <david.feuer at gmail.com> wrote:

> I think flexibility about the proxy type has become the norm, and we
> should probably follow that guideline. However, it could theoretically
> break code.
>
> asProxyTypeOf x (pure "I'm a string")
>
> is currently accepted but would be rejected with the proposed change
> (since the proxy type isn't fixed, GHC doesn't know that it's Applicative).
>
> On Nov 6, 2016 12:37 PM, "Tom Ellis" <tom-lists-haskell-cafe-2013@
> jaguarpaw.co.uk> wrote:
>
>> Did anything ever come of this proposal to relax the type of asProxyType
>> of?
>>
>>     https://mail.haskell.org/pipermail/libraries/2014-December/
>> 024462.html
>>
>> i.e. change
>>
>>     asProxyTypeOf :: a -> Proxy a -> a
>>
>> to
>>
>>     asProxyTypeOf :: a -> proxy a -> a
>>
>> I posted this issue on the Trac
>>
>>     https://ghc.haskell.org/trac/ghc/ticket/12805
>>
>> but it was suggested I ask on the libraries list.
>>
>> Tom
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20161106/e57a53a9/attachment.html>


More information about the Libraries mailing list