\pagenumbering{arabic}
}{}
-\mychapter{chp:dsl_embedding_techniques}{DSL embedding techniques}%
+\chapter{DSL embedding techniques}%
+\label{chp:dsl_embedding_techniques}%
An \gls{EDSL} is a language embedded in a host language created for a specific domain\todo{citation needed?}.
\glspl{EDSL} can have one or more backends or views.
Commonly used views are pretty printing, compiling, simulating, verifying and proving the program.
| E.e: Eq (Expr e) (Expr e) -> Expr Bool & == e
\end{lstClean}
-\subsection{Shallow embedding}
+\section{Shallow embedding}
In a shallowly \gls{EDSL} all language constructs are expressed as functions in the host language.
An evaluator view for the example language then can be implemented as the code shown in Definition~\ref{lst:exshallow}.
Note that much of the internals of the language can be hidden using monads.
The only way of achieving this is by reimplementing all functions so that they run all backends at the same time.
This will mean that every component will have to implement all views rendering it slow for multiple views and complex to implement.
-\subsection{Generalised algebraic data types}
-
-\section{Shallow embedding}
-
\subsection{Tagless-final embedding}\label{ssec:tagless}
\section{Comparison}
+\todo{cite compositional DSLs}
\input{subfilepostamble}
\end{document}