shithub: mc

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