Dependent Types at Work
Paper i proceeding, 2009

In these lecture notes we give an introduction to functional programming with dependent types. We use the dependently typed programming language Agda which is an extension of Martin-Löf type theory. First we show how to do simply typed functional programming in the style of Haskell and ML. Some differences between Agda's type system and the Hindley-Milner type system of Haskell and ML are also discussed. Then we show how to use dependent types for programming and we explain the basic ideas behind type-checking dependent types. We go on to explain the Curry-Howard identification of propositions and types. This is what makes Agda a programming logic and not only a programming language. According to Curry-Howard, we identify programs and proofs, something which is possible only by requiring that all program terminate. However, at the end of these notes we present a method for encoding partial and general recursive functions as total functions using dependent types.

Författare

Ana Bove

Chalmers, Data- och informationsteknik, Datavetenskap

Peter Dybjer

Chalmers, Data- och informationsteknik, Datavetenskap

Lecture Notes in Computer Science

0302-9743 (ISSN)

Vol. 5520 57-99

Ämneskategorier

Datavetenskap (datalogi)

DOI

10.1007/978-3-642-03153-3_2

ISBN

978-3-642-03152-6