Closed thomasvergne closed 6 months ago
A problem was issuing with type extensions: the generated code lacked forward declarations, as it needed mutual function calls (introduced and due to closure conversion step). To resolve such an issue, we moved to a labeled representation of the bytecode to better generate it afterward by resolving labels into virtual memory addresses.
The current Plume type-system contains unsound inference rules, especially with its extensions' system. It has some issues during resolving instances with generics.
To counter this issue, a new type-extension system should be introduced, a system like the Haskell one, which could enable fully sound inference and type checking on Plume. This comes with completely new syntax for extensions.
Such a system would inherit from Haskell's one, meaning it would introduce new syntaxes changes such as the
interface
keyword, which would be used to define a Haskellclass
equivalent, and theextends
keyword on type-generics to specify which interface should the generic inherit.The new syntax should look like that: