[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Type classes (Nipkow)
Tobias Nipkow asked me to forward the following.
(Hi Tobias! By the way, I think your paper is Good Stuff.) -- P
From: firstname.lastname@example.org (Tobias Nipkow)
Subject: Re: The scope of type variables
Sender: email@example.com (The news facility)
Reply-To: firstname.lastname@example.org (Tobias Nipkow)
Date: Sun, 31 Mar 91 10:17:56 GMT
Just for the record: The syntax for class and instance declarations that
Satish Thatte is proposing is pretty much the one that Gregor Snelting and
myself used in a report about type classes written last August . Class and
instance declarations in Mini-Haskell (a tiny sublanguage of Haskell defined
in that report) have roughly the following syntax:
class C <= C1,...,Ck where ...
instance T: (C1,...,Cn) C where ...
where T is the name of a type constructor, and the Ci and C are class names.
This notation emphasizes the main point of that paper, namely that type
constructors are functions on an order-sorted universe of types, and that
instance declarations declare arities of type constructors. In Satish's
variant you would write
class C <= C1*...*Ck where ...
instance C (T C1 ... Cn) where ...
Later on in the report the idea of "conjunctive sorts" is introduced,
corresponding to Satish's "class intersection". Instead of "C1*C2" we write
"C1 /\ C2".
A revised version of  is available from me upon request. I have included
the abstract below.
 T. Nipkow and G. Snelting. Type Classes and Overloading Resolution via
Call set up problem - Campus Nmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm eeeeeeeeeeeeeeeeeeevvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrlookup failure - Name probably deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee oooooooooooooooooooooooooooooooooooooooooooooo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsssssssssssssssssssssssssssssssssssssssss