(==.) infix 4 :: (v a p) (v a q) -> v Bool Expr | ...
\end{lstlisting}
\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Control flow}
+ \begin{lstlisting}
+class If v q r ~s where
+ If :: (v Bool p) (v t q) (v t r) -> v t s | ...
+
+class IF v where
+ IF :: (v Bool p) (v t q) (v s r) -> v () Stmt | ...
+ (?) infix 1 :: (v Bool p) (v t q) -> v () Stmt | ...
+
+instance If Code Stmt Stmt Stmt
+instance If Code e Stmt Stmt
+instance If Code Stmt e Stmt
+instance If Code x y Expr
+
+class seq v where
+ (:.) infixr 0 :: (v t p) (v u q) -> v u Stmt | ...
+ \end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Assignment and Input/Output}
+ \begin{lstlisting}
+:: DigitalPin = D0 | D1 | D2 ...
+:: AnalogPin = A0 | A1 | A2 ...
+
+class dIO v where dIO :: DigitalPin -> v Bool Upd
+class aIO v where aIO :: AnalogPin -> v Int Upd
+
+class analogRead v where
+ analogRead :: AnalogPin -> v Int Expr
+ analogWrite :: AnalogPin (v Int p) -> v Int Expr
+
+class digitalRead v where
+ digitalRead :: DigitalPin -> v Bin Expr
+ digitalWrite :: DigitalPin (v Bool p) -> v Int Expr
+ \end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Shared Data Sources and Assignment}
+ \begin{lstlisting}
+:: In a b = In infix 0 a b
+:: Main a = {main :: a}
+
+class sds v where
+ sds :: ((v t Upd)->In t (Main (v c s))) -> (Main (v c s)) | ...
+
+class assign v where
+ (=.) infixr 2 :: (v t Upd) (v t p) -> v t Expr | ...
+ \end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Examples}
+ \begin{lstlisting}
+blink = task \blink=(\x.
+ IF (x ==. lit True)
+ (ledOn led)
+ (ledOff led) :.
+ blink (lit 1000) (Not x))
+ In {main=blink (lit 1000) True}
+
+thermostat :: Main (View () Stmt)
+thermostat = {main = IF (analogRead A0 >. lit 50)
+ ( digitalWrite D0 (lit True) )
+ ( digitalWrite D0 (lit False) )
+ }
+
+thermostat2 :: Main (View () Stmt)
+thermostat2 = let a0 = aIO A0
+ d0 = dIO D0
+ in {main = IF (a0 >. lit 50)
+ (d0 =. lit True)
+ (d0 =. lit False)
+ }
+ \end{lstlisting}
+\end{frame}
\begin{itemize}[<+->]
\item New bytecode backend for mTask
\item Interpreter on client
- \item Server in iTasks
- \item Integration with iTasks
- \item No taskserver generation
- \item Program only once
+ \item Server in iTasks with integration
+ \item No taskserver generation, onetime programming
\end{itemize}
\end{block}
\end{frame}