scilla icon indicating copy to clipboard operation
scilla copied to clipboard

Make `ScillaIdentifier` module `Comparable`

Open jubnzv opened this issue 3 years ago • 3 comments

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.

jubnzv avatar Aug 17 '22 12:08 jubnzv

Since identifiers contain extra information, like locations, we should decide if the Comparable implementation should just ignore that part.

anton-trunov avatar Aug 18 '22 07:08 anton-trunov

There is some attempts to implement something like this here: https://github.com/Zilliqa/scilla/blob/55f1b64dba4db9096acea243e0e71aaa3029d3aa/src/base/Type.ml#L89

anton-trunov avatar Aug 18 '22 13:08 anton-trunov

Moving to Scilla 0.14.0.

jjcnn avatar Oct 17 '22 11:10 jjcnn