shithub: mc

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

View raw version
use "syswrap.use"
use "types.use"

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

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

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