add panic.nix and assertions to type checks
This commit is contained in:
parent
fd008cd2e1
commit
ea01dcc827
5 changed files with 44 additions and 25 deletions
4
nib/panic.nix
Normal file
4
nib/panic.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{...}: {
|
||||
badType = expect: x:
|
||||
throw "Expected type ${expect} but got ${builtins.typeOf x}.";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue