update
[msc-thesis1617.git] / pres.mtask.tex
index f878ecf..bdc529a 100644 (file)
@@ -147,9 +147,29 @@ instance intArith PrettyPrinter where
                        \item Type safe
                        \item Embedded in Clean
                        \item Extendable
-                       \item \ldots\pause{} but\ldots
-                       \item No interaction
-                       \item Compilation requires reprogramming
                \end{itemize}
        \end{block}
 \end{frame}
+
+\begin{frame}[fragile]
+       \frametitle{Expressions}
+       \begin{block}{mTask}
+               \begin{itemize}
+                       \item Two phantom types
+                       \item Hierarchy
+               \end{itemize}
+       \end{block}
+       \pause{}
+       \begin{lstlisting}
+class arith v where
+  lit           :: t -> v t Expr
+  (+.) infixl 6 :: (v t p) (v t q) -> v t Expr          | +, zero t    & isExpr p & isExpr q
+  (-.) infixl 6 :: (v t p) (v t q) -> v t Expr          | -, zero t    & ...
+  ...
+class boolExpr v where
+  Not           :: (v Bool p) -> v Bool Expr            | ...
+  (&.) infixr 3 :: (v Bool p) (v Bool q) -> v Bool Expr | ...
+  ...
+  (==.) infix 4 :: (v a p) (v a q) -> v Bool Expr       | ...
+         \end{lstlisting}
+\end{frame}