\frame{\titlepage}
\begin{frame}[fragile]
- \frametitle{\textsc{SPLS}}
+ \frametitle{\textsc{SPLT}}
\begin{block}{Features}
\begin{itemize}
\item Implementation language:
\end{CleanCode}
\pause
\item It is also correctly determined that \CI{Bool} and the return
- type of \CI{flop(n,l)} don't match.
+ type of \CI{flip(n,l)} don't match.
\end{itemize}
\end{frame}
\end{itemize}
\end{frame}
-
\begin{frame}[fragile]
\frametitle{Mutual Recursion}
\begin{itemize}
\end{frame}
\begin{frame}[fragile]
- \frametitle{But wait, there is more!}
- \framesubtitle{Trouble that is}
+ \frametitle{It is not all trouble}
+ \begin{block}{A lot of functionality works correctly}
+ \begin{itemize}
+ \item Typing of \CI{VarDecls}
+ \pause
+ \item Typing of type chains:
+ \begin{CleanCode}
+id_poly_wtf(x) :: a -> a
+{
+ var a = x;
+ var b = a;
+ var c = b;
+ return c;
+}
+ \end{CleanCode}
+ \end{itemize}
+ \end{block}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{It is not all trouble}
+ \begin{block}{A lot of functionality works correctly}
+ \begin{itemize}
+ \item Typing of \CI{VarDecls}
+ \item Typing of type chains:
+ \begin{CleanCode}
+id_poly_wtf(x) :: a -> a
+{
+ a a = x;
+ a b = a;
+ a c = b;
+ return c;
+}
+ \end{CleanCode}
+ \pause
+ \item Typing \CI{var l = 1:2:[];} succeeds \\
+ while. \CI{var l = []; var x = True:l; var y = 1:l;} fails
+ \end{itemize}
+ \end{block}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Why is there so much trouble?}
\begin{block}{Our type inference algorithm is too greedy}
It globally types a function once it is applied to a value, even
if this types it more specified then needed.
We will implement the Hindley-Miller algorithm exactly instead of
\emph{``kinda''}
\end{block}
+ \pause
\begin{block}{Split constraint generation and solving}
Hide all the nasty details of constraint generation using a
Reader-Writer-State-Transformer-Monad
+ \pause
\begin{description}
\item[Reader] Reader environment to read fresh type variable
\item[Writer] Write constraints to \CI{Constraint} environment
\item[State] Gamma
\item[Transformer] (Either SemError)
\end{description}
- \emph{Sadly these monads are not in the Clean library.}\\
+ \emph{\small Sadly these monads are not in the Clean library.}\\
+ \pause
Then solve with a Relatively simple Solver-Monad
\begin{CleanCode}
:: Solve a = StateT Unifier (Either TypeError) a