janestreet / base

Standard library for OCaml
MIT License
848 stars 124 forks source link

fix type_equal docs for OCaml 4.12 injectivity annotations #151

Open mheiber opened 1 year ago

mheiber commented 1 year ago

Update doc comments to reflect that OCaml has injectivity annotations.

Previously the doc comments for Type_equal.mli "OCaml has no built-in language feature to state that a type is injective" but such comments were added in 4.12.

This change may be helpful for code readers to know that OCaml has a built-in alternative to the Injectivity machinery, though tbh I'm not sure what the trade-off is when choosing to use Injectivity vs !