<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi John,<br>
<br>
&gt; In the class I wrote, c has kind * (e.g. [a]), but then I don't see<br>&gt; how to write a suitable map function.  For that, I would want c to<br>&gt; have kind * -&gt; *.  Unfortunately then I don't know to write the<br>&gt; others.<br>&gt; <br>&gt; Would I have to do something with c having kind (* -&gt; *) ?<br>&gt; <br>&gt; class Chunkable2 c el where<br>&gt;    cLength :: c el -&gt; Int<br>&gt;    cHead :: c el -&gt; Maybe el<br>&gt;    cMap :: (el -&gt; el') -&gt; c el -&gt; c el'<br><br>When c is (* -&gt; *), why do you need el to be a parameter of the<br>
typeclass at all? I.e., would this work for your purposes:<br>
<br>
&gt; class Chunkable3 c where<br>
&gt; &nbsp; cLength :: c el -&gt; Int<br>
&gt; &nbsp; cHead :: c el -&gt; Maybe el<br>
&gt; &nbsp; cMap :: (a -&gt; b) -&gt; c a -&gt; c b<br>
<br>
&gt; instance Chunkable3 [] where<br>
&gt;&nbsp; &nbsp;&nbsp; cLength = length<br>
&gt;&nbsp;&nbsp; &nbsp; cMap = map<br>&gt;&nbsp; &nbsp;&nbsp; cHead = ...<br><br>Using Functor as a superclass of Chunkable3 works too.<br>
<br>
Thanks,<br>
-Brian<br /><hr />check out the rest of the Windows Live™.
More than mail–Windows Live™ goes way beyond your inbox.
 <a href='http://www.microsoft.com/windows/windowslive/' target='_new'>More than messages</a></body>
</html>