shithub: mc

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