I read the easy parts of the "Associated Types with Class" and "Associated Type Synonyms" papers. An associated type synonym seems to kind of work similarly to a restricted form of class. In what way are the two following examples different?
<br><br> -- define a class with a type synonym, and a set of operations<br> class A a where<br> type B b<br> foo :: a -> B b<br><br> instance A Int where<br> type B = Bool<br> foo = (==0)
<br><br> -- define two classes, and an function that .<br> class A a, B b where<br> foo :: a -> b<br><br> instance A Int, B Bool where<br> foo = (==0)<br><br>Also, has anybody written a paper on the differences between typeclasses + associated types and ML's module system + overloading?
<br><br>Thanks,<br>Brian<br>