diff --git a/unify.tex b/unify.tex index e636e88..7b0f094 100644 --- a/unify.tex +++ b/unify.tex @@ -7,6 +7,19 @@ \section{Unify}\label{sec:unify} +\subsection{Adding Wildcards to the mix} +%Wildcard creation. % TODO: Explain by the example from the Bad Honnef Talk +%Wildcards are bound to a type. +% and can therefore only be created at T <. a constraints +% After a reduce step the information to which Type the wildcard was bound is lost! +\begin{lstlisting} + List concat(List l, List r){ ... } + +someList(){ + return new List("String") :? new List(42); +} +\end{lstlisting} + \subsection{Description} The \unify{} algorithm tries to find a solution for a set of constraints like $\set{\exptype{List}{String} \lessdot \tv{a}, \exptype{List}{Integer} \lessdot \tv{a}}$.