File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -207,13 +207,14 @@ Here is a small example of a non-generic map:
207
207
{@ocaml[
208
208
module IntKey : PatriciaTree.KEY with type t = int = struct
209
209
type t = int
210
- let to_int x = x
210
+ let to_int x = x (* to_int must be injective and fast *)
211
211
end
212
212
]}}
213
213
{li Use it to instanciate the map/set functors:
214
214
{[
215
215
module IMap : PatriciaTree.MAP with type key = int
216
216
= PatriciaTree.MakeMap(IntKey)
217
+
217
218
module ISet : PatriciaTree.SET with type elt = int
218
219
= PatriciaTree.MakeSet(IntKey)
219
220
]}}
@@ -350,7 +351,7 @@ liberty of having a generic type as a key.
350
351
end
351
352
]}
352
353
Note the full polymorphic equality, that returns a GADT term {!PatriciaTree.cmp}
353
- which, when equal ({{!PatriciaTree.Eq}[Eq]}), it is a proof of type equality
354
+ which, when equal ({{!PatriciaTree.Eq}[Eq]}), is a proof of type equality
354
355
between the type parameters.}
355
356
{li We can now instanciate our map functor. Note that in the heterogeneous case,
356
357
we must also specify the value type (second functor argument) and how it depends
You can’t perform that action at this time.
0 commit comments