@MISC{Kagawa97simplificationof, author = {Koji Kagawa}, title = {Simplification of Subtyping Constraints and Its Application for Monadic Programming}, year = {1997} }
Share
OpenURL
Abstract
We discuss type inference for a language which supports both polymorphic records (variants) and implicit subtyping --- useful features for object-oriented programming. We extend subtyping relation to type constructor variables. We show that such extension is especially useful for typing monadic-style functional programs, that is, imperative-style programs written in a purely functional language such as Haskell. It gives reasonably simple types to monadic (imperative) programs and is, in a sense, similar to the effect system. We use the notion of constrained types. The point is to separate matching constraints and subtyping constraints in order to avoid the difficulties caused by recursive type constraints. We will focus on simplification of such mixed constraints. 1 Introduction Monadic style is now becoming more and more popular in purely functional programming community. It uses two fundamental operators overloaded using a constructor class of Haskell [3]: class Monad m where retu...