<div>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:</div>
<div> </div>
<div>1) data IX a = IX { constructor :: Int -> a, ... }</div>
<div>2) data IX a b = IX { constructor :: Int -> b, func :: a -> b, ... }</div>
<div>3) data IX a b = IX { iy :: IY a, ... }</div>
<div>4) data IX a b = IX { iz :: IZ b, iy :: IY a, ... }</div>
<div> </div>
<div>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.</div>
<div> </div>
<div> -- ryan<br><br> </div>
<div><span class="gmail_quote">On 1/2/08, <b class="gmail_sendername">Nicholls, Mark</b> <<a href="mailto:Nicholls.Mark@mtvne.com">Nicholls.Mark@mtvne.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I'm trying to translate some standard C# constucts into Haskell... some<br>of this seems easy....<br><br>
Specifically<br><br>1)<br><br>Interface IX<br>{<br>}<br><br>2)<br><br>Interface IX<A><br>{<br>}<br><br>3)<br><br>Interface IX<A><br> Where A : IY<br>{<br>}<br><br>4)<br><br>Interface IX<A> : IZ<br>
Where A : IY<br>{<br>}<br><br><br>I can take a punt at the first 2....but then it all falls apart<br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">
Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></blockquote></div><br>