Context Navigation



Ignore:
Timestamp:
Nov 26, 2007, 4:32:43 PM (18 years ago)
Author:
neil.c.c.brown
Message:

Added a slide at the end advertising the next talk, and tweaked other content. Notably the pattern matches for the assignment example were out-of-sync
with the original examples

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/trunk/200711-tock-seminars/200711-A-tock-slides.tex

    r59 r60
    298298
    299299\begin{frame}
    300\frametitle{The frameworks we use}
    300\frametitle{Test-driven development}
    301\begin{itemize}
    302 \item Passes are small so the tests can be small.
    303 \item Passes can be tested independently.
    304 \item We test the parser, the passes and the code generation backends.
    305\end{itemize}
    306\end{frame}
    307
    308\begin{frame}
    309\frametitle{The test frameworks we use}
    301310\begin{itemize}
    302311 \item HUnit
    415424 testOutput
    416425
    417singleAssign lhv rhv
    418 = Assign (VarList [lhv]) (ExprList [JustVar rhv])
    426singleAssign lhv rhv = Assign (VarList [lhv]) (ExprList [JustVar rhv])
    419427\end{lstlisting}
    420428
    465473\begin{frame}[fragile]
    466474\frametitle{Generic pattern-matching}
    467Built our own pattern-matching library using \lstinline|Data.Generics|
    475\begin{itemize}
    476 \item Built our own pattern-matching library using \lstinline|Data.Generics|
    477\end{itemize}
    468478\lstset{emph={Constr}}
    469479\begin{lstlisting}
    472482 | Named String Pattern
    473483 | Match Constr [Pattern]
    484(追記) (追記ここまで)
    485(追記) label @@ patt = Named label patt (追記ここまで)
    474486\end{lstlisting}
    475487\lstset{emph={}}
    476All \lstinline|Named| items with the same name must match
    488\begin{itemize}
    489 \item Can match any Haskell data (not functions)
    490 \item All \lstinline|Named| items with the same name must match
    491\end{itemize}
    477492\end{frame}
    478493
    490505\begin{lstlisting}
    491506assertPatternMatch "tempAssignTest 0"
    492 (mBlock(削除) Don'tCare (削除ここまで)
    507 (mBlock(追記) (追記ここまで)
    493508 [ singleAssign' ("tempVar" @@ Don'tCare) "y"
    494509 , singleAssign' "y" "x"
    496511 ])
    497512 testOutput
    498(削除) (削除ここまで)
    499(削除) mBlock = tag2 Block (削除ここまで)
    500513\end{lstlisting}
    501514%FIXME: Point out that singleAssign' can be reused between tests
    508521\end{itemize}
    509522\begin{lstlisting}[escapechar=\%]
    510singleAssign' lhv rhv = mAssign Don'tCare
    511 (mVarList Don'tCare [lhv])
    512 (mExprList Don'tCare [mJustVar rhv])
    523singleAssign' lhv rhv
    524 = mAssign (mVarList [lhv]) (mExprList [mJustVar rhv])
    525
    526mAssign = tag2 Assign
    513527
    514528tag2 con x0 x1 = Match (toConstr con) [checkPatt x0, checkPatt x1]
    604618\end{itemize}
    605619\end{frame}
    620(追記) (追記ここまで)
    621(追記) \begin{frame} (追記ここまで)
    622(追記) \frametitle{Same time, same place} (追記ここまで)
    623(追記) Next week in the second talk: (追記ここまで)
    624(追記) \begin{itemize} (追記ここまで)
    625(追記) \item Why occam is interesting to compile (追記ここまで)
    626(追記) \item Parser combinators in Haskell (追記ここまで)
    627(追記) \item Navigating tree structures, generically (追記ここまで)
    628(追記) \item Generating C/C++ (追記ここまで)
    629(追記) \item Reflections on using Haskell (追記ここまで)
    630(追記) \end{itemize} (追記ここまで)
    631(追記) \end{frame} (追記ここまで)
    606632%}}}
    607633
Note: See TracChangeset for help on using the changeset viewer.

AltStyle によって変換されたページ (->オリジナル) /