shithub: mc

ref: f762f96f07cf2dfc7b3bb745d6a767dccda0a01a
dir: /lib/std/die.myr/

View raw version
use "syswrap"
use "types"

pkg std = 
	$noret const die	: (msg : byte[:] -> void)
	pkglocal const iassert	: (cond : bool, msg : byte[:] -> void)
;;

const die = {msg
	write(2, msg)
	suicide()
}

const iassert = {cond, msg
	if !cond
		die(msg)
	;;
}