Has anybody seen a type checker for STLC, or even better, a CoC, that uses (in part) something like pull parsing for dealing with ASTs? xmlpull.org/history/index. Super curious about if it could reduce memory allocation overhead for certain parts of the type checker. 🤔
Conversation
I'm interested in both the performance of type checking, but also in allowing for flexibility in the user-facing syntax vs serialization format - and even in projectional/nodal editing later on. Visitors seemed like an interesting option too: lihaoyi.com/post/ZeroOverh
1
1
I'm guessing you'll need places where you allocate trees of nodes as 'checkpoints' but it'd be nice to reduce that as much as possible. It would be also neat to design the core calculus in such a way that is amendable to streaming, but I've got no idea how to do that. 🤔
2
Look at nanopass crazy stuff in chez scheme
1
1
Replying to
Yeah I've seen Nanopass! Do they cover ways of fusing passes so that you don't have to allocate intermediate data structures?
Replying to
Yes. At least as done in the chez scheme compiler edition of it. You’ll wanna poke at both.
Point being emphatic yes ;)
It’s pretty nutty
1

