X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=methods.dsl.tex;h=1a153b1b5b9ef9aa76a61bc66776396d6f36b055;hb=7694dfaa240c6dd9af2f1ac8880f0fb1d7f38324;hp=be9d7acc3b8fda2fdc9d39f1b1ad1c0072174fd2;hpb=435b0d98d22a47530f50ff82f2451e70ce2bed96;p=msc-thesis1617.git diff --git a/methods.dsl.tex b/methods.dsl.tex index be9d7ac..1a153b1 100644 --- a/methods.dsl.tex +++ b/methods.dsl.tex @@ -12,7 +12,7 @@ functions that transform something to the datatype or the other way around. As an example we have the simple arithmetic \gls{EDSL} shown in Listing~\ref{lst:exdeep}. -\begin{lstlisting}[language=Clean,label={lst:exdeep},% +\begin{lstlisting}[label={lst:exdeep},% caption={A minimal deep \gls{EDSL}}] :: DSL = LitI Int @@ -39,7 +39,7 @@ using bimaps or projection pairs\cite{cheney_lightweight_2002}. Unfortunately the lack of extendability remains a problem. If a language construct is added, no compile time guarantee is given that all views support it. -\begin{lstlisting}[language=Clean,label={lst:exdeepgadt},% +\begin{lstlisting}[label={lst:exdeepgadt},% caption={A minimal deep \gls{EDSL} using \glspl{GADT}}] :: DSL a = LitI Int -> DSL Int @@ -57,7 +57,7 @@ the host language. An evaluator view for our example language then looks something like the code shown in Listing~\ref{lst:exshallow}. Note that much of the internals of the language can be hidden using monads. -\begin{lstlisting}[language=Clean,label={lst:exshallow},% +\begin{lstlisting}[label={lst:exshallow},% caption={A minimal shallow \gls{EDSL}}] :: Env = ... // Some environment :: DSL a = DSL (Env -> a) @@ -109,7 +109,7 @@ must be updated accordingly to prevent possible runtime errors. When an extension is added in a new class, this problem does not arise and views can choose to implement only parts of the collection of classes. -\begin{lstlisting}[language=Clean,label={lst:exclassshallow},% +\begin{lstlisting}[label={lst:exclassshallow},% caption={A minimal class based shallow \gls{EDSL}}] :: Env = ... // Some environment :: Evaluator a = Evaluator (Env -> a)