Context Navigation


Changeset 38 for docs


Ignore:
Timestamp:
Nov 23, 2007, 6:42:23 PM (18 years ago)
Author:
neil.c.c.brown
Message:

Tweaked some more code formatting, added a type to the >>* operator (so it is clearer what it does) and tried to be clever with a slide title.

File:
1 edited

Legend:

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

    r37 r38
    817817 \item Operators combine productions into bigger productions
    818818 \begin{itemize}
    819 \item \lstinline$<|> :: Parser a -> Parser a -> Parser a(削除) $ -- choice (削除ここまで)
    819 \item \lstinline$<|> :: Parser a -> Parser a -> Parser a(追記) -- choice$ (追記ここまで)
    820820 \end{itemize}
    821821 \end{itemize}
    951951\frametitle{Testing backend code}
    952952\begin{lstlisting}
    953type GenOps = GenOps { ...
    954 genWhile :: GenOps -> Expression -> Statement -> CodeGenM (),
    955 genExpression :: GenOps -> Expression -> CodeGenM (),
    956 genStatement :: GenOps -> Statement -> CodeGenM (),
    957 ...
    958}
    953-- genWhile :: GenOps -> Expression -> Statement -> CodeGenM ()
    954-- genExpression :: GenOps -> Expression -> CodeGenM ()
    955-- genStatement :: GenOps -> Statement -> CodeGenM ()
    959956
    960957testgenWhile
    961958 = assertEqual "testgenWhile"
    962 "while(@@@)(削除) $$$ (削除ここまで)"
    959 "while(@@@)(追記) ### (追記ここまで)"
    963960 (runCodeGen (genWhileC whileOps undefined undefined))
    964961 where
    965962 whileOps = GenOps { genExpression = (\_ _ -> tell ["@@@"]),
    966 genStatement = (\_ _ -> tell ["(削除) $$$ (削除ここまで)"]) }
    967\end{lstlisting}(削除) (削除ここまで)
    968Using \lstinline|undefined| saves (削除) needed to construct (削除ここまで) a value, \\
    963 genStatement = (\_ _ -> tell ["(追記) ### (追記ここまで)"]) }
    964\end{lstlisting}(追記) (追記ここまで)
    965Using \lstinline|undefined| saves (追記) constructing (追記ここまで) a value, \\
    969966and makes sure it's not evaluated!
    970967\end{frame}
    11921189 \item e.g. applying a pure function to the result of a monadic
    11931190 operation \\
    1191(追記) \lstinline|(>>*) :: m a -> (a -> b) -> m b| \\ (追記ここまで)
    11941192 \lstinline|(>>*) op f = (liftM f) op| \\
    11951193 \lstinline|v <- getFoo >>* fromMaybe|
    12621260\end{frame}
    12631261
    1264\begin{frame}(削除) (削除ここまで)
    1265\frametitle{(削除) Not as generic as we'd lik (削除ここまで)e}
    1262\begin{frame}(追記) [fragile] (追記ここまで)
    1263\frametitle{(追記) \dag~Insert generic swear-word her (追記ここまで)e}
    12661264\begin{itemize}
    12671265 \item Bad \lstinline|Constr| equality
    12681266 \begin{itemize}
    1269 \item \lstinline$toConstr False == toConstr Nothing$(削除) (削除ここまで)
    1267 \item \lstinline$toConstr False == toConstr Nothing$(追記) \dag (追記ここまで)
    12701268 \end{itemize}
    12711269 \item No easy way to discover number of parameters for a \lstinline|Constr|~
    12721270 \begin{itemize}
    12731271 \item Have to map ``\lstinline$const undefined$'' over the sub-terms
    1274 and count the length of the returned list(削除) ! (削除ここまで)
    1272 and count the length of the returned list(追記) \dag (追記ここまで)
    12751273 \end{itemize}
    12761274 \item Can't pass a type as a parameter
Note: See TracChangeset for help on using the changeset viewer.

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