|
|
|
@ -197,23 +197,16 @@ val old_exist : (Infer.variable -> 'c co) -> (/*\alert{F.ty}*/ * 'c) co
|
|
|
|
|
val new_exist : (Infer.variable * /*\alert{F.ty co}*/ -> 'c co) -> 'c co
|
|
|
|
|
\end{lstlisting}
|
|
|
|
|
|
|
|
|
|
% [Gabriel]: if we had introduced let@ and let+ at this point, we
|
|
|
|
|
% could show short before/after examples:
|
|
|
|
|
|
|
|
|
|
% Before:
|
|
|
|
|
% let+ (output1, (output2, r)) =
|
|
|
|
|
% let@ input1 = quantifier1 in
|
|
|
|
|
% let@ input2 = quantifier2 in
|
|
|
|
|
% ...
|
|
|
|
|
% in <result>
|
|
|
|
|
|
|
|
|
|
% After:
|
|
|
|
|
% let@ input1, output1 = quantifier1 in
|
|
|
|
|
% let@ input2, output2 = quantifier2 in
|
|
|
|
|
% ...
|
|
|
|
|
% let+ output1 = output1
|
|
|
|
|
% and+ output2 = output2
|
|
|
|
|
% in <result>
|
|
|
|
|
\pause\vfill
|
|
|
|
|
|
|
|
|
|
For \lstinline{with_input}:
|
|
|
|
|
\begin{lstlisting}
|
|
|
|
|
val old_with_input : path ->
|
|
|
|
|
(in_channel -> 'c cloud) -> (cost * 'c cloud)
|
|
|
|
|
val new_with_input : path ->
|
|
|
|
|
(in_channel * cost cloud -> 'c cloud) -> 'c cloud
|
|
|
|
|
\end{lstlisting}
|
|
|
|
|
|
|
|
|
|
\end{frame}
|
|
|
|
|
|
|
|
|
|
\begin{frame}[fragile]{New API}
|
|
|
|
|