Clarify the contents of Michelson references
There are two Michelson references today:
- a static one, that provides details about the place, the purpose, and the inner workings of the language in the blockchain;
- an interactive one, where searching for an instruction or a type is made very convenient, and the results are ergonomically displayed.
However, these two references also share a lot of the same contents, such as the description of types and instructions, their typing and semantics rules.
As a consequence, this makes things harder for developers to keep both references up-to-date, since they often have to replicate changes from one of them to the other.
One way to solve this is to explicit the role of each reference, and ensure that their contents are disjoint, by making them point to one another wherever needed.
Thus, we propose that the static reference contains:
- explanations about what is the Michelson language;
- how to read typing and semantics rules;
- examples of contracts;
- but not the details about each type and instruction;
and that the interactive reference contains:
- the exhaustive list of types and instructions;
- their typing and semantics rules.
This could be achieved following the steps below:
-
fix the continuous integration of the interactive reference, as this prevents us from updating it and it is thus blocking: michelson-reference#71 (closed); -
add a link from the interactive reference to the static reference to learn more about Michelson's purpose and where it fits in the blockchain: michelson-reference!68 (merged); -
temporarily add the description of typing and semantics rules directly in the interactive reference, because the syntax is not exactly the same in the static reference: michelson-reference!69 (merged). These descriptions in the interactive reference will be removed at the end, after we update those of the static reference once all instructions have been imported; - delete the parts about instructions from the static reference:
- one merge request per section (control structures, operations on unit, operations on booleans, etc.), to avoid a merge request that would be too big if it contained everything;
- by adding a link from the static reference to the interactive reference about this section;
- by opening merge requests in the interactive reference repository to complete whatever it is missing from the static reference;
-
Control structures !6816 (merged) -
Stack operations michelson-reference!70 (merged) michelson-reference!71 (merged) michelson-reference!74 (merged) !6843 (merged) -
Generic comparison !6904 (merged) -
Operations on unit !6981 (merged) -
Operations on type never !7144 (merged) -
Operations on booleans !6981 (merged) -
Operations on integers and natural numbers michelson-reference!76 (merged) !7150 (merged) -
Operations on strings michelson-reference!75 (merged) !7144 (merged) -
Operations on pairs and right combs !7753 (merged) michelson-reference!82 (merged) michelson-reference!83 (merged) -
Operations on sets !7358 (merged) michelson-reference!79 (merged) -
Operations on maps !7925 (merged) michelson-reference!85 (merged) michelson-reference!87 (merged) -
Operations on big_maps !8006 (merged) -
Operations on optional values !7703 (merged) michelson-reference!81 (merged) michelson-reference!86 (merged) -
Operations on unions !7790 (merged) -
Operations on lists !8107 (merged) michelson-reference!92 (merged) -
Operations on timestamps !7783 (merged) -
Operations on Mutez !7901 (merged) michelson-reference!84 (merged) -
Operations on contracts !8247 (merged) michelson-reference!95 (merged) michelson-reference!96 (merged) michelson-reference!98 (merged) michelson-reference!99 (merged) -
Special operations !8302 (merged) michelson-reference!104 (merged) michelson-reference!103 (merged) -
Operations on bytes !9426 (merged) michelson-reference!107 (merged) -
Cryptographic primitives !8900 (merged) michelson-reference!111 (merged) -
BLS12-381 primitives !8902 (merged) -
Sapling operations !9212 (merged) michelson-reference!116 (merged) -
Operations on tickets !8991 (merged) michelson-reference!113 (merged) michelson-reference!114 (merged) -
Operations on timelock !9563 (merged) michelson-reference!119 (merged) -
Events !9110 (merged) michelson-reference!115 (merged) -
Removed instructions !9884 (merged) michelson-reference!124 (merged) -
Operations on views !9800 (merged) michelson-reference!123 (merged) -
Macros !9890 (merged) -
and then, at the end, by removing all the links that were added this way and replace them with a unique one: !10353 (merged);
-
update the descriptions of typing and semantics rules in the static reference to match the syntax of the rules in the interactive reference (take care of michelson-reference#87 and remember to describe the contents of the typing environment at the same time); -
remove the descriptions of typing and semantics rules in the interactive reference and add links to the corresponding sections in the static reference; -
reopen !1721 (closed), an old merge request that was actually trying to solve the very same issue with pretty much the same strategy. Don't implement it, but close each thread by: - resolving the comment;
- or discarding it, if it is obsolete;
- or open a follow-up issue, if it needs more work to resolve;
-
verify that it also completes the checklist in michelson-reference#60. -
add a section in the static reference linking to sub-pages describing Michelson concepts such as (see !9994 (comment 1566883645)): -
Sapling -
Timelock -
Views -
Tickets -
Events -
Global constants
-
Edited by Nicolas Ayache