[Haskell-cafe] Announcing OneTuple-0.1.0
Luke Palmer
lrpalmer at gmail.com
Thu Oct 2 03:59:27 EDT 2008
Hmm, it looks like you forgot to write a Traversable instance. I don't believe:
sequenceA (OneTuple [1,2,3,4]) = _|_
is correct. Here is my contribution!
instance Traversable OneTuple where
sequenceA (OneTuple x) = fmap OneTuple x
Luke
On Thu, Oct 2, 2008 at 12:56 AM, John Dorsey <haskell at colquitt.org> wrote:
> Fellow Haskellers,
>
> Much attention has been paid over the years to the regrettable
> omission of singleton tuples from Haskell.
>
> I am pleased to announce OneTuple, a humble implementation of the
> singleton tuple for Haskell. Now you can:
>
> * Wrap a single value of any type in a OneTuple !
>
> * Pattern match to retrieve your value !
>
> * Solve any of the software problems that cannot be solved without
> the singleton tuple !
>
> * Enjoy instances for all the classes normal tuples have, plus more !
>
> * Proclaim feature parity with Python !
>
> Note: the singleton tuple does not support tuple syntax.
>
> Contributions are welcome. The project could use a tutorial, and a
> decent test suite. Strict singleton tuples are planned for the next
> version.
>
> Enjoy!
>
> Regards,
> John Dorsey
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list