Affiliation:
1. INRIA-Rocquencourt, Cedex, France
Abstract
We propose a type system MLFthat generalizes ML with first-class polymorphism as in System F. Expressions may contain second-order type annotations. Every typable expression admits a principal type, which however depends on type annotations. Principal types capture all other types that can be obtained by implicit type instantiation and they can be inferred.All expressions of ML are well-typed without any annotations. All expressions of System F can be mechanically encoded into MLFby dropping all type abstractions and type applications, and injecting types of lambda-abstractions into MLFtypes. Moreover, only parameters of lambda-abstractions that are used polymorphically need to remain annotated.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference26 articles.
1. Partial polymorphic type inference is undecidable
2. Principal type-schemes for functional programs
3. J. Garrigue. Relaxing the value-restriction. Presented at the third Asian workshop on Programmaming Languages and Systems (APLAS) 2002. J. Garrigue. Relaxing the value-restriction. Presented at the third Asian workshop on Programmaming Languages and Systems (APLAS) 2002.
Cited by
24 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献