shithub: mc

ref: fc03d6189b22d17ac7554ac3de5ab5d47f7d0030
dir: /libstd/die.myr/

View raw version
use "syswrap.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)
	;;
}