Since the type checker sucks less now, we can think about maybe
adding some features to the language.
...At some point I'd like to have the type checker clean up
the index map.
- Renamed "intrinsic" -> "primitive"
- I thought it was funny, but it's just annoying.
- Rename "Uninferred" -> "Inferred"
- It's a concrete type, but an inferred one.
- Add lifetimes to the Entry API
- Categorize does not care about recursive types. You can't have a recursive AST.
- Added helpful constructors to the inference engine
- Added some overloadable operators to the inference engine
- These are a MAJOR work in progress
- Reorganized the Inference implementation file by functionality.
stdlib:
- Updated standard library.
- Function bind is now one Pattern
- TyRef now allows &Ty (i.e. &[i32], &(char, bool)
- Range patterns (they cannot bind, only check whether a value is in range
- ArrayRep repeat has been reverted to usize, for now, until early consteval is implemented.
cl-ast: No more bare ExprKind: every Expr has a Span
cl-interpret: Give errors a span
cl-repl: Print eval errors in load_file, instead of returning them. These changes are relevant.
This breaks out the pattern matching/unification algorithm from cl-interpret/interpret.rs to cl-interpret/pattern.rs
TODO: pattern destructuring in const, static :^)
- Patterns are no longer parsed with the highest precedence
- Function calls with just a path and a tuple of args can now be transformed into a Pattern
- Deny arbitrary paths in patterns (only one non-keyword identifier allowed!)
- Allow patterns in for-loop binders (literally useless atm, but it's a step toward making patterns the only way to bind names.)
Next: Functions, Tuple Struct Patterns... And solving the stupid syntactic ambiguity of structors.