[Haskell-cafe] Void vs ()

Bardur Arantsson spam at scientician.net
Sat Mar 25 09:21:28 UTC 2017

On 2017-03-25 00:45, David Feuer wrote:
> Using Void states that the list will always be empty, because the only
> way to put elements in it would be to fill in the Void fields with
> bottoms.

Right, so I kind of took it to mean "don't even bother trying to look at
this -- there's nothing here", but I guess it could get kind of awkward
if you were to, say, try to sort the list further. You'd have to
purposefully avoid the field explicitly...

Haven't go to it, but I'm probably going to go with a newtype and punt
the naming by just doing Foo' vs Foo. After all, naming is really hard. :).


More information about the Haskell-Cafe mailing list