[TYPES] union types and overloading
Neelakantan Krishnaswami
neelk at gs3106.sp.cs.cmu.edu
Sun Oct 3 21:26:29 EDT 2004
Kwangkeun Yi writes:
>
> I would like to extend our ML compiler's type system so that it
> allow functions to be defined over the sum of multiple
> datatypes. (union types?)
>
> Could you point me to some papers that I have to check out to avoid
> reinvention or to expect possible obstacles?
Hello,
Barry Jay's paper "The Pattern Calculus" is about exactly what you
describe.
<http://www-staff.it.uts.edu.au/~cbj/Publications/pattern_calculus.ps>
Another approach is to use row polymorphism to type extensible
sums. Ocaml has this feature, and calls it "polymorphic variants". I
think Didier Remy's paper "Records and Variants as a Natural Extension
of ML" introduced the idea.
<http://portal.acm.org/citation.cfm?doid=75277.75284>
--
Neel Krishnaswami
neelk at cs.cmu.edu
More information about the Types-list
mailing list