Permalink
Browse files

Removed presentation from `master` branch.

Presentation was moved to `docs` branch.
Not sure if this is the proper way to separate these in git, but it seems to work.
  • Loading branch information...
1 parent 44638c4 commit c686d62b277a5e8b22c8f8b8079d622ff70f3c68 @tomlokhorst committed Feb 15, 2010
@@ -1,149 +0,0 @@
-%include polycode.fmt
-%include code.fmt
-
-%if style == newcode
-
-> {-# OPTIONS_GHC -F -pgmF lhs2tex -optF --pre #-}
-
-> module ArithExpr where
-> import Language.Cil hiding (Add)
-
-%endif
-
-\begin{frame}
-
-> data Expr where
-> Con :: Int -> Expr
-> Add :: Expr -> Expr -> Expr
-> Mul :: Expr -> Expr -> Expr
-
-%if style == newcode
-
-> instance Show Expr where
-> show (Con x) = "Con " ++ show x
-> show (Add x y) = "Add (" ++ show x ++ ") (" ++ show y ++ ")"
-> show (Mul x y) = "Mul (" ++ show x ++ ") (" ++ show y ++ ")"
-
-> instance Eq Expr where
-> Con x == Con y = x == y
-> Add x y == Add x' y' = x == x' && y == y'
-> Mul x y == Mul x' y' = x == x' && y == y'
-> _ == _ = False
-
-%endif
-
-\end{frame}
-
-
-\begin{frame}
-
-> eval :: Expr -> Int
-> eval (Con x) = x
-> eval (Add x y) = eval x + eval y
-> eval (Mul x y) = eval x * eval y
-
-\end{frame}
-
-
-\begin{frame}
-
-
-%if style == newcode
-
-> mul :: MethodDecl
-> mul = add -- Yeah, not implemeted
-
-%endif
-
-
-%if style /= newcode
-
-> import Language.Cil
-
-%endif
-
-> compile :: Expr -> Assembly
-> compile e = simpleAssembly (f e)
-> where
-> f :: Expr -> [MethodDecl]
-> f (Con x) = [ldc_i4 x]
-> f (Add x y) = f x ++ f y ++ [add]
-> f (Mul x y) = f x ++ f y ++ [mul]
-
-\end{frame}
-
-
-\begin{frame}
-
-\begin{center}
-\Huge{$4 + 2 \times 3$}
-\end{center}
-
-\pause
-
-%if style /= newcode
-
-> x :: Expr
-> x = Add (Con 4)
-> (Mul (Con 2)
-> (Con 3))
-
-%endif
-
-\end{frame}
-
-
-\begin{frame}
-
-> instance Num Expr where
-> fromInteger x = Con (fromIntegral x)
-> x + y = Add x y
-> x * y = Mul x y
-
-%if style == newcode
-
-> abs = undefined
-> signum = undefined
-
-%endif
-
-\end{frame}
-
-
-\begin{frame}
-
-\begin{center}
-\Huge{$4 + 2 \times 3$}
-\end{center}
-
-\pause
-
-%if style /= newcode
-
-\begin{overlayarea}{\textwidth}{0.2\textheight}
-\only<2>{
-
-> x :: Expr
-> x = 4 + 2 * 3
-
-}
-
-\only<3>{
-
-> x :: Int
-> x = 4 + 2 * 3
-
-}
-\only<4>{
-
-> x :: Num a => a
-> x = 4 + 2 * 3
-
-}
-
-\end{overlayarea}
-
-%endif
-
-\end{frame}
-
@@ -1,131 +0,0 @@
-%include polycode.fmt
-%include code.fmt
-
-%if style == newcode
-
-> {-# OPTIONS_GHC -F -pgmF lhs2TeX -optF --pre #-}
-
-> module BoolLike where
-> import Expr
-
-%endif
-
-
-\begin{frame}
-
-%if style /= newcode
-
-> (==) :: Eq a => a -> a -> Bool
-
-\pause
-
-> (==) :: (Eq a, BoolLike b) => a -> a -> b
-
-%endif
-
-\end{frame}
-
-
-\begin{frame}
-
-> class BoolLike b where
-> false :: b
-> true :: b
-> bool :: a -> a -> b -> a
-
-\pause
-
-%if style /= newcode
-
-\begin{overlayarea}{\textwidth}{0.3\textheight}
-\only<2>{
-
-> instance BoolLike Bool where
-> false = False
-> true = True
-> bool x y b = if b then y else x
-
-}
-\only<3>{
-
-> instance BoolLike Expr where
-> false = ConFalse
-> true = ConTrue
-> bool x y b = If b y x
-
-}
-\end{overlayarea}
-
-%endif
-
-\end{frame}
-
-
-\begin{frame}
-
-%if style /= newcode
-
-> (&&) :: Bool -> Bool -> Bool
-> (||) :: Bool -> Bool -> Bool
-> not :: Bool -> Bool
-
-
-\pause
-
-\begin{overlayarea}{\textwidth}{0.5\textheight}
-\only<2>{
-
-> (&&) :: BoolLike b => b -> b -> b
-> WhiteSpace
-
-> (||) :: BoolLike b => b -> b -> b
-> WhiteSpace
-
-> not :: BoolLike b => b -> b
-> WhiteSpace
-
-}
-\only<3>{
-
-> (&&) :: BoolLike b => b -> b -> b
-> (&&) x y = bool x y x
-
-> (||) :: BoolLike b => b -> b -> b
-> (||) x y = bool y x x
-
-> not :: BoolLike b => b -> b
-> not x = bool true false x
-
-}
-\end{overlayarea}
-
-%endif
-
-\end{frame}
-
-
-\begin{frame}
-
-%if style /= newcode
-
-\textcolor{cmnt}{
-\LARGE{
-\begin{verbatim}
-
-ghci> :t not
-not :: (BoolLike b) => b -> b
-
-ghci> not True
-False
-
-ghci> not ConTrue
-If ConTrue ConFalse ConTrue
-
-\end{verbatim}
-}
-}
-
-%endif
-
-\end{frame}
-
@@ -1,77 +0,0 @@
-%include polycode.fmt
-%include code.fmt
-
-%if style == newcode
-
-> {-# LANGUAGE GADTs #-}
-> {-# OPTIONS_GHC -F -pgmF lhs2tex -optF --pre #-}
-
-> module Conclusion where
-
-%endif
-
-% -----------------------------------------------------------------------------
-
-\begin{frame}
-\frametitle{This prototype}
-
-\begin{itemize}
-
-\item Abstract away from concrete datatypes.
-\item Abstract away from functions.
-\item Replace with type classes.\linebreak
-
-\item Different instances for different computational contexts.
-\item Functions look similar.
-\item Types get complicated.\linebreak
-
-\item Plain lazy and purely functional Haskell.
-\item Purely functional strict JavaScript.
-\item Functional reactive JavaScript.
-
-\end{itemize}
-
-\end{frame}
-
-% -----------------------------------------------------------------------------
-
-\begin{frame}
-\frametitle{Current problems}
-
-\begin{itemize}
-
-\item Explicit lifting of function application and recursion.
-\item Type signatures with big contexts.
-\item No sugar for pattern matching, let bindings, if-then-else.
-\item Reimplementing the entire Haskell Prelude.
-\item Lots of manual instances for every datatype and context.
-
-\end{itemize}
-
-\end{frame}
-
-% -----------------------------------------------------------------------------
-
-\begin{frame}
-\frametitle{Future work}
-
-\begin{itemize}
-
-\item Syntactic front-end.
-\begin{item}
- Additional computational contexts:
- \begin{itemize}
- \item Strict Haskell.
- \item Functional Reactive Haskell.
- \item Profiling support.
- \item C, Objective-C, C\#, etc...
- \end{itemize}
-\end{item}
-\item Generic derivation of instances.
-\item Improved optimizing compiler.
-\item Single computation over different contexts.
-
-\end{itemize}
-
-\end{frame}
-
Oops, something went wrong.

0 comments on commit c686d62

Please sign in to comment.