Skip to content

Commit 75d9763

Browse files
committed
Read and write type nodes through the accessors in Ctype
Ctype, the core of unification, instantiation, generalization and the occur checks, now reads type nodes only through `get_desc`, `get_level` and `get_id`, and makes its unlogged writes (copy marks, level marks, temporary links, writes after `log_type`) through `Transient_expr`. Its local `get_level env p`, the binding level of a path, is renamed `get_path_level` so that it does not shadow `Types.get_level`. Review: Does the conversion change evaluation order, sharing or allocation? No. Writes still evaluate the new descriptor before storing it, `filter_visited` returns the same list cell, and the already-copied variant case in `copy` matches with a guard instead of building an option. Signed-off-by: Jono Prest <jjprest@gmail.com>
1 parent 9eb6866 commit 75d9763

2 files changed

Lines changed: 247 additions & 217 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Read and update type nodes in `Btype` and `Ctype` through accessors, a first step towards an abstract `type_expr`.

0 commit comments

Comments
 (0)