
On Tue, 2010-11-16 at 00:55 -0500, Daniel Peebles wrote:
If I were to guess, I'd say it's because there are two major "spaces" in Haskell, the type level and the value level. They never interact directly (their terms are never juxtaposed) so there's not much chance for confusion. "Typeclass constructors" and type constructors do however live in the same space. The fact that you propose "instance String String" might be odd to some. It's still unambiguous, but isn't necessarily the most clear:
(with higher-sorted kind polymorphism, MPTCs, type families, and GADTs)
instance String String String String String where data String String String String String where String :: String String String String String
:-)
data Buffalo = Buffalo class Buffalo b where type familly Buffalo b instance Buffalo Buffalo where type familly Buffalo Buffalo = Buffalo instance Buffalo b => Buffalo (Buffalo b) where type familly Buffalo (Buffalo b) = b But: data Buffalo b = Buffalo b class Buffalo b where type familly Buffalo b -- Is it about Buffalo (type) b being buffalo or result of -- Buffalo (type function) being Buffalo? instance Buffalo b => Buffalo (Buffalo b) where type familly Buffalo (Buffalo b) = b Regards