On 14/09/2011, at 2:45 PM, Casey McCann wrote: > > class Tuple t where > type Arg t :: * > type Result t :: * > tuple :: t -> Arg t -> Result t > > instance (x1 ~ x2) => Tuple (x1 -> a, x2 -> b) where > type Arg (x1 -> a, x2 -> b) = x1 > type Result (x1 -> a, x2 -> b) = (a, b) > tuple (f, g) x = (f x, g x)
That's it, that's what I was after. Thanks. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe