<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;">That worked, Brandon; thanks!<div><br></div><div>Gurus, I’d still love to understand exactly what I broke, trying to do it the other way. Any thoughts?</div><div><br></div><div>Thanks,</div><div>-db</div><div><br><div><div>On May 21, 2014, at 12:14 AM, <a href="mailto:haskell-cafe-request@haskell.org">haskell-cafe-request@haskell.org</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: ArialMT; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">if there's only one definition, then define it</span><br style="font-family: ArialMT; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-family: ArialMT; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">*outside* the typeclass.</span></blockquote></div><br></div><div><blockquote type="cite" style="font-family: ArialMT;"><br></blockquote><blockquote type="cite"><blockquote type="cite"><span style="font-family: ArialMT;">I have a typeclass, which defines the following two member functions:</span><br style="font-family: ArialMT;"><span style="font-family: ArialMT;">(t is a Rose Tree.)</span><br style="font-family: ArialMT;"><br style="font-family: ArialMT;"><span style="font-family: ArialMT;">   getCompNodes   :: t -> [CompNode a]</span><br style="font-family: ArialMT;"><br style="font-family: ArialMT;"><span style="font-family: ArialMT;">   getAllCompNodes :: t -> [CompNode a]</span><br style="font-family: ArialMT;"><span style="font-family: ArialMT;">   getAllCompNodes t = getCompNodes t</span><br style="font-family: ArialMT;"><span style="font-family: ArialMT;">                    ++ (concatMap getAllCompNodes (subForest t))</span><br style="font-family: ArialMT;"></blockquote></blockquote><br><blockquote type="cite"><blockquote type="cite" style="font-family: ArialMT;">The first one must be defined uniquely by each instance, but the second<br>never needs a unique definition.<br>So, I provided its implementation in the typeclass definition, as shown.<br><br></blockquote></blockquote></div></body></html>