[Haskell-cafe] [ANN] anonymous-sums
omari at smileystation.com
Sat Feb 15 13:46:06 UTC 2014
On Fri, Feb 14, 2014 at 11:02 PM, Tikhon Jelvis <tikhon at jelv.is> wrote:
> Yeah, S0 and S1 are probably worth including for the sake of completion. We
> don't have a 1-tuple, and I believe that's caused a bit of trouble for
> people writing generic libraries. Enough trouble so that somebody wrote a
> OneTuple package anyhow.
S1 is easy enough; I added that in.
S0 takes some more thought as there's more than one way to do that. I
could use EmptyDataDecls or do it more like ekmett's Data.Void. Then
what do you get for, e.g., partitionS0?
partitionS0 :: [S0] -> ()
I suppose that makes sense if you look at partition as returning the
same number of lists as there are type variables. No type variables,
no lists. Or should it be
partitionS0 :: [S0] -> Void
which also makes me wonder if this is a special case better left to Data.Void.
More information about the Haskell-Cafe