This is a toy programming language meant to practice some new topics for me:
- Implementing programming language in Rust from scratch
- Bidirectional type checking
- Algebraic effects
- [*] Higher-kinded types
- [*] Linear types
[*] This topics might be excluded from the project if they won't match with other features or making it too complex to KISS.
Comparing with my primary project -- Jacy which I got stuck with because of initial complexity (it's about 20k sloc but even type check is not done yet 😪), in Impact I'm trying to go with KISS from start to the end, even considering the fact that I'll try to cover so many topics.
This list contains all reference I used to implement different stages and features.
Of course, I've needed Rust documentation along with rustc
internals (rust is the best large programming language which source code I can read and even understand something)
- "Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism" (PDF) and its implementations
- Haskell version by Zehao Chen / zehaochen19. Pretty implementation of basic programming language with bidir as typeck algorithm.
I began this project with one main point in development -- KISS, but no external tools were used which would help me with, for example, parsing. The reason is that I wanted to try Rust as a replacement for C++ that I used in Jacy. Right now, writing this, I'm implementing type check, parser stage is mostly done and the only thing I want to say about using Rust as a programming language for compiler development is that it's freaking amazing. Really, I feel so good with it, I would rewrite Jacy in it.