Skip to content

Commit 19fc79d

Browse files
authored
Merge pull request #562 from gsuuon/dev
Tour page typos
2 parents 9f400dd + 7d0b9bc commit 19fc79d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/spec/tour.kk.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ pub fun test-with1()
203203
```
204204

205205
The `with` statement essentially puts all statements that follow it into
206-
an anynomous function block and passes that as the last parameter. In general:
206+
an anonymous function block and passes that as the last parameter. In general:
207207

208208
~ translate
209209
```unchecked
@@ -493,7 +493,7 @@ Hover over `square6` to see the inferred effect for `:_e`.
493493
The inferred effects are not just considered as some extra type information on
494494
functions. On the contrary, through the inference of effects, &koka; has a very
495495
strong connection to its denotational semantics. In particular, _the full type
496-
of a &koka; functions corresponds directly to the type signature of the
496+
of a &koka; function corresponds directly to the type signature of the
497497
mathematical function that describes its denotational semantics_. For example,
498498
using 〚`:t`〛 to translate a type `:t` into its corresponding
499499
mathematical type signature, we have:
@@ -906,7 +906,7 @@ value struct argb{ alpha: int; color-red: int; color-green: int; color-blue: int
906906
To support generic polymorphism, sometimes value types are _boxed_. For example, a list
907907
is polymorphic in its elements. That means that if we construct a list of tuples, like
908908
`[(1,True)]`, that the element `(1,2)` will be boxed and heap allocated -- essentially
909-
the compiler transforms this expression into `[Box((1,True)]` internally.
909+
the compiler transforms this expression into `[Box((1,True))]` internally.
910910

911911
Note that for regular data types and `:int`'s boxing is free (as in isomorphic). Moreover, value types
912912
up to 63 bits (on a 64-bit platform) are boxed in-place and do not require heap allocation
@@ -1242,7 +1242,7 @@ For example, the type of `pretty` becomes:
12421242
```unchecked
12431243
fun pretty( d : doc ) : width string
12441244
```
1245-
as is requires the `:width` effect to be handled (aka,
1245+
as it requires the `:width` effect to be handled (aka,
12461246
the "dynamic binding for `width : int` to be defined",
12471247
aka, the "`:width` capability").
12481248

@@ -1327,7 +1327,7 @@ This is a total handler and only discharges the `:emit` effect.
13271327
{.learn}
13281328

13291329
As another example, consider a generic `catch` handler that
1330-
applies an handling function when `:raise` is called on our
1330+
applies a handling function when `:raise` is called on our
13311331
exception example:
13321332

13331333
```
@@ -1349,7 +1349,7 @@ fun catch-example()
13491349
The `catch` handler has an interesting type where the action can
13501350
have a `:raise` effect (`: () -> <raise|e> a`) and maybe further effects `:e`,
13511351
while the handling function `hnd` only has effect `:e`. Now consider
1352-
supplying a handing function that itself calls `raise`: in that case, the
1352+
supplying a handling function that itself calls `raise`: in that case, the
13531353
type of `catch` would be instantiated to: `: (hnd: (string) -> <raise> a, action : () -> <raise, raise> a ) : <raise> a`.
13541354
This is correct: the (outer) `:raise` effect of `action` is handled and discharged, but since
13551355
the handling function `hnd` can still cause `raise` to be called, the final effect still contains `:raise`.
@@ -1396,7 +1396,7 @@ fun div42()
13961396

13971397
#### A State Effect { #sec-state; }
13981398

1399-
For more examples of the use of `return` operations, we look at a the state effect.
1399+
For more examples of the use of `return` operations, we look at the state effect.
14001400
In its most general form it has just a `set` and `get` operation:
14011401

14021402
```
@@ -1490,7 +1490,7 @@ with regard to other approaches:
14901490
of this is the continuation monad (which can express ``call/cc``).
14911491

14921492
The &koka; compiler internally uses monads and `shift`/`reset` to compile effect handlers though, and
1493-
it compiles handlers into to an internal free monad based on multi-prompt delimited control [@Xie:evp;@Gunter:mprompt].
1493+
it compiles handlers into an internal free monad based on multi-prompt delimited control [@Xie:evp;@Gunter:mprompt].
14941494
By inlining the monadic _bind_ we are able to generate efficient C code that only allocates continuations
14951495
in the case one is actually yielding up to a general `ctl` operation.
14961496
~

0 commit comments

Comments
 (0)