Bend icon indicating copy to clipboard operation
Bend copied to clipboard

Implement type system for Bend

Open kings177 opened this issue 6 months ago • 2 comments

#615 describes the need for having a type system for Bend as well as the design discussion of how this system should be.

This issue tracks the implementation of the bend type system.

  • [x] Compile bend programs to kindc, deferring type checking to kind.
  • [x] Study the implementation of Hindley-Milner type systems.
  • [x] Search for extensions and alternatives to HM that could allow for a less restrictive set of accepted lambda terms.
  • [x] Implement a simple HM type system with type inference.
  • [x] Add recursion to the type system.
  • [x] Add adts to the type system.
  • [x] Add mutual recursion to the type system.
  • [x] Port the type system from haskell to rust.
  • [x] Port the implemented type system to Bend.
  • [x] Add the Bend-specific types to the type system (numbers, tuples, None).
  • [x] Add type checking, comparing with user provided annotations.
  • [x] Add non-checked functions.
  • [x] Add the untyped type Any.
  • [x] Write good type error diagnostics.
  • [x] Update the builtin library to use the new type system correctly.
  • [x] Write tests for type inference and type checking.

kings177 avatar Aug 19 '24 23:08 kings177