Skip to content

Commit 83b7c72

Browse files
goldfirereantalsz
authored andcommitted
Document the debug_printers script
Thanks to Chris for explaining this to me!
1 parent 98896e0 commit 83b7c72

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

HACKING.jst.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,19 @@ where the test file or test dir are specified with respect to the
5454
$ make -f Makefile.jst test-one TEST=typing-local/local.ml
5555
$ make -f Makefile.jst test-one DIR=typing-local
5656

57+
## Debugging
58+
59+
OCaml 4.14 makes `type_expr` abstract, and thus normal debug printing
60+
of types no longer works. However, there is now an installable printer
61+
for types, which we can use to see the types. Here are the instructions:
62+
63+
1. Use the old `Makefile`, not the new `Makefile.jst`. This is an infelicity
64+
we hope to fix.
65+
66+
2. In the `tools` directory, run `make debug_printers.cmo`.
67+
68+
3. In the debugger, execute some instructions, with e.g. `run` or `step`. This forces
69+
the debugger to load the compiler code, required for the next
70+
step.
71+
72+
4. Execute `source tools/debug_printers` to install the printers.

0 commit comments

Comments
 (0)