scilla
scilla copied to clipboard
Make `ScillaIdentifier` module `Comparable`
The ScillaIdentifier module is often used as a key of Map and Set collections, so it must implement functions defined in the Comparable functor. Because of this we create an extra wrapper module in every of this cases, for example here.
It will be convenient to implement Comparable functions once in the ScillaIdentifier and just use it when needed.
Since identifiers contain extra information, like locations, we should decide if the Comparable implementation should just ignore that part.
There is some attempts to implement something like this here: https://github.com/Zilliqa/scilla/blob/55f1b64dba4db9096acea243e0e71aaa3029d3aa/src/base/Type.ml#L89
Moving to Scilla 0.14.0.