Coding 2025-07-10
I've worked out that probably the sensible formulation is to have some kind of "provenance" that I can bundle up with nodes, different classes for each kind of constraint that I've thought of, with a constructor that takes bundled nodes and operates on just the node data, to determine whether the constraint is violated. The problem is, I'm having trouble figuring out what the "provenance" should be, and what should be elided, and how.
I think part of the problem could be that I'm unsure whether making the AST more expressive would help. The problem there is that the plan has always been to compile down to this System F Omega stuff as a somewhat-intermediate representation, but until I have the higher-level data structures to compile down, the obvious way to construct these trees is going to be full-on artisanal.
In the interest of making things work, I'm going to try the following in the next few days:
- Come up with a stub string representation for all computation terms.
- Come up with proper string representations for all value terms.
- Actually, see if I can somewhat present useful information for computation terms.
- Create a union type to represent provenance.
- Create a parametric bundling type.
- Write the different constraint classes.
- Try to give the resulting data a somewhat human-readable presentation.
For now, I'm going to be getting ready for bed as quickly as possible, because I got distracted by Gentoo Rescue.
Good night.