A Simple Semantics for Polymorphic Recursion

Polymorphic recursion is a useful extension of Hindley- Milner typing and has been incorporated in the functional programming language Haskell. It allows the expression of efficient algorithms that take advantage of non-uniform data structures and provides key support for generic programming. However, polymorphic recursion is, perhaps, not as broadly understood as it could be and this, in part, motivates the denotational semantics presented here. The semantics reported here also contributes an essential building block to any semantics of Haskell: a model for first-order polymorphic recursion. Furthermore, Haskell-style type classes may be described within this semantic framework in a straightforward and intuitively appealing manner.

[1]  Mark P. Jones,et al.  A system of constructor classes: overloading and implicit higher-order polymorphism , 1993, FPCA '93.

[2]  Chris Okasaki,et al.  Purely functional data structures , 1998 .

[3]  John C. Mitchell,et al.  The essence of ML , 1988, POPL '88.

[4]  Ralf Hinze,et al.  Generic Haskell: Practice and Theory , 2003, Generic Programming.

[5]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[6]  D. J. Allerton,et al.  Book Review: GPS theory and practice. Second Edition, HOFFMANNWELLENHOFF B., LICHTENEGGER H. and COLLINS J., 1993, 326 pp., Springer, £31.00 pb, ISBN 3-211-82477-4 , 1995 .

[7]  Philip Wadler,et al.  How to make ad-hoc polymorphism less ad hoc , 1989, POPL '89.

[8]  Mark P. Jones Dictionary-free overloading by partial evaluation , 1995, LISP Symb. Comput..

[9]  Peter Buneman,et al.  A study of semantics, types and languages for databases and object-oriented programming , 1989 .

[10]  Ugo Montanari,et al.  International Symposium on Programming , 1982, Lecture Notes in Computer Science.

[11]  Carl A. Gunter Semantics of programming languages: structures and techniques , 1993, Choice Reviews Online.

[12]  Satish R. Thatte Semantics of type classes revisited , 1994, LFP '94.

[13]  Ralf Hinze,et al.  A new approach to generic functional programming , 2000, POPL '00.

[14]  Fritz Henglein,et al.  Type inference with polymorphic recursion , 1993, TOPL.

[15]  Alexander A. Stepanov,et al.  Generic Programming , 1988, ISSAC.

[16]  Mark P. Jones Qualified Types: Theory and Practice , 1994 .

[17]  J. Girard,et al.  Proofs and types , 1989 .

[18]  John C. Mitchell,et al.  On the type structure of standard ML , 1993, TOPL.

[19]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[20]  Patrick Cousot,et al.  Types as abstract interpretations , 1997, POPL '97.

[21]  William L. Harrison,et al.  Fine Control of Demand in Haskell , 2002, MPC.

[22]  Jerzy Tiuryn,et al.  Type reconstruction in the presence of polymorphic recursion , 1993, TOPL.

[23]  Simon L. Peyton Jones,et al.  Type Classes in Haskell , 1994, ESOP.

[24]  Alan Mycroft,et al.  Polymorphic Type Schemes and Recursive Definitions , 1984, Symposium on Programming.

[25]  Atsushi Ohori,et al.  A simple semantics for ML polymorphism , 1989, FPCA.

[26]  R. Hindley The Principal Type-Scheme of an Object in Combinatory Logic , 1969 .

[27]  John C. Mitchell,et al.  Foundations for programming languages , 1996, Foundation of computing series.

[28]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[29]  William L. Harrison,et al.  Under Consideration for Publication in J. Functional Programming the Logic of Demand in Haskell , 2022 .

[30]  Gordon D. Plotkin,et al.  An ideal model for recursive polymorphic types , 1984, Inf. Control..