I think lowering vars to db indices works now
hir2 lowering and var conversion is slowly coming together and even might work properly!
ok I have some meaningful tests for de bruijn index lowering now
Have I finally come up with a construction that doesn't make me cry?
Ok I'm still procrastinating about de bruijn indices. Not sure what to do about this.
grmbl grmbl symbol tables
ok I still think this will work
Puttin' more work into avoiding standard de bruijn index construction Mostly to prove I can
Hokay starting to remember wtf I was doing
Ok we now give lowered variables indices We MIGHT even do it correctly!
resolving names into de bruijn indices is the worst kind of problem: uninteresting, meticulous and difficult. Welp, I tried.
Ok I just ripped a bunch of type ambiguity out of hir2 and *hnnnrg* does it feel good. So it should now be *very clear* where type abstraction and type application occurs, and where type variables are declared. And nothing new is broken, as far as I can tell! Next up I think it's time to stuff a symbol table into the HIR2 lowering process, properly translate vars to indices, and then we can start evaluating shit.
oh actually compiling first is a good idea
Slowly refactoring kinds into actual arg lists
Continuing along with eval_type() Still not sure where to fit unification into this, it's a little sticky. I think eval_type() creates my unification variables and then quote() or type_equiv() or type_of() just resolves them. I think it's time to RIP AND TEAR my existing type infra though, which will hella sting. Maybe I can just duplicate it in parallel still?
Ok I think I've broken it down to a test case to start on unification
Ok it's time to think Hard about unification vs bidi I think I'm going to try out unification. reconstruct() is basically quote() and having eval_type() be able to introduce unknowns which normalize() or something then tries to eliminate Feels Right. I already have a type_equiv() function that is essentially used wherever the old type checker would use unify()...
Gnawing on the boring parts of the NbE typechecker
Refactoring out HIR2 lowering and thinking about names/indices.
already have an interesting problem ig