Fix todo's in the introduction chapter.
[matthijs/master-project/report.git] / Chapters / HardwareDescription.tex
index 20c43e3594eebaede01f3e94821b9f012c035d5f..24afd8965d42722bb87114f6453bd049dbac84f9 100644 (file)
@@ -342,6 +342,7 @@ and3 a b c = and (and a b) c
         types) and just one field (which are technically not a product).
       \stopdesc
       \startdesc{Enumerated types}
         types) and just one field (which are technically not a product).
       \stopdesc
       \startdesc{Enumerated types}
+        \defref{enumerated types}
         An enumerated type is an algebraic datatype with multiple constructors, but
         none of them have fields. This is essentially a way to get an
         enum-like type containing alternatives.
         An enumerated type is an algebraic datatype with multiple constructors, but
         none of them have fields. This is essentially a way to get an
         enum-like type containing alternatives.
@@ -788,7 +789,7 @@ acc in s = (s', out)
         variables are used by a function can be completely determined from its
         type signature (as opposed to the stream approach, where a function
         looks the same from the outside, regardless of what state variables it
         variables are used by a function can be completely determined from its
         type signature (as opposed to the stream approach, where a function
         looks the same from the outside, regardless of what state variables it
-        uses (or whether it's stateful at all).
+        uses or whether it's stateful at all).
 
         This approach is the one chosen for Cλash and will be examined more
         closely below.
 
         This approach is the one chosen for Cλash and will be examined more
         closely below.
@@ -803,7 +804,9 @@ acc in s = (s', out)
         has to somehow know the current state for these called functions. The
         only way to do this, is to put these \emph{substates} inside the
         caller's state. This means that a function's state is the sum of the
         has to somehow know the current state for these called functions. The
         only way to do this, is to put these \emph{substates} inside the
         caller's state. This means that a function's state is the sum of the
-        states of all functions it calls, and its own state.
+        states of all functions it calls, and its own state. This sum
+        can be obtained using something simple like a tuple, or possibly
+        custom algebraic types for clarity.
 
         This also means that the type of a function (at least the "state"
         part) is dependent on its own implementation and of the functions it
 
         This also means that the type of a function (at least the "state"
         part) is dependent on its own implementation and of the functions it
@@ -882,7 +885,7 @@ acc in s = (s', out)
 
         \todo{Sidenote: One or more state arguments?}
 
 
         \todo{Sidenote: One or more state arguments?}
 
-    \subsection{Explicit state annotation}
+    \subsection[sec:description:stateann]{Explicit state annotation}
       To make our stateful descriptions unambigious and easier to translate,
       we need some way for the developer to describe which arguments and
       results are intended to become stateful.
       To make our stateful descriptions unambigious and easier to translate,
       we need some way for the developer to describe which arguments and
       results are intended to become stateful.