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`.
243
+
Run the `dune utop` command. This triggers `Exeter`'s compilation, launches `utop`, and loads `Exeter`.
244
244
```ocaml
245
245
# open Exeter;;
246
246
@@ -254,7 +254,7 @@ Type `aleph` is public. Values can be created or accessed.
254
254
Unknown element.
255
255
```
256
256
257
-
Type `bet` is private, it is not available outside of the implementation where it is defined, here `Exeter`.
257
+
Type `bet` is private. It is not available outside of the implementation where it is defined, here `Exeter`.
258
258
```ocaml
259
259
# #show gimel;;
260
260
type gimel
@@ -272,7 +272,7 @@ val gimel_of_bool : bool -> gimel
272
272
- : string = "Christine"
273
273
```
274
274
275
-
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.
275
+
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.
276
276
```ocaml
277
277
# #show dalet;;
278
278
type dalet = private Dennis of int | Donald of string | Dorothy
@@ -318,12 +318,12 @@ let () =
318
318
Florence.print_goodbye ()
319
319
```
320
320
321
-
Definitions from a submodule are access by chaining module names, here
321
+
Definitions from a submodule are accessed by chaining module names, here
322
322
`Florence.Hello.print`.
323
323
324
-
### Submodule with Signatures
324
+
### Submodule With Signatures
325
325
326
-
To define an interface to a submodule we can provide a _module signature_. This
326
+
To define an interface to a submodule, we can provide a _module signature_. This
327
327
is done in this second version of the `florence.ml` file:
328
328
```ocaml
329
329
module Hello : sig
@@ -354,9 +354,9 @@ end
354
354
let print_goodbye () = print_endline "Goodbye"
355
355
```
356
356
357
-
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.
357
+
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.
358
358
359
-
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.
359
+
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