Skip to content

Commit f3e4488

Browse files
committed
Fix some typos
- This is the results of a pass through with cSpell, where I looked briefly at the warnings generated. This is a semi-automatic pass, which would need to be completed by another read at a slower pace.
1 parent 75290cd commit f3e4488

9 files changed

+22
-22
lines changed

CHANGES.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
(@ada2k, @dinosaure, #27)
88
- Protect an illegal access to the orphan from a possibly parallel task which
99
does not own the orphan value
10-
(@poytypic, @dinosaure, #31, #32)
10+
(@polytypic, @dinosaure, #31, #32)
1111
- Be able to pin a specific domain when we want to launch a parallel task
1212
(@dinosaure, #34)
1313
- Expose the `Miou.Backoff` module which can be useful for users
1414
(@dinosaure, #35)
15-
- Fix or improve (from the maintainance point-of-view) the `Miou.Queue` module
15+
- Fix or improve (from the maintenance point-of-view) the `Miou.Queue` module
1616
and some internal parts of Miou about the usage of atomics
1717
(@dinosaure, @polytypic, #36, #33)
1818
- Prefer to require a `finaliser` function for the `events` value and actually

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ let () = Miou.run @@ fun () ->
7676
let p0 = Miou.async @@ fun () -> 42 in
7777
let p1 = Miou.async @@ fun () -> Miou.await_exn p0 in
7878
Miou.await_exn p1
79-
Esxception: Miou.Not_a_child
79+
Exception: Miou.Not_a_child
8080
```
8181

8282
This rule dictates that passing values from one task to another requires
@@ -139,7 +139,7 @@ let prgm () =
139139
let rec until_its n =
140140
match prgm () with
141141
| Ok n' when n = n' -> ()
142-
| _ -> untils_its n
142+
| _ -> until_its n
143143
144144
let () =
145145
until_its 1;
@@ -195,7 +195,7 @@ system resources through the API it can offer).
195195
I/O and the resources of a system. Mutexes, conditions or semaphores can also
196196
suspend the execution of a program. Our documentation and tutorials explain
197197
those cases that we consider *marginal* in the interest of internalizing
198-
suspension mecanism rather than exporting it to the user (but which are equally
198+
suspension mechanism rather than exporting it to the user (but which are equally
199199
important in the design of an application).
200200

201201
## Genesis

book/src/conditions_and_mutexes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ let server () =
4747
let client, sockaddr = Miou_unix.Ownership.accept socket in
4848
Format.printf "new client: %a\n%!" pp_sockaddr sockaddr;
4949
ignore (Miou.async
50-
~give:[ Miou_unix.Ownership.resource clientr
50+
~give:[ Miou_unix.Ownership.resource client ]
5151
~orphans (fun () -> echo client))
5252
done;
5353
Miou_unix.Ownership.close socket
@@ -154,11 +154,11 @@ new connection.
154154

155155
If we try this code, it may not work, and Miou might complain with the
156156
`Not_owner` exception. This is because our `accept` task does not own the
157-
file-descritptor; we need to pass it the resource via the `give` parameter.
157+
file-descriptor; we need to pass it the resource via the `give` parameter.
158158

159159
It's worth noting that this ownership is exclusive. Once we've performed
160160
`Miou_unix.Ownership.accept`, we need to:
161-
1) transfer the file-descritptor back to the parent (so it can transfer it to
161+
1) transfer the file-descriptor back to the parent (so it can transfer it to
162162
the next `accept`).
163163
2) transfer the new file-descriptor to the parent that was created in our
164164
`accept` task so that it can transfer it to our `echo` task.

lib/miou.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ module Domain = struct
606606
add_into_domain domain (Domain_task (prm, state))
607607
| false ->
608608
(* In that case, we must propagate the cancellation if [prm.state] has
609-
ended abnormally. We try to attach tghe trigger to the compuatation
609+
ended abnormally. We try to attach the trigger to the computation
610610
[prm.state]. Two situations are possible:
611611
- if we can attach the trigger, this means that the promise has not
612612
yet been cancelled/resolved. However, between attachment and

lib/miou.mli

+6-6
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
Miou.both prm0 prm1
202202
203203
(* [my_long_computation] should have multiple cooperative points to let
204-
the other task (our [server]) to accept incoming TCP/IP connexions. *)
204+
the other task (our [server]) to accept incoming TCP/IP connections. *)
205205
]}
206206
207207
In other words, your application is "more" available to handle events than
@@ -962,7 +962,7 @@ val cancel : 'a t -> unit
962962

963963
val yield : unit -> unit
964964
(** [yield ()] reschedules tasks and give an opportunity to carry out the tasks
965-
that have been on hold the longest. For intance:
965+
that have been on hold the longest. For instance:
966966
967967
{[
968968
# Miou.run @@ fun () ->
@@ -1064,7 +1064,7 @@ end
10641064
10651065
Finally, Miou informs the monitor of any points that have been cancelled, so
10661066
that the associated events can no longer be monitored (this could involve
1067-
cleaning up the table of active file-descritpors).
1067+
cleaning up the table of active file-descriptors).
10681068
10691069
{3 Tutorial.}
10701070
@@ -1128,7 +1128,7 @@ val sys_signal : int -> Sys.signal_behavior -> Sys.signal_behavior
11281128
- [Signal_handle fn] calls [fn] (in the [dom0])
11291129
11301130
[signal] is provided to be able to execute Miou's tasks when we receive a
1131-
signal from the system. The [dom0] takes the responsability to execute the
1131+
signal from the system. The [dom0] takes the responsibility to execute the
11321132
given [fn]. *)
11331133

11341134
val protect :
@@ -1252,6 +1252,6 @@ module Lazy : sig
12521252
been forced the computation is skipped and stored result is reproduced.
12531253
12541254
@raise Undefined
1255-
in case the suspension is currently being forced by the current
1256-
prommise. *)
1255+
in case the suspension is currently being forced by the current promise.
1256+
*)
12571257
end

lib/miou_sync.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module Trigger : sig
2020
(** [create ()] allocates a new trigger in the initial state. *)
2121

2222
val is_initial : t -> bool
23-
(** [is_initial t] dtermines whether the trigger [t] is in the initial state.
23+
(** [is_initial t] determines whether the trigger [t] is in the initial state.
2424
*)
2525

2626
val is_signaled : t -> bool

lib/miou_unix.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ val bind_and_listen :
5656

5757
val accept : ?cloexec:bool -> file_descr -> file_descr * Unix.sockaddr
5858
(** [accept ?cloexec fd] is a Miou friendly {!Unix.accept} which returns file
59-
descritptors in non-blocking mode. *)
59+
descriptors in non-blocking mode. *)
6060

6161
val connect : file_descr -> Unix.sockaddr -> unit
6262
(** [connect fd sockaddr] is a Miou friendly {!val:Unix.connect}. The function

lib/miou_vector.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ val get: 'a t -> int -> 'a
125125
ensures x = a.view[i] *)
126126

127127
val set: 'a t -> int -> 'a -> unit
128-
(** [set a n x] modifies aector [a] in place, replacing
128+
(** [set a n x] modifies vector [a] in place, replacing
129129
element number [n] with [x].
130130
131131
Raise [Invalid_argument "Vector.set"]

lib/scheduler.mld

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This short tutorial shows you how to create a simple scheduler in OCaml with
44
effects. We'd like to warn the reader that certain choices have been made to
5-
suit our purposes: in other words, as opposed to Tatcher, there {b are}
5+
suit our purposes: in other words, as opposed to Thatcher, there {b are}
66
alternatives in implementing a scheduler. This tutorial is not {i absolutist} in
77
what it explains.
88

@@ -193,7 +193,7 @@ We still need to define a few last elements for our scheduler so that the user
193193
can interact with it:
194194
- of course, there's the effect that will create a task
195195
- but also a promise as a {i witness} to the task's progress
196-
- from this promise, we can have a last interation, awaiting task completion
196+
- from this promise, we can have a last interaction, awaiting task completion
197197

198198
Finally, a last type allows us to manipulate tasks independently of the type of
199199
their results.
@@ -276,8 +276,8 @@ consisting of 3 functions:
276276
+ our effects installer
277277

278278
{[
279-
let spawn fn = Effet.perform (Spawn fn)
280-
let await prm = Effet.perform (Await prm)
279+
let spawn fn = Effect.perform (Spawn fn)
280+
let await prm = Effect.perform (Await prm)
281281

282282
let my_function =
283283
let prm = spawn @@ fun () -> print_endline "Hello" in

0 commit comments

Comments
 (0)