Void type in base

Edward Kmett ekmett at gmail.com
Fri Jul 19 02:36:39 CEST 2013


It doesn't sound like the newtype coercions we are likely to get are going
to be usable in this way regardless. It was just the historical reason for
why I kept vacuous around. =)

-Edward

On Thu, Jul 18, 2013 at 8:24 PM, Dan Doel <dan.doel at gmail.com> wrote:

> Are GHC's newtype coercions going to know that the second step of 'f Void
> -> f (forall a. a) -> forall a. f a' is valid due to f being a Functor? I'm
> not sure that can be counted upon.
>
>
>
> On Thu, Jul 18, 2013 at 1:33 PM, Edward Kmett <ekmett at gmail.com> wrote:
>
>> You can get there if you use
>>
>> newtype Void = Void { absurd :: forall a. a }
>>
>> instead.
>>
>> -Edward
>>
>> On Wed, Jul 17, 2013 at 6:03 PM, Joachim Breitner <
>> mail at joachim-breitner.de> wrote:
>>
>>> Hi,
>>>
>>> Am Mittwoch, den 17.07.2013, 15:27 -0400 schrieb Edward Kmett:
>>> > Now the Data.Void.Unsafe module provides that functionality (as
>>> > unsafeVacuous) and vacuous itself is provided for compatibility with
>>> > code that used it, and is left in case we ever get something in
>>> > Functor that lets us apply newtype coercions directly to the Functor's
>>> > parameter.
>>>
>>> how would lifting newtype coercions to functors help here:
>>>   vacuous :: Functor f => f Void -> f a
>>> Void is not a newtype of a.
>>>
>>> Greetings,
>>> Joachim
>>>
>>>
>>> --
>>> Joachim “nomeata” Breitner
>>>   mail at joachim-breitner.dehttp://www.joachim-breitner.de/
>>>   Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0x4743206C
>>>   Debian Developer: nomeata at debian.org
>>>
>>> _______________________________________________
>>> Libraries mailing list
>>> Libraries at haskell.org
>>> http://www.haskell.org/mailman/listinfo/libraries
>>>
>>>
>>
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130718/b8c3ed20/attachment.htm>


More information about the Libraries mailing list