package ocamlmig

  1. Overview
  2. Docs
OCaml source code rewriting tool

Install

Dune Dependency

Authors

Maintainers

Sources

ocamlmig-5.2-20250228.tbz
sha256=b62e6316ed39461c814320282d42484bd8b7a412b861a6f14d2853ceed423005
sha512=112b09f4ee3c9305c162cb7061d3f84e6017e22f990c60f69bc8ca9a3d0344d2793f6d38b08f43b761a5b2d0d430d7e0d9b71bfe3de2f80a65ce23ce47c8fe06

doc/CHANGES.html

5.2-20250228

  • Added support for rewriting .mli files, just not .ml files.
  • First stab at supporting migrating modules: module Old_name : sig end .... [@@migrate { repl = New_name }]. These annotations are only looked for when passing -module-migration, and the replacement is limited to a module path.
  • given an annotation val x : ... [@@migrate { repl = e }], when inserting e at a use-site of x, in some case, we now modify e to avoid shadowing-related issues, and shorten module paths according to the modules opened in that scope.
  • added an experimental printer that ocamlformats only the sections of the code that are modified, instead of the entire file. It is used by default when a repository does not use ocamlformat.
  • ocamlmig transform rescope -unopen now knows to rename identifiers in all namespaces (module identifiers, type constructors, class identifiers, etc), instead of only values.

5.2-20250202

Correct a failure to use some opam-installed files.

5.2-20250129

Initial release.

OCaml

Innovation. Community. Security.