add trivial.warnIf

This commit is contained in:
Emile Clark-Boman 2026-01-15 13:34:02 +10:00
parent 8c57b7d2d3
commit f6c33420ea

View file

@ -1,4 +1,9 @@
{...}: {
{...}: let
inherit
(builtins)
warn
;
in {
id = x: x;
min = x: y:
@ -10,4 +15,9 @@
if x > y
then x
else y;
warnIf = cond: msg:
if cond
then warn msg
else x: x;
}