Skip to content

JsLIGO: add support for module access in type application

Motivation and Context

As it has been reported in #1387 (closed) , parametric types do not work with module accessors.

For JsLIGO, Sander added support in the parser (!2018 (merged)), but there's missing support in abstractor/middle-end.

Description

This MR adds support in the middle-end by changing Type_app to support another parameter:

type ('ty_path, 'ty_exp) t =
   { type_operator : 'ty_path
   ; arguments : 'ty_exp list
   }

to be used in type_operator (instead of just Type_var.t).

The abstractor for JsLIGO is adapted accordingly.

For CameLIGO, there's still no support in the parser, so we cannot adapt the abstractor yet.

PascaLIGO is being deprecated (!2271 (merged)), so no need to implement it.

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)

Changelog

Checklist:

  • 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).
Edited by E. Rivas

Merge request reports

Loading