Coding 2024-12-25
Okay, I got kind of distracted thinking about the surface syntax today, so I didn't make much progress in the direction that I wanted. To try and get something done today, I'm going to go through the target compilation flow I think I'm going for.
- Write source code in Impliciula.
- Parse to high-level AST.
- Desugar AST.
- Generate type constraints and resolve all constraints with z3. (Is this going to be multi-pass or otherwise incremental?) (Wait, maybe there's a SAT-solver in Rust that I can just use directly?)
- Possibly do a few more AST transformations, until we get to something with a mostly limited vocabulary.
- Do What It Takes to convert that to LLVM IR.
Now, even given the amount of slop and slack in all of that, I feel like the right way to proceed is to make sure that the end steps can even happen. So, the proper stuff to focus on is extending System Fω until it has the capabilities I want (several new kinds of type, as well as a few new kinds of expression), somehow taking care to avoid breaking the desirable properties of System Fω. From there, I can construct modules, and higher-level syntactic sugar.
As to how to extend System Fω, my plan right now is to write down my goals so I can refer to them later, and then, um, teach myself the relevant aspects of CS so I sort of know what I'm doing. We'll see how this goes. Later.
Good night.