Abstract
We present an extension of the Hindley-Milner type system that supports a generous class of type constructors called functors, and provide a parametrically polymorphic algorithm for their mapping, i.e. for applying a function to each datum appearing in a value of constructed type. The algorithm comes from shape theory, which provides a uniform method for locating data within a shape. The resulting system is Church-Rosser and strongly normalising, and supports type inference.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
P. Aczel. A general Church-Rosser theorem. Technical report, Univ. of Manchester, 1978.
H.P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. North Holland, 1984. revised edition.
H.P. Barendregt. Lambda calculi with types. In Handbook of Logic in Computer Science. Oxford Univ. Press, 1992.
J. Benabou. Introduction to bicategories, volume 47. Springer, 1967.
E.S. Bainbridge, P.J. Freyd, A. Scedrov, and P.J. Scott. Functorial polymorphism. Theoretical Computer Science, 70:35–64, 1990.
G. Bellè, C. B. Jay, and E. Moggi. Functorial ML. available from ftp://ftp.disi.unige.it/person/MoggiE/functorial_ml.dvi, 1996.
M. Barr and C. Wells. Category Theory for Computing Science. International Series in Computer Science. Prentice Hall, 1990.
J.R.B. Cockett and T. Fukushima. About charity. Technical Report 92/480/18, University of Calgary, 1992.
J.-Y. Girard, Y. Lafont, and P. Taylor. Proofs and Types, volume 7. CUP, 1989.
R. Harper and G. Morrisett. Compiling polymorphism using intensional type analysis. In Conference Record of POPL '95: 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 130–141, San Francisco, California, January 1995.
C.B. Jay. Type-free term reduction for covariant types. Tech. report to appear.
C.B. Jay. Polynomial polymorphism. In R. Kotagiri, editor, Proceedings of the Eighteenth Australasian Computer Science Conference: Glenelg, South Australia 1–3 February, 1995, volume 17, pages 237–243. A.C.S. Communications, 1995.
C.B. Jay. A semantics for shape. Science of Computer Programming, 25:251–283, 1995.
C.B. Jay. Shape analysis for parallel computing. In Parallel Computing Workshop '95 at Fujitsu Parallel Computing Centre, Imperial College, 1995.
C.B. Jay. A fresh look at parametric polymorphism: covariant types. In Proceedings of the 19th Australasian Computer Science Conference, Melbourne, Australia, January 31–February 2 1996., pages 525–533, 1996.
J. Jeuring. Polytypic pattern matching. In Conference on Functional Programming Languages and Computer Architecture, pages 238–248, 1995.
M.P. Jones. A system of constructor classes: overloading and implicit higherorder polymorphism. J. of Functional Programming, 5(1), 1995.
J.W. Klop. Combinatory Reduction Systems. PhD thesis, Mathematical Center Amsterdam, 1980. Tracts 129.
X. Leroy. Unboxed objects and polymorphic typing. In 19th Symp. on Principle of Programming Languages. ACM Press, 1992.
J. Lambek and P.J. Scott. Introduction to Higher-Order Categorical Logic, volume 7 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, 1986.
N.P. Mendler. Inductive types and type constraints in the second-order lambda calculus. Annals of Pure and Applied Logic, 51, 1991.
E. Meijer, M. Fokkinga, and R. Paterson. Functional programming with bananas, lenses, envelopes and barbed wire. In J. Hughes, editor, Procceding of the 5th ACM Conference on Functional Programming and Compter Architecture, volume 523 of LNCS, pages 124–44. Springer Verlag, 1991.
E. Meijer and G. Hutton. Bananas in space: extending fold and unfold to exponential types. In Procedings 7th International Conference on Functional Programming and Computer Architecture, San Diego, California, June 1995. ACM Press, 1995.
R. Milner. A theory of type polymorphism in programming. JCSS, 17, 1978.
S. Peyton Jones. Unboxed values as first-class citizens. In Functional Programming and Computer Architecture, volume 523 of LNCS, 1991.
J. Reynolds and G.D. Plotkin. On functors expressible in polymorphic lambda-calculus. In G. Huet, editor, Logical Foundations of Functional Programming. Addison-Wesley, 1990.
M. Tofte. Operational Semantics and Polymorphic Type Inference. PhD thesis, University of Edinburgh, 1988. available as CST-52-88.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bellè, G., Jay, C.B., Moggi, E. (1996). Functorial ML. In: Kuchen, H., Doaitse Swierstra, S. (eds) Programming Languages: Implementations, Logics, and Programs. PLILP 1996. Lecture Notes in Computer Science, vol 1140. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61756-6_75
Download citation
DOI: https://doi.org/10.1007/3-540-61756-6_75
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61756-3
Online ISBN: 978-3-540-70654-0
eBook Packages: Springer Book Archive