@@ -348,7 +348,7 @@ We'll need to be able to create a new ``Surface`` by opening a window:
348 initWindow : Int -> Int -> ST m Var [add Surface]
348 initWindow : Int -> Int -> ST m Var [add Surface]
350However, this isn't quite right. It's possible that opening a window
350However, this isn't quite right. It's possible that opening a window
351−will fail, for example if our program is running in a termina without
351+will fail, for example if our program is running in a terminal without
352a windowing system available. So, somehow, ``initWindow`` needs to cope
352a windowing system available. So, somehow, ``initWindow`` needs to cope
353with the possibility of failure. We can do this by returning a
353with the possibility of failure. We can do this by returning a
354``Maybe Var``, rather than a ``Var``, and only adding the ``Surface``
354``Maybe Var``, rather than a ``Var``, and only adding the ``Surface``
@@ -657,14 +657,14 @@ resources and merge them into one composite resource. Before we run
657``combine``, the target resource must exist (``comp`` here) and must be
657``combine``, the target resource must exist (``comp`` here) and must be
658of type ``State ()``.
658of type ``State ()``.
660−It is instructive to look at the types of ``split`` and combine to see
660+It is instructive to look at the types of ``split`` and ``combine`` to see
661the requirements on resource lists they work with. The type of ``split``
661the requirements on resource lists they work with. The type of ``split``
662is the following:
662is the following:
664.. code-block:: idris
664.. code-block:: idris
666 split : (lbl : Var) -> {auto prf : InState lbl (Composite vars) res} ->
666 split : (lbl : Var) -> {auto prf : InState lbl (Composite vars) res} ->
667− STrans m (VarList vars) res (\ vs => mkRes vs ++ updateRes res prf (State ()))
667+ STrans m (VarList vars) res (\vs => mkRes vs ++ updateRes res prf (State ()))
669The implicit ``prf`` argument says that the ``lbl`` being split must be
669The implicit ``prf`` argument says that the ``lbl`` being split must be
670a composite resource. It returns a variable list, built from the composite
670a composite resource. It returns a variable list, built from the composite
@@ -713,8 +713,8 @@ A ``Line`` is defined as a start location, and end location, and a colour:
713 Line : Type
713 Line : Type
714 Line = ((Int, Int), (Int, Int), Col)
714 Line = ((Int, Int), (Int, Int), Col)
716−To implement ``start``, which creates a new ``Turtle`` (or returns ``Nothing``)
716+To implement ``start``, which creates a new ``Turtle`` (or returns ``Nothing``
717−if this is impossible, we begin by initialising the drawing surface then
717+if this is impossible), we begin by initialising the drawing surface then
718all of the components of the state. Finally, we combine all of these
718all of the components of the state. Finally, we combine all of these
719into a composite resource for the turtle:
719into a composite resource for the turtle: