Proposal: Add gcoerceWith to Data.Type.Coercion

Edward Kmett ekmett at gmail.com
Thu Jul 21 23:27:17 UTC 2016


No objection here. +1

-Edward

On Fri, Jul 22, 2016 at 1:18 AM, David Feuer <david.feuer at gmail.com> wrote:

> In Data.Type.Equality, we have both
>
> castWith :: (a :~: b) -> a -> b
>
> and
>
> gcastWith :: (a :~: b) -> (a ~ b => r) -> r
>
>
> But in Data.Type.Coercion we only have
>
>
> coerceWith :: Coercion a b -> a -> b
>
>
> It seems to me that for the sake of consistency, we should add
>
>
> gcoerceWith :: Coercion a b -> (Coercible a b => r) -> r
> gcoerceWith Coercion a = a
>
> David Feuer
> _______________________________________________
> 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/20160722/8ae53087/attachment.html>


More information about the Libraries mailing list