May change the interface to use typeclass lua_value.