shithub: mc

ref: c827bfd2eb941cfdccf9cb2a1b6e50c24af5049e
dir: /libmyr/die.myr/

View raw version
use "sys.use"
use "types.use"

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

const die = {msg
	write(2, msg)
	kill(getpid(), 6)
}

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