Skip to content

Commit

Permalink
Typos
Browse files Browse the repository at this point in the history
  • Loading branch information
dlesbre committed Jun 12, 2024
1 parent 3ded150 commit 915cb10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.mld
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ liberty of having a generic type as a key.
| G_Equal : 'a expr * 'a expr -> bool expr
]}
We can create our {{!PatriciaTree.HETEROGENEOUS_KEY}[HETEROGENEOUS_KEY]} functor
parameter using this type has follows:
parameter using this type as follows:
{[
module Expr : PatriciaTree.HETEROGENEOUS_KEY with type 'a t = 'a expr = struct
type 'a t = 'a expr
Expand Down
7 changes: 4 additions & 3 deletions patriciaTree.mli
Original file line number Diff line number Diff line change
Expand Up @@ -1421,14 +1421,14 @@ module type HASHED_VALUE = sig
Examples of safe implementations include:
{ul
{li Having a type ['a t] which doesn't depend on ['a], in which case casting
form ['a t] to ['b t] is always safe:
from ['a t] to ['b t] is always safe:
{[
type _ t = foo
let cast : type a b. a t -> b t = fun x -> x
let polyeq : type a b. a t -> b t -> bool = fun x y -> x = y
]}}
{li Using a GADT type and examining its constructors to only return [true]
when the constructors are equal:
when the constructors are equal (or have the same type parameter):
{[
type _ t =
| T_Int : int -> int t
Expand Down Expand Up @@ -1480,7 +1480,8 @@ module type HASHED_VALUE = sig
end)
]}
Using this can lead to unexpected behaviors:
in the following [m3] has cardinal 1, the [m1->"foo"] binding has been overwritten
in the following [m3] has cardinal 1, the [m1->"foo"] binding has been
overwritten:
{[
# let m3 = MapOfMaps.of_list [ (Any m1, "foo"); (Any m2, "bar") ]
val m3 : string MapOfMaps.t = <abstr>
Expand Down

0 comments on commit 915cb10

Please sign in to comment.