Changeset 60 for docs/trunk/200711-tock-seminars/200711-A-tock-slides.tex
- 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 298 298 299 299 \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} 301 310 \begin{itemize} 302 311 \item HUnit … … 415 424 testOutput 416 425 417 singleAssign lhv rhv 418 = Assign (VarList [lhv]) (ExprList [JustVar rhv]) 426 singleAssign lhv rhv = Assign (VarList [lhv]) (ExprList [JustVar rhv]) 419 427 \end{lstlisting} 420 428 … … 465 473 \begin{frame}[fragile] 466 474 \frametitle{Generic pattern-matching} 467 Built 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} 468 478 \lstset{emph={Constr}} 469 479 \begin{lstlisting} … … 472 482 | Named String Pattern 473 483 | Match Constr [Pattern] 484 (追記) (追記ここまで) 485 (追記) label @@ patt = Named label patt (追記ここまで) 474 486 \end{lstlisting} 475 487 \lstset{emph={}} 476 All \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} 477 492 \end{frame} 478 493 … … 490 505 \begin{lstlisting} 491 506 assertPatternMatch "tempAssignTest 0" 492 (mBlock (削除) Don'tCare (削除ここまで)507 (mBlock(追記) (追記ここまで) 493 508 [ singleAssign' ("tempVar" @@ Don'tCare) "y" 494 509 , singleAssign' "y" "x" … … 496 511 ]) 497 512 testOutput 498 (削除) (削除ここまで)499 (削除) mBlock = tag2 Block (削除ここまで)500 513 \end{lstlisting} 501 514 %FIXME: Point out that singleAssign' can be reused between tests … … 508 521 \end{itemize} 509 522 \begin{lstlisting}[escapechar=\%] 510 singleAssign' lhv rhv = mAssign Don'tCare 511 (mVarList Don'tCare [lhv]) 512 (mExprList Don'tCare [mJustVar rhv]) 523 singleAssign' lhv rhv 524 = mAssign (mVarList [lhv]) (mExprList [mJustVar rhv]) 525 526 mAssign = tag2 Assign 513 527 514 528 tag2 con x0 x1 = Match (toConstr con) [checkPatt x0, checkPatt x1] … … 604 618 \end{itemize} 605 619 \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} (追記ここまで) 606 632 %}}} 607 633
Note:
See TracChangeset
for help on using the changeset viewer.