
I was thinking more along type classes....and then I was going to throw
some spanners in the works....
________________________________
From: Ryan Ingram [mailto:ryani.spam@gmail.com]
Sent: 02 January 2008 17:41
To: Nicholls, Mark
Cc: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Is there anyone out there who can translate
C# generics into Haskell?
Of course it depends what's inside the braces, and what you want to do
with it, but I'd be inclined to do something like this:
1) data IX a = IX { constructor :: Int -> a, ... }
2) data IX a b = IX { constructor :: Int -> b, func :: a -> b, ... }
3) data IX a b = IX { iy :: IY a, ... }
4) data IX a b = IX { iz :: IZ b, iy :: IY a, ... }
Can you specify more clearly what the goal of the conversion is? If you
want "OO" style behavior the thing that is most important is existential
quantification.
-- ryan
On 1/2/08, Nicholls, Mark