<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi all,<div><br></div><div>I have a typeclass, which defines the following two member functions:</div><div>(t is a Rose Tree.)</div><div><br></div><div><div><font face="Courier New">    getCompNodes   :: t -> [CompNode a]</font></div><div><font face="Courier New"><br></font></div><div><span style="font-family: 'Courier New';">    getAllCompNodes :: t -> [CompNode a]</span></div><div><font face="Courier New">    getAllCompNodes t = getCompNodes t</font></div><div><font face="Courier New">                     ++ (concatMap getAllCompNodes (subForest t))</font></div></div><div><br></div><div>The first one must be defined uniquely by each instance, but the second never needs a unique definition.</div><div>So, I provided its implementation in the typeclass definition, as shown.</div><div>However, I don’t get the expected behavior!</div><div>If I copy and paste the code, above, for <i>getAllCompNodes</i> into my instance definition, then I get the expected results.</div><div>Does anyone know why this is happening?</div><div><br></div><div>Thanks,</div><div>-db</div><div><br></div></body></html>