Hi,<br><br>class Processor a where<br>&nbsp; ready :: (forall b c. a $B"*(B [b $B"*(B c])<br><br>{-<br>instance Processor (b $B"*(B c) where<br>&nbsp; ready = repeat<br><br>instance Processor [b $B"*(B c] where<br>&nbsp; ready = id-}<br><br>doSth :: (Show p, Processor p) $B"M(B p $B"*(B IO ()<br>
doSth p = print p<br><br>-------------------------------<br>Why can I not declare the above instances and always get:<br><br>message.hs:229:10:<br>&nbsp;&nbsp;&nbsp; Couldn&#39;t match expected type `b&#39; against inferred type `b1&#39;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `b&#39; is a rigid type variable bound by<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the instance declaration at message.hs:228:20<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `b1&#39; is a rigid type variable bound by<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the type signature for `ready&#39; at message.hs:226:19<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Expected type: b -&gt; c<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inferred type: b1 -&gt; c1<br>&nbsp;&nbsp;&nbsp; In the expression: repeat<br>&nbsp;&nbsp;&nbsp; In the definition of `ready&#39;: ready = repeat<br><br>message.hs:229:10:<br>&nbsp;&nbsp;&nbsp; Couldn&#39;t match expected type `c&#39; against inferred type `c1&#39;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `c&#39; is a rigid type variable bound by<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the instance declaration at message.hs:228:24<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `c1&#39; is a rigid type variable bound by<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the type signature for `ready&#39; at message.hs:226:21<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Expected type: b -&gt; c<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inferred type: b1 -&gt; c1<br>&nbsp;&nbsp;&nbsp; In the expression: repeat<br>&nbsp;&nbsp;&nbsp; In the definition of `ready&#39;: ready = repeat<br><br>message.hs:232:10:<br>&nbsp;&nbsp;&nbsp; Couldn&#39;t match expected type `b1&#39; against inferred type `b&#39;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `b1&#39; is a rigid type variable bound by<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the type signature for `ready&#39; at message.hs:226:19<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `b&#39; is a rigid type variable bound by<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the instance declaration at message.hs:231:20<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Expected type: [b1 -&gt; c]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inferred type: [b -&gt; c1]<br>&nbsp;&nbsp;&nbsp; In the expression: id<br>&nbsp;&nbsp;&nbsp; In the definition of `ready&#39;: ready = id<br><br>message.hs:232:10:<br>&nbsp;&nbsp;&nbsp; Couldn&#39;t match expected type `c1&#39; against inferred type `c&#39;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `c1&#39; is a rigid type variable bound by<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the type signature for `ready&#39; at message.hs:226:21<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `c&#39; is a rigid type variable bound by<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the instance declaration at message.hs:231:24<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Expected type: [b -&gt; c1]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inferred type: [b1 -&gt; c]<br>&nbsp;&nbsp;&nbsp; In the expression: id<br>&nbsp;&nbsp;&nbsp; In the definition of `ready&#39;: ready = id<br><br>Is there a way around this?<br><br>Regards,<br>CS<br>