<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-GB link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I was thinking more along type classes&#8230;.and
then I was going to throw some spanners in the works&#8230;.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><font
size=3 face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal style='margin-left:36.0pt'><b><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
Ryan Ingram [mailto:ryani.spam@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 02 January 2008 17:41<br>
<b><span style='font-weight:bold'>To:</span></b> Nicholls, Mark<br>
<b><span style='font-weight:bold'>Cc:</span></b> haskell-cafe@haskell.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Haskell-cafe] Is
there anyone out there who can translate C# generics into Haskell?</span></font><span
lang=EN-US><o:p></o:p></span></p>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Of course it depends
what's inside the braces, and what you want to do with it,&nbsp;but I'd be
inclined to do something like this:<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>1) data IX a = IX
{&nbsp;constructor :: Int -&gt; a, ...&nbsp;}<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>2) data IX a&nbsp;b = IX
{ constructor :: Int -&gt; b, func :: a -&gt; b, ...&nbsp;}<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>3) data IX a b = IX { iy
:: IY a, ... }<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>4) data IX a b =
IX&nbsp;{ iz :: IZ b, iy :: IY a, ... }<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Can you specify more
clearly what the goal of the conversion is?&nbsp; If you want &quot;OO&quot;
style behavior the thing that is most important is existential quantification.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>&nbsp; -- ryan<br>
<br>
&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><span class=gmailquote><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>On 1/2/08, <b><span
style='font-weight:bold'>Nicholls, Mark</span></b> &lt;<a
href="mailto:Nicholls.Mark@mtvne.com">Nicholls.Mark@mtvne.com</a>&gt; wrote:</span></font></span>
<o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>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&lt;A&gt;<br>
{<br>
}<br>
<br>
3)<br>
<br>
Interface IX&lt;A&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Where A : IY<br>
{<br>
}<br>
<br>
4)<br>
<br>
Interface IX&lt;A&gt; : IZ<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>