configury: fix a typo in local.mk.

* local.mk (doc/.ldocs): Move misplaced close paren to the
correct position.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
lib: Add Lua API for argument checking.

* lib/zile/lib.lua (argerror): New function. Equivalent to
luaL_argerror.
(argcheck): New function. Equivalent to luaL_argcheck.
(argcheck): New function. This is where the heavy lifting
happens, and mismatches between expected and actual argument
types are found and diagnosed.
(iscallable, recase, stack): Add LDocs.
* build-aux/config.ld.in (file): Add lib.lua.
* local.mk (dist_modules_DATA): Add generated zile.lib.html.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Array: ensure cloning existing arrays works correctly.

* lib/zile/specs/Array_spec.yaml (__call): Redo the specifications
to ensure cloning an existing array copies elements correctly.
Use a more `alien.array` like API for instantiating new arrays.
* lib/zile/Array.lua (_init): Implement new API to meet new
specifications. Use lib.argcheck to check argument types.
(copy): New private helper function.
(setlen): Rename from this...
(realloc): ...to this, for consistency with alien.array APIs.
Manage array.used field from here.  Use lib.argcheck.
(push): Simplify. Use lib.argscheck.
(pop, __index, __newindex): Simplify.
(__tostring): New function. Return a string that will recreate the
array if passed to Lua load().

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Array: add a set method.

* lib/zile/specs/Array_spec.yaml (set): Specify a new method to
set a contiguous block of elements to a given value.
* lib/zile/Array.lua (set): Implementation to meet specs.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>