elixir
elixir copied to clipboard
Set-theoretic types: type definitions
This refers to second and third milestones of Elixir's type system. It is a continuation of #13227 and #14558 and can only be started once they are completed.
New constructs and APIs will be added to Elixir:
- [ ] Define a construct for typed structs (field documentation, parametric definitions, private fields)
- [ ] Define a construct for type aliases
- [ ] Define a construct for type signatures
- [ ] Define a construct for typed behaviours
- [ ] Define a construct for typed protocols and implementations
- [ ] Parametric protocols
- [ ] Dispatching based on output type
- [ ] Define a construct for Erlang FFI
Implementation:
- [ ] Module-local inference of private functions based on callers
- [ ] Occurrence typing via reverse arrows
- [ ] Strong arrows
At the descr-level, we need to support:
- [ ] Recursive types
- [ ] Parametric polymorphism
- [ ] Anonymous function call inlining
- [ ] Augment type inference to also consider parametric types
- [ ] Recursive types in for-comprehensions' reduce
- [ ] Row polymorphism
- [ ] Behaviours
- [ ] Witness generation / property based testing