Skip to content

Commit a627ded

Browse files
authored
Fix doc formatting typos (#2016)
(rubber stamp ok)
1 parent 882de13 commit a627ded

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/modules/language-guide/pages/language-manual.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ The `Null` type has a single value, the literal `null`. `Null` is a subtype of t
788788
[[option-types]]
789789
=== Option types
790790

791-
`? <typ>` specifies the type of values that are either `null` or a proper value of the form `? <v>` where `<v>` has type `typ`.
791+
`? <typ>` specifies the type of values that are either `null` or a proper value of the form `? <v>` where `<v>` has type `<typ>`.
792792

793793
[[function-types]]
794794
=== Function types
@@ -1078,14 +1078,14 @@ Multiple imports of the same library can be safely deduplicated without loss of
10781078

10791079
An import `import <id>? =? <url>` declares an optional identifier `<id>?` bound to the contents of the text literal `<url>`. (`<id>?`, when absent, defaults to some fresh identifier `<id>`.)
10801080

1081-
`<url>` is a text literal that designates some resource: a local library specified with a relative path, a named module from a named package,
1081+
`<url>` is a text literal that designates some resource: a local library specified with a relative path, a named module from a named package,
10821082
or an external canister, referenced either by numeric canister id or by a named alias, and imported as a {proglang} actor.
10831083

10841084
In detail, if `<url>` is of the form:
10851085

10861086
* `"<filepath>"` then `<id>` is bound to the library module defined in file `<filepath>.mo`.
10871087
`<filepath>` is interpreted relative to the absolute location of the enclosing file.
1088-
Note the `.mo` extension is implicit and should *not* be included in `<url>`.
1088+
Note the `.mo` extension is implicit and should *not* be included in `<url>`.
10891089
For example, `import U "lib/Util"` defines `U` to reference the module in local file
10901090
`./lib/Util`.
10911091

@@ -1438,7 +1438,7 @@ The unary operator `<unop> <exp>` has type `T` provided:
14381438
* `<exp>` has type `T`, and
14391439
* The category of `<unop>` is a category of `T`.
14401440

1441-
The unary operator expression `<unop> <exp>` evaluates `exp` to a result. If the result is a value `v`, it returns the result of `<unop> v`.
1441+
The unary operator expression `<unop> <exp>` evaluates `<exp>` to a result. If the result is a value `v`, it returns the result of `<unop> v`.
14421442
If the result is `trap`, the entire expression results in `trap`.
14431443

14441444
[[binary-operators]]
@@ -1487,7 +1487,7 @@ The tuple expression `(<exp1>, ..., <expn>)` evaluates the expressions `exp1` ..
14871487
The tuple projection `<exp> . <nat>` has type `Ti` provided `<exp>` has tuple type
14881488
`(T1, ..., Ti, ..., Tn)`, `<nat>` == `i` and `1 \<= i \<= n`.
14891489

1490-
The projection `<exp> . <nat>` evaluates `exp` to a result `r`. If `r` is `trap`, then the result is `trap`. Otherwise, `r` must be a tuple `(v1,...,vi,...,vn)` and the result of the projection is the value `vi`.
1490+
The projection `<exp> . <nat>` evaluates `<exp>` to a result `r`. If `r` is `trap`, then the result is `trap`. Otherwise, `r` must be a tuple `(v1,...,vi,...,vn)` and the result of the projection is the value `vi`.
14911491

14921492
The empty tuple expression `()` is called the *unit value*.
14931493

@@ -1506,7 +1506,7 @@ The variant injection `# <id> <exp>` has variant type `{# id T}` provided:
15061506

15071507
The variant injection `# <id>` is just syntactic sugar for `# <id> ()`.
15081508

1509-
The variant injection`# <id> <exp>` evaluates `exp` to a result `r`. If `r` is `trap`, then the result is `trap`.
1509+
The variant injection`# <id> <exp>` evaluates `<exp>` to a result `r`. If `r` is `trap`, then the result is `trap`.
15101510
Otherwise, `r` must be a value `v` and the result of the injection is the tagged value `# <id> v`.
15111511

15121512
The tag and contents of a variant value can be tested and accessed using a <<pat-variant,variant pattern>>.
@@ -1527,7 +1527,7 @@ Such an object literal is equivalent to the object declaration `object { <dec-fi
15271527
The object projection `<exp> . <id>` has type `var? T` provided `<exp>` has object type
15281528
`sort { var1? <id1> : T1, ..., var? <id> : T, ..., var? <idn> : Tn }` for some sort `sort`.
15291529

1530-
The object projection `<exp> . <id>` evaluates `exp` to a result `r`. If `r` is `trap`, then the result is `trap`. Otherwise, `r` must be an
1530+
The object projection `<exp> . <id>` evaluates `<exp>` to a result `r`. If `r` is `trap`, then the result is `trap`. Otherwise, `r` must be an
15311531
object value `{ <id1> = v1,..., id = v, ..., <idn> = vn }` and the result of the projection is the value `v` of field `id`.
15321532

15331533
If `var` is absent from `var? T` then the value `v` is the constant value of immutable field `<id>`, otherwise:
@@ -1557,7 +1557,7 @@ The iterator access `<exp> . <id>` has type `T` provided `<exp>` has type `U`, a
15571557
| `[var T]` | `put` | `(Nat, T) -> ()` | indexed write function (mutable arrays only)
15581558
|===
15591559

1560-
The projection `<exp> . <id>` evaluates `exp` to a result `r`.
1560+
The projection `<exp> . <id>` evaluates `<exp>` to a result `r`.
15611561
If `r` is `trap`, then the result is `trap`.
15621562
Otherwise, `r` must be a value of type `U` and the result of the projection is a value of type `T`
15631563
whose semantics is given by the Description column of the previous table.
@@ -1659,7 +1659,7 @@ Otherwise, `r1` is a function value, `<shared-pat>? func <X0 <: V0, ..., n <: Vn
16591659
If `<shared-pat>` is present and of the form `shared query? <pat>` then evaluation continues by matching the record value `{caller = p}` against `<pat>`, where `p`
16601660
is the `Principal` invoking the function (typically a user or canister).
16611661
Matching continues by matching `v1` against `<pat1>`.
1662-
If pattern matching succeeds with some bindings, then evaluation returns the result of `exp` in the environment of the function value (not shown) extended with those bindings.
1662+
If pattern matching succeeds with some bindings, then evaluation returns the result of `<exp>` in the environment of the function value (not shown) extended with those bindings.
16631663
Otherwise, some pattern match has failed and the call results in `trap`.
16641664

16651665
Note: the exhaustiveness side condition on `shared` function expressions ensures that argument pattern matching cannot fail (see <<exp-func>>).
@@ -1890,7 +1890,7 @@ The expression `return <exp>` has type `None` provided:
18901890
* `T` is the return type of the nearest enclosing function (with no intervening `async` expression), or
18911891
* `async T` is the type of the nearest enclosing (perhaps implicit) `async` expression (with no intervening function declaration)
18921892

1893-
The `return` expression exits the corresponding dynamic function invocation or completes the corresponding dynamic async expression with the result of `exp`.
1893+
The `return` expression exits the corresponding dynamic function invocation or completes the corresponding dynamic async expression with the result of `<exp>`.
18941894

18951895
// TBR async traps?
18961896

@@ -1953,7 +1953,7 @@ See <<type-Error>>.
19531953
[[exp-assert]]
19541954
=== Assert
19551955

1956-
The assert expression `assert <exp>` has type `()` provided `exp` has type `Bool`.
1956+
The assert expression `assert <exp>` has type `()` provided `<exp>` has type `Bool`.
19571957

19581958
Expression `assert <exp>` evaluates `<exp>` to a result `r`. If `r` is `trap` evaluation returns `trap`. Otherwise `r` is a Boolean value `v`. The result of `assert <exp>` is:
19591959

0 commit comments

Comments
 (0)