To do
May 9, 2021 ยท View on GitHub
Type system features
minimal subset with 2-tuples as only basic type subtypeframework for handling subtypes of multiple basic typestuples of arbitrary fixed lengthclosed records without optional fieldsrecursionfunctions of one argumentrepresent multiple function arguments using tuplesrecursive function typesstring singleton typereadonly typerest field for tuplesall of any basic typeopen records- readonly record fields
- optional record fields
boolean singleton typeinteger singleton typeinteger subtypes with specific width/signedness- float singletons
- decimal singletons
- objects (without member qualifiers or object qualifiers)
- typedesc subtypes
- future subtypes
- stream subtypes
- table type without keys
- table keys
- distinct object types
- public, private object member qualifiers
- client, service remote qualifiers
error detail subtypes- distinct error types
- string:Char type
- xml subtypes
- isolated qualifier
- transactional qualifier
Other things
- Implement concept of a module (collection of mutually recursive named definitions)
- Conversion from SemType to JSON representation
- JSON syntax for varargs functions
- JSON syntax for difference and/or complement
["!" T]or["-" T1 T2] - Support Ballerina syntax for types (start with a subset)
- One of the subtype tests creates >600 BDDs: we should understand why and try to reduce it
- Use isolated in core and json modules
- Make use of Ballerina's data-driven test feature
- Add JSON
["?" T]meaning["|", T, "()"] - Extend to provide error messages for subtype failure
- I suspect we have a problem with a function return type of
never - Move desugaring of multiple function arguments into core
- Maybe use
nullinstead of"nil"to represent nil type in JSON (for consistency withtrue,false) - Better to make TypeCheckerContext be an object