[Haskell-cafe] [ANN] anonymous-sums
roma at ro-che.info
Fri Feb 14 07:01:24 UTC 2014
* adam vogt <vogt.adam at gmail.com> [2014-02-13 19:51:34-0500]
> 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 <
Yes, this solution is highly recommended... by @EvilHaskellTips :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: Digital signature
More information about the Haskell-Cafe