Brian Smith:
When using AT then we have to decide what part of the abstraction is
the class and what part is the associated type. Sometimes this seams
arbitrary. If we have:
class A a where
type B b
f :: a - B b
instance A Int where
type B = Bool
Hello Brian,
Saturday, September 2, 2006, 10:19:17 PM, you wrote:
What is the practical difference between class A and class B? With
class A we can define instances so that f is overloaded (Int -
Bool), (String - Bool), (Bool - Bool) by defining instances of A
for Int, String, and Bool, but
Bulat, Stefan,My question wasn't clear. I understand already that classes with associated types are are alternative to MPTC with fundeps.When using AT then we have to decide what part of the abstraction is the class and what part is the associated type. Sometimes this seams arbitrary. If we have:
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?
-- define a class with a type synonym, and a set of
Brian,
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?
-- define a class with a type synonym,
Hello Brian,
Friday, September 1, 2006, 8:32:55 PM, you wrote:
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