shithub: mc

ref: ad3da8e78225fcd945766edbb9bc97a24083b8e1
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)
	suicide()
}

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