Open
Description
-
Proper trait and struct scoping
- Need proper namespecing, i.e. stop ignoring IdentifierPath's NodeId
- Resolve only traits that are in the current scope
- Keep a higher-level all-in-one collection of traits, to help identify what to
use
-
Impl rework
- Merge trait and struct impl into one generic method-collecting
- Have a unified way to get a trait method and a struct method
This implies that we need a real TraitSolver mechanism, like Chalk
-
Type rework
- Subtyping
- Change State to have TypeId instead of Type
- Have a map of TypeId=>Type inside the state
- Have also a map of TypeId=>TypeId
- And a map from TypeId=>TraitId for trait bounds
- Add a solving phase where
- We consider subtyping when resolving
- Same for trait bounds
- Trait bound
- Change the syntax of traits to accept bounds
- Add a check for every impl if the bounds are respected
- Optional signature for fns
- Reimplement optional type-signature to force a type for a fn #155
- Have a pre-check of a sig to know if they need to have the stack-based constraint
mechanism applied to it (in case of a generic or bound type somewhere) or if
they can be infered right away and put out of this aforementioned mechanism
- Signature bound
- Add a bound for trait applied to generics at the begining of the sig
- When constraining, add bounds to TypeIds that propagate when solving
- Subtyping
-
Struct generics
-
Enums (and generics)
This thread's purpose is to create, organize and track issues realated to the work needed to
release v0.5.0. For this release we aim to have a real proper type system with a real proper inference
system.
The checklist above is meant to be edited at any time to add, amend or complete listed tasks.
Sections that have a good enough planification will be transformed into issues for dispatch and development.
Feel free to pop in to comment and propose any improvement.