@@ -19,15 +19,15 @@ have already seen this function in Section :ref:`sect-lazy`):
1919
2020.. code-block:: idris
2121
22− boolCase : (x:Bool) -> Lazy a -> Lazy a -> a;
23− boolCase True t e = t;
24− boolCase False t e = e;
22+ ifThenElse : (x:Bool) -> Lazy a -> Lazy a -> a;
23+ ifThenElse True t e = t;
24+ ifThenElse False t e = e;
2525
2626and then extend the core syntax with a ``syntax`` declaration:
2727
2828.. code-block:: idris
2929
30− syntax "if" [test] "then" [t] "else" [e] = boolCase test t e;
30+ syntax if [test] then [t] else [e] = ifThenElse test t e;
3131
3232The left hand side of a ``syntax`` declaration describes the syntax
3333rule, and the right hand side describes its expansion. The syntax rule
@@ -58,10 +58,10 @@ recursive. The following syntax extensions would therefore be valid:
5858
5959.. code-block:: idris
6060
61− syntax [var] ":=" [val] = Assign var val;
62− syntax [test] "?" [t] ":" [e] = if test then t else e;
63− syntax "select" [x] "from" [t] "where" [w] = SelectWhere x t w;
64− syntax "select" [x] "from" [t] = Select x t;
61+ syntax [var] ":=" [val] = Assign var val;
62+ syntax [test] "?" [t] ":" [e] = if test then t else e;
63+ syntax select [x] from [t] "where" [w] = SelectWhere x t w;
64+ syntax select [x] from [t] = Select x t;
6565
6666Syntax macros can be further restricted to apply only in patterns (i.e.,
6767only on the left hand side of a pattern match clause) or only in terms
@@ -92,7 +92,7 @@ forms. For example, a ``for`` loop binds a variable on each iteration:
9292
9393.. code-block:: idris
9494
95− syntax "for" {x} "in" [xs] ":" [body] = forLoop xs (\x => body)
95+ syntax for {x} in [xs] ":" [body] = forLoop xs (\x => body)
9696
9797 main : IO ()
9898 main = do for x in [1..10]: