Avoid using flat structure for `DocItemPosition`s set
Clarification and motivation
It so happened that some Morley users need to gather multiple repositories under one project to provide some tooling. And here they face a problem because if different contracts define custom doc items with the same DocItemPosition
, then using those contracts in the same code won't be possible.
A proposed solution is to make DocItemPosition
not of Nat
kind, but some more complex one.
Here there is a demo solution.
Acceptance criteria
Contracts can declare guarantely unique DocItemPosition
s.
The solution has to comply with the following properties:
- A small amount of boilerplate.
- Items appear in a predictable order.
- The resulting order can be well-configured. E.g. it would be nice to ensure that the user can put his doc items either before or after doc items defined by Morley, depending on what he wants.
Edited by Konstantin Ivanov