Skip to content

[Draft] Add records to type diff

Nicolas Phan requested to merge type_diff_2 into dev

Motivation and Context

This is a follow-up of the first Type Diff MR, which introduced a printing of the difference between two tuples types on a typer error.

This MR extends the printing to records types. Tuple diffs were lists of changes, now records diffs are records of changes, whose labels are the union of the two records' labels and values are the diff between the two records' value (i.e. diff[label] = diff of record1[label] vs. record2[label]).


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement (non-breaking change that improves performance)
  • None (change with no changelog)



  • Changes follow the existing coding style (use dune @fmt to check).
  • Tests for the changes have been added (for bug fixes / feature).
  • Documentation has been updated.
  • Changelog description has been added (if appropriate).
  • Start titles under ## Changelog section with #### (if appropriate).
  • There is no image or uploaded file in changelog
  • Examples in changed behaviour have been added to the changelog (for breaking change / feature).

Merge request reports