X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=dsl%2Fclass.tex;h=9db7e20bc00d3b6a49ece96e31aae8553edf72d4;hb=c590c9a29ba0f88f0a4b19b3be89ed6c52bfd0f9;hp=5931da76135f4c050fd13d84e324e24e7a201e47;hpb=4e17593a20e8c3af4c82a0b14bc648ddc180c25d;p=phd-thesis.git diff --git a/dsl/class.tex b/dsl/class.tex index 5931da7..9db7e20 100644 --- a/dsl/class.tex +++ b/dsl/class.tex @@ -2,12 +2,13 @@ \input{subfilepreamble} +\setcounter{chapter}{0} + \begin{document} +\input{subfileprefix} \chapter{Deep embedding with class}% \label{chp:classy_deep_embedding} -\input{subfileprefix} - \begin{chapterabstract} The two flavours of \gls{DSL} embedding are shallow and deep embedding. In functional languages, shallow embedding models the language constructs as functions in which the semantics are embedded. @@ -870,9 +871,8 @@ e1 :: (Typeable c, UsingExt '[Neg, Subst]) => Expr c Giving an instance for \haskelllhstexinline{Interp} for \haskelllhstexinline{DataType} that uses the extensions \haskelllhstexinline{e_1, e2, ...} and depends on interpretations \haskelllhstexinline{i_1,i_2, ...} is done as follows: \begin{lstHaskellLhstex} -instance ( UsingExt '[e_1, e_2, ...] s - , DependsOn '[i_1, i_2, ...] s - ) => Interp (DataType s) where +instance ( UsingExt '[e_1, e_2, ...] s, DependsOn '[i_1, i_2, ...] s) + => Interp (DataType s) where ... \end{lstHaskellLhstex}