An important implication of this approach is that the order of writing
function applications affects the state type. Fortunately, this problem can be
-localized by consistently using type synonyms for state types, which should
-prevent changes in other function's source when a function changes.
+localized by consistently using type synonyms for state types (see
+\in{section}[sec:prototype:substatesynonyms]), which should prevent
+changes in other function's source when a function changes.
A less obvious implications of this approach is that the scope of variables
produced by each of these expressions (using the \hs{<-} syntax) is limited to
two functions (components) in two directions. For most Monad instances, this
is a requirement, but here it could have been different.
-\todo{Add examples or reference for state synonyms}
-
\subsection{Alternative syntax}
Because of these typing issues, misusing Haskell's do notation is probably not
the best solution here. However, it does show that using fairly simple