mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
add migration guide to the readme
This commit is contained in:
parent
6b9f39d224
commit
f78ee1bf92
1 changed files with 21 additions and 0 deletions
21
README.adoc
21
README.adoc
|
|
@ -45,6 +45,27 @@ Containers is:
|
|||
Some of the modules have been moved to their own repository (e.g. `sequence`,
|
||||
`gen`, `qcheck`) and are on opam for great fun and profit.
|
||||
|
||||
== Migration Guide
|
||||
|
||||
=== To 2.0
|
||||
|
||||
- The type system should detect issues related to `print` renamed into `pp` easily.
|
||||
If you are lucky, a call to `sed -i 's/print/pp/g'` on the concerned files
|
||||
might help rename all the calls
|
||||
properly.
|
||||
|
||||
- many optional arguments have become mandatory, because their default value
|
||||
would be a polymorphic "magic" operator such as `(=)` or `(>=)`.
|
||||
Now these have to be specified explicitly, but during the transition
|
||||
you can use `Pervasives.(=)` and `Pervasives.(>=)` as explicit arguments.
|
||||
|
||||
- if your code contains `open Containers`, the biggest hurdle you face
|
||||
might be that operators have become monomorphic by default.
|
||||
We believe this is a useful change that prevents many subtle bugs.
|
||||
However, during migration and until you use proper combinators for
|
||||
equality (`CCEqual`), comparison (`CCOrd`), and hashing (`CCHash`),
|
||||
you might want to add `open Pervasives` just after the `open Containers`.
|
||||
|
||||
== Change Log
|
||||
|
||||
See link:CHANGELOG.adoc[this file].
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue