What I said is not true since overlapping instances are not that much decidable.<div><br></div><div>Btw, in previous versions of GHC this worked well, but now I suppose order does not suffices to define instances overlapping</div>
<div><br class="webkit-block-placeholder"></div><div>How could I compile such an example, assuming that I want to use the instance C String for Strings only and the more general instance for the rest?</div><div><br class="webkit-block-placeholder">
</div><div><div>class C a where</div><div> c :: a</div><div><br class="webkit-block-placeholder"></div><div>instance C Char where</div><div> c = 'a'</div><div> </div><div>instance C a => C [a] where</div>
<div> c = [c :: a,c :: a]</div><div> </div><div>instance C String where</div><div> c = "a"</div><div><br class="webkit-block-placeholder"></div><div>cc = c :: String</div><div><br class="webkit-block-placeholder">
</div><div><div>Sorry for the newbie question.</div><div>hugo</div></div></div>