typechecking individual cell blocks
Currently cell-blocks just accept an attribute-set of anything, explained in the following comment: https://github.com/divnix/std/blob/3335a48d421604093e5e48527e870973d9735511/src/validators.nix#L112-L118
We should explore ways that we can eliminate infinite recursion here. builtins.genericClosure perhaps?
If we can make this work, this would be really nice to establish something more than just "gentlemen's agreement". I haven't had genericClosure on my screen as a potential mitigator...
Adding typeCheck to each Cell Block Type and start failing hard and early, would be awesome.
genericClosure is essentially the only way to do efficient (as in, doesn't eventually overflow) recursion in Nix, since it uses C++ primitives under the hood instead of an ever growing functional call stack. Not sure or not yet if it would also allow an escape hatch for us here, as it's usage is fairly complex and I'm not sure I fully understand it yet.
I have a good reference use case stacked away here (for study): https://github.com/divnix/POP/commit/bcef37270dcd8becfcd67ad20bf1b2555f008cf6
First step underway: https://github.com/paisano-nix/core/pull/3