Notes: 14 September 2026

Mon 14 September 2026

Filed under Posts

Tags weeknotes

Hello again. It's been a few weeks, so I'll post this on a Monday this time... I took some time off which turns out to have been a really good idea, then did some other bits and pieces. But it's time to get cracking on the new Idris properly now. Research leave has started! Hooray! This week, I've started porting unification over to the new core. Some reminders of the main things that are new, as much for myself as anyone else:

  • The intention is to have a new architecture that is much more interactive. So, rather than being based on loading entire files at a time, we're processing a definition at a time and keeping track of what needs rechecking at a much finer granularity.
  • Case trees and local definitions (that is, things defined in where blocks) are part of the core now, not always lifted to the top level. This was a hack that was convenient for Idris 2, but is limiting in quite a few ways. e.g. for reasons I won't go into here it means that let bindings behave in ways that might be surprising.
  • We use a glued representation of values, which, in short, means that during conversion checking and unification we have more control over when subexpressions get evaluated (in short: only when they need to be).
  • I'm rethinking surface language features that seemed a good idea at the time. This means that (sorry everyone) I'm not taking backwards compatibility into account.
  • I'm remembering that I'm primarily an academic researching what is possible and investigating how to program with expressive type systems, and not here to make a product! So if that means I need to break something, so be it.
  • I'm still not using LLMs, whatever anyone says. Despite everything, I still believe that almost all uses of LLMs can be achieved better and cheaper by the surprisingly underrated technique of "thinking a little bit". If you disagree, good for you. If I'm wrong, they'll still be there when I'm ready and if they're as good as you claim, I'll catch up in no time.

Anyway. I've spent what feels like forever experimenting with different ways of doing things. So it's definitely time to concentrate on making that thing, especially now I have time to think for a little bit!

Latest small observation (might have said this earlier but it's becoming more important): having local definitions as part of the core means that we need to keep track of them all over. Everywhere, we have an environment, which consists of the local variables (let bound, pi bound, lambda bound). Within that, there can be local function/data definitions, which I'm calling LocalDefs, that are indexed by the environment they're defined in. So why not make them part of the environment, wouldn't that be simpler? Well, no, sadly, because function and data definitions can be forward declared, to allow mutual definitions, and we want to be able to do that locally too. We still have a global context (called Defs containing definitions in an empty context). LocalDefs are tracked during elaboration and evaluation and can contain all the things Defs might contain, but in a potentially larger scope.

Anyway. That's enough thinking out loud for now. Back to the lambda mines.


Comments


Edwin Brady © Edwin Brady Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More