diff --git a/doc/manual/syntax.md b/doc/manual/syntax.md index 02a0e09ac6..0346cc1c4e 100644 --- a/doc/manual/syntax.md +++ b/doc/manual/syntax.md @@ -602,7 +602,7 @@ Here are some examples of type annotations in Nickel: error: incompatible types [..] -> (1 + 1 : Number) + ((`foo |> match { `foo => 1, _ => 2 }) : Number) +> (1 + 1 : Number) + (('foo |> match { 'foo => 1, _ => 2 }) : Number) 3 > let x : Number = "a" in x diff --git a/doc/manual/typing.md b/doc/manual/typing.md index 445ef8c62a..a9ad708885 100644 --- a/doc/manual/typing.md +++ b/doc/manual/typing.md @@ -220,7 +220,7 @@ The following type constructors are available: ``` - **Enum**: ``[| 'tag1, .., 'tagn |]``: an enumeration comprised of alternatives - `tag1`, .., `tagn`. An enumeration literal is prefixed with a backtick and + `tag1`, .., `tagn`. An enumeration literal is prefixed with a single quote and serialized as a string. It is useful to encode finite alternatives. The advantage over strings is that the typechecker handles them more finely: it is able to detect incomplete matches, for example.