
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
+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@haskell.org http://www.haskell.org/mailman/listinfo/libraries