Void type in base
Edward Kmett
ekmett at gmail.com
Wed Jul 17 21:27:39 CEST 2013
vacuous is mostly historical.
Back in the day it used to be implemented by an unsafeCoerce at the behest
of Conor McBride who didn't want to pay for traversing the whole Functor
and replacing its contents, when the types tell us that it shouldn't have
any. This is correct if applied to a proper Functor, but subvertible in the
presence of GADTs.
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.
-Edward
On Wed, Jul 17, 2013 at 3:21 PM, John Wiegley <johnw at fpcomplete.com> wrote:
> +1 for Void and absurd; I'm also unclear as to why vacuous is needed.
>
> --
> John Wiegley
> FP Complete Haskell tools, training and consulting
> http://fpcomplete.com johnw on #haskell/irc.freenode.net
>
> _______________________________________________
> 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/20130717/4ddf9099/attachment.htm>
More information about the Libraries
mailing list