Marco Maggi a écrit :
It seems to me that the standard library
interface to int32 numbers lacks a function
to test if an abstract is of that kind.

static value int32_p (value v)
{
  return (val_is_int32(v))? val_true : val_false;
}

I guess a k_kind val_kind would be needed, with apis such as :

static value int32_kind() {
        return alloc_abstrac(k_kind,k_int32);
}

Then a builtin $is_kind(k,v) that would test if a value is of the given abstract type or not.

Nicolas

--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to