@@ -1,9 +1,14 @@
1−\subsection{Syntax Extensions}
1+\section{Syntax Extensions}
3\Idris{} supports the implementation of Embedded Domain Specific Languages (EDSLs) in
3\Idris{} supports the implementation of Embedded Domain Specific Languages (EDSLs) in
4several ways~\cite{res-dsl-padl12}. One way, as we have already seen, is through
4several ways~\cite{res-dsl-padl12}. One way, as we have already seen, is through
5extending \texttt{do} notation. Another important way is to allow extension of the core
5extending \texttt{do} notation. Another important way is to allow extension of the core
6+syntax. In this section we describe two ways of extending the syntax: \texttt{syntax}
7+rules and \texttt{dsl} notation.
9+\subsection{\texttt{syntax} rules}
6−syntax. For example, we have seen \texttt{if...then...else} expressions, but these
11+We have seen \texttt{if...then...else} expressions, but these
7are not built in --- instead, we define a function in the prelude\ldots
12are not built in --- instead, we define a function in the prelude\ldots
9\begin{SaveVerbatim}{boolelim}
14\begin{SaveVerbatim}{boolelim}
@@ -87,3 +92,5 @@ term syntax "[" [x] "..." [y] "]" = MkInterval x y ?bounds_lemma
87In terms, the syntax \texttt{[x...y]} will generate a proof obligation
92In terms, the syntax \texttt{[x...y]} will generate a proof obligation
88\texttt{bounds\_lemma} (possibly renamed).
93\texttt{bounds\_lemma} (possibly renamed).