You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the `dune utop` command, it triggers `Exeter`'s compilation, launches `utop` and loads `Exeter`.
258
+
Run the `dune utop` command. This triggers `Exeter`'s compilation, launches `utop`, and loads `Exeter`.
259
259
```ocaml
260
260
# open Exeter;;
261
261
@@ -269,7 +269,7 @@ Type `aleph` is public. Values can be created or accessed.
269
269
Unknown element.
270
270
```
271
271
272
-
Type `bet` is private, it is not available outside of the implementation where it is defined, here `Exeter`.
272
+
Type `bet` is private. It is not available outside of the implementation where it is defined, here `Exeter`.
273
273
```ocaml
274
274
# #show gimel;;
275
275
type gimel
@@ -287,7 +287,7 @@ val gimel_of_bool : bool -> gimel
287
287
- : string = "Christine"
288
288
```
289
289
290
-
Type `gimel` is _abstract_. Values can be created or manipulated, but only as function results or arguments. Only the provided functions `gimel_of_bool`, `gimel_flip`, and `gimel_to_string` or polymorphic functions can receive or return `gimel` values.
290
+
Type `gimel` is _abstract_. Values can be created or manipulated, but only as function results or arguments. Just the provided functions `gimel_of_bool`, `gimel_flip`, and `gimel_to_string` or polymorphic functions can receive or return `gimel` values.
291
291
```ocaml
292
292
# #show dalet;;
293
293
type dalet = private Dennis of int | Donald of string | Dorothy
@@ -333,12 +333,12 @@ let () =
333
333
Florence.print_goodbye ()
334
334
```
335
335
336
-
Definitions from a submodule are access by chaining module names, here
336
+
Definitions from a submodule are accessed by chaining module names, here
337
337
`Florence.Hello.print`.
338
338
339
-
### Submodule with Signatures
339
+
### Submodule With Signatures
340
340
341
-
To define an interface to a submodule we can provide a _module signature_. This
341
+
To define an interface to a submodule, we can provide a _module signature_. This
342
342
is done in this second version of the `florence.ml` file:
343
343
```ocaml
344
344
module Hello : sig
@@ -369,9 +369,9 @@ end
369
369
letprint_goodbye () = print_endline "Goodbye"
370
370
```
371
371
372
-
First, we define a `module type` called `HelloType` which defines the same module interface as previously. Instead of providing the signature when defining the `Hello` module, we use the `HelloType` module type.
372
+
First, we define a `module type` called `HelloType`, which defines the same module interface as before. Instead of providing the signature when defining the `Hello` module, we use the `HelloType` module type.
373
373
374
-
This allows writing interfaces shared by several modules. An implementation satisfies any module type listing some of its contents. This implies a module may have several types and there is a subtyping relationship between module types.
374
+
This allows writing interfaces shared by several modules. An implementation satisfies any module type listing some of its contents. This implies a module may have several types and that there is a subtyping relationship between module types.
0 commit comments