shithub: mc

ref: 515b8e89c1a6c0859eaefbf7835a4e6497a57e0b
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)
	;;
}