[Haskell-cafe] [ANN] anonymous-sums

adam vogt vogt.adam at gmail.com
Fri Feb 14 00:51:34 UTC 2014

On Thu, Feb 13, 2014 at 4:36 PM, Omari Norman <omari at smileystation.com>
> If there is already something like this out there (or some elegant way
> to do this that doesn't involve hairy extensions), please let me know
> and I will be all too happy to deprecate this.
> Omari

Hi Omari,

You could use:

type S3 a b c = (Maybe a, Maybe b, Maybe c)

And then prove to yourself that only one entry is Just. This lets you use
of classes that work with tuples such as Field1 through Field9 from lens or
things from http://hackage.haskell.org/package/tuple.

At least that's the strategy in <

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140213/4364bc1c/attachment.html>

More information about the Haskell-Cafe mailing list