
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
I'm trying to translate some standard C# constucts into Haskell... some of this seems easy....
Specifically
1)
Interface IX { }
2)
Interface IX<A> { }
3)
Interface IX<A> Where A : IY { }
4)
Interface IX<A> : IZ Where A : IY { }
I can take a punt at the first 2....but then it all falls apart _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe