now has type Int64, but it is code-genned into ssm_now(). This means that even though it looks like a variable, it does not behave like one, in that its value depends on the instant in which you evaluate it.
@@ r is our syntax for last r.
Both of these primitives return Int64, which is not really a type we've used or tested at all. Right now I use ssm_new_time() to allocate them onto the heap (so that we still get an ssm_value_t handle to them, but sslang doesn't actually provide any way to read them directly. We'll use the cquote stuff to hack in some primitives, but until we have type classes/proper operator overloading, using == and < etc. on times just won't typecheck.
But damnit I need these primitives, so Landin forgive me I will merge this without review.
Doing so in the hackiest possible way...
Super quirks:
now
has typeInt64
, but it is code-genned intossm_now()
. This means that even though it looks like a variable, it does not behave like one, in that its value depends on the instant in which you evaluate it.@@ r
is our syntax forlast r
.Both of these primitives return
Int64
, which is not really a type we've used or tested at all. Right now I usessm_new_time()
to allocate them onto the heap (so that we still get anssm_value_t
handle to them, but sslang doesn't actually provide any way to read them directly. We'll use the cquote stuff to hack in some primitives, but until we have type classes/proper operator overloading, using==
and<
etc. on times just won't typecheck.But damnit I need these primitives, so Landin forgive me I will merge this without review.