X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=top%2Flang.tex;h=d0945c9591aec48b49b1e6c0f29e49a86d649d0f;hb=5a27c37e8d41687aae6fc84e92c7d630880618bf;hp=effca753964fd66a630b0136e088d5443a773b25;hpb=066dd25d4da01798ce7a5dd2c96e47040fa908d8;p=phd-thesis.git diff --git a/top/lang.tex b/top/lang.tex index effca75..d0945c9 100644 --- a/top/lang.tex +++ b/top/lang.tex @@ -2,6 +2,8 @@ \input{subfilepreamble} +\setcounter{chapter}{3} + \begin{document} \input{subfileprefix} \chapter{The \texorpdfstring{\gls{MTASK}}{mTask} language}%\texorpdfstring{\glsxtrshort{DSL}}{DSL}}% @@ -79,7 +81,8 @@ instance addition Printer where Terms in our little toy language can be overloaded in their interpretation, they are just an interface. For example, $1+5$ is written as \cleaninline{add (lit 1) (lit 5)} and has the type \cleaninline{v Int \| literals, addition v}. -\todo{hier nog uit\-leg\-gen hoe je meer\-de\-re in\-ter\-pre\-ta\-tions kunt ge\-brui\-ken?} +However, due to the way polymorphism is implemented in most functional languages, it is not always straightforward to use multiple interpretations in one function. +Creating such a function, e.g.\ one that both prints and evaluates an expression, requires rank-2 polymorphism (see \cref{lst:rank2_mtask}). \section{Interpretations} This section describes all \gls{MTASK}'s interpretations.