quint
quint copied to clipboard
The parser and type checker allows declaring state variables and constants with operator types
E.g., from the repl
>>> var opervar : (int) => str
>>> const operconst: (int) => str
I don't think we're meant to allow operators as 1st class values. If I'm not mistaken, this can be ruled out in the syntax. But would it be better to catch it during type checking in terms of user errors?
Yes, this could be done by the type checker.