Mon 26 October 2026

Filed under Posts

Tags weeknotes

Continuing on the surface language constructs. Still finding some surprising bits of complexity. Idris 2's implementation was very much "move fast and break things" which sort of made since because I needed the thing running, but that means, well, you can tell when looking at the implementation. So this time it's more "move slowly and understand what you're doing".

Here's a little detail that Idris 2 gets wrong, and I don't know if anybody has actually noticed, but could be the source of some confusion if you write something just the wrong way - I've just been implementing the elaborator for variables, something you'd think would be simple, because you check if it's defined locally, then check if it's defined globally, then if it's neither, report an error. But "locally" could mean one of two things: is it in the environment (pattern variables or lambda, let, or pi bound things) or is it a locally defined function (e.g. in a where clause, or a local pattern matching definition). So Idris first looks for local definitions, then in the local environment, then globally. While this'll get the right answer most of them time (because hopefully you're not using the same name for a local function definition and a local variable) you could contrive something that makes it not do the right thing (because if you want to write something odd, or indeed have a machine generate something odd, the compiler should support you!)

Anyway. The fix is simple: keep track of the order names are defined so that when you encounter a name, you know where to look. It'd be really annoying to do this fix in Idris 2 (for reasons I won't go into here) but fortunately this time, it's no big deal.

Comment

Mon 19 October 2026

Filed under Posts

Tags weeknotes

I see I'm a bit behind here. Hello again. I've spent the last little while working on a parser for the surface language, and the structure of the elaborator and some of the machinery that entails. A lot of this has involved trying to remind myself how Idris 2 itself …

Read More

Mon 21 September 2026

Filed under Posts

Tags weeknotes

Last week was largely spent doing some plumbing to get the unification working. Thankfully it's pretty much as before, except that we need to keep track of local definitions as well as everything else, just so that we have the whole context if we encounter a unification problem that's stuck …

Read More

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 …

Read More

Fri 31 July 2026

Filed under Posts

Tags weeknotes

This week, work on conversion checking in LTT3 and progress towards unification. Conversion checking turns out to be pretty much the same as before, Unification is a bit trickier because unification problems can be suspended pending further information (like, other metavariables being unsolved means that we may need to postpone …

Read More

Fri 24 July 2026

Filed under Posts

Tags weeknotes

Been a few weeks, sorry! Partly been on the road, partly taking a bit of a break because it's been just too hot. So, just briefly: progress on the new core (currently going by the name LTT3 and I can't even remember why but I'll stick with that as a …

Read More

Fri 26 June 2026

Filed under Posts

Tags weeknotes

I don't really know why I'm doing this, but I'm trying emacs again. I used to use it all the time, but in 2012 I switched to vim for a month and I'm still there. The lure of the Idris mode in emacs is perhaps too much, and experience so …

Read More

Fri 19 June 2026

Filed under Posts

Tags weeknotes

Not much to say this week really, just that I went to a workshop in Bonn on Mathematics, Formalisation and AI while continuing to fiddle about with the new Idris core and evaluator.

The workshop was interesting in lots of ways, with lots of exciting possibilities discussed. Though it was …

Read More

Fri 12 June 2026

Filed under Posts

Tags weeknotes

More work on the evaluator in the new core. It's interesting how much needs to be done to support local definitions, and thinking about laziness, of weakening and evaluation of let blocks. Why? Firstly: the context, which we pass around everywhere, now contains definitions in the local scope, and not …

Read More

Fri 05 June 2026

Filed under Posts

Tags weeknotes

A two week update this time, simply because last week and this things happened that meant I didn't make much progress on the things I want to write about here. Not bad things, just... Things :). PhD progress reviews, family visits, curriculum planning, that sort of thing. And it's still maybe …

Read More

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