Polymorphic subtyping in O'Haskell

Abstract O'Haskell is a programming language derived from Haskell by the addition of concurrent reactive objects and subtyping. Because Haskell already encompasses an advanced type system with polymorphism and overloading, the type system of O'Haskell is much richer than what is the norm in almost any widespread object-oriented or functional language. Yet, there is strong evidence that O'Haskell is not a complex language to use, and that both Java and Haskell programmers can easily find their way with its polymorphic subtyping system. This paper describes the type system of O'Haskell both formally and from a programmer's point of view; the latter task is accomplished with the aid of an illustrative, real-world programming example: a strongly typed interface to the graphical toolkit Tk.

[1]  John C. Mitchell,et al.  Type inference with simple subtypes , 1991, Journal of Functional Programming.

[2]  Luca Cardelli An implementation of F , 1993 .

[3]  Martin Odersky,et al.  Pizza into Java: translating theory into practice , 1997, POPL '97.

[4]  Dilip Sequeira Type inference with bounded quantification , 1998 .

[5]  Simon Peyton Jones,et al.  Simple Usage Polymorphism , 2000 .

[6]  John C. Mitchell,et al.  Coercion and type inference , 1984, POPL.

[7]  Scott F. Smith,et al.  Sound polymorphic type inference for objects , 1995, OOPSLA.

[8]  Jakob Rehof Minimal typings in atomic subtyping , 1997, POPL '97.

[9]  Martin Odersky,et al.  Type Inference with Constrained Types , 1999, Theory Pract. Object Syst..

[10]  Martin Odersky,et al.  Colored local type inference , 2001, POPL '01.

[11]  François Pottier,et al.  Simplifying Subtyping Constraints: A Theory , 2001, Inf. Comput..

[12]  C. Zenger,et al.  Nested Types , 2001 .

[13]  Simon Peyton Jones,et al.  Lightweight Extensible Records for Haskell , 1999 .

[14]  Prateek Mishra,et al.  Polymorphic Subtype Inference: Closing the Theory-Practice Gap , 1989, TAPSOFT, Vol.2.

[15]  Geoffrey Smith,et al.  Principal Type Schemes for Functional Programs with Overloading and Subtyping , 1994, Sci. Comput. Program..

[16]  John C. Mitchell,et al.  Type Inference with Extended Pattern Matching and Subtypes , 1993, Fundamenta Informaticae.

[17]  Magnus Carlsson,et al.  Reactive objects in a functional language : an escape from the Evil I , 1997, ICFP 1997.

[18]  François Pottier,et al.  A framework for type inference with subtyping , 1998, ICFP '98.

[19]  Frank Pfenning,et al.  Refinement types for ML , 1991, PLDI '91.

[20]  Johan Nordlander,et al.  Pragmatic subtyping in polymorphic languages , 1998, ICFP '98.

[21]  Mark P. Jones,et al.  Using parameterized signatures to express modular structure , 1996, POPL '96.

[22]  John K. Ousterhout,et al.  Tcl and the Tk Toolkit , 1994 .

[23]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

[24]  Daniel Leivant,et al.  Polymorphic type inference , 1983, POPL '83.

[25]  Mats Carlsson,et al.  FUDGETS: a graphical user interface in a lazy functional language , 1993, FPCA '93.

[26]  B. Pierce,et al.  How Good Is Local Type Inference , 1999 .

[27]  Manuel Fähndrich,et al.  Making Set-Constraint Program Analyses Scale , 1996 .

[28]  Benjamin C. Pierce,et al.  Local type inference , 1998, POPL '98.

[29]  Koen Claessen,et al.  Structuring graphical paradigms in TkGofer , 1997, ICFP '97.

[30]  Philip Wadler,et al.  A practical subtyping system for Erlang , 1997, ICFP '97.

[31]  Luca Cardelli,et al.  On Binary Methods , 1995, Theory Pract. Object Syst..

[32]  Stephan Merz,et al.  Type checking higher-order polymorphic multi-methods , 1997, POPL '97.

[33]  Johan Nordlander,et al.  Reactive Objects and Functional Programming , 1999 .

[34]  Didier Rémy,et al.  Objective ML: a simple object-oriented extension of ML , 1997, POPL '97.

[35]  Stefan Kaes Type inference in the presence of overloading, subtyping and recursive types , 1992, LFP '92.

[36]  Robin Milner,et al.  Definition of standard ML , 1990 .

[37]  Mark P. Jones,et al.  First-class polymorphism with type inference , 1997, POPL '97.

[38]  Alexander Aiken,et al.  Type inclusion constraints and type inference , 1993, FPCA '93.

[39]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[40]  Prateek Mishra,et al.  Type Inference with Subtypes , 1990, Theor. Comput. Sci..

[41]  Scott F. Smith,et al.  Subtyping Constrained Types , 1996, SAS.

[42]  John H. Reppy,et al.  Simple objects for Standard ML , 1996, PLDI '96.

[43]  Martin Odersky,et al.  Polymorphic type inference and abstract data types , 1994, TOPL.

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

[45]  François Pottier,et al.  Simplifying subtyping constraints , 1996, ICFP '96.

[46]  Alberto Martelli,et al.  An Efficient Unification Algorithm , 1982, TOPL.