No deep inheritance? Then what's the problem?<br><br><span style="font-family: courier new,monospace;">module X where</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">class Foo a where foo :: a -> String</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">module Y where</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">class Foo' a where foo :: a -> String</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">module Main where</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">import qualified X</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">import qualified Y</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">instance X.Foo Int where foo _ = "X"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">instance Y.Foo' Int where foo _ = "Y"</span><br><br>It is known that the first foo is referring to X.foo, and the second is referring to Y.foo.<br><br>In fact... come to think of it, there are actually no namespace problems. The instance syntax is just a little quirky, since you don't qualify the LHS, even if the name is only imported qualified.<br>
<br>Or is that not what you're referring to?<br><br>Luke<br><br><div class="gmail_quote">On Thu, Dec 4, 2008 at 5:43 PM, Jason Dusek <span dir="ltr"><<a href="mailto:jason.dusek@gmail.com">jason.dusek@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> It's not that I like to have a lot of methods in a class, but<br>
rather a lot of classes.<br>
<font color="#888888"><br>
--<br>
_jsn<br>
</font></blockquote></div><br>