add panic.nix and assertions to type checks

This commit is contained in:
Emile Clark-Boman 2025-12-14 22:41:17 +10:00
parent fd008cd2e1
commit ea01dcc827
5 changed files with 44 additions and 25 deletions

4
nib/panic.nix Normal file
View file

@ -0,0 +1,4 @@
{...}: {
badType = expect: x:
throw "Expected type ${expect} but got ${builtins.typeOf x}.";
}