shithub: mc

ref: 3c9502102b2b01d6b32dad5f4f23f6f1fe736721
dir: /libstd/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)
	;;
}