Skip to content

Commit

Permalink
finish correcting chapter 14
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei.winitzki committed Dec 21, 2020
1 parent dd2616a commit 80923d1
Show file tree
Hide file tree
Showing 6 changed files with 237 additions and 173 deletions.
4 changes: 4 additions & 0 deletions sofp-src/excluded_words
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
^cYD$
^cadabra$
^cadalgebra$
^callcc$
^catamorphism$
^catsMonoidRoute$
^cb
Expand Down Expand Up @@ -454,6 +455,7 @@
^inC$
^inK$
^inLeft$
^inS$
^incr$
^indices$
^inequivalent$
Expand Down Expand Up @@ -557,6 +559,7 @@
^os$
^outC$
^outK$
^outS$
^overline$
^p2a$
^p2q$
Expand Down Expand Up @@ -610,6 +613,7 @@
^scala$
^scalacheck$
^scalaz$
^scc$
^scop$
^see100$
^semigroup$
Expand Down
13 changes: 13 additions & 0 deletions sofp-src/sofp-summary.tex
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,19 @@ \subsubsection{Problem \label{par:Problem-monads-5-2-1}\ref{par:Problem-monads-5
The monoid morphism identity law holds for \lstinline!brun!. Does
the composition law hold?
\subsubsection{Problem \label{subsec:Problem-monatron-lift-reset-and-shift}\ref{subsec:Problem-monatron-lift-reset-and-shift}}
The continuation monad\textsf{'}s operations \lstinline!reset! and \lstinline!shift!
are defined by
\begin{align*}
& \text{reset}:\forall S.\,\text{Cont}^{R,R}\rightarrow\text{Cont}^{S,R}\quad,\quad\quad\text{reset}\triangleq c^{:\left(R\rightarrow R\right)\rightarrow R}\rightarrow k^{:R\rightarrow S}\rightarrow k(c(\text{id}))\quad,\\
& \text{shift}:\forall A.\,((A\rightarrow R)\rightarrow\text{Cont}^{R,R})\rightarrow\text{Cont}^{R,A}\quad,\quad\quad\text{shift}\triangleq g^{:\left(A\rightarrow R\right)\rightarrow\text{Cont}^{R,R}}\rightarrow k^{:A\rightarrow R}\rightarrow g(k)(\text{id})\quad.
\end{align*}
How to lift these operations to an arbitrary monad stack $P$ that
contains a continuation monad?\footnote{See \texttt{\href{https://github.com/renormalist/pugs/blob/master/src/Pugs/AST/Eval.hs}{https://github.com/renormalist/pugs/blob/master/src/Pugs/AST/Eval.hs}}
for custom code (in Haskell) that lifts \lstinline!reset! and \lstinline!shift!
to the \lstinline!ContT! monad transformer.} What are the appropriate type signatures for the lifted operations?
\begin{comment}
Failed attempts to verify the composition law:
Expand Down
Loading

0 comments on commit 80923d1

Please sign in to comment.