
On Tue, Mar 16, 2010 at 11:15 AM, Henning Thielemann
newtype T3 a = T3 (a,a,a)
which could well be
data T3 a = T3 a a a
I chose that specific representation just because at the end I want to use normal tuples. I thought this way was easier for "boxing" an "unboxing"
Are these types used for vector computations or what application do you have in mind?
I didn't have any specific application for the library. One day I just wanted to do an fmap with a tuple and somebody in #haskell suggested join (***) Of course this only works for binary tuples. I thought this would be a good excuse to play with template-haskell and give instances to some of the type classes I learnt about in the Typeclassopedia. I found it useful for vector computations. But aggregating with the Foldable instance is also handy.
Then again, is tuple-instance still an appropriate name?
"There are only two hard things in Computer Science: cache invalidation and naming things" - Phil Karlton I'm open to suggestions :-) Diego Echeverri