Notice

The website of Tom Schrijvers has moved to http://people.cs.kuleuven.be/~tom.schrijvers. Please adjust any links you maintain as this copy will be taken down shortly.


Partial Type Signatures for Haskell


Thomas Winant and Dominique Devriese and Frank Piessens and Tom Schrijvers.
Practical Aspects of Declarative Languages (PADL).
Matthew Flatt and Hai-Feng Guo, eds.
pp. 17-32, Springer, 2014.

Abstract

Strong type systems can be used to increase the reliability and performance of programs. In combination with type inference the overhead for the programmer can be kept small. Nevertheless, explicit type signatures often remain needed or useful. In languages with standard Hindley-Milner-based type systems, programmers have a binary choice between omitting the type signature (and rely on type inference) or explicitly providing the type entirely; there are no intermediate options. Proposals for partial type signatures exist, but none support features like local constraints and GHC's non-generalisation of local bindings. Therefore we propose and motivate a practical form of partial type signatures for present-day Haskell. We formally describe our proposal as an extension of the OutsideIn(X) system and prove some of its properties. We have developed a (not yet complete) implementation for the GHC Haskell compiler. Our design fits naturally in both the OutsideIn(X) formalism and the compiler.

BibTeX

@inproceedings{padl2014,
  author = {Thomas Winant and
               Dominique Devriese and
               Frank Piessens and
               Tom Schrijvers},
  title = {Partial Type Signatures for Haskell},
  pages = {17-32},
  editor = {Matthew Flatt and
               Hai-Feng Guo},
  booktitle = {Practical Aspects of Declarative Languages (PADL)},
  publisher = {Springer},
  series = {Lecture Notes in Computer Science},
  volume = {8324},
  year = {2014},
  isbn = {978-3-319-04131-5},
  url = {/Research/papers/padl2014.pdf},
  abstract = {Strong type systems can be used to increase the reliability and performance
of programs. In combination with type inference the overhead for the
programmer can be kept small. Nevertheless, explicit type signatures often
remain needed or useful. In languages with standard Hindley-Milner-based
type systems, programmers have a binary choice between omitting the type
signature (and rely on type inference) or explicitly providing the type
entirely; there are no intermediate options. Proposals for partial type
signatures exist, but none support features like local constraints and GHC's
non-generalisation of local bindings. Therefore we propose and motivate a
practical form of partial type signatures for present-day Haskell. We
formally describe our proposal as an extension of the OutsideIn(X)
system and prove some of its properties. We have developed a (not yet
complete) implementation for the GHC Haskell compiler. Our design fits
naturally in both the OutsideIn(X) formalism and the compiler.
  },
}