shithub: mc

ref: ea3ae1c8e5d7daf59061e0fc194b1f0ad5ba1609
dir: /libstd/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)
	kill(getpid(), 6)
}

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