mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
3429ec24cc
* Normalize struct field order in the LF spec. This commit changes the LF spec to ensure that struct field order is ignored whenever reasonable. * Rename "type synonym resolution" to "type normalization", and change the rule for structs to also normalize the order of fields. * Make the struct type "well-formed" only if the struct fields are sorted by field name. (This matches the way "well-formed" is only used for normalized types. E.g. type synonyms are not considered "well-formed" by the spec. This nomenclature should possibly be fixed in a separate PR.) * Change the struct con expression type rule accordingly. * Change the definition of a struct value. A struct value is now a struct expression where all the field expressions are values, and all the field names are sorted. * Change the evaluation rule for struct expressions to also sort the fields by field name in the process. As far as I know, this spec matches the behavior of the LF engine. I also tried to make the treatment of struct field order in the types match the treatment of struct field order in expressions (i.e. normalized structs always have sorted fields, but non-normalized structs do not). changelog_begin changelog_end * Apply suggestions from code review Co-authored-by: Remy <remy.haemmerle@daml.com> * Update daml-lf/spec/daml-lf-1.rst Co-authored-by: Remy <remy.haemmerle@daml.com> |
||
---|---|---|
.. | ||
contract-id.rst | ||
daml-lf-1.rst | ||
transaction.rst | ||
value.rst |