Re: [Haskell-cafe] Are associated types synonyms like type classes?

2006-11-17 Thread Manuel M T Chakravarty
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

Re[2]: [Haskell-cafe] Are associated types synonyms like type classes?

2006-09-03 Thread Bulat Ziganshin
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

Re: [Haskell-cafe] Are associated types synonyms like type classes?

2006-09-02 Thread Brian Smith
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:

[Haskell-cafe] Are associated types synonyms like type classes?

2006-09-01 Thread Brian Smith
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

Re: [Haskell-cafe] Are associated types synonyms like type classes?

2006-09-01 Thread Stefan Holdermans
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,

Re: [Haskell-cafe] Are associated types synonyms like type classes?

2006-09-01 Thread Bulat Ziganshin
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