Void type in base

Joachim Breitner mail at joachim-breitner.de
Thu Jul 18 13:18:40 CEST 2013


Am Donnerstag, den 18.07.2013, 12:49 +0200 schrieb Twan van Laarhoven:
> On 17/07/13 07:14, Shachaf Ben-Kiki wrote:
> > It seems strange that there's a canonical unit type -- () -- which is
> > used extensively, but no canonical type for its dual, the uninhabited
> > type. The closest we have is in Edward Kmett's void package, but
> > several people seem to prefer to write it themselves rather than incur
> > an extra dependency, which is a shame.
> What is the advantage of having Data.Void in base compared to a separate 
> package? I think the real issue is including the module in the Haskell Platform. 
> It is not as if people don't use other platform libraries like containers.

there is an overhead in finding out the package name a module you want
to use, putting it in your .cabal file and figuring out the right
dependency range. Up to the point where it might be easier to just
implement it yourself.

Also every packages causes additional work to downstream packages
(distributions, stackage, in-house haskell package management). And it
reduced the visibility of the code therein.

There is a good reason why we have containers, and not packages "map",
"graph", "set", "tree" and "sequence".

Especially if the code is very small, has no further dependencies and
unlikely to undergo a lot of API changes (as it the case with
Data.Void), there is very little advantage in _not_ having it in a
package like base.


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130718/b84e3940/attachment.pgp>

More information about the Libraries mailing list