@@ -4,43 +4,45 @@ Dependently typed programming languages, such as Agda \cite{norell2007thesis}
44and Coq \cite{Bertot2004}, have emerged in recent years as a promising approach
55to ensuring the correctness of software. The \Idris{} language
66\cite{Brady2011a} aims to take these ideas further, by providing support for
7−verification of general-purpose systems software. In contrast to Agda and Coq,
7+verification of general purpose systems software. In contrast to Agda and Coq,
88which have arisen from the theorem proving community, \Idris{} takes Haskell as
9−its baseline. Recent Haskell extensions such as GADTs and type families have
10−given some of the power of dependent types to Haskell programmers. However,
9+its main influence. Recent Haskell extensions such as GADTs and type families have
10+given some of the power of dependent types to Haskell programmers. In the short
11+term this approach has a clear advantage, since it builds on a mature language
12+infrastructure with extensive library support.
13+Taking a longer term view, however,
1114these extensions are inherently limited in that they are required to maintain
12−backwards compatibility with existing Haskell programs. \Idris{}, being a new
15+backwards compatibility with existing Haskell implemtations. \Idris{}, being a new
1316language, has no such limitation, essentially asking the question:
1417
1518\begin{center}
1619\emph{``What if Haskell had \emph{full} dependent types?''}
1720\end{center}
1821
19−It is important, for the sake of usability of a programming language, to provide
22+It is important for the sake of usability of a programming language to provide
2023a notation which allows programmers to express high level concepts
2124in a natural way. Taking Haskell as a starting point means that \Idris{} offers
2225high level structures such as type classes, \texttt{do}-notation, primitive types
2326and monadic I/O, for example.
2427Nevertheless, it is important for the sake of correctness of the language implementation
2528to have a small core language with well understood meta-theory
26−\cite{Altenkirch2010}.
27−
29+\cite{Altenkirch2010}.
2830How can we achieve both of these goals?
2931
3032This paper describes a method for elaborating a high level dependently typed
3133functional programming language to a low level core language based on dependent
3234type theory. The method involves building an Embedded Domain Specific Language
3335(EDSL) for constructing programs in the core language, using \emph{tactics}
34−directed by high level
35−program syntax.
36−%This method allows higher level language constructs to be
37−%constructed in a straightforward manner.
36+directed by high level program syntax.
37+As we shall see, this method allows higher level language constructs to be
38+constructed in a straightforward manner, without compromising the simplicity
39+of the underlying type theory.
3840
3941\subsection{Overview}
4042
4143A dependently typed programming language relies on several components, many of
4244which are now well understood. For example, we rely on a type checker for
43−the underlying type theory \cite{Chapman2005epigram,loh2010tutorial}, a
45+the core type theory \cite{Chapman2005epigram,loh2010tutorial}, a
4446unification algorithm \cite{Miller1992} and an evaluator. However, it is less
4547well understood how to combine these components effectively into a practical
4648programming language. Therefore, the primary contribution of this paper is