Abstract
This is an exercise in the description of programming languages as indexed categories. Type classes have been introduced into functional programming languages to provide a uniform framework for ‘overloading’. We establish a correspondence between type classes and comprehension schemata in categories. Coherence results allow us to describe subclasses and implicit conversions between types.
This is an extended abstract. A full paper is available from the authors at the address: Department of Computer Science, University of Manchester, Oxford Road, Manchester M13 9PL, U.K.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
H. Barendregt (1989) Introduction to Generalised Type Systems. Proc. Third Italian Conference on Theoretical Computer Science, Ed. U. Moscati. Montova, November, 1989. World Scientific Publishing, Singapore.
P.-L. Curien (1990) Substitution up to Isomorphism. Research Report LIENS-90-9, Laboratoire d'Informatique de l'Ecole Normale Supérieure, 45 Rue d'Ulm, 75230 Paris.
P.-L. Curien and G. Ghelli (1990) Coherence of Subsumption. Research Report LIENS-90-10, Laboratoire d'Informatique de l'Ecole Normale Supérieure, 45 Rue d'Ulm, 75230 Paris.
Th. Ehrhard (1988) A categorical semantics of constructions. In Proc. Logic in Computer Science I.E.E.E. publ. Computer Society Press, Washington.
J.M.E. Hyland and A.M. Pitts (1989) Theory of constructions: categorical semantics and topos-theoretic models. In J.W. Gray and A. Scedrov (editors), Proc. A.M.S. Conference on Categories in Computer Science and Logic, Boulder, Colorado (1987). American Mathematical Society.
P. Hudak, P. Wadler, et al. (1988) Report on the Functional Programming Language, Haskell. Draft proposed standard. Preprint, Dept. Computer Science, University of Glasgow, U.K.
G. Huet (1976) Résolutions d'équations dans des langages d'ordre 1,2,..., ω. Thèse d'Etat, Université de Paris VII.
B. Jacobs (1990) Comprehension Categories and The Semantics of Type Dependency. Preprint, Dept. Comp. Sci. Toernooiveld, 6525 ED Nijmegen, The Netherlands.
B. Jacobs, E. Moggi and T. Streicher (1991) Relating Models of Impredicative Type Theories. Preprint, Dept. Comp. Sci. Toernooiveld, 6525 ED Nijmegen, The Netherlands.
C.B. Jay (1991) Long βη Normal Forms in Confluent Categories. Preprint: LFCS, Department of Computer Science, University of Edinburgh, The King's Buildings, Mayfield Road, Edinburgh.
J. Lambek and P. Scott (1986) Introduction to higher order categorical logic. Cambridge University Press.
F.W. Lawvere (1970) Equality in Hyperdoctrines and the Comprehension Schema as an Adjoint Functor. In Proc. Symp. in Pure Math., XVII: Applications of Categorical Algebra, Am. Math. Soc. pp. 1–14.
S. Mac Lane (1982) Why commutative diagrams coincide with equivalent proofs (presented in honour of Nathan Jacobson). In Contemporary Mathematics 13, American Mathematical Society. pp 387–401.
S. Mac Lane and R. Paré (1985) Coherence for Bicategories and Indexed Categories. J. Pure and Applied Algebra, 37, pp 59–80.
E. Moggi (1991) A category-theoretic account of program modules. Math. Structures in Comp. Sci. 1.1. pp 103–139.
T. Nipkow and G. Snelting (1990) Type Classes and Overloading Resolution via Order-Sorted Unification. Technical Report No. 200, Computer Laboratory, University of Cambridge, Cambridge, U.K.
S.L. Peyton Jones and P. Wadler (1990) A static semantics for Haskell. Preprint, Dept Computer Science, University of Glasgow, U.K.
A.M. Pitts (1987) Polymorphism is Set Theoretic, Constructively. Proc. Summer Conference on Category Theory and Computer Science, Edinburgh 1987, LNCS 283.
R.A.G. Seely (1987) Categorical semantics for higher order polymorphic lambda calculus. J. Symbolic Logic, 52, pp 969–989
P. Wadler and S. Blott (1989) How to make ad hoc polymorphism less ad hoc. In Proceedings of 16th ACM Symposium on Principles of Programming Languages, A.C.M.
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hilken, B.P., Rydeheard, D.E. (1991). Towards a categorical semantics of type classes. In: Tarlecki, A. (eds) Mathematical Foundations of Computer Science 1991. MFCS 1991. Lecture Notes in Computer Science, vol 520. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54345-7_62
Download citation
DOI: https://doi.org/10.1007/3-540-54345-7_62
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54345-9
Online ISBN: 978-3-540-47579-8
eBook Packages: Springer Book Archive