shithub: mc

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