[#513] Custom generics for ligo
Description
Problem: LIGO's default layout applied to product and sum types is currently not supported by us, and whenever we want to keep Lorentz and LIGO contracts on par we have to achieve that manually.
That layout is relatively optimal: the resulting tree is balanced, however e.g. 9
fields will be distributed as 8 fields in left total subtree and 1
field in right subtree; so it's worth trying it and see how this impacts our real contracts.
Solution: adjust our customGenerics
to be able to sort fields alphabetically as necessary for LIGO's layout, add support for their way of building tree of pairs/ors.
Add GenericStrategy
-ies specifically for LIGO's commonly used layouts.
Related issue(s)
Resolves #513 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Konstantin Ivanov