A language for specifying type contracts in erlang and its interaction with success typings

  • Authors:
  • Miguel Jimenez;Tobias Lindahl;Konstantinos Sagonas

  • Affiliations:
  • Uppsala University;Uppsala University;National Technical University of Athens

  • Venue:
  • ERLANG '07 Proceedings of the 2007 SIGPLAN workshop on ERLANG Workshop
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose a small extension of the Erlang language that allows programmers to specify contracts with type information at the level of individual functions. Such contracts are optional and they document the intended uses of functions. Contracts allow automatic documentation tools such as Edoc to generate better documentation and defect detection tools such as Dialyzer to detect more type clashes. Since the Erlang/OTP system already contains components which perform automatic type inference of success typings, we also describe how contracts interact with success typings and can often provide some key information to the inference process.