X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Freport.git;a=blobdiff_plain;f=Chapters%2FFuture.tex;h=8cfd12741e980970e49a04bfee4a1f42c003b3f5;hp=523fc0a8a1a6d3313bb8354cb6e08e977159a993;hb=5d71d2a32828f0c589696ba07dea0867c7fcf988;hpb=efc1953cd015844a2d969a9c9b6e633569891033 diff --git a/Chapters/Future.tex b/Chapters/Future.tex index 523fc0a..8cfd127 100644 --- a/Chapters/Future.tex +++ b/Chapters/Future.tex @@ -214,8 +214,9 @@ happening. 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 @@ -223,8 +224,6 @@ the expressions that come after it. This prevents values from flowing between 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