Results 1 
5 of
5
Simple type inference for structural polymorphism
 In: The Ninth International Workshop on Foundations of ObjectOriented Languages
, 2002
"... We propose a new way to mix constrained types and type inference, where the interaction between the two is minimal. By using local constraints embedded in types, rather than the other way round, we obtain a system which keeps the usual structure of an HindleyMilner type system. In practice, this me ..."
Abstract

Cited by 10 (5 self)
 Add to MetaCart
(Show Context)
We propose a new way to mix constrained types and type inference, where the interaction between the two is minimal. By using local constraints embedded in types, rather than the other way round, we obtain a system which keeps the usual structure of an HindleyMilner type system. In practice, this means that it is easy to introduce local constraints in existing type inference algorithms. Eventhough our system is notably weaker than general constraintbased type systems, making it unable to handle subtyping for instance, it is powerful enough to accomodate many features, from simple polymorphic records à la Ohori to Objective Caml’s polymorphic variants, and accurate typing of pattern matching (i.e. polymorphic message dispatch), all these through tiny variations in the constraint part of the system. 1.
Notes on HM(X)
, 1998
"... Abstract This note makes available some observations on the HM(X) scheme. 1 Introduction The HM(X) scheme due to Sulzmann, Odersky, and Wehr [10] allows one to define atype system with MLstyle (Hindley/Milner [1, 4]) polymorphism in a generic manner, if a constraint system X is given that suffices ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract This note makes available some observations on the HM(X) scheme. 1 Introduction The HM(X) scheme due to Sulzmann, Odersky, and Wehr [10] allows one to define atype system with MLstyle (Hindley/Milner [1, 4]) polymorphism in a generic manner, if a constraint system X is given that suffices to explain the monomorphic fragment ofthe type system. HM(X) also provides a generic type inference algorithm. The merit of HM(X) is that it provides generic proofs of correctness, principality, and completenessof type inference and so simplifies future design and investigation of type systems. I am an HM(X) fan. I was always bothered by the feeling that designers of typesystems `a la ML had been proving the same theorems over and over again. And I share the conviction that the interesting part of MLstyle type system is the monomorphicfragment. Now HM(X) is there. Just the right thing. I have, however, some objections against some of the design decisions which I would like to put under consideration.This is what this note is about.
Abstract Type Inference for FirstClass Messages
"... with MatchFunctions Messages that can be treated as firstclass entities are called firstclass messages. We present a sound unificationbased type inference system for firstclass messages. The main contribution of the paper is the introduction of an extended form of function called a matchfunctio ..."
Abstract
 Add to MetaCart
with MatchFunctions Messages that can be treated as firstclass entities are called firstclass messages. We present a sound unificationbased type inference system for firstclass messages. The main contribution of the paper is the introduction of an extended form of function called a matchfunction to type firstclass messages. Matchfunctions can be given simple dependent types: the return type depends on the type of the argument. We encode objects as matchfunctions and messages as polymorphic variants, thus reducing messagepassing to simple function application. We feel the resulting system is significantly simpler than previous systems for typing firstclass messages, and may reasonably be added to a language design without overly complicating the type system.
Abstract Type Inference for FirstClass Messages
"... with MatchFunctions Messages that can be treated as firstclass entities are called firstclass messages. We present a sound unificationbased type inference system for firstclass messages. The main contribution of the paper is the introduction of an extended form of function called a matchfunctio ..."
Abstract
 Add to MetaCart
with MatchFunctions Messages that can be treated as firstclass entities are called firstclass messages. We present a sound unificationbased type inference system for firstclass messages. The main contribution of the paper is the introduction of an extended form of function called a matchfunction to type firstclass messages. Matchfunctions can be given simple dependent types: the return type depends on the type of the argument. We encode objects as matchfunctions and messages as polymorphic variants, thus reducing messagepassing to simple function application. We feel the resulting system is significantly simpler than previous systems for typing firstclass messages, and may reasonably be added to a language design without overly complicating the type system.