From: Matthijs Kooijman Date: Mon, 7 Dec 2009 13:13:09 +0000 (+0100) Subject: Improve some wordings. X-Git-Tag: final-thesis~57 X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Freport.git;a=commitdiff_plain;h=7d7d8450c160084213309170269f41177e4dbe0b Improve some wordings. --- diff --git a/Chapters/HardwareDescription.tex b/Chapters/HardwareDescription.tex index ff4b0c0..0717a76 100644 --- a/Chapters/HardwareDescription.tex +++ b/Chapters/HardwareDescription.tex @@ -808,13 +808,13 @@ quadruple n = mul (mul n) Note that the concept of \emph{state} is no more than having some way to communicate a value from one cycle to the next. By introducing a - \hs{delay} function, we can do exactly that: Delay (each value in) a + \hs{delay} function, we can do exactly that: delay (each value in) a stream so that we can "look into" the past. This \hs{delay} function simply outputs a stream where each value is the same as the input value, but shifted one cycle. This causes a \quote{gap} at the beginning of the stream: What is the value of the delay output in the - first cycle? For this, the \hs{delay} function has a second input - (which is a value, not a stream!). + first cycle? For this, the \hs{delay} function has a second input, of + which only a single value is used. \in{Example}[ex:DelayAcc] shows a simple accumulator expressed in this style. @@ -1087,6 +1087,8 @@ acc in s = (s', out) \item tail has the type \hs{(n > 0) => Vector n -> Vector (n - 1)} \item This means that xs must have the type \hs{(n > 0) => Vector n} \item This means that sum must have the type \hs{(n > 0) => Vector n -> a} + (The type \hs{a} is can be anything at this stage, we will not try to finds + its actual type in this example). \item sum is called with the result of tail as an argument, which has the type \hs{Vector n} (since \hs{(n > 0) => Vector (n - 1)} is the same as \hs{(n >= 0) => Vector n}, which is the same as just \hs{Vector n}).