Zilliqa / scilla

Scilla - A Smart Contract Intermediate Level Language
https://scilla-lang.org
GNU General Public License v3.0
241 stars 78 forks source link

Preferred style of comparing types #774

Closed anton-trunov closed 2 years ago

anton-trunov commented 4 years ago

E.g.

match ts with
| [ PrimType Bnum_typ; PrimType (Uint_typ _) ] ->

vs

match ts with
| [ s; u ] when [%equal: typ] s bnum_typ && is_uint_type u ->

See the discussion here: https://github.com/Zilliqa/scilla/pull/771#discussion_r375927045

anton-trunov commented 2 years ago

Looks like with the introduction of subtyping checks this issue is not that relevant anymore.