Skip to content

Edo primitives

Rémi requested to merge edo into dev

To remember

For EDO, we needed linear pattern matching for tuple/record, and (for users sanity) deep tuple/record destructuring. The abstraction pass handle that, but this MR do not introduce deep pattern matching even if the code is ready. Bellow a few TODOs to get it done properly:

  1. move patterns handling later in the pipeline (around sugar). Function conv is the only thing that would remain in src/passes/04-tree_abstraction/cameligo(pascaligo/cameligo)/compiler.ml and a new case for match_patterns must be added (and conserved for a later pass)
  2. tuple destructuring at top-level should be deprecated (for now, the previous implem is kept only for top-level)
  3. add support for Variant destructuring (should be very easy)
  4. get-scope support for tuple-destructuring (and later deep pattern matching)
  5. see with serokell to update their parser (looks like destructured records are not parsed correctly)
  6. see with @rinderkn if there is a way to get {a ; b} == { a = b ; b = b } (kinda nicer to write)

Still left:

  • DOC
  • not sure how to translate sapling types
Edited by Rémi

Merge request reports

Loading