X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fhaskell-symposium-talk.git;a=blobdiff_plain;f=introduction.lhs;h=32afbe9e6f5708bfe8cb4bfcd773eda8c4b4c6f4;hp=5cd6c0acab16f70574fedb99a49758d01648c4e6;hb=994fb60ca2fb9a48380e54b4392f7519fcc63ec1;hpb=ce4726310e0e0586d352338c1e5786758ffe05fd diff --git a/introduction.lhs b/introduction.lhs index 5cd6c0a..32afbe9 100644 --- a/introduction.lhs +++ b/introduction.lhs @@ -46,6 +46,7 @@ Voor wie het niet meer weet, dit is een mealy machine \frame { \frametitle{Haskell Description} +\begin{beamercolorbox}[sep=-2.5ex,rounded=true,shadow=true,vmode]{codebox} \begin{code} mealyMachine :: InputSignals -> @@ -56,16 +57,19 @@ mealyMachine inputs {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} = ({-"{\color<3>[rg {-"{\color<3>[rgb]{1,0,0}"-}new_state{-"}"-} = logic {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} input outputs = logic {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} input \end{code} +\end{beamercolorbox} } \subsection{Simulation} \frame { \frametitle{Simulating a Mealy Machine} +\begin{beamercolorbox}[sep=-2.5ex,rounded=true,shadow=true,vmode]{codebox} \begin{code} run func {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} [] = [] run func {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} (i:input) = o:out where - ({-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-}, o) = func {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} i + ({-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-}, o) = func i {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} out = run func {-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-} input \end{code} +\end{beamercolorbox} } \ No newline at end of file