elixir icon indicating copy to clipboard operation
elixir copied to clipboard

Set-theoretic types: inference of all language constructs

Open josevalim opened this issue 5 months ago • 0 comments

Major milestones:

  • [x] Tracking of variables
  • [x] Type inference of patterns
  • [ ] Type inference of guards
  • [ ] Type inference for function application and function definition
  • [x] Type inference of return types

This is a more granular break down of what needs to be done:

  • [x] Map and struct updates
  • [x] Checking of all inlined functions from Kernel
  • [x] Checking of all inlined conversion functions
  • [x] Checking of __STACKTRACE__ and raising functions
  • [x] Support for local calls
  • [x] Support for remote calls
  • [x] Support for __info__, module_info, and behaviour_info
  • [x] Typing of :erlang inlined functions
  • [x] for comprehensions
    • [x] generators
    • [x] :into
    • [x] :reduce
  • [ ] with comprehensions
  • [x] Detect never matching clauses and patterns (cond, case, try)
  • [ ] Track precision in case and inferred clauses to perform elimination
  • [ ] Detect overlapping clauses (case, receive, try, reduce)
  • [ ] Exhaustiveness checks (case, try, cond, reduce)
  • [x] Unused clauses in private functions
  • [x] Tracking of mismatches in equality operators
  • [x] Tracking of structs in ordered comparison operators
  • [x] Move compile.protocols to parallel compiler
  • [x] Type checking of protocol dispatch
  • [x] Type checking of impls
  • [x] Storing of inferred types in .beam files
  • [ ] Infer based on all loaded applications
  • [ ] Infer all Elixir modules at once

This was extracted from #13227 and will be followed up by #13881.

josevalim avatar Jun 06 '25 06:06 josevalim