Adding Polymorphic Abstraction to ML (Detailed Abstract)


Autoria(s): Kfoury, A.J.; Wells, J.B.
Data(s)

12/09/2011

12/09/2011

16/03/1994

Resumo

The ML programming language restricts type polymorphism to occur only in the "let-in" construct and requires every occurrence of a formal parameter of a function (a lambda abstraction) to have the same type. Milner in 1978 refers to this restriction (which was adopted to help ML achieve automatic type inference) as a serious limitation. We show that this restriction can be relaxed enough to allow universal polymorphic abstraction without losing automatic type inference. This extension is equivalent to the rank-2 fragment of system F. We precisely characterize the additional program phrases (lambda terms) that can be typed with this extension and we describe typing anomalies both before and after the extension. We discuss how macros may be used to gain some of the power of rank-3 types without losing automatic type inference. We also discuss user-interface problems in how to inform the programmer of the possible types a program phrase may have.

National Science Foundation (CCR-9113196)

Identificador

Kfoury, A.J.; Wells, J.B.. "Adding Polymorphic Abstraction to ML”, Technical Report BUCS-1994-006, Computer Science Department, Boston University, May 1994. [Available from: http://hdl.handle.net/2144/1465]

http://hdl.handle.net/2144/1465

Idioma(s)

en_US

Publicador

Boston University Computer Science Department

Relação

BUCS Technical Reports;BUCS-TR-1994-006

Tipo

Technical Report