File: README.md

package info (click to toggle)
ppxlib 0.37.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,804 kB
  • sloc: ml: 66,587; sh: 103; makefile: 40; python: 36
file content (25 lines) | stat: -rw-r--r-- 904 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
gencopy is a dev utility tool that we use to generate migration functions
skeletons when adding support for new compiler versions.

It generates deep copy functions from the types defined in the provided
ast_X.ml to what it assumes is in ast_Y.ml. The latter is only used to for
type annotations and qualified record fiels/variant names. Those functions
are generated assuming types are symmetrical across the two files.

One would first generate `migrate_X_Y.ml` and `migrate_Y_X.ml` by running
respectively:
```
gencopy ast_X.ml ast_Y.ml > migrate_X_Y.ml
```
and
```
gencopy ast_Y.ml ast_X.ml > migrate_Y_X.ml
```
from the `astlib/` folder.

Trying to build ppxlib should give you compile errors for those two files
corresponding to the specific parts of the AST types that changed across the two
versions.

Properly fixing those until it all builds should give you a valid set of
migration functions.