@@ -1,155 +1,155 @@
1−\documentclass{jfp1}
1+\documentclass{jfp1}
2−%\documentclass[acmtoplas]{acmtrans2m}
2+%\documentclass[acmtoplas]{acmtrans2m}
4−\usepackage[draft]{comments}
4+\usepackage[draft]{comments}
5−%\usepackage[final]{comments}
5+%\usepackage[final]{comments}
6−% \newcommand{\comment}[2]{[#1: #2]}
6+% \newcommand{\comment}[2]{[#1: #2]}
7−\newcommand{\khcomment}[1]{\comment{KH}{#1}}
7+\newcommand{\khcomment}[1]{\comment{KH}{#1}}
8−\newcommand{\ebcomment}[1]{\comment{EB}{#1}}
8+\newcommand{\ebcomment}[1]{\comment{EB}{#1}}
10−\usepackage{epsfig}
10+\usepackage{epsfig}
11−%\usepackage{path}
11+%\usepackage{path}
12−\usepackage{url}
12+\usepackage{url}
13−%\usepackage{amsmath,amssymb}
13+%\usepackage{amsmath,amssymb}
14−\usepackage{fancyvrb}
14+\usepackage{fancyvrb}
15−\usepackage{todonotes}
15+\usepackage{todonotes}
17−\newenvironment{template}{\sffamily}
17+\newenvironment{template}{\sffamily}
19−\usepackage{graphics,epsfig}
19+\usepackage{graphics,epsfig}
20−\usepackage{stmaryrd}
20+\usepackage{stmaryrd}
22−\input{./macros.ltx}
22+\input{./macros.ltx}
23−\input{./library.ltx}
23+\input{./library.ltx}
25−\NatPackage
25+\NatPackage
26−\FinPackage
26+\FinPackage
28−\newcounter{per}
28+\newcounter{per}
29−\setcounter{per}{1}
29+\setcounter{per}{1}
31−\newcommand{\Ivor}{\textsc{Ivor}}
31+\newcommand{\Ivor}{\textsc{Ivor}}
32−\newcommand{\Idris}{\textsc{Idris}}
32+\newcommand{\Idris}{\textsc{Idris}}
33−\newcommand{\IdrisM}{\textsc{Idris}$^-$}
33+\newcommand{\IdrisM}{\textsc{Idris}$^-$}
34−\newcommand{\TT}{\textsf{TT}}
34+\newcommand{\TT}{\textsf{TT}}
35−\newcommand{\TTdev}{\textsf{TT$_{dev}$}}
35+\newcommand{\TTdev}{\textsf{TT$_{dev}$}}
36−\newcommand{\Funl}{\textsc{Funl}}
36+\newcommand{\Funl}{\textsc{Funl}}
37−\newcommand{\Agda}{\textsc{Agda}}
37+\newcommand{\Agda}{\textsc{Agda}}
38−\newcommand{\LamPi}{$\lambda_\Pi$}
38+\newcommand{\LamPi}{$\lambda_\Pi$}
40−\newcommand{\perule}[1]{\vspace*{0.1cm}\noindent
40+\newcommand{\perule}[1]{\vspace*{0.1cm}\noindent
41−\begin{center}
41+\begin{center}
43−\begin{minipage}{7.5cm}\textbf{Rule \theper:} #1\addtocounter{per}{1}
43+\begin{minipage}{7.5cm}\textbf{Rule \theper:} #1\addtocounter{per}{1}
44−\end{minipage}}
44+\end{minipage}}
45−\end{center}
45+\end{center}
46−\vspace*{0.1cm}
46+\vspace*{0.1cm}
49−\newcommand{\mysubsubsection}[1]{
49+\newcommand{\mysubsubsection}[1]{
51−\textbf{#1}
51+\textbf{#1}
53−\newcommand{\hdecl}[1]{\texttt{#1}}
53+\newcommand{\hdecl}[1]{\texttt{#1}}
57− {Implementing General Purpose Dependently Typed Programming Languages}
57+ {Implementing General Purpose Dependently Typed Programming Languages}
58−%\subtitle{Implementing Domain Specific Languages by Overloading}
58+%\subtitle{Implementing Domain Specific Languages by Overloading}
60−\author[Edwin Brady]
60+\author[Edwin Brady]
61−{EDWIN BRADY\\
61+{EDWIN BRADY\\
62−School of Computer Science, University of St Andrews, St Andrews,
62+School of Computer Science, University of St Andrews, St Andrews,
63−KY16 9SX, UK}
63+KY16 9SX, UK}
65−\begin{document}
65+\begin{document}
67−\maketitle
67+\maketitle
69−\begin{abstract}
69+\begin{abstract}
70−Many components of a dependently typed programming language are by now well
70+Many components of a dependently typed programming language are by now well
71−understood, for example the underlying type theory, type checking, unification and
71+understood, for example the underlying type theory, type checking, unification and
72−evaluation. How to combine these components into a realistic and usable high
72+evaluation. How to combine these components into a realistic and usable high
73−level language is, however, folklore, discovered anew by successive
73+level language is, however, folklore, discovered anew by successive
74−language implementations. In this paper, I describe the implementation of a
74+language implementations. In this paper, I describe the implementation of a
75−new dependently typed functional programming language, \Idris{}.
75+new dependently typed functional programming language, \Idris{}.
76−\Idris{} is intended to be a \emph{general purpose} programming language
76+\Idris{} is intended to be a \emph{general purpose} programming language
77−and as such provides high level concepts such as implicit syntax,
77+and as such provides high level concepts such as implicit syntax,
78−type classes and \texttt{do} notation.
78+type classes and \texttt{do} notation.
79−I describe the high level language and the underlying type theory, and present
79+I describe the high level language and the underlying type theory, and present
80−a method for \emph{elaborating} concrete high level syntax with implicit
80+a method for \emph{elaborating} concrete high level syntax with implicit
81−arguments and type classes into a fully explicit type theory. Furthermore,
81+arguments and type classes into a fully explicit type theory. Furthermore,
82−I show how this method,
82+I show how this method,
83−based on a domain specific language embedded in Haskell, facilitates the
83+based on a domain specific language embedded in Haskell, facilitates the
84−implementation of new high level language constructs.
84+implementation of new high level language constructs.
86−%I describe the implementation of a dependently typed functional
86+%I describe the implementation of a dependently typed functional
87−%programming language, \Idris{}. Much has been written about various
87+%programming language, \Idris{}. Much has been written about various
88−%aspects of dependently typed language implementation (e.g. checking
88+%aspects of dependently typed language implementation (e.g. checking
89−%dependent types, unification, optimisation) but nothing yet about how
89+%dependent types, unification, optimisation) but nothing yet about how
90−%to bring it all together into a complete, practical, usable tool. This paper
90+%to bring it all together into a complete, practical, usable tool. This paper
91−%attempts to do so. In particular, I explain what is needed to turn
91+%attempts to do so. In particular, I explain what is needed to turn
92−%concrete syntax with implicit arguments into fully elaborated type
92+%concrete syntax with implicit arguments into fully elaborated type
93−%theory, using unification and a tactic engine.
93+%theory, using unification and a tactic engine.
94−\end{abstract}
94+\end{abstract}
97−%\category{D.3.2}{Programming Languages}{Language
97+%\category{D.3.2}{Programming Languages}{Language
98−% Classifications}[Applicative (functional) Languages]
98+% Classifications}[Applicative (functional) Languages]
99−%\category{D.3.4}{Programming Languages}{Processors}[Compilers]
99+%\category{D.3.4}{Programming Languages}{Processors}[Compilers]
100−%\terms{Languages, Verification, Performance}
100+%\terms{Languages, Verification, Performance}
101−%\keywords{Dependent Types, Typechecking}
101+%\keywords{Dependent Types, Typechecking}
104−%\begin{bottomstuff}
104+%\begin{bottomstuff}
105−%Author's address: Edwin Brady, School of Computer Science, North Haugh, St Andrews,
105+%Author's address: Edwin Brady, School of Computer Science, North Haugh, St Andrews,
106−%KY16 9SX
106+%KY16 9SX
107−%\end{bottomstuff}
107+%\end{bottomstuff}
109−\input{intro.tex}
109+\input{intro.tex}
111−%\input{overview.tex}
111+%\input{overview.tex}
113−\input{hll.tex}
113+\input{hll.tex}
115−\input{typechecking.tex}
115+\input{typechecking.tex}
117−%\input{proofstate.tex}
117+%\input{proofstate.tex}
119−\input{elaboration.tex}
119+\input{elaboration.tex}
121−\input{delab.tex}
121+\input{delab.tex}
123−%\input{compiling.tex}
123+%\input{compiling.tex}
125−%\input{syntax.tex}
125+%\input{syntax.tex}
127−\input{conclusions.tex}
127+\input{conclusions.tex}
129−\section*{Acknowledgements}
129+\section*{Acknowledgements}
131−This work was funded by the Scottish Informatics and Computer Science
131+This work was funded by the Scottish Informatics and Computer Science
132−Alliance (SICSA) and by EU Framework 7 Project No. 248828 (ADVANCE).
132+Alliance (SICSA) and by EU Framework 7 Project No. 248828 (ADVANCE).
133−My thanks to Kevin Hammond and Vilhelm Sj\"{o}berg for their comments
133+My thanks to Kevin Hammond and Vilhelm Sj\"{o}berg for their comments
134−on an earlier draft of this paper.
134+on an earlier draft of this paper.
136−\bibliographystyle{jfp}
136+\bibliographystyle{jfp}
137−\bibliography{library.bib}
137+\bibliography{library.bib}
139−\appendix
139+\appendix
141−%\section{TODOs}
141+%\section{TODOs}
142−%\listoftodos{}
142+%\listoftodos{}
144−%\section{Elaboration meta-operations}
144+%\section{Elaboration meta-operations}
146−%It's possible that it would be useful to have a quick reference of meta-operations
146+%It's possible that it would be useful to have a quick reference of meta-operations
147−%used by the elaborator here.
147+%used by the elaborator here.
149−%They are: $\ttinterp{\cdot}$, $\MO{Elab}$, $\MO{TTDecl}$,
149+%They are: $\ttinterp{\cdot}$, $\MO{Elab}$, $\MO{TTDecl}$,
150−%$\MO{NewProof}$, $\MO{NewTerm}$,
150+%$\MO{NewProof}$, $\MO{NewTerm}$,
151−%$\MO{Term}$, $\MO{Type}$, $\MO{Context}$, $\MO{Patterns}$, $\MO{Lift}$, $\MO{Expand}$.
151+%$\MO{Term}$, $\MO{Type}$, $\MO{Context}$, $\MO{Patterns}$, $\MO{Lift}$, $\MO{Expand}$.
153−%\input{code}
153+%\input{code}
155−\end{document}
155+\end{document}