2015-03-08  Gary V. Vaughan  <gary@gnu.org>

	Release version 41.2.0
	* NEWS.md: Record release date.

	configury: bump release revision to 41.2.0.
	* configure.ac (AC_INIT): Bump release revision to 41.2.0.
	* .travis.yml: Regenerate.

	io: don't leak extra results from implementation details.
	* lib/std/io.lua (dirname): Return parenthesised results from
	internal gsub calls to prevent unexpected additional values
	leaking.
	* NEWS.md (Bug fixes): Update.

	doc: don't tell LDoc that resulterror is called argerror!

	debug: deprecate `toomanyargmsg` for `extramsg_toomany`.
	* specs/debug_spec.yaml (extramsg_toomany): Add examples for
	correct behaviours of new api.
	* lib/std/debug.lua (toomanyargmsg): Deprecate.
	(extramsg_toomany): New function, satisfies specified behaviours.
	* lib/std/container.lua: Use extramsg_toomany api.
	* NEWS.md (New features, Deprecations): Update.

	debug: refactor and export debug.resulterror.
	* specs/debug_spec.yaml (resulterror): Add examples of behaviours
	for resulterror.
	* lib/std/base.lua (raise): New function factored out of...
	(argerror): ...this.  Adjust accordingly.
	* lib/std/debug.lua (resulterror): Rewrite over base.raise.
	Move out of _DEBUG.argcheck guard.
	Export as resulterror.
	* NEWS.md (New features): Update.

	debug: export formaterror as extramsg_mismatch.
	* specs/debug_spec.yaml (extramsg_mismatch): Add examples for
	correct behaviours of extramsg_mismatch.
	* lib/std/debug.lua (formaterror): Rename from this...
	(extramsg_mismatch): ...to this.  Move out of _DEBUG.argcheck
	guard.
	(prototype, concat): Move above position of first call in file.
	* NEWS.md (New features): Update.

	debug: accept "bool" as a typename alias for "boolean".
	* specs/debug_spec.yaml: Add examples for behaviour when given
	"bool" in lieu of "boolean".
	* lib/std/debug.lua (formaterror, checktype): Accept "bool" as an
	alias for "boolean" in a type specification.
	* NEWS.md (Bug fixes): Update.

	debug: skip `self` typecheck when fname contains a colon.
	* specs/debug_spec.yaml (argscheck): Specify behaviours for colon
	delimited function name.
	* lib/std/debug.lua (argscheck): Drop `self` argument before
	checking types of remaining arguments when the function name
	contains a colon.
	* NEWS.md (New features): Update.

	debug: export a new function to parse type table.
	Close #91
	* lib/std/debug.lua (normalize): Rename from this...
	(typesplit): ...to this.  Move to outer scope, so it will be
	visible even if _DEBUG.argcheck is false.
	((markdots, permute, projectuniq): Move to outer scope.
	(parsetypes): New function.
	(parsetypes, typesplit): Export as public APIs.
	* specs/debug_spec.yaml (extendbase): Add parsetypes and
	typesplit.

	debug: improve argscheck patterns.
	* lib/std/debug.lua (args_pat, argscheck): Improve patterns.

	slingshot: sync with upstream, for git rockspec fixes.
	* slingshot: Sync with upstream.
	* stdlib-git-1.rockspec: Regenerate.

	debug: maintain stack frame depth parity with LuaJIT.
	* lib/std/debug.lua (getfenv): Be careful not to let the LuaJIT
	optimizer eliminate a stack frame, and mess up the depth count.

	slingshot: sync with upstream, for Lua 5.2.4 update.
	* slingshot: Sync with upstream.
	* .travis.yml: Regenerate.

	debug: adjust numeric args for getfenv wrapper for Lua 5.1.
	* lib/std/debug.lua (getfenv): When calling core getfenv from
	our wrapper, make sure to add one to numeric args to compensate
	for the extra stack frame.

2015-02-27  Gary V. Vaughan  <gary@gnu.org>

	debug: export portable getfenv and setfenv implementations.
	* specs/debug_spec.yaml (getfenv, setfenv): Add examples of
	behaviour of these functions.
	* lib/std/debug.lua (getfenv): Fix a bug that prevented
	unwrapping of functables on Lua 5.1 and LuaJIT.
	(getfenv, setfenv): Export as public APIs.
	* NEWS.md (New features): Update.

	functional: callable returns falsey for nil argument.
	* specs/functional_spec.yaml (callable): Specify correct behaviour
	for uncallable argument.
	* lib/std/functional.lua (callable): Don't raise an argument error
	for a nil argument, just return nil like any other uncallable.
	* NEWS.md (Bugs fixed): Update.

	functional: add examples to show reduce handling nil arguments.
	* specs/functional_spec.yaml (reduce): Add examples to show
	behaviours with nil arguments.

2015-02-27  Reuben Thomas  <rrt@sc3d.org>

	std/io.lua: adjust catdir's return to 1 value

2015-02-26  Gary V. Vaughan  <gary@gnu.org>

	functional: ensure map propagates nil arguments.
	* specs/functional_spec.yaml (map): Add examples to show
	behaviours with nil arguments.
	* lib/std/functional.lua (map): Detect iterator arity when
	collecting result table.
	* NEWS.md (Bug fixes): Update.

	functional: ensure filter propagates nil arguments.
	* specs/functional_spec.yaml (filter): Add example to show
	behaviour with nil arguments.
	* lib/std/functional.lua (filter): Detect iterator arity when
	collecting result table.
	* NEWS.md (Bug fixes): Update.

	functional: ensure collect propagates nil arguments.
	* specs/functional_spec.yaml (collect): Add examples to show
	behaviours with nil arguments.
	* lib/std/functional.lua (collect): Use npairs as a default
	iterator.
	Detect iterator arity when collecting result table.
	* NEWS.md (Bug fixes): Update.
	(Incompatible changes): Note change of default iterator.

	functional: ensure compose propagates nil arguments.
	* specs/functional_spec.yaml (compose): Add examples to show
	behaviours with nil arguments.
	* lib/std/functional.lua (compose): Simplify.
	* NEWS.md (Bug fixes): Update.

	functional: ensure bind propagates nil arguments.
	* specs/functional_spec.yaml (bind): Add example to show
	behaviours with nil arguments.
	* lib/std/functional.lua (bind): Simplify.
	* NEWS.md (Bug fixes): Update.

	std: new npairs and rnpairs iterators.
	* specs/std_spec.yaml (npairs, rnpairs): Specify correct
	behaviour for these new iterators.
	* lib/std/debug.lua (argpairs): Move from here...
	* lib/std/base.lua (npairs): ...to here.
	(rnpairs): New function.
	* lib/std.lua.in (npairs, rnpairs): Reexport from here.
	* NEWS.md (New features): Update.

	std: fix argscheck declaration for std.getmetamethod.
	* lib/std.lua.in (getmetamethod): This function works on anything
	the Lua can add a metatable to.  Adjust LDocs and argscheck
	declaration to support that.
	* specs/std_spec.yaml (getmetamethod): Adjust badargs parameters
	accordingly.
	* NEWS.md (Bug fixes): Update.

2015-02-26  Gary V. Vaughan  <gary@vaughan.pe>

	Merge pull request #96 from lua-stdlib/fix-require-version
	base: require does not work with non-string module version fields

2015-02-26  Gary V. Vaughan  <gary@gnu.org>

	maint: fix .gitignore problems.
	Close #97.
	* .gitignore: Some versions of git disallow !re-include inside a
	directory that has been excluded.  Add a trailing '/*' to support
	those versions.
	(/build-aux/config.ld.in): Re-include this source file.
	(/doc/config.ld): Remove exclusion of no longer generated file,
	now that config.ld is also kept in build-aux.
	Reported by Reuben Thomas

2015-02-25  Reuben Thomas  <rrt@sc3d.org>

	base: require does not work with non-string module version fields
	Simple fix: run “tostring” on the version field.

	It may be desired to refuse certain types. The motivating case here is
	that std.optparse has version set to number 0.

2015-02-06  Gary V. Vaughan  <gary@gnu.org>

	list: std.ireverse is not a full replacement for list.reverse.
	* lib/std/list.lua (reverse): Describe a full replacement
	with functional.compose in deprecation warning message.
	Reported by Reuben Thomas

2015-01-31  Gary V. Vaughan  <gary@gnu.org>

	maint: post-release administrivia.
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* ./local.mk (old_NEWS_hash): Auto-update.

	Release version 41.1.1
	* NEWS.md: Record release date.

	configury: bump release version to 41.1.1.
	* configure.ac (AC_INIT): Bump release version to 41.1.1.
	* .travis.yml: Regenerate.

	std: fix an infinite loop in std.barrel() with Lua 5.3.
	Close #94
	* lib/std/base.lua (maxn): This function is called from any
	function wrapped by debug.argscheck, which calls debug.diagnose.
	Calling std.barrel monkey-patches the global pairs function,
	so we can't call that from here, otherwise it will in turn use
	the monkey-patched pairs, which calls debug.diagnose to check
	for argument errors before the original maxn call has finished.
	Reported by Reuben Thomas

2015-01-30  Gary V. Vaughan  <gary@gnu.org>

	doc: add missing parameter LDoc for debug:markdots.
	* lib/std/debug.lua (markdots): Add missing LDocs for v parameter.

	maint: post-release administrivia.
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* ./local.mk (old_NEWS_hash): Auto-update.

	Release version 41.1.0
	* NEWS.md: Record release date.

	package: normalize leaves valid /../.. sequences unmolested.
	* specs/package_spec.yaml (normalize): Add examples of correct
	behaviour with multiple .. directories.
	* lib/std/package.lua (normalize): Detect redundant .. components
	correctly, and only remove them when it's safe to do so.
	* NEWS.md (Bug fixes): Update.

	slingshot: sync with upstream.
	* slingshot: Sync with upstream.
	* .travis.yml: Regenerate.

	configury: bump release version to 41.1.0.
	* configure.ac (AC_INIT): Bump release version to 41.1.0.

	table: new unpack method that behaves consistently across Lua versions.
	* specs/table_spec.yaml (unpack): Specify behaviours for unpack,
	especially when dealing with holes.
	* lib/std/base.lua (unpack): Wrapper for the core function, but
	defaulting the final index argument to table.maxn.
	* lib/std/table.lua (unpack): Export from here.  Add LDocs.
	* lib/std/debug.lua, lib/std/functional.lua, lib/std/list.lua: Use
	safer base.unpack.
	* specs/spec_helper.lua (maxn, unpack): Make safe versions
	available to spec examples.
	* specs/debug_spec.yaml: Simplify id implementation.
	* NEWS.md (New features): Update.

	debug: unpack to maxn (t) for equivalence between Lua versions.
	luajit alone stops unpacking at the first nil valued index, so
	we have to pass explicit limits to make it behave like Lua 5.1
	through 5.3.
	* lib/std/debug.lua (argscheck): unpack from 1 to maxn (results).
	* specs/debug_spec.yaml (argscheck): Adjust id implementation to
	calculate maximum numeric index and unpack all results up to
	that value.

	debug: support variant return type lists with argscheck.
	Sometimes we need to say `returns an int or nil,errmsg', the
	syntax is `=> int or nil, string`, because `=> ?int, string` will
	wrongly accept, say, `3, "oh noes!"`.
	* specs/debug_spec.yaml (argscheck): Specify behaviours with
	variant return type lists.
	* lib/std/debug.lua (argscheck): Parse all variants and add them
	to the accepted type list permutations table.
	Update LDocs.
	* NEWS.md (New features): Update.

2015-01-29  Gary V. Vaughan  <gary@gnu.org>

	refactor: store parameter dots property against each permuted list.
	Rather than deciding whether a typelist has continuation dots in
	the last position once for the entire table of permuted type match
	lists, add it to each permutation with continuation dots.
	* lib/std/debug.lua (markdots): Simplify.
	(permute): Call it for each new permutation row.
	(projectuniq): New function to select and de-deduplicate all
	values from the table of permuted type lists at a given index.
	(diagnose): Rewrite to work with new format permutations.
	(argscheck): Simplify accordingly.
	(match): Remove allargs parameter, and always check all arguments.
	(merge, HAS_DOTS): Remove. No longer used.

2015-01-28  Gary V. Vaughan  <gary@gnu.org>

	refactor: clean up maxvalues calculation in debug.argscheck.
	* lib/std/debug.lua (stripellipsis): Remove.
	(markdots): New function encapsulating stripellipsis, maxvalue
	calculation and optional normalization.
	(argscheck): Simplify accordingly.

	debug: argscheck supports return type checking.
	Close #89
	* specs/spec_helper.lua (badargs.result): Fallback implementation
	until next Specl release.
	(init): Use it to return a `badresult` function.
	* specs/debug_spec.yaml: Specifiy behaviours with return type
	checking.
	* lib/std/debug.lua (toomanyargmsg): Factor this...
	(toomanymsg): ...into this more general function.
	(M): Adjust accordingly.
	(resulterror): New function modelled after argerror, but tailored
	for result type mismatch error reporting.
	(has_dots): Symbol to name use of math.huge for denoting an
	ellipsis was stripped from the type list.
	(stripellipsis): New function.
	(diagnose): Refactored to take a vtable of arguments instead of an
	ever longer list of parameters.
	(argscheck): Build a vtable to call diagnose for argument type
	checking.
	Add another diagnose() with a separate vtable for result type
	checking.
	Update LDocs.
	* NEWS.md (New features): Update.

2015-01-27  Gary V. Vaughan  <gary@gnu.org>

	refactor: separate argscheck inner wrapper into its own function.
	* lib/std/debug.lua (empty): New function.
	(diagnose): New function...
	(argscheck): ...factored out of here.

2015-01-26  Gary V. Vaughan  <gary@gnu.org>

	tree: don't argcheck metamethods.
	Lua will not call metamethods unless the metatables are compatible,
	so don't waste time rechecking the argument types.
	* lib/std/tree.lua (__index, __newindex): Remove superfluous
	argscheck invocations.

	set: don't argcheck metamethods.
	Lua will not call metamethods unless the metatables are compatible,
	so don't waste time rechecking the argument types.
	* lib/std/set.lua (__add, __sub, __mul, __div, __le, __lt)
	(__tostring): Remove superfluous argscheck invocations.

	debug: more accurate too many arguments diagnostics.
	Close #76
	* specs/debug_spec.yaml (argscheck): Specify behaviour when
	arguments match by skipping bracketed optional parameters, but
	for one unmatched argument at the end.
	* lib/std/debug.lua (permutations): Rename function from this
	noun...
	(permute): ...to this verb.
	(argscheck): Use the matching permutation to decide whether
	too many arguments were passed, unless the last parameter has
	an ellipsis denoting any number of matching arguments are allowed.
	* NEWS.md (Bug fixes): Update.

	debug: process [final|parm|types] without nil substitution hack.
	* specs/debug_spec.yaml (argscheck): Specify behaviours for
	bracketed final parameter more thoroughly.
	* lib/std/debug.lua (argscheck): Remove hack of replacing
	brackets in bracketed last parameter by 'or nil'; we really
	run permutations without a bracketed final parameter now.
	(permutations): Simplify accordingly; we don't need all the
	sentinel gunk to track final argument nils now.
	(normalize): Simplify, and fix a related bug where nils could
	get dropped from the type list by a double increment.
	* lib/std/functional.lua (bind): This really is a '?any...',
	requiring explicit nils, and not a [any...] optional argument.
	* specs/debug_spec.yaml: Adjust badargs calls as necessary.
	* specs/io_spec.yaml (writelines): Now that this implementation
	is a step ahead of the current Specl release generator, manually
	write out bad argument examples.
	* NEWS.md: Update.

	debug: argscheck accepts bracketed final parameter.
	* specs/debug_spec.yaml (argscheck): Add examples for bracketed
	final parameters.
	* lib/std/debug.lua (argscheck): Handle bracketed final parameter
	and satisfy new specs.  Adjust all callers accordingly.
	* NEWS.md (New features): Update.

	debug: use trailing `...` instead of `*` with argscheck.
	* specs/debug_spec.yaml (argscheck): Add specifications for
	continuation argument behavious with `...`.
	* lib/std/debug.lua (argscheck): Use `...` instead of `*` as the
	syntax for optional repeats of the final parameter type.  Adjust
	all callers.
	* NEWS.md (Incompatible changes): Update.

	refactor: change `types` symbol name to `argtypes`.
	* lib/std/debug.lua (argscheck): Change `types` symbol name to
	`argtypes`.

2015-01-25  Gary V. Vaughan  <gary@gnu.org>

	debug: argcheck requires leading ? for argtypes, to match specl.
	Close #90
	* specs/debug_spec.yaml (argcheck): Change to leading `?` over
	previous trailing `?` style.
	* lib/std.lua.in, lib/std/container.lua, lib/std/debug.lua,
	lib/std/functional.lua, lib/std/io.lua, lib/std/list.lua,
	lib/std/math.lua, lib/std/package.lua, lib/std/string.lua,
	lib/std/table.lua, lib/std/tree.lua: Adjust accordingly.

	strbuf: document and test functional copying style.
	Close #85
	* lib/std/strbuf.lua: Improve LDocs.
	* specs/strbuf_spec.yaml: Add example of functional copying.

	strbuf: support lazy stringification and concat anything.
	* specs/strbuf_spec.yaml: Specify correct behaviours, and add
	lazy stringification example.
	* lib/std/strbuf.lua (__concat): Simply insert a reference.
	(__tostring): Make a table of stringified elements, and concat
	those instead of the object elements proper.
	* NEWS.md: Update.

	strbuf: allow concatenation of StrBuf objects.
	* specs/strbuf_spec.yaml: Specify new behaviours.
	* lib/std/strbuf.lua (concat): New function, handles concatenation
	of StrBuf objects as well as strings.
	* NEWS.md: Update.

	strbuf: deprecate strbuf.tostring.
	* specs/strbuf_spec.yaml: Specify deprecation messages from
	strbuf.tostring.
	* lib/std/strbuf.lua (StrBuf.tostring): Deprecate.
	* NEWS.md: Update.

	refactor: rearrange strbuf.lua idiomatically.
	* lib/std/strbuf.lua: Rearrange declarations idiomatically.

	maint: support strict mode.
	Close #92
	* lib/std/base.lua (loadstring): Use rawget to fetch loadstring
	from _G, to bypass strict mode checks on Lua > 5.2 where
	_G.loadstring is nil.
	* lib/std/debug.lua (getfenv): Likewise, for Lua > 5.2 where
	there is no _G.fgetenv.
	* lib/std/debug_init/init.lua (_DEBUG): Likewise, for cases where
	caller did not preload _G._DEBUG.
	* NEWS.md: Updated.
	Reported by Gergely Risko <gergely@risko.hu>

2015-01-19  Gary V. Vaughan  <gary@gnu.org>

	std: barrel and monkey_patch return module table.
	Closes #93
	In order for things like `std = require "std".barrel ()` to work
	as documented, these methods must return their parent module
	table, i.e. in this case, the `std` table.
	* specs/io_spec.yaml (monkey_patch): Specify correct behaviour.
	* specs/math_spec.yaml (monkey_patch): Likewise.
	* specs/string_spec.yaml (monkey_patch): Likewise.
	* specs/table_spec.yaml (money_patch): Likewise.
	* specs/std_spec.yaml (barrel, monkey_patch): Likewise.
	* lib/std.lua.in (barrel, monkey_patch): Return parent module
	able.
	* lib/std/io.lua, lib/std/math.lua, lib/std/string.lua,
	lib/std/table.lua (monkey_patch): Likewise.
	* NEWS.md (Bug fixes): Update.
	Reported by Reuben Thomas

2015-01-14  Gary V. Vaughan  <gary@gnu.org>

	slingshot: sync with upstream for working Lua 5.3.0 final support.
	* slingshot: Sync with upstream.
	* .travis.yml: Regenerate.

	slingshot: sync with upstream for Lua 5.3.0 final support.
	* slingshot: Sync with upstream.
	* .travis.yml: Regenerate.

2015-01-14  Gergely Risko  <gergely@risko.hu>

	base: remove spurious case reference from base module.
	* lib/std/base.lua: Remove spurious reference to case from
	export table.  That function has long since moved to std.functional.

2015-01-03  Gary V. Vaughan  <gary@gnu.org>

	maint: post-release administrivia.
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* ./local.mk (old_NEWS_hash): Auto-update.

	Release version 41.0.0
	* NEWS.md: Record release date.

	maint: don't use math.pow, which some Lua 5.3 builds don't support.
	When compiled without -DLUA_COMPAT_5_2, Lua 5.3 removes a good
	chunk of the math library, including math.pow.
	* lib/std.lua.in (eval): Use math.min in LDocs usage.
	* specs/functional_spec.yaml (bind, curry, eval): Instead of
	math.pow, use math.min where sensible, otherwise std.operator.pow.
	* specs/operator_spec.yaml (pow): Compare with result calculated
	using ^ infix operator.
	* specs/std_spec.yaml (eval): Use math.min over math.pow.

	std: ireverse only operates on the proper sequence part.
	* lib/std/base.lua (ireverse): Ignore any holes in the argument
	table, returning only the reversed proper sequence part.
	* NEWS.md: Update.

	std: make ripairs respect contiguous integer keys like ipairs.
	* lib/std/base.lua (ripairs): Start from lowest contiguous integer
	key with a nil value, and iterate backwards to 1.
	* NEWS.md: Update.

	std: revert std.ipairs to return all contiguous key pairs 1..n.
	Now that Lua 5.3 returned to an ipairs implementation that returns
	contiguous key-value pairs from 1..n, where n is the last non-nil
	integer key, stdlib can do the same for simpler compliance with
	all supported Lua versions.
	* lib/std/base.lua (ipairs): Simplify accordingly.
	* lib/std.lua.in (ipairs): Update LDocs accordingly.
	* NEWS.md: Update.

	maint: commit git rockspec to master branch.
	* .gitignore: Allow git rockspecs.
	* stdlib-git-1.rockspec: New file.

	configury: add ansicolors to travis_extra_rocks.
	* bootstrap.conf (buildreq): Bump Specl requirement to 14.1.0.
	(travis_extra_rocks): Add ansicolors for color specl output.
	* .travis.yml: Regenerate.

	maint: add 5.3 to compatibility statement.
	* README.md: Add 5.3 to compatibility statement.
	* specs/std_spec.yaml (std.version): Update accordingly.

	maint: update copyrights.
	* COPYING, README.md, bootstrap.conf, configure.ac, local.mk,
	specs/optparse_spec.yaml, specs/string_spec.yaml: Add 2015 to
	copyright statement.

	rockspec: Lua 5.4 and higher not yet supported.
	* rockspec.conf (dependencies): Add lua < 5.4 constraint.

	io: pass io.die message as an error() string.
	* lib/std/io.lua (warnfmt): New function factored out of warn().
	Adjust callers.
	(die): Pass result of warnfmt to error instead of writing directly
	to stderr.
	* specs/io_spec.yaml, specs/optparse_spec.yaml: Adjust
	specifications accordingly.
	* NEWS.md: Update.

	specs: support Lua 5.3 variants of core error messages.
	* specs/container_spec.yaml, specs/debug_spec.ymal: Also accept
	slightly different error message formats from Lua 5.3 core.

	slingshot: sync with upstream, for Lua 5.3.0 compatibility.
	* slingshot: Sync with upstream.
	* bootstrap: Update from slingshot.
	* NEWS: Move from here...
	* NEWS.md: ...to here.  Reformat as Markdown and update.
	* local.mk (old_NEWS_hash): Update.
	* .gitignore: Add NEWS.
	* .travis.yml: Regenerate.

2014-12-29  Gary V. Vaughan  <gary@gnu.org>

	string: consistent numbertosi output in Lua 5.3.
	* lib/std/string.lua (numbertosi): Be careful to output an
	integer even when handling a number ('double') in Lua 5.3.

	maint: 5.3 uses load instead of loadstring.
	* lib/std/base.lua (loadstring): Set to load if loadstring is not
	available.
	* lib/std/functional.lua (loadstring): Likewise.

	maint: preliminary Lua 5.3.0 compatibility.
	* configure.ac (AX_PROG_LUA): Accept Lua 5.3 interpreters.
	* lib/std/io.lua (setmetatable): Define locally to
	debug.setmetatable for resetting FILE* metatable in given
	namespace.
	* lib/std/base.lua, lib/std/debug.lua, lib/std/functional.lua,
	lib/std/list.lua, lib/std/package.lua (unpack): Set to either
	table.unpack or _G.unpack to satisfy Lua 5.1, 5.2 and 5.3.
	* specs/spec_helper.lua (unpack): Set appropriately for all
	supported Lua releases.
	* NEWS: Update.

2014-12-24  Gary V. Vaughan  <gary@gnu.org>

	specs: use correct Specl > 13 arity for bad argument errors.
	Now that Specl's badargs module is generating examples with
	the correct messages, we can now say 'no more than 0 arguments'.
	* lib/std/debug.lua (toomanyargmsg): Return singular 'argument'
	in error message only for exactly 1 expected argument, otherwise
	plural.
	* bootstrap.conf (buildreq): Bump specl requirement.

	refactor: rename operator.deref to operator.get.
	* specs/operator_spec.yaml (deref): Rename from this...
	(get): ...to this.
	* lib/std/operator.lua (deref): Rename from this...
	(get): ...to this.
	Adjust all callers.
	* NEWS: Update.

	functional: generalize reduce to any table.
	* specs/functional_spec.yaml (reduce): Specify optional iterator
	argument defaulting to std.pairs.
	Specify requirement for std.ielems when ignoring reduced table
	keys.
	* specs/operator_spec.yaml (set): Specify behaviours for a new
	table element setting operator.
	* specs/container_spec.yaml: Use appropriate iterator functions
	for new reduce API.
	* lib/std/functional.lua (reduce): Diagnose optional iterator
	argument to std.pairs.
	(fold): Copy old reduce implementation into deprecated call.
	* lib/std.lua.in (barrel): Adjust accordingly.
	* lib/std/base.lua (reduce): Default optional iterator argument
	to std.pairs.
	Pass all iterator results to accumulator function.
	Adjust all clients.
	* lib/std/operator.lua (set): Implement according to new specs.
	* NEWS: Update.

	functional: improve lambda expressiveness.
	* specs/functional_spec.yaml: Specify new behaviours with omitted
	optional '=', and '_' alias argument.
	* lib/std/functional.lua (lambda): Strip more useless whitespace
	in parsing to improve memoize cache hits.
	Support omitting leading '=' when first non-whitespace of lambda
	string is '_'.
	Add '_' alias to '_1' for lambda string compiled expressions.
	Update LDocs.

	doc: show release version in LDocs column headings.
	* build-aux/config.ld.in (project): Add release version.

2014-12-21  Gary V. Vaughan  <gary@gnu.org>

	string: don't return spurious additional values.
	* lib/std/base.lua (escape_pattern): Wrap gsub return value in
	parens to strip all but the first string return value.
	* lib/std/string.lua (caps, chomp, escape_shell, ltrim, rtrim)
	(trim): Likewise.

	io: add dirname function again.
	* specs/io_spec.yaml (dirname): Specify behaviour of a new
	function to discard the final path separator in a string and all
	that follows.
	* lib/std/io.lua (M.dirname): Implement it.
	* NEWS: Update.

	vector: remove unneeded module.
	On second thoughts, this is not necessary.  Adding methods to core
	table would give us the API benefits, and posix.curses.chstr is a
	much easier way of handling arrays of attributed strings.
	* lib/std/vector.lua: Remove.
	* build-aux/config.ld.in (file): Remove lib/std/vector.lua.
	* local.mk (dist_luastd_DATA): Likewise.
	(dist_classes_DATA): Remove doc/classes/std.vector.html.
	* specs/vector_spec.yaml: Remove.
	* specs/string_spec.yaml (render): Remove vector examples.
	* specs/specs.mk (specl_SPECS): Remove specs/vector_spec.yaml.
	* NEWS: Remove vector references.

2014-12-16  Gary V. Vaughan  <gary@gnu.org>

	configury: adopt semantic versioning.
	* configure.ac (AC_INIT): Set version to 41.0.0.

2014-11-05  Gary V. Vaughan  <gary@gnu.org>

	maint: fix bitrot in README.
	* README.md: Update.

2014-10-05  Gary V. Vaughan  <gary@gnu.org>

	specs: simplify bad argument checking with specl.badargs.
	* specs/spec_helper.lua (badargs):  Expose specl.badargs to the
	example execution environment.
	(badarg, init): Remove.  Superseded by badargs.init.
	* specs/debug_spec.yaml, specs/string_spec.yaml: Use badargs.init
	instead of init.
	* specs/functional_spec.yaml, specs/io_spec.yaml,
	specs/list_spec.yaml, specs/math_spec.yaml,
	specs/package_spec.yaml, specs/std_spec.yaml,
	specs/table_spec.yaml: Use badargs.diagnose to write bad argument
	diagnostics examples automatically.
	* bootstrap.conf (buildreq): Use moonscript rocks server URLs.

	travis: remove temporary specl-git-1.rockspec dependency.
	* .travis.yml (script): Regenerate from travis.yml.n.

2014-10-01  Gary V. Vaughan  <gary@gnu.org>

	slingshot: sync with upstream for SPECL_ENV improvements.
	* slingshot: Sync with upstream.
	* specs/specs.mk: Simplify accordingly.
	* specs/spec_helper.lua (package.path): Set according to slingshot
	recommendations.
	* bootstrap.conf: Require latest specl, and tidy accordingly.

	functional: fill unbound arguments in order with bind.
	* lib/std/functional (bind): When filling unbound arguments, be
	sure to traverse the remaining arguments *in* order!

	debug: improve argscheck parsing patterns.
	* lib/std/debug.lua (argscheck): Strip leading and trailing
	whitespace from argument type list.
	Allow commas without trailing whitespace.
	Allow periods in `fname` pattern.

	travis: reformat .travis.yml.
	* .travis.yml: Reformat.

	travis: use specl-git-1.rockspec from specl git master branch.
	* .travis.yml (script): Adjust specl-git-1.rockspec URL.

	refactor: rationalize deprecation interfaces.
	Tracking one deprecation warning per deprecated function is
	fiddly and confusing.  Change the semantics to this: by
	default calling deprecated API fires a warning message; turn
	off the messages with `_DEBUG.deprecate = false`; elide
	deprecated APIs entirely with `_DEBUG.deprecate = true`.
	Easy and useful :)
	* lib/std/debug_init/init.lua (_ARGCHECK): Remove.  Adjust all
	callers to use _DEBUG.argcheck instead.
	(_DEBUG): Always a table, with fields initialised according to
	global _DEBUG if necessary.  Simplify all callers accordingly.
	* lib/std/debug.lua (setcompat, getcompat): Remove.
	(DEPRECATIONMSG): If _DEBUG.deprecate is nil, always return a
	deprecation message, otherwise the empty string.
	(DEPRECATED): If _DEBUG.deprecate is truthy, don't return a
	function at all.
	(_setdebug): New private function.  A reliable way to jigger the
	_DEBUG table contents, without worrying about nested specl
	environments.
	* specs/spec_helper.lua (setdebug): Import std.debug._setdebug
	into the outermost execution environment.
	* specs/debug_spec.yaml (extend_base): Add _setdebug.
	Adjust other behaviour specs to match saner _DEBUG.deprecate
	semantics.
	* specs/functional_spec.yaml, specs/list_spec.yaml,
	specs/string_spec.yaml, specs/table_spec.yaml: Adjust deprecation
	warning behaviour examples to match new semantics.
	* NEWS: Update.

2014-09-04  Gary V. Vaughan  <gary@gnu.org>

	tree: use argscheck on exported apis.
	* lib/std/tree.lua: Move LDocs and add argschecks to returned
	Tree object function declarations.

	set: check for strict Set type arguments.
	Since we have type checking to help maintain correctness, don't
	undermine ourselves and add complexity by adding type coercions
	and looser type safety.  When we're using Set's, passing a table
	instead of a Set is probably an error, so treat it as one!
	* specs/set_spec.yaml: Remove specifications for type coercions.
	* lib/std/set.lua: Remove type coercions and require strict Set
	arguments everywhere.
	Add type checks to metamethods.
	* NEWS: Update.

	strbuf: use argscheck on exported apis.
	* lib/std/strbuf.lua: Move LDocs and add argschecks to returned
	StrBuf object declarations.
	* HACKING: Update.

	set: use argscheck on exported apis.
	* lib/std/set.lua: Move LDocs and add argschecks to returned Set
	object declaration.
	* HACKING: Add items about best practices for `debug.argscheck`.

2014-09-03  Gary V. Vaughan  <gary@gnu.org>

	refactor: simplify primitive std.set functions.
	* lib/std/set.lua (insert, delete): Return results of calling
	rawset.

	refactor: simplify string.render and clients.
	* lib/std/base.lua (render): Use `cb` suffix for callback
	parameter names.
	Rename j and w locals to k_ and v_, as they represent the values
	of k and v resp. from the previous iteration.
	Remove unrelated Haskell comments.
	* lib/std/string.lua (prettytostring): Likewise.
	* lib/std/container.lua (__tostring): Manually unroll render
	invocation with base.tostring functions plugged in.

2014-09-02  Gary V. Vaughan  <gary@gnu.org>

	refactor: factor away std.container.__pairs.
	Object pairs iteration shouldn't rely on slow in-order traversal,
	we only care about key order when printing.
	* lib/std/container.lua (__pairs): Remove.  By the time this is
	called, private keys are already moved into the metatable, and
	the client would be using ipairs and okeys for ordered traversal.
	(__tostring): Use ipairs and okeys here, because we do care about
	ordering.

	std: use numeric keys first ordering when stringifying a table.
	Closes #81.
	* specs/table_spec.yaml (okeys): Specify behaviours of a new
	ordered keys function.
	* lib/std/container.lua (__pairs): Factor key sorting algorithm
	from here...
	* lib/std/base.lua (keysort): New function. ...to here.
	(okeys): Use keysort to extract a sorted key list from a table.
	* lib/std/table.lua (okeys): Re-export from here.
	* lib/std/base.lua (render): Simplify accordingly, and always
	sort keys nicely as a pleasant side-effect.
	* NEWS: Update.

2014-09-01  Gary V. Vaughan  <gary@gnu.org>

	doc: Use LDoc @object type for std.vector.
	Closes #65.
	* lib/std/vector.lua: Improve documentation.

2014-08-31  Gary V. Vaughan  <gary@gnu.org>

	doc: use LDoc @object type for std.tree.
	* lib/std/tree.lua: Improve documentation.

	doc: use LDoc @object type for std.strbuf.
	* lib/std/strbuf.lua: Improve documentation.

	doc: use LDoc @object type for std.list
	* lib/std/list.lua: Improve documentation.

	refactor: upgrade OptionParser implementation to a std.object.
	* lib/std/optparse.lua (OptionParser): Reimplement as a std.object,
	and simplify accordingly.

	doc: use LDoc @object type for std.set.
	* lib/std/set.lua: Improve documentation.

	doc: use LDoc @object type for std.container.
	* lib/std/container.lua: Improve documentation.

	doc: use LDoc @object type for std.object.
	* build-aux/config.ld.in (object): New type for documenting
	objects.
	* lib/std/object.lua: Improve documentation.

	doc: add prototype chains to object LDocs.
	* lib/std/list.lua, lib/std/set.lua, lib/std/strbuf.lua,
	lib/std/tree.lua, lib/std/vector.lua: LDocument prototype chains.

	doc: simplify and clarify container and object LDocs.
	* lib/std/object.lua, lib/std/container.lua: Simplify and clarify
	LDocs.

	doc: fix a broken cross-reference.
	* lib/std/container.lua (std.container): Now that we're not
	documenting inherited methods, reference std.object.__call from
	the prototype object.
	* HACKING: Document rationale for slimming LDocs in this way.

	debug: argcheck accepts objects as valid table type arguments.
	Closes #84.
	Really, table is the base type of object (or strictly speaking,
	container), and its almost always desirable to be able to pass
	objects to functions that operate on tables.
	* specs/debug_spec.yaml (argcheck): Specify this behaviour when
	an object argument is given where a table is required.
	* lib/std/debug.lua (argcheck): Accept any object argument
	where a table parameter is expected.

2014-08-30  Gary V. Vaughan  <gary@gnu.org>

	table: deprecate totable.
	Closes #74.
	* specs/container_spec.yaml (tablification): Remove specs.
	* specs/object_spec.yaml (copy): Use this new function instead of
	`totable`.
	* specs/object_spec.yaml, specs/set_spec.yaml,
	specs/strbuf_spec.yaml, specs/tree_spec.yaml (__totable): Remove.
	* specs/table_spec.yaml (totable): Deprecate this function.
	* specs/spec_helper.lua (totable): Remove.
	* lib/std/table.lua (totable): Likewise.
	* lib/std/base.lua (totable): Remove implementation.
	* lib/std.lua.in (barrel): Remove "table.totable".
	* lib/std/container.lua (__totable): Remove.
	(__pairs): Return elements in order, omitting private elements.
	(__tostring): Use it to concatenate elements in order.
	(__call, instantiate, mapfields): Iterate with `next` to fetch
	raw elements, rather than ordered object __pairs elements.
	* lib/std/object (__totable): Remove reference.
	* lib/std/set.lua (__totable): Remove.
	(__tostring): Fetch keys for display using std.pairs.
	* lib/std/string.lua (pickle): Likewise.
	* NEWS: Update.

2014-08-29  Gary V. Vaughan  <gary@gnu.org>

	doc: overhaul LDocs for std.table.
	* lib/std/table.lua: Tidy up LDocs, and add @usage examples.

2014-08-28  Gary V. Vaughan  <gary@gnu.org>

	table: add remove for orthogonality with insert.
	* specs/table_spec.yaml (remove): Specify expected behaviour.
	* lib/std/table.lua (remove): Implement specified behaviors.
	* NEWS: Update.

	refactor: modules can only require std.base and std.debug.
	* lib/std/table.lua (totable): Move implementation from here...
	* lib/std/base.lua (totable): ...to here.
	* lib/std/string.lua: Import core implementation from std.base
	instead of argcheck wrapper from std.table.
	* lib/std/io.lua (dirsep, catfile): Move implementations from
	here...
	* lib/std/string.lua (escape_pattern): ...here...
	* lib/std/table.lua (invert): ... and here...
	* lib/std/base.lua (dirsep, catfile, invert): ...to here.
	* lib/std/package.lua: Import core implementations from std.base
	instead eof argcheck wrappers from user interface files.
	* lib/std/list.lua, lib/std/tree.lua (func): Remove spurious
	require.
	* lib/std/set.lua, lib/std/tree.lua, lib/std/vector.lua
	(container): Fold into Container prototype constructor.
	* lib/std/list.lua, lib/std/strbuf.lua (object): Fold into
	Object prototype constructor.
	* lib/std/string.lua (strbuf): Fold into StrBuf prototype
	constructor.
	* lib/std/math.lua (debug): Fold into X definition.
	* HACKING: Add a description of how to use `require`
	idiomatically in stdlib source.

	table: ensure there is always a maxn function.
	* specs/table_spec.yaml (maxn): Specify behaviour of maxn.
	(len): Add missing specifications.
	* specs/std_spec.yaml (barrel): Add maxn to list of monkey_patch
	apis from std.table.
	* lib/std/base.lua (maxn): Use core table.maxn if available, or
	else define our own.
	* lib/std/container.lua, lib/std/debug.lua: Use it!
	* lib/std/table.lua (maxn): Export it.
	* NEWS: Update.

	refactor: make all monkey_patch functions work the same.
	* specs/std_spec.yaml, specs/io_spec.yaml, specs/math_spec.yaml,
	specs/string_spec.yaml, specs/table_spec.yaml (monkey_patch):
	Specify injection of all exported apis into the given namespace.
	* lib/std/base.lua (copy): Support an optional `dest` argument.
	(merge): Like copy, but don't overwrite pre-existing entries at
	the same key.
	* lib/std.lua.in, lib/std/io.lua, lib/std/math.lua,
	lib/std/string.lua, lib/std/table.lua: Use merge and copy to
	simplify tracking and injecting monkey_patches.
	* specs/std_specl.yaml (barrel): Specify behaviour of running all
	monkey_patch functions, and recreating the legacy global api by
	additionally injecting those functions.
	* lib/std.lua.in (barrel): Update to meet tighter specifications.
	* HACKING: Note about global hygiene and use of monkey_patch ().
	* NEWS: Update.

2014-08-27  Gary V. Vaughan  <gary@gnu.org>

	package: tidy up LDocs, and remove unnecessary M references.
	* lib/std/package.lua (pathsub, find): Remove spurious `M.`
	prefixes.
	(mappath_callback): Rename from this...
	(mappathcb): ...to this.
	* HACKING: Add LDoc style notes.

	functional: remove std.operator expansions from lambda.
	There's no good reason to clog up the lambda functable with a copy
	of std.operator, when we can just pass the operators without
	interposing lambda if we need to.
	* lib/std/functional.lua (lambda): Remove std.operator expansions.
	* NEWS: Update.

	operator: more RSI-reducing operator function name changes.
	* specs/operator_spec.yaml (cons, length): Remove - just pass
	`table.pack` or `table.len` instead, resp.
	(["and"], ["or"], ["not"]): Rename these...
	(conj, disj, neg): ...to these.
	* lib/std/operator.lua: Likewise.
	Give full and proper LDocs for each function.
	* lib/std/functional.lua (M.op): Update deprecation redirections.
	* NEWS: Update.

	refactor: reorder function definitions in base.lua.
	* lib/std/base.lua: Rather than mostly random order, subject to
	interdepencies, put functions in asciibetical order as far as
	possible while avoiding forward declarations.
	* HACKING: Update.

	table: diagnose insert out of bounds arguments on all Lua.
	* specs/table_spec.yaml (insert): Adjust errors to include out of
	bounds position.
	* lib/std/debug.lua (argerror): Move implementation from here...
	* lib/std/base.lua (argerror): ...to here.
	(insert): Use it to diagnose out of bounds arguments.
	* NEWS: Update.

	table: add missing specs for table.insert, and correct argtypes.
	* specs/table_spec.yaml (insert): Specify behaviours.
	* lib/std/table.lua (insert): Don't double import.
	(M): Don't allow nil valued final argument.

	table: new insert method.
	* specs/table_spec.yaml (insert, len): Specify behaviours.
	* lib/std/base.lua (insert, last): New functions that
	respect `__len` when calculating table length.
	(len): Use callable to extract __len metamethod.
	* HACKING: New file to document coding style and design choices.
	* lib/std/base.lua, lib/std/container.lua, lib/std/debug.lua,
	lib/std/io.lua, lib/std/list.lua, lib/std/optparse.lua,
	lib/std/strbuf.lua, lib/std/string.lua, lib/std/table.lua,
	lib/std/tree.lua, lib/std/vector.lua: Follow HACKING rules for
	use of len and insert.
	* NEWS: Update.

	refactor: assorted simplifications to std.table.
	* lib/std/table.lua (merge_allfields): Use `nil` for unspecified
	`map` argument, and when `nil` use a faster inner loop for
	copying.
	(merge_namedfields): Use `nil` for unspecified `keys` argument.
	(clone): Unroll into export table.
	(depair, keys): Use ipairs and dummy variable, rather than ielems.
	(pack): Remove duplicate definition.

	refactor: remove arglen, duplicates table.maxn functionality.
	* specs/debug_spec.yaml (arglen): Remove specifications.
	* lib/std/debug.lua (arglen): Remove.
	* lib/std/container.lua (M.__call), lib/std/debug.lua (match)
	(argcheck): Change all callers to use table.maxn instead.

2014-08-26  Gary V. Vaughan  <gary@gnu.org>

	operator: use non-RSI inducing operator function names.
	* lib/std/operator.lua ([".."], ["[]"], ["{}"], ["#"], ["+"])
	(["-"], ["*"], ["/"], ["%"], ["^"], ["=="], ["~="], ["<"], ["<="])
	([">"], [">="]): Rename from these...
	(concat, deref, cons, length, sum, diff, prod, quot, mod, pow, eq)
	(neq, lt, lte, gt, gte): ...to these.
	(['""']): Remove. Just pass the tostring function.
	(["~"]): Remove. Just pass string.find.
	Adjust all callers.
	* NEWS: Update.

	functional: deprecate functional.op properly.
	* specs/functional_spec.yaml (op): Specify deprecation warnings
	when using old functional.op API.
	* lib/std/functional.lua (M.op): Deprecate old APIs.
	* NEWS: Update.

	refactor: modernize std/debug.lua.
	* lib/std/debug.lua: Reorder declarations and LDocs to match
	latest style.

	std: commit missed change to lib/std.lua.in.
	* lib/std.lua.in (X): Update export call to argscheck.

	doc: improve LDoc usage examples in std.debug.
	* lib/std/debug (DEPRECATIONMSG, DEPRECATED): Improve LDoc usage
	examples.

	refactor: merge debug.argscheck and debug.export.
	* lib/std/debug.lua (argscheck): Remove.
	(export): Rename to argscheck.
	Adjust all callers.

	refactor: merge lib/std/base files into std.base.
	* lib/std/base/functional.lua (callable, collect, reduce): Move
	from here...
	* lib/std/base/string.lua (copy, render, split): ...here...
	* lib/std/base/tree.lua (leaves): ...and here...
	* lib/std/base.lua (callable, collect, reduce, copy, render)
	(split, leaves): ...to here.
	Adjust all callers.
	* lib/std/base/functional.lua, lib/std/base/string.lua,
	lib/std/base/tree.lua: Remove files.
	* local.mk (luastdbasedir, dist_luastdbase_DATA): Remove.

	refactor: std.vector simplifications.
	* lib/std/vector.lua: Fix usage examples to use `avector` instead
	of `anvector`.
	(set): Factor away use of debug.argscheck.

	refactor: simplify export implementation and api.
	* specs/debug_spec.yaml (export): specify behaviours with
	explicit arguments instead of introspection.
	* lib/std/debug.lua (export): expect explicit declaration string
	with argument types, and inner function.
	(whatpath, getinfo): Remove unused introspection functions.
	* lib/std.lua.in, lib/std/base/string.lua, lib/std/functional.lua,
	lib/std/io.lua, lib/std/list.lua, lib/std/math.lua,
	lib/std/package.lua, lib/std/string.lua, lib/std/table.lua:
	Move LDocs and export declarations to module table constructors.

	refactor: remove obsolete __ipairs specs.
	stdlib no longer supports __ipairs metamethods.
	* specs/vector_spec.yaml (__ipairs): Remove.

	list: remove workaround for old module metadata layout.
	* lib/std/list.lua (transpose): Remove workaround for old module
	data layout.

	refactor: simplify functional.memoize.
	* lib/std/functional.lua (memoize): Remove spurious require and
	associated comment.

2014-08-25  Gary V. Vaughan  <gary@gnu.org>

	refactor: use toomanyargmsg function instead of toomanyarg_fmt string.
	* lib/std/debug.lua (toomanyarg_fmt): Remove.
	(toomanyargmsg): A replacement function that returns the formatted
	string.  Adjust all callers.
	* specs/debug_spec.yaml (extend_base): Adjust accordingly.

	refactor: factor getcompat and setcompat out of debug api.
	* specs/debug_spec.yaml (getcompat, setcompat): Remove.
	* lib/std/debug.lua (DEPRECATIONMSG): Use getcompat and setcompat
	internally, returning an empty string if necessary.
	(DEPRECATED): Don't use getcompat or setcompat now that
	DEPRECATIONMSG does that.
	(M): Remove getcompat and setcompat.
	* lib/std/functional.lua (bind): Simplify.

	refactor: move DEPRECATED, export et.al. from `base` to `debug`.
	* specs/base_spec.yaml (export, DEPRECATED): Move from here...
	* specs/debug_spec.yaml (export, DEPRECATED): ...to here.
	* specs/base_spec.yaml: Remove unused file.
	* specs/specs.mk (specl_SPECS): Remove specs/base_spec.yaml.
	* lib/std/base.lua (DEPRECATED, DEPRECATIONMSG, argcheck)
	(argerror, arglen, argscheck, export, getcompat, setcompat)
	(toomanyarg_fmt): Move from here...
	* lib/std/debug.lua (DEPRECATED, DEPRECATIONMSG, argcheck)
	(argerror, arglen, argscheck, export, getcompat, setcompat)
	(toomanyarg_fmt): ...to here.  Adjust all callers.
	* lib/std/base.lua (argpairs, checktype, concat, formaterror)
	(getfenv, getinfo, match, merge, normalize, permutations)
	(setfenv, whatpath): Move from here...
	* lib/std/debug.lua (argpairs, checktype, concat, formaterror)
	(getfenv, getinfo, match, merge, normalize, permutations)
	(setfenv, whatpath): ...to here, but elide their definitions
	if _DEBUG.argcheck is false, or equivalent.
	* NEWS: Update.

	refactor: break std.debug dependency on std.functional and std.string.
	* specs/debug.spec (say): Specify usage of std.tostring.
	* lib/std/debug.lua (tabify): Remove.
	(say) Manually unroll functional compose sequence, formerly
	knows as tabify.
	(trace): Manually unroll and consequently remove string.rep call.

	base: support module name override with std.base.export.
	* lib/std/base/list.lua (compare): Move from here...
	* lib/std/base.lua (compare): ...to here.
	* lib/std/base/list.lua: Remove.
	* local.mk (dist_luastdbase_DATA): Remove lib/std/base/list.lua.
	* lib/std/list.lua (M.compare): Provide explicit module name
	argument.
	* lib/std/base.lua (export): If an explicit module name was
	passed, use that instead of reverse engineering it from the
	source file containing an exported function.

2014-08-24  Gary V. Vaughan  <gary@gnu.org>

	base: remove export table metadata.
	* lib/std/base.lua: Remove export table metadata.

	refactor: simplify std.require, and improve error diagnostics.
	Closes #78.
	* specs/std_spec.yaml (require): Specify better diagnostics on
	failure.
	* lib/std/list.lua (compare): Move from here...
	* lib/std/base/list.lua (compare): ...to here.
	* local.mk (dist_luastdbase_DATA): Add lib/std/base/list.lua.
	* lib/std/base.lua: Break dependency on "std.list".
	(require): Use base.list.compare directly, and show verbose
	diagnostics on failure.
	(module_version, version_to_list): Remove; no longer used.
	* NEWS: Update.

	refactor: remove spurious comments from base.lua.
	* lib/std/base.lua: Remove spurious comments.

2014-08-23  Gary V. Vaughan  <gary@gnu.org>

	maint: fix a typo in std.lua.in.
	* lib/std.lua.in (export): Import this symbol correctly.

	refactor: simplify use of export by looking up local functions.
	Prior to this changeset, export worked by creating an argument
	checking wrapper function when called with an inner function, a
	destination table containing metadata and the argument spec
	string.  The metadata leaked out into the library interface, as
	well as other assorted clunkiness. Clean up and simplify the
	whole thing.
	* specs/spec_helper.lua (badarg): Adjust to produce consolidated
	error messages.
	* specs/functional_spec.yaml, specs/list_spec.yaml,
	specs/std_spec.yaml: Remove element `1` from expected entries in
	export table, now that metadata isn't leaked.
	* specs/base_spec.yaml (DEPRECATED, export): Remove argument
	checking specifications.
	* lib/std/base.lua (getinfo): New functions. Use `debug.getinfo`
	to lookup a local function in the given scope given only its
	name.
	(whatpath): Cross reference the package.path and function source
	file from `debug.getinfo` to reverse engineer the module path
	passed to require that was used to load this function.
	(export): Remove all vestiges of hard-coded module metadata from
	the destination table, and passing of an inner function; instead
	look everything up using introspection and the new functions
	above.  Don't stash the result in a table parameter, return it.
	Adjust all callers.
	(copy, render, split): Move from here...
	* lib/std/base/string.lua (copy, render, split): New file.  ...to
	here, so that base.whatpath reports the correct module path.
	* local.mk (dist_luastdbase_DATA): Add lib/std/base/string.lua.
	* lib/std/container.lua, lib/std/debug.lua,
	lib/std/functional.lua, lib/std/io.lua, lib/std/list.lua,
	lib/std/math.lua, lib/std/package.lua, lib/std/string.lua,
	lib/std/table.lua (M): Remove metadata, rebuild after exported
	functions' local declarations.
	* NEWS: Update.

2014-08-21  Gary V. Vaughan  <gary@gnu.org>

	functional: have callable return the function rather than a bool.
	* specs/functional_spec.yaml (callable): Adjust to check that
	return values are the actual function.
	* lib/std/base/functional.lua (callable): Return the actual
	function.

	specs: break dependency on M[1], M[2] in badarg.
	That is, polluting the exported module tables with the module
	name (M = {"std.base"}) and object name (M = {"std.list", "List"})
	for argument error message text generation is ugly.
	* specs/spec_helper.lua (badarg): Require an explicit module
	name arg, and use it instead of relying on M[1].
	* specs/base_spec.yaml, specs/debug_spec.yaml,
	specs/functional_spec.yaml, specs/io_spec.yaml,
	specs/list_spec.yaml, specs/math_spec.yaml,
	specs/package_spec.yaml, specs/std_spec.yaml,
	specs/string_spec.yaml, specs/table_spec.yaml: Pass the explicit
	module name arg to badarg calls.
	* specs/list_spec.yaml: The goal is not to output different
	error messages when called with ':' syntax than with '.' syntax.
	Move module function argument check specifications into higher
	scope; remove object method argument check specifications
	entirely.

2014-08-18  Gary V. Vaughan  <gary@gnu.org>

	maint: prepare lib/std/list.lua for deprecation-apocalypse!
	Almost half of lib/std/list.lua is only there to take care of
	warning about deprecated usage.
	* lib/std/list.lua: Group all deprecation support code in one
	huge block ready for quick and easy annihilation in due course.

	refactor: move list.depair and list.enpair into std.table.
	* specs/table_spec.yaml (depair, enpair): Specify full behaviours.
	* specs/list_spec.yaml (depair, enpair): Specify deprecation
	warnings.
	* lib/std/list.lua (depair, enpair): Move from here...
	* lib/std/table.lua (depair, enpair): ...to here.
	* NEWS: Update.

2014-08-18  Gary V. Vaughan  <gary@gnu.org>

	Revert "list: exchange parameter order for list.cons."
	This reverts commit 1b290ee40f638b03a4dd4b3c4f5b8faa6cdd2479.


	Conflicts:
		lib/std/list.lua
		specs/list_spec.yaml

2014-08-18  Gary V. Vaughan  <gary@gnu.org>

	maint: disable specl rock version check by bootstrap.
	Specl 13 is not released yet, but we're relying on some fixes
	it has.
	* bootstrap.conf (buildreq): Disable specl temporarily.

	travis: use unreleased specl rockspec.
	* .travis.yml (script): Use specl-git-1.rockspec from github.

	refactor: move `list.project` to `table.project`.
	* specs/table_spec.yaml (project): Specify behaviours of project.
	* specs/list_spec.yaml (project): Specify deprecation warnings.
	* lib/std/list.lua (project): Move from here...
	* lib/std/table.lua (project): ...to here.
	* NEWS: Update.

	refactor: move `list.shape` to `table.shape`.
	* specs/table_spec.yaml (shape): Specify full behaviours.
	* specs/list_spec.yaml (shape): Specify deprecation warnings.
	* lib/std/list.lua (shape): Move from here...
	* lib/std/table.lua (shape): ...to here.
	* NEWS: Update.

2014-08-18  Gary V. Vaughan  <gary@gnu.org>

	refactor: move list.flatten to table.flatten.
	* specs/list_spec.yaml (flatten): Specify deprecation warnings.
	* specs/functional_spec.yaml (flatten): Move from here...
	* specs/table_spec.yaml (flatten): ...to here.
	* lib/std/list.lua (flatten): Move from here...
	* lib/std/table.lua (fatten): ...to here.
	* lib/std/functional.lua (collect): Move core from here...
	* lib/std/base/functional.lua (collect): ...to here.

	* specs/list_spec.yaml (flatten): Deprecated properly.
	* lib/std/list.lua (flatten): Wrap object method in deprecation
	warning.

2014-08-18  Gary V. Vaughan  <gary@gnu.org>

	list: deprecate filter in favour of functional.filter.
	* specs/list_spec.yaml (filter): Specify deprecation messages.
	* lib/std/list.lua (filter): Deprecated.
	* NEWS: Update.

	list: properly deprecate `list.map` to match NEWS.
	* specs/list_spec.yaml (map): Deprecated properly.
	* lib/std/base/functional.lua (map): Move from here...
	* lib/std/functional.lua (map): ...back to here.
	* lib/std/list.lua (map): Reinstate deprecated version of this
	function locally, for simplicity.

	doc: document list.cons arguments in the correct order.
	* lib/std/list.lua (cons): Fix LDoc to display parameters in the
	correct order.

	list: export all apis for automatic argument type checking.
	* specs/list_spec.yaml: Specify argument checking of all apis.
	* lib/std/functional.lua (map): Move core function from here...
	* lib/std/base/functional.lua (map): ...to here.
	* lib/std/list.lua (project, map, map_with, transpose): Use it.
	(m): Collect exported object methods here.
	(List.__index): Set to m.

	refactor: simplify deprecation specs.
	* lib/std/base.lua (DEPRECATED): Use `name` as the key into the
	table for recording whether each deprecation message has been
	output yet... it's more likely to be unique than the inner
	function address, which might be shared between a module function
	and object method.
	* specs/functional_spec.yaml, specs/list_spec.yaml,
	specs/string_spec.yaml, specs/table_spec.yaml: Simplify
	specifications for deprecation warning.

	specs: fix os.execute thinko.
	* specs/spec_helper.lua (LUA): No need to repeat ourselves by
	looking for lua in the PATH with which and again at runtime.

	configury: use static specs/spec_helper.lua.
	No need to generate this file just to substitute @LUA@, just
	use os.getenv "LUA" in a static file instead.
	* specs/spec_helper.lua.in: Move from here...
	* specs/spec_helper.lua: New file. ...to here.
	(LUA): Set from LUA environment, or call `which lua` or just rely
	on path search for "lua".
	* .gitignore: Remove specs/spec_helper.lua.
	* configure.ac (AC_CONFIG_FILES): Remove specs/spec_helper.lua
	generator.
	* specs/specs.mk (specs_path, spec-check-local): Remove.
	(SPECL_ENV): Simplify.
	(EXTRA_DIST): Adjust.
	* specs/io_spec.yaml (process_files, readlines, slurp)
	(writelines): Don't rely on specs/spec_helper.lua being in the
	builddir, in case of VPATH builds.

	travis: add .slackid for slack notifications.
	* .slackid: New file.
	* .travis.yml: Regenerate.

	slingshot: sync with upstream, for slack notifications.
	* slingshot: Sync with upstream.
	* .travis.yml: Regenerate.

	maint: remove stale files from .gitignore.
	* .gitignore: Remove unused /m4/ax_compare_version.m4.

2014-08-17  Gary V. Vaughan  <gary@gnu.org>

	refactor: use to_raise matcher alias consistently.
	Slingshot sanity checks flag strings with an initial capital
	following 'error' as bad style.  Rather than switch off that
	check, use a matcher alias.
	* build-aux/sanity-cfg.mk (sc_error_message_uppercase): Remove
	spec-files from regexp.
	specs/base_spec.yaml, specs/container_spec.yaml,
	specs/debug_spec.yaml, specs/functional_spec.yaml,
	specs/io_spec.yaml, specs/list_spec.yaml, specs/math_spec.yaml,
	specs/optparse_spec.yaml, specs/package_spec.yaml,
	specs/std_spec.yaml, specs/string_spec.yaml,
	specs/table_spec.yaml, specs/tree_spec.yaml,
	specs/vector_spec.yaml: s/to_error/to_raise/
	s/not_to_raise ()/not_to_raise "any error"/

	refactor: simplify argument error specifications.
	* specs/spec_helper.lua.in (toomanyarg): Remove.
	(badarg): Now file local, and treats one or two numeric args as
	a `too many arguments` error request.
	(init): Prebind badarg module and function names.
	* lib/std/base.lua: Add M[1] for error message matching.
	* specs/container_spec.yaml (construction): Unroll non-generated
	bad argument error messages.
	* specs/base_spec.yaml, specs/debug_spec.yaml,
	specs/functional_spec.yaml, specs/io_spec.yaml,
	specs/list_spec.yaml, specs/math_spec.yaml,
	specs/package_spec.yaml, specs/std_spec.yaml,
	specs/string_spec.yaml, specs/table_spec.yaml: Simplify argument
	error specifications.

2014-08-16  Gary V. Vaughan  <gary@gnu.org>

	base: support zero argument exports.
	* specs/base_spec.yaml (export): Remove specification for zero
	argument export error.
	* lib/std/base.lua (export): Remove zero argument error.
	* specs/base_spec.yaml (export): Specify argument checking of
	zero argument exports.
	* lib/std/base.lua (export): Support zero arguments.

	base: ensure export errors report callsite in stack trace.
	* specs/base_spec.yaml (export): Finish and simplify mkstack().
	Specify callsite line numbers in export errors.
	* lib/std/base.lua (formaterror): Allow expectedtypes to be a
	string.
	(export): Use it to generate error messages.
	(export): Set levels correctly for correct callsite reporting.

2014-08-15  Gary V. Vaughan  <gary@gnu.org>

	refactor: move list.flatten to functional.flatten.
	* lib/std/list.lua (flatten): Deprecate.
	* lib/std/functional.lua (flatten): Export from here.
	* specs/list_spec.yaml, specs/functional_spec.yaml: Adjust.
	* NEWS: Update.

	refactor: merge most of std.base.functional back into functional.
	* lib/std/base/functional.lua: Remove comment about needing to
	wait until deprecated access points are gone before merging.
	(foldl, foldr, memoize, nop): Move from here...
	* lib/std/functional.lua (foldl, foldr, memoize, nop): ...to here.
	* lib/std/list.lua (foldl, foldr): Keep a file local copy of
	these functions to satisfy deprecated access points.

	refactor: share leaves implementation from new std.base.tree.
	* lib/std/base.lua (leaves): Move from here...
	* lib/std/base/tree.lua (leaves): New file.  ...to here.
	* local.mk (dist_luastdbase_DATA): Add lib/std/base/tree.lua.
	* lib/std/io.lua, lib/std/list.lua, lib/std/tree.lua: Adjust.

	refactor: use new functional apis in std.tree.
	* lib/std/tree.lua (reduce, operator): Use these...
	(fold, op): ...instead of these.

	functional: new zip and zip_with replace list transpose and zip_with.
	* specs/functional_spec.yaml (zip, zip_with): Specify behaviour
	of new general zip and zip_with apis.
	* lib/std/functional.lua (zip, zip_with): New functions.
	* lib/std/list.lua (transpose, zip_with): Deprecate.
	* specs/list_spec.yaml (transpose, zip_with): Specify deprecation
	warning behaviours.
	* NEWS: Update.

2014-08-14  Gary V. Vaughan  <gary@gnu.org>

	list: deprecate list.map.
	* specs/list_spec.yaml (map): Specify output of deprecation
	warning on first call.
	* specs/debug_spec.yaml (debug, say): Use functional.map for
	mkwrap instead of deprecated list.map.
	* lib/std/list.lua (map): Deprecate.
	* NEWS: Update.

	functional: support default iterators where possible.
	* specs/functional_spec.yaml (collect, filter, map): Specify
	behaviours when iterator argument is omitted.
	* lib/std/functional.lua (collect): Default iterator to ipairs.
	(filter, map): Default iterator to pairs.
	* NEWS: Update.

	functional: new callable module function.
	* specs/functional_spec.yaml (callable): Specify correct behaviour
	for new callable function.
	* lib/std/functional.lua (iscallable): Move from here...
	* lib/std/base/functional.lua (callable): ...to here.  Adjust all
	callers.
	* lib/std/functional.lua (M.callable): Reexport as a public api.
	* NEWS: Update.

	functional: improve LDocs for consistency and clarity.
	* lib/std/functional.lua: Be consistent with parameter names in
	all functions.
	Be consistent with usage example formats.
	Be consistent with lambda string quoting in examples.

2014-08-13  Gary V. Vaughan  <gary@gnu.org>

	functional: replace list.map_with using new functional.map_with.
	* specs/functional_spec.yaml (map_with): Specify behaviour of
	improved map_with implementation that handles tables.
	* lib/std/functional.lua (map_with): Improved implementation of
	`list.map_with`.
	* lib/std/list.lua (map_with): Deprecate.
	* specs/list_spec.yaml (map_with): Adjust accordingly.
	* NEWS: Update.

	list: factor out manual argument checking.
	* lib/std/list.lua (depair, map_with, project, transpose)
	(zip_with): Use new "container of thing" support in export type-
	lists to replace manual checks.
	(_ARGCHECK): Remove. No longer used.
	* specs/list_spec.yaml (depair, map_with, project, transpose)
	(zip_with): Adjust error expectations accordingly.

	debug: support "container of homogenous_thing" in argcheck.
	* specs/debug_spec.yaml (argcheck): Specify behaviours when
	checking for combinations of "List of table" variations.
	* lib/std/base.lua (formaterror): Add optional index parameter,
	and diagnose errors that use it with new "type at index N"
	format; otherwise, simplify "List of table" strings in
	expectedtypes to just "List" when the error is in the outer
	type matching.
	(checktype): Abstracted out of `argcheck`.
	(argcheck): Simplify accordingly.
	Detect and diagnose element mismatches with "List of table"
	expected types.
	(export): Likewise.
	(typeof): Factored out entirely.

	list: update LDocs.
	* lib/std/list.lua: Add @function and @static keywords.

	list: base.export module functions for improved argchecks.
	* lib/std/list.lua (_functions): Rename from this...
	(M): ...to this.  Add a module name entry for export.
	* specs/list_spec.yaml (exported_apis): Adjust accordingly.
	(append, compare, concat, filter, flatten, map, project, rep)
	(sub, tail, transpose, zip_with): Modernize badarg error
	specifications.  Specify "too many arguments" error behaviours.
	* lib/std/list.lua (cons): Store in M; adjust getcompat/setcompat
	id.
	(map_with, project, transpose, zip_with): Use export for improved
	argchecks.
	(append, compare, concat, depair, enpair, filter, flatten, map)
	(rep, shape, sub, tail): Likewise.  Remove manual argcheck calls.

	specs: specify `std.list` apis.
	* specs/list_spec.yaml (std.list): Add specs for exported apis,
	and global table hygiene.

	string: remove unused local.
	* lib/std/string.lua (render): Remove unused local.

	refactor: split out base functions for `std.functional`.
	* lib/std/base.lua (foldl, foldr, memoize, nop, reduce): Move
	from here...
	* lib/std/base/functional.lua (foldl, foldr, memoize, nop)
	(reduce): New file. ...to here.
	* lib/std/functional.lua, lib/std/list.lua: Adjust imports
	accordingly.
	* local.mk (luastdbasedir, dist_luastdbase_DATA): Install new
	file correctly.

	refactor: move list.foldl and list.foldr to std.functional.
	Move the documented location for foldl and foldr from list.lua
	to functional.lua, modernizing specs as we go.  Keep the old
	access points, with a deprecation warning.
	* lib/std/list.lua (foldl, foldr): Move from here...
	* lib/std/base.lua (foldl, foldr): ...to here.
	* lib/std/functional.lua (reduce): Move from here...
	* lib/std/base.lua (reduce): ...to here, where foldl and foldr
	can use it.
	* specs/list_spec.yaml (foldl, foldr): Copy from here...
	* specs/functional_spec.yaml (foldl, foldr): ...to here.
	* specs/base_spec.yaml (before): Don't depend on the location of
	implementation of nop.
	* NEWS: Update.

	travis: add slack notifications.
	* .travis.yml (notifications): Add slack.

2014-08-11  Gary V. Vaughan  <gary@gnu.org>

	refactor: move lambda back to std.functional.
	* lib/std.lua.in (lambda): Move from here...
	* lib/std/base.lua (lamba): ...and here...
	* lib/std/functional.lua (lambda): ...to here.
	* specs/functional_spec.yaml, specs/std_spec.yaml: Adjust
	accordingly.
	* lib/std/base.lua (tostring): Unroll lambda calls.
	* lib/std/operator.lua ("#"): Move implementation from here...
	* lib/std/base.lua (len): ...to here. Adjust all callers.
	(_len): Remove.
	(operator): Remove unused require statement
	* lib/std/list.lua (transpose): Unroll lambda call.
	* NEWS: Update.

	functional: new `cond` function.
	* specs/functional_spec.yaml (cond): Specify behaviour of a new
	cond function.
	* lib/std/functional.lua (cond): Satisfy specified behaviours.
	* NEWS: Update.

	functional: process non-function branch values with case.
	* specs/functional_spec.yaml (case): Specify behaviours with new
	functable and non-callable branch values.
	* lib/std/functional.lua (case): Call functables as if they were
	regular functions, and return non-callable values directly.
	* NEWS: Update.

	specs: add exported api specification to functional_spec.yaml.
	* specs/functional_spec.yaml (std.functional): Specify exported
	apis.

	refactor: functional.eval issues a deprecation warning.
	* specs/functional_spec.yaml (eval): Specify deprecation warning.
	* lib/std/functional.lua (eval): Deprecated.
	* NEWS: Update.

	refactor: move memoize back to std.functional.
	* specs/std_spec.yaml (memoize): Move from here...
	* specs/functional_spec.yaml (memoize): ...to here.
	* lib/std.lua.in (memoize): Move from here...
	* lib/std/functional.lua (memoize): ...to here.
	* NEWS: Update.

	refactor: move case back to std.functional.
	* specs/std_spec.yaml (case): Move from here...
	* specs/functional_spec.yaml (case): ...to here.
	* lib/std/base.lua (case): Move implementation from here..
	* lib/std.lua.in (case): ...and argcheck wrapper from here...
	* lib/std/functional.lua (case): ...to here.
	* lib/std/package.lua (path_sub): Decouple from std.functional by
	comparing manually rather than using functional.case.

2014-08-07  Gary V. Vaughan  <gary@gnu.org>

	functional: rename fold to reduce.
	* specs/functional_spec.yaml (fold): Remove argument checking
	specifications.
	Add deprecation warning specification.
	(reduce): Specify identical behaviour to old fold api.
	* lib/std/functional.lua (fold): Rename from this...
	(reduce): ...to this.
	(fold): Show a deprecation warning on first use.
	* specs/container_spec.yaml (construction): Adjust.
	* lib/std/list.lua (foldl, foldr): Use functional.reduce instead
	of deprecated functional.fold.
	* lib/std.lua.in (barrel): Install _G.fold from
	`std.functional.reduce`.
	* specs/std_spec.yaml (barrel): Adjust.
	* NEWS: Update.

	functional: map supports key:value remapping functions.
	* specs/functional_spec.yaml (map): Specify behaviour of passing
	all iteration return values to mapping function; and remapping
	when mapping function returns a key:value pair.
	* lib/std/functional.lua (map): Collect all iteration return
	values and propagate them to the mapping callback function.
	If there are two values returned from the callback, treat them as
	a key and value for setting in the results table.
	* NEWS: Update.

	functional: fold supports multi-return iterators.
	* specs/functional_spec.yaml (fold): Specify behaviour with
	iterators that return multiple values.
	* lib/std/functional.lua (fold): Collect all values returned by
	iterator and operate on the last one of those.
	* specs/container_spec.yaml (construction): Fold dereferences
	automatically, no need to manually dereference any more.
	* NEWS: Update.

	doc: add LDoc Type section for callback function signatures.
	* lib/std.lua.in (normalizecb): Document signature of memoize
	callback function.
	(memoize): Set type of *normalize* argument to new `normalizecb`
	signature.
	* lib/std/functional.lua (predicate): Document signature for a
	predicate function.
	(filter): Set type of *p* argument to new `predicate` signature.
	* lib/std/io.lua (fileprocessor): Document signature of
	process_files callback function.
	(process_files): Set type of *fn* to new `fileprocessor` function.
	* lib/std/string.lua (opentablecb, closetablecb, elementcb)
	(paircb, separatorcb): Document signature for render callback
	functions.
	(render): Set type of callback functions accordingly.
	* lib/std/table.lua (comparator): Document signature of sort
	comparison function.
	(sort): Set type of *c* argument to new `comparator` signature.

	functional: filter supports multi-parameter predicates.
	* specs/functional_spec.yaml (filter): Specify behaviours when
	called with an iterator that returns multiple values, and
	predicate that accepts multiple parameters.
	* lib/std/functional.lua (filter): Collect all results from
	iterator function, and propagate them all to the predicate call.
	* NEWS: Update.

	functional: collect creates tables from multi-return iterators.
	* specs/functional_spec.yaml (collect): Differentiate behaviours
	of calling collect with single return versus multiple return
	iterators.
	* lib/std/functional.lua (collect): Inject new elements into the
	collected values table using key:value pairs when the iterator
	returns more than one value.
	* NEWS: Update.

	maint: bump copyright years.
	* README.md: Bump copyright years to include 2014.

	maint: Update AUTHORS file.
	* AUTHORS: Update.

	maint: use fully qualified api names in all deprecation messages.
	* specs/list_spec.yaml (elems, index_key, index_value, relems)
	(reverse, :depair, :map_with, :transpose, :zip_with): Specify
	fully qualified api name in deprecation message.
	* specs/string_spec.yaml (assert, require_version, tostring):
	Likewise.
	* specs/table_spec.yaml (clone_rename, metamethod, ripairs):
	Likewise.
	* lib/std/list.lua (elems, index_key, index_value, relems)
	(reverse, :depair, :map_with, :transpose, :zip_with): Add `std.`
	prefix to deprecation messages.
	* lib/std/string.lua (assert, require_version, tostring):
	Likewise.
	* lib/table.lua (clone_rename, metamethod, ripairs): Likewise.

	functional: report bind api deprecations correctly.
	* specs/functional.yaml (bind): Specify deprecation warning
	behaviour when called with the legacy multi-argument parameter
	passing.
	* lib/std/functional.lua (bind): Use new getcompat/setcompat
	internal apis to report deprecation of legacy calling convention.

	base: unwrap functables before calling debug.setenv on Lua 5.1.
	* lib/std/base.lua (setfenv): Unwrap functables unconditionally,
	before delegating to `debug.setfenv` or Lua 5.2 emulation.

	base: propagate environments through export argcheck wrappers.
	* lib/std/base.lua (debug): Rename from this...
	(debug_init): ...to this.
	(_ARGCHECK, _DEBUG): Adjust accordingly.
	(getfenv, setfenv): Compatibility functions for Lua 5.2.
	(export): When returning argchecking wrapper function, propagate
	the wrapper's function environment to the inner function.
	* specs/base_spec.yaml (export): Adjust mkmagic not to rely on
	out-of-scope MAGIC table.

2014-08-05  Gary V. Vaughan  <gary@gnu.org>

	list: exchange parameter order for list.cons.
	Closes #72.
	* specs/list_spec.yaml (cons): Modernize specifications.
	Specify deprecation warning behaviour when calling cons with
	arguments in legacy order.
	* lib/std/list.lua (cons): If arguments appear to be in the
	wrong order, issue a deprecation warning and rewrite them into
	the correct order.
	* NEWS: Update.

	refactor: break apart base.DEPRECATED for component reuse.
	* lib/std/base.lua (DEPRECATIONMSG, getcompat, setcompat): New
	functions, factored out of...
	(DEPRECATED): ...here.  Simplify accordingly.

	refactor: use std.ipairs and std.pairs everywhere internally.
	* lib/std/container.lua, lib/std/functional.lua, lib/std/io.lua,
	lib/std/list.lua, lib/std/optparse.lua, lib/std/package.lua,
	lib/std/set.lua, lib/std/string.lua, lib/std/table.lua,
	lib/std/tree.lua, lib/std/vector.lua: Import and use `base.ipairs`
	and `base.pairs` everywhere
	* NEWS: Update.

	specs: capture list.map_with deprecation warning.
	* specs/list_spec.yaml (map_with): Modernize specifications for
	argument checking, split module function and object method
	specifications, and capture deprecation warning for list:map_with
	on first invocation.

	std: remove __ipairs support in favour of 1..#t iteration.
	* specs/std_spec.yaml (ipairs, ireverse, ripairs): Adjust
	specifications to verify treatment of __len metamethod, and
	ignore __ipairs metamethod.
	* lib/base.lua (ipairs): Using __len if available, or # operator
	otherwise, iterate over elments 1..#t.
	(unwrap__ipairs): Remove.  Simplifications above make this
	function superfluous.
	(ripairs, ireverse): Adjust accordingly.
	* lib/std/vector.lua (core_metatable.__ipairs)
	(alien_functions.__ipairs): Remove.
	* lib/std.lua.in (ipairs, ireverse, ripairs): Update LDocs.
	* NEWS: Update.

2014-08-04  Gary V. Vaughan  <gary@gnu.org>

	refactor: factor away math.pow.
	Upcoming Lua 5.3 deprecates `math.pow` in favour of the `^`
	operator.  We can easily eliminate stdlib's references to
	`math.pow` for future compatibility.
	* lib/std/operator.lua ("^"): Use `^` rather than `math.pow`.
	* lib/std/functional.lua (bind, fold): Use "^" lambda function
	instead of `math.pow` in LDocs.

2014-08-02  Gary V. Vaughan  <gary@gnu.org>

	refactor: simplify deprecation management.
	Closes #73.
	* specs/base_spec.yaml (DEPRECATED): Specify behaviours of an
	improved internal deprecation API.
	* specs/list_spec.yaml (elems, index_key, index_value, relems)
	(reverse): Specify default deprecation behaviours.
	* specs/string_spec.yaml (assert, require_version, tostring):
	Likewise.
	* specs/table_spec.yaml (clone_rename, metamethod, ripairs):
	Likewise.
	* lib/std/debug.lua (_DEBUG): Document new compat field.
	* lib/std/base.lua (_DEBUG): Set from debug_init.lua.
	(deprecate): Rename from this...
	(DEPRECATED): ...to this, and improve API.
	* lib/std/functional.lua (bind): Use it to mark the old bind
	API as deprecated since release 39.
	* lib/std/list.lua (elems, index_key, index_value, relems)
	(reverse): Collect in a new section and deprecate with the
	improved API.
	* lib/std/string.lua (assert, require_version, tostring):
	Likewise.
	* lib/std/table.lua (clone_rename, metamethod, ripairs):
	Likewise.
	* build-aux/sanity-cfg.mk (exclude_file_name_regexp): Don't choke
	on error specs in specs/list_spec.yaml
	* NEWS (Deprecations): Collect deprecated API NEWS for this
	release.

	string: reference totable correctly in string.pickle.
	Closes #79.
	* lib/std/string.lua (totable): Set to table.totable.
	Reported by Simon Cozens.

	list: specify shape method behaviours.
	* specs/list_spec.yaml (shape): Specify method behaviours.

	list: specify list.zip_with, and fix revealed bugs.
	* specs/list_spec.yaml (zip_with): Specify behaviour of zip_with
	method.
	* lib/std/list.lua (zip_with): Call list.map with correctly
	* ordered arguments.
	* NEWS: Update.

	list: specify list.transpose, and fix revealed bugs.
	* specs/list_spec.yaml (transpose): Specify behaviour of transpose
	method.
	* lib/std/list.lua (transpose): Handle empty list argument.
	Call list.map with correctly ordered arguments.
	* NEWS: Update.

	maint: reinstate specl package.path workaround for luarocks bug.
	Now that we're supporting LuaRocks' `init.lua suffixed filenames
	get installed to an init installation directory` bug again, we
	must adjust Specl's in-tree package.path to accommodate.
	* specs/spec_helper.lua.in (package.path): Add "lib/?/init.lua".
	* local.mk (std_path): Likewise

	specs: don't rely on `_G.arg[-1]:match "/lua[0-9.]*$"`
	When `specs/optparse_spec.yaml` came over from Specl, I forgot to
	upgrade the direct `hell.spawn` invocations to nicely abstracted
	`spec_helper.lua:luaproc` calls.
	* specs/optparse_spec.yaml (parser): Replace hell.spawn calls
	with luaproc calls, so that Lua interpreter is set correctly.

2014-07-31  Gary V. Vaughan  <gary@gnu.org>

	slingshot: sync with upstream for upload and moonscript support.
	* slingshot: Sync with upstream.
	* bootstrap.conf (slingshot_files): Delete removed
	ax_compare_version.m4.
	* README.md (Installation): Show moonscript rocks repo.
	* .travis.yml: Regenerate.

2014-07-29  Gary V. Vaughan  <gary@gnu.org>

	std: `std.require` now matches last dot-delimited version number.
	* specs/std_spec.yaml (require): Specify behaviours when a version
	string contains more than one substring with dot-delimited digits.
	* lib/std/base.lua (module_version): Anchor the version matching
	pattern at the end of the string.
	* lib/std.lua.in (require): Improve LDocs accordingly.
	* NEWS: Update.

	maint: reinstate LuaRocks init install bug workaround.
	Latest LuaRocks still has the bug where Lua source files ending
	in `init.lua` are installed to a subdirectory.  Put back the
	workaround I removed prematurely.
	* lib/std/debug_init.lua: Move from here...
	* lib/std/debug_init/init.lua: ...to here.
	* local.mk (dist_luastd_DATA): Remove lib/std/debug_init.lua.
	(dist_luastddebug_DATA): Add lib/std/debug_init/init.lua.

2014-07-25  Gary V. Vaughan  <gary@gnu.org>

	spec: modernize and normalize std specs.
	* specs/std_spec.yaml: Reduce redundancy, and update to modern
	style with fully argchecked apis.
	* lib/std.lua.in (barrel): Scribble deprecated functions into
	global namespace.

	doc: improve LDocs for std.lua.
	* lib/std.lua.in: Tidy up and normalize LDocs.

	refactor: move `table.metamethod` to `std.getmetamethod`.
	Be more in keeping with the style of core Lua.
	* lib/std/table.lua (metamethod): Deprecate.
	* lib/std.lua.in (getmetamethod): Export from here instead.
	* specs/table_spec.yaml, specs/std_spec.yaml: Adjust accordingly.
	* NEWS: Update.

	refactor: move `std.string.tostring` to `std.tostring`.
	* lib/std/string.lua (render, tostring): Move from here...
	* lib/std/base.lua (render, tostring): ...to here, with argchecks
	removed.
	* lib/std/string.lua (render): Re-export base.render from here.
	(tostring): Re-export base.tostring with a deprecation notice.
	* lib/std.lua.in (tostring): Re-export base.tostring from here.
	(memoize): Simplify accordingly.
	* specs/debug_spec.yaml, specs/string_spec.yaml,
	specs/std_spec.yaml: Adjust accordingly.
	* NEWS: Update.

	refactor: relocate std.lua contents to std.base and std.
	* specs/lua_spec.yaml: Remove. All specs moved from here...
	* specs/std_spec.yaml: ...to here.
	* specs/specs.mk (specl_SPECS): Remove specs/lua_spec.yaml.
	* lib/std/operator.lua (getmetamethod): Remove to break a
	require loop.
	* lib/std/lua.lua (assert, case, elems, eval, ielems, ipairs)
	(ireverse, lambda, memoize, pairs, require, ripairs): Move from
	here...
	* lib/std/base.lua (assert, case, elems, eval, ielems, ipairs)
	(ireverse, lambda, memoize, pairs, require, ripairs): ...to here,
	removing argchecks...
	* lib/std.lua.in (assert, case, elems, eval, ielems, ipairs)
	(ireverse, lambda, memoize, pairs, require, ripairs): ...and
	re-export from here with argcheck wrappers.
	(barrel, monkey_patch): Adjust accordingly.
	* lib/std/functional.lua (filter, fold, map): Adjust LDocs.
	(case, eval, memoize): Re-export with argcheck wrappers.
	* lib/std/string.lua (assert, require_version): Deprecate.
	* build-aux/config.ld.in (file): Remove lib/std/lua.lua.
	* local.mk (dist_luastd_DATA): Remove lib/std/lua.lua.
	* specs/functional_spec.yaml (fold): Adjust require imports.
	* NEWS: Update.

2014-07-24  Gary V. Vaughan  <gary@gnu.org>

	refactor: move `table.ripairs` to `lua.ripairs`.
	* specs/table_spec.yaml (ripairs): Specify deprecation warning
	on first use.
	* specs/lua_spec.yaml (ripairs): Specify all behaviours for
	ripairs.
	* lib/std/base.lua (ripairs): Shared core functionality for
	ripairs, respecting `__ipairs` metamethod even on Lua 5.1.
	* lib/std/table.lua (ripairs): Use it, with a deprecation
	warning on first use.
	* lib/std/lua.lua (ripairs): Re-export it from here with full
	argchecks.
	* NEWS: Update.

2014-07-23  Gary V. Vaughan  <gary@gnu.org>

	refactor: replace `list.reverse` with `lua.ireverse`.
	* specs/lua_spec.yaml (ireverse): Specify behaviour of new
	ireverse function.
	* specs/list_spec.yaml (relems, reverse): Specify new deprecated
	behaviours of these functions.
	* lib/std/list.lua (relems, reverse): Deprecated.
	* lib/std/base.lua (ireverse): New `__ipairs` aware generator of
	new reversed array-part of any table.
	* lib/std/lua.lua (ireverse): Export `base.ireverse`.
	(monkey_patch): Inject ireverse into given namespace.
	* specs/std_spec.yaml (monkey_patch): Adjust accordingly.
	* NEWS: Updated.

2014-07-21  Gary V. Vaughan  <gary@gnu.org>

	operator: break a require loop.
	* lib/std/base.lua: Remove unused `require "std.operator"` to
	break a require loop.

	operator: make '#' operator Lua 5.1 compatible.
	* specs/operator_spec.yaml (#): Specify behaviour of # operator.
	* lib/std/operator.lua (#): If there's a `__len` metamethod, call
	it manually before falling back to actual `#` operator.

2014-07-18  Gary V. Vaughan  <gary@gnu.org>

	doc: improve render LDocs @usage examples.
	* lib/std/string.lua (render, render_separator): Improve LDocs
	@usage examples.

	doc: add missing @function to prettytostring LDocs.
	* lib/std/string.lua (prettytostring): Add missing @function.

	refactor: move assert and require from std.string to std.lua.
	* specs/string_spec.yaml (assert, require): Move from here...
	* specs/lua_spec.yaml (assert, require): ...to here.
	* lib/std/string.lua (assert, module_version, require,
	version_to_list): Move from here...
	* lib/std/lua.lua (assert, module_version, require,
	version_to_list): ...to here.
	* lib/std/string.lua (assert): Propagate invocations to std.lua,
	with a deprecation warning.
	* NEWS: Update.

	refactor: decouple std.lua from other modules.
	* lib/std/lua.lua (wrapiterator): Move from here...
	* lib/std/base.lua (wrapiterator): ...to here.
	(ielems): Non-argchecked implementation.
	* lib/std/lua.lua (ielems): Use it.
	* lib/std/debug.lua, lib/std/list.lua, lib/std/set.lua,
	lib/std/tree.lua: Use base.ielems internally.
	* lib/std/functional.lua (case, eval, lambda, memoize): Load
	std.lua on demand when these functions are called rather than
	depending on it at require time.
	* lib/std/table.lua: Remove unused std.lua requirement.

	lua: add a monkey_patch function.
	* specs/lua_spec.yaml (monkey_patch): Specify behaviour of lua
	monkey_patch function.
	* lib/std/lua.lua (monkey_patch): Install lua functions into the
	given namespace.
	* lib/std/std.lua.in (monkey_patch): Add lua.monkey_patch
	invocation.
	(barrel): Remove double injection of `std.lua` functions.
	* specs/std_spec.yaml (barrel): Add new 'std.lua' functions.

2014-07-17  Gary V. Vaughan  <gary@gnu.org>

	Merge branch 'waffle-iron-master'

2014-07-17  Making GitHub Delicious.  <iron@waffle.io>

	add waffle.io badge

2014-07-17  Gary V. Vaughan  <gary@gnu.org>

	lua: support __ipairs and __pairs metamethods on Lua 5.1.
	* specs/lua_spec.yaml (ipairs, pairs): Specify portable behaviour
	for new functions.
	* lib/std/lua.lua (ipairs, pairs): New functions that support
	__ipairs and __pairs metamethods, even on Lua 5.1.
	(ielems, elems): Improve LDocs and argchecks.
	* specs/lua_spec.yaml (elems, ielems): Adjust error message specs.
	* NEWS: Update.

	debug: argcheck accepts a List object for a list parameter.
	* specs/debug_spec.yaml (argcheck): Remove specifications for
	mismatch errors between list parameters and List arguments.
	* lib/std/base.lua (argcheck): Accept an empty List object for a

	refactor: simplify list.flatten implementation.
	* lib/std/list.lua (flatten): Simplify.

	container: don't rewrap existing modulefunction functables.
	* lib/std/container.lua (modulefunction): When re-exporting
	module functions from another module, don't wrap inside another
	functable.

2014-07-16  Gary V. Vaughan  <gary@gnu.org>

	list: deprecate list.elems module function.
	* lib/std/list.lua (elems): Deprecate.
	* specs/list_spec.yaml (elems): Specify deprecation warning
	behaviour.

	refactor: consolidate and speed-up ielems and elems functions.
	* specs/table_spec.yaml (elems, ielems): Move from here...
	* specs/lua_spec.yaml (elems, ielems): ...to here.
	* specs/functional_spec.yaml (fold): Adjust ielems import.
	* lib/std/base.lua (ielems): Remove.
	* lib/std/table.lua (elems, ielems): Remove.
	* lib/std/lua.lua (elems, ielems): Wrap ipairs and pairs, taking
	care to honor __ipairs and __pairs metamethods, for a noticeable
	speedup.
	* lib/std/debug.lua, lib/std/list.lua, lib/std/tree.lua: Adjust
	ielems imports and examples.
	* build-aux/sanity-cfg.mk (sc_error_message_uppercase): Add
	specs/lua_spec.yaml.
	* NEWS: Update.

2014-07-14  Gary V. Vaughan  <gary@gnu.org>

	refactor: move language features to a new  `std.lua` module.
	* specs/functional_spec.yaml (case, eval, lambda, memoize): Move
	from here...
	* specs/lua_spec.yaml: New file. ...to here.
	* specs/std_spec.yaml: Adjust accordingly.
	* specs/specs.mk (specl_SPECS): Add specs/lua_spec.yaml.
	* build-aux/config.ld.in (file): Add lib/std/lua.lua.
	* lib/std/base.lua (lambda): Move from here...
	* lib/std/lua.lua (lambda): New file. ...to here.
	* local.mk (dist_luastd_DATA): Add lib/std/lua.lua.
	* lib/std/functional.lua (case, eval, lambda, memoize): Move from
	here...
	* lib/std/lua.lua (case, eval, lambda, memoize): ...to here.
	* lib/std/string.lua (pickle): Adjust LDocs eval cross reference.
	* NEWS: Update.

2014-07-11  Gary V. Vaughan  <gary@gnu.org>

	maint: revert automatic lambda string compilation.
	* lib/std/base.lua (lambda): Core Lua APIs require actual
	functions, so to be useful for passing lambda strings to core
	APIs and stdlib APIs alike, return a raw function rather than a
	functable.
	(argcheck): Don't accept a compilable lambda string where a
	function argument is expected.
	* lib/std/debug.lua (lambda, argcheck): Adjust LDocs.
	* lib/std/functional.lua: Likewise.
	(bind, case, collect, compose, curry, filter, fold, map)
	(memoize): Remove lambda argument compilation.
	* lib/std/io.lua (process_files): Likewise.
	* lib/std/list.lua (filter, foldl, foldr, map, map_with)
	(zip_with): Likewise.
	* lib/std/package.lua (mappath): Likewise.
	* lib/std/string.lua (render): Likewise.
	* lib/std/table.lua (sort): Likewise.
	* specs/debug_spec.yaml, specs/functional_spec.yaml,
	specs/io_spec.yaml, specs/list_spec.yaml,
	specs/package_spec.yaml, specs/string_spec.yaml,
	specs/table_spec.yaml: Adjust lambda specs.
	* NEWS: Update.

	specs: don't load std.object for std.list spec examples.
	* specs/spec_helper.lua.in (prototype): Copied from
	lib/std/base.lua.
	* specs/list_spec.yaml: Don't load 'std.object', use prototype
	from spec_helper.

	base: provide better errors from exported object methods.
	* specs/base_spec.yaml (export): Specify behaviour of exported
	object methods.
	* lib/std/base.lua (export): Use separator ':' between module name
	and method name when dealing with methods, as opposed to '.' when
	dealing with functions.
	Count method arguments starting at '0' for self in error messages.
	* build-aux/sanity-cfg.mk (sc_error_message_uppercase): Add
	specs/base_spec.yaml.

2014-07-10  Gary V. Vaughan  <gary@gnu.org>

	doc: object and container _functions fields are optional.
	* lib/std/container.lua (Container): _functions field is optional.
	* lib/std/object.lua (Object): Likewise.

	doc: clarify use of compiled lambda strings.
	* lib/std/functional.lua (Lambda): Add LDocs cross-references,
	and a usage example with call field.
	(lambda): Fix usage example not to show calling core Lua
	table.sort with a functable!

	refactor: simplify std.base.lambda.
	* lib/std/base.lua (lambda): Use `unpack` unconditionally.
	Save lambda string in Lambda object.

	doc: add LDocs for functional.lambda return functables.
	* lib/std/functional.lua (Lambda): Add LDocs.
	(lambda): Document return type correctly.

	doc: improve debug module LDocs.
	* lib/std/debug.lua (_DEBUG): Document default field values.
	(argerror): Document interaction between function and lambda
	strings.

	doc: improve functional module LDocs.
	* lib/std/functional.lua: Improve module header LDocs.

	functional: make nop an official functional method.
	* specs/functional_spec.yaml (nop): Specify behaviour of new nop
	module method.
	* specs/spec_helper.lua.in (nop): Remove one-off nop declaration.
	* specs/string_spec.yaml (finds): Specify in-situ nop.
	* specs/base_spec.yaml (std.base): Likewise.
	* lib/std/base.lua (nop): Declare an official nop function.
	* lib/std/functional.lua (nop): Re-export std.base.nop.
	* NEWS: Update.

2014-07-09  Gary V. Vaughan  <gary@gnu.org>

	maint: clean up NEWS.
	* NEWS: Update bitrotted recent entries to match reality.

	std: accept lamda strings as an alternative to functions.
	* specs/functional_spec.yaml, specs/io_spec.yaml,
	specs/list_spec.yaml, specs/package_spec.yaml,
	specs/string_spec.yaml, specs/table_spec.yaml: Specify behaviours
	of API calls that accept functions when given a lambda string
	instead.
	* lib/std/functional.lua (Lambda, lambda): Move from here...
	* lib/std/base.lua (Lambda, lamba): ...to here.
	(Lambda): Save arguments in table fields.
	(argcheck): Accept a valid lambda string in lieu of a Lua
	function.
	* lib/std/table.lua (sort): When passed a lambda string, pass the
	associated function to core table.sort.
	* lib/std/functional.lua (bind, case, collect, curry, filter)
	(fold, map, memoize): Accept lamda strings in lieu of Lua
	functions.
	* lib/std/io.lua (process_files): Likewise.
	* lib/std/list.lua (filter, foldl, foldr, map, map_with)
	(zip_with): Likewise.
	* lib/std/string.lua (render): Likewise.
	* NEWS: Update.

	specs: add specifications for std.operator.
	* specs/operator_spec.yaml: New file.  Specify behaviours for
	operator functions.
	* specs/specs.mk (specl_SPECS): Add specs/operator_spec.yaml.

2014-07-08  Gary V. Vaughan  <gary@gnu.org>

	refactor: factor functional.op into new std.operator module.
	* lib/std/functional.lua (op): Move from here...
	* lib/std/operator.lua (M): ...to here.
	(M[".."], M["{}"], M[#"], M["~"], M["%"], M["^"]): New operators.
	* local.mk (dist_luastd_DATA): Add lib/std/operator.lua.
	* build-aux/config.ld.in (files): Likewise.
	* local.mk (dist_module_DATA): Add std.operator.html.
	* NEWS: Update.

2014-07-07  Gary V. Vaughan  <gary@gnu.org>

	functional: new lambda function.
	Support compiling an anonymous Lua function from a "lambda string".
	* specs/functional_spec.yaml (lambda): Specify behaviour for a
	new lambda function.
	* lib/std/functional.lua (lambda): Satisfy specification.
	* NEWS: Update.

	functional: support multiple return values with memoize.
	* specs/functional_spec.yaml (memoize): Specify behaviour when
	passed a function with multiple return values.
	* lib/std/functional.lua (memoize): Save return values from
	wrapped function as a table, and unpack it when called again with
	the same arguments.
	* NEWS: Update.

2014-07-04  Gary V. Vaughan  <gary@gnu.org>

	doc: fix functional.op LDocs.
	* lib/std/functional.lua (op): Workaround LDoc's inability to
	render non-alphanumeric @field names.

	functional: support relational operators in op table.
	* lib/std/functional.lua (op): Add `<`, `<=`, `>` and `>=`.
	* NEWS: Update.

	specs: avoid tickling sc_error_message_uppercase sanity check.
	* specs/spec_helper.lua.in (raise): An alias to the error matcher
	to subvert matching `error` followed by `"[A-Z]` that prevents
	make dist from completing.
	* specs/container_spec.yaml (construction): Use the raise alias.

	reformat: order functional module functions asciibetically.
	* lib/std/functional.lua: Reorder module functions asciibetically.

	specs: don't pass a Tree to object constructor.
	* specs/tree_spec.yaml (construction): Don't pass a Tree to an
	object constructor.

	refactor: use a function to export container module methods.
	* specs/spec_helper.lua.in (badarg, toomanyarg): Format
	appropriately when module name is not given.
	* specs/container_spec.yaml (construction)
	Update to latest style:
	Add argcheck behaviour examples.
	* lib/std/base.lua (olen): Rename from this...
	(arglen): ...to this.
	(M): Export arglen and toomanyarg_fmt.
	* lib/std/container.lua (M): Add module name at element 1.
	(__tostring, __totable): Reformat these...
	(M.__tostring, M.__totable): ...as local table function
	declarations.
	(M.__call): When _ARGCHECK is not disabled, diagnose argument
	type errors in table _init styl objects, to satisfy newly
	specified behaviours.
	(mapfields): Upgrade to base export declaration (for overhead
	free argcheck calls with _DEBUG=false) and simplify accordingly.

2014-07-03  Gary V. Vaughan  <gary@gnu.org>

	maint: rename array to vector.
	In mathematics "array" suggests the possibility of multiple
	dimensions, and while one can simulate that with a std.array
	of std.arrays, the name "vector" is a better fit for what this
	class supports.
	* lib/std/array.lua, specs/array_spec.yaml: Move from here...
	* lib/std/vector.lua, specs/vector_spec.yaml: ...to here.
	Rename symbols accordingly.
	* build-aux/config.ld.in (file): Adjust accordingly.
	* local.mk (dist_luastd_DATA, dist_classes_DATA): Likewise.
	* specs/specs.mk (specl_SPECS): Likewise.
	* specs/string_spec.yaml (render): Adjust Array using example to
	Vector.

	refactor: use a function to export table apis.
	* specs/table_spec.yaml (clone, clone_select, elems, empty)
	(ielems, invert, keys, merge, merge_select, metamethod)
	(monkey_patch, new, pack, ripairs, size, totable, values):
	Update to latest style:
	Add "too many argument" behaviour checks.
	Simplify and standardise argument error message comparisons.
	* lib/std/table.lua (M): Add module name at element 1.
	(clone, clone_select, elems, empty, ielems, invert, keys)
	(merge, merge_select, metamethod, monkey_patch, new, pack)
	(ripairs, size, totable, values): Upgrade to base export
	declarations (for overhead free argcheck calls with _DEBUG=false)
	and simplify accordingly.

	maint: settle on calling std api calls `Module Functions`.
	* lib/std/debug.lua, lib/std/io.lua, lib/std/package.lua,
	lib/std/table.lua, lib/std/tree.lua: Consolidate comment section
	header as "Module Functions.".

2014-07-02  Gary V. Vaughan  <gary@gnu.org>

	maint: don't flag `Lua` strings as invalid errors in spec-files.
	* build-aux/sanity-cfg.mk (exclude_file_name_regexp): Add
	specs/debug_spec.yaml.

	debug: finish support for nil arguments in exported functions.
	Because luajit (legitimately) stops counting on the first nil
	value in a list, where Lua 5.1 and 5.2 keep counting, we have
	to do our own size calculations on argument vectors to be
	consistent.
	* lib/std/base.lua (olen): Return the largest integer key from a
	table.
	(match, export): Use it to ignore `nil` elements in the argument
	list when counting the number of arguments.

	debug: support nil arguments in functions declared with export.
	* lib/std/base.lua (opairs): Like ipairs, but does not stop at
	the first nil value.

2014-07-01  Gary V. Vaughan  <gary@gnu.org>

	refactor: use a function to export string apis.
	* specs/string_spec.yaml (__concat, __index, assert, caps, chomp)
	(escape_pattern, escape_shell, finds, format, ltrim, monkey_patch)
	(numbertosi, ordinal_suffix, pad, pickle, prettytostring, render)
	(require, require_version, rtrim, split, tfind, tostring, trim)
	(wrap): Update to latest style:
	Add "too many argument" behaviour checks.
	Simplify and standardise argument error message comparisons.
	* lib/std/string.lua (M): Add module name at element 1.
	(__concat, __index, assert, caps, chomp, escape_pattern)
	(escape_shell, finds, format, ltrim, monkey_patch, numbertosi)
	(ordinal_suffix, pad, pickle, prettytostring, render, require)
	(require_version, rtrim, split, tfind, tostring, trim): Upgrade
	to base.export declarations (for overhead free argcheck calls
	with _DEBUG = false) and simplify accordingly.

	refactor: simplify caps, chomp, escape_pattern and escape_shell.
	* lib/std/string.lua (caps, chomp, escape_pattern, escape_shell):
	Remove extraneous parens around return argument.
	Use Lua :-method call sugar to shorten gsub invocations.

	refactor: rename string.require_version to string.require.
	* specs/string_spec.yaml (require): A copy of the require_version
	specs.
	(require_version): Also check for deprecation warning on first
	use.
	(monkey_patch): Check that new `require` function is written into
	the given namespace.
	* specs/std_spec.yaml (barrel): Likewise.
	(monkey_patch): Check that the deprecated `require_version` is
	still written into the global namespace.
	* lib/std/string.lua (require_version): Rename from this...
	(require): ...to this.
	(require_version): A deprecated copy of `string.require`.
	* NEWS: Update.

	refactor: simplify std.string.require_version.
	* lib/std/string.lua (version_to_list, module_version): Factored
	out of require_version, rather than defining new temporary local
	functions on each invocation of require_version.
	(require_version): Simplify accordingly.

	refactor: simplify std.string.tfind.
	* lib/std/string.lua (tpack): Factored out of tfind, rather than
	defining a new temporary local pack function on every invocation.
	(tfind): Simplify accordingly.

	refactor: simplify std.string.format.
	* lib/std/string.lua (format): Simplify.

	refactor: simplify std.string.assert.
	* lib/std/string.lua (assert): Simplify.

	refactor: no need for the underscore in local _floor.
	There's no clash between M.floor and local floor now we're using
	`export` to declare api calls.
	* lib/std/math.lua (_floor): Rename from this...
	(floor): ...to this.  Adjust all callers.

	refactor: use a function to export package apis.
	* specs/package_spec.yaml (find, insert, mappath, normalize)
	(remove): Update to latest style.
	Add "too many argument" behaviour checks.
	Simplify and standardise argument error message comparisons.
	* lib/std/package.lua (M): Add module name at element 1.
	(find, insert, mappath, normalize, remove): Upgrade to
	base.export declarations (for overhead free argcheck calls with
	_DEBUG = false) and simplify accordingly.
	(package): Improve LDocs.

	specs: work around luajit argument counting gotcha.
	Luajit truncates a variadic function call's argument list at
	the first nil!
	* specs/base_spec.yaml (export): Don't pass nil part way through
	a variadic function call's argument list.

	base: support optional arguments in export type declarations.
	The algorithm is approximately to collect every possible
	permutation of argument type-spec list with and without any
	optional arguments.  An optional argument in the last position
	must match the given type or nil, so that the permutation with
	the final optional removed matches, allowing an uncaught
	mismatched type at that position.  Then we try to match the
	actual arguments against each permutation until one passes,
	otherwise diagnose the mismatch, reporting that any type
	at the mismatched index from all permutations is required.
	* specs/base_spec.yaml (export): Specify behaviours when called
	with a declaration containing an optional argument wrappend in
	square brackets.
	* lib/std/base.lua (match, formaterror): New functions; factored
	out of argcheck.
	(copy, match, normalize, permutations): New functions; support
	classification of matchable argument type-specs.
	(export): Use them to implement optional arguments in export
	type declarations to satisfy new specifications.

	doc: improve strict LDocs.
	* lib/std/strict.lua: Improve LDocs.

	doc: correct parameter descriptions on debug.argscheck.
	* lib/std/debug.lua (argscheck): Improve LDocs.

	specs: decouple spec_helper.lua from std.table and std.functional.
	* specs/spec_helper.lua.in (bind): Use our own implmentation of
	bind, otherwise if std.functional becomes unloadable, the whole
	specl suite is unusable.
	(totable): Likewise for std.table.totable.
	(set): No need to rely on std.set, when a simple table index
	dereference works equally well.

	refactor: use a function to export io apis.
	* specs/io_spec.yaml (catdir, catfile, die, monkey_patch)
	(process_files, readlines, shell, slurp, splitdir, warn)
	(writelines): Update to latest style.
	Add "too many argument" behaviour checks.
	Simplify and standardise argument error message comparisons.
	* lib/std/io.lua (M): Add module name at element 1.
	(catdir, catfile, die, monkey_patch, process_files, readlines)
	(shell, slurp, splitdir, warn, writelines): Upgrade to
	base.export declarations (for overhead free argcheck calls with
	_DEBUG = false) and simplify accordingly.
	(catdir, catfile, die, monkey_patch, process_files, readlines)
	(shell, slurp, splitdir, warn, writelines): Improve LDocs.
	* NEWS: Update.

	debug: revert export of trace.
	Both because the argument check wrapper is not properly tail-call
	eliminated by Lua 5.1, and because as a core function callback
	the function signature is fixed already, there's no good reason
	to check arguments on debug.trace.
	* specs/debug_spec.yaml (trace): Remove argument check behaviour
	specifications.
	* lib/std/debug.lua (trace): Remove the export wrapper.

2014-06-30  Gary V. Vaughan  <gary@gnu.org>

	debug: revert export of argerror, argcheck and argscheck.
	Annoyingly, Lua 5.1 misses an obvious tail call elimination when
	_DEBUG.argcheck is set, so the deep call to error gets the wrong
	level, and reports argument errors in the wrong functions!! Rather
	than uglify the code to remove the tail-calls and do a recount,
	or add a fudge factor when Lua 5.1 is detected, it's cleaner to
	remove the argchecking wrappers of the 3 affected functions -- at
	least until we're ready to drop Lua 5.1 support entirely.
	* specs/debug_spec.yaml (argerror, argcheck, argscheck): Mark the
	argument checking behaviours as pending.
	* lib/std/debug.lua (argerror, argcheck, argscheck): Comment out
	the argument checking wrappers, and call the bare functions.

2014-06-13  Gary V. Vaughan  <gary@gnu.org>

	debug: improve argcheck list semantics.
	Following the principle of least surprise, make a new `#list`
	check type that has the same behaviour as `list` did previously,
	for orthogonality with `#table`, and add a new `list`
	implementation for orthogonality with `table`.
	* specs/debug_spec.yaml (argcheck): Specify behaviours of `list`
	and `#list` with new semantics.
	* lib/std/debug.lua (argcheck): Update LDocs.
	* lib/std/base.lua (argcheck): Count the elements of a `list`
	and ensure that number is not greater than the result of the
	length operator -- i.e. the table has no holes, and no non-
	integer keys.
	When building a type-mismatch error, write `empty list` where
	appropriate.
	* lib/std/debug.lua (argcheck): Make the 2nd argument a `#list`.

	refactor: use export function to simplify debug argchecks.
	* lib/std/debug.lua (argcheck, argerror, argscheck, trace): Add
	argument checking.
	* specs/debug_spec.yaml: Adjust.

	refactor: use a string specifier instead of a table for export.
	* specs/base_spec.yaml (export): Specify behaviours of export
	function, particularly with argument errors.
	* lib/std/base.lua (export): In place of an export name and a
	table of expected argument types, parse a single `decl` argument
	into an export name and table of argument types.
	Support specified argument error behaviours.
	* lib/std/math.lua (floor, monkey_patch, round): Simplify
	accordingly.
	* lib/std/functional.lua (bind, case, collect, compose, curry)
	(eval, filter, fold, map, memoize): Likewise.

	refactor: use pipe-delimited strings for argcheck type lists.
	* specs/debug_spec.yaml (argcheck, argscheck): Adjust for
	pipe-delimited string instead of table of strings.
	* lib/std/base (argcheck): Use base.split to make a table from
	expected argument.
	* lib/std/array.lua, lib/std/container.lua, lib/std/debug.lua,
	lib/std/io.lua, lib/std/list.lua, lib/std/package.lua,
	lib/std/string.lua, lib/std/table.lua: Adjust argcheck and
	argscheck types argument accordingly.

	refactor: use a function to simplify bad argument specs.
	* specs/spec_helper.lua.in (badarg, toomanyarg): Assemble a
	suitable error string from arguments.
	* specs/function_spec.yaml, specs/math_spec.yaml: Simplify
	accordingly.

	refactor: use a function to export functional apis.
	* lib/std/base.lua (argcheck): Accept "func" as an alias for
	"function".
	(export): When the last types element ends with "*", check type
	of remaining unchecked args against it.
	If there is no "*" mark in the types list, and more arguments are
	passed than types entries, throw a "too many arguments" error.
	Return the unwrapped function argument, so it can be captured
	back into a local by the caller.
	* specs/functional_spec.yaml (case, curry, eval, memoize): Check
	these fixed argument functions throw a "too many arguments" error
	when called with too many arguments.
	* specs/math_spec.yaml (floor, monkey_patch, round): Likewise.
	* lib/std/functional.lua (bind, case, collect, compose, curry)
	(eval, filter, fold, map, memoize): Use base.export for
	conditional argument checking. Simplify accordingly.
	(functional): Rename from this...
	(M): ...to this.

	refactor: use a function to export math apis.
	* lib/std/base.lua (export): New function.  Add a function to the
	module export table, with or without argument checking as
	appropriate.
	* lib/std/math.lua (floor, monkey_path, round): Simplify
	accordingly.
	(M): Store the module prefix at index 1, for export argerror
	calls.
	* specs/spec_helper.lua.in (show_apis): Ignore module prefix at
	index 1 of export table.
	* specs/math_spec.yaml (round): Correct a typo in argerrors.

	list: deprecate index_key and index_value.
	* specs/list_spec.yaml (index_key, index_value): Check that the
	functions issue a depraction warning on first use.
	* lib/std/list.lua (index_key, index_value): Add deprecation
	warning with base.deprecate.
	* NEWS (Incompatible changes): Update.

	table: add elems and ielems module functions.
	* specs/table_spec.yaml (elems, ielems): Specify behaviour of
	new iterators.
	* lib/std/table.lua (elems): Iterate over all values of a table,
	for orthogonality with std.list and std.set.
	(ielems): Expose base.ielems in a type checking wrapper.
	* NEWS: Update.

	doc: disable LDoc backtick references.
	* build-aux/config.ld.in (backtick_references): Set to false, so
	we can write fixed-width font words in LDoc comments.

2014-06-10  Gary V. Vaughan  <gary@gnu.org>

	list: prefer numeric comparison to asciibetical in compare.
	Close #60.
	* lib/std/list.lua (compare): If tonumber can make numbers out
	of both arguments, use those results in preference to strings.
	* specs/list_spec.yaml (compare): Specify behaviours with elements
	that can be coerced to numbers.
	* specs/string_spec.yaml (require_string): Remove pending #60
	commands.  Add some more happy path examples.

2014-06-09  Gary V. Vaughan  <gary@gnu.org>

	refactor: differentiate module tables and prototype objects.
	It turns out that documentation and code is much clearer when
	we differentiate between `list` (the module table for `std.list`)
	and `List` (the prototype List object), because that makes it
	explicit whether we're calling a module function (`list.append`)
	or performing an operation with the prototype (`List.clone {}`).
	As a bonus, we gain a bit of speed by cloning the prototype
	object from the module table, by virtue of not having a
	`_functions` table to administer.
	* lib/std/array.lua, lib/std/base.lua, lib/std/container.lua,
	lib/std/debug.lua, lib/std/functional.lua, lib/std/io.lua,
	lib/std/list.lua, lib/std/math.lua, lib/std/object.lua,
	lib/std/optparse.lua, lib/std/set.lua, lib/std/strbuf.lua,
	lib/std/string.lua, lib/std/table.lua, lib/std/tree.lua: Always
	use the module table or prototype object as appropriate. Make
	sure the LDocs don't contradict us.

	doc: add functional.memoize usage example.
	* lib/std/functional.lua (memoize): Add a usage example.

	doc: fix some errors in functional usage docs.
	* lib/std/functional.lua (collect): list.relems requires a List.
	(map, filter, fold): list.elems requires a List.

	refactor: set local _ARGCHECK instead of dereferencing debug_init.
	* lib/std/array.lua, lib/std/base.lua, lib/std/function.lua,
	lib/std/io.lua, lib/std/list.lua, lib/std/package.lua,
	lib/std/string.lua, lib/std/table.lua: Set local _ARGCHECK
	instead of importing std.debug_init and dereferencing it all the
	time.

	refactor: string.split is an argchecking base.split.
	* lib/std/base.lua (split): Remove argument checking.
	* lib/std/string.lua (split): Re-export base.split when we are
	not argchecking, otherwise check types and call base.split when
	successful.

	refactor: table.metamethod is an argchecking base.getmetamethod.
	* lib/std/base.lua (metamethod): Rename from this...
	(getmetamethod): ...to this, and remove argument checking.
	Adjust export table.
	* lib/std/table.lua (metamethod): Re-export base.getmetamethod
	when we are not argchecking, otherwise check types and call
	base.getmetamethod when successful.
	* lib/std/object.lua (clone): Adjust.
	* lib/std/string.lua (render): Likewise.

	refactor: list.elems is an argument checking base.ielem wrapper.
	Functions in std.base are for internal use, and so all callers
	have already validated arguments, so we shouldn't waste time
	rechecking types on every call to base.elems.
	Also this means list.elems can be strict about only accepting
	List objects, and catch accidental table passing earlier.
	* lib/std/base.lua (elems): Move from here...
	(ielems): ...to here, and remove argument checking.  Adjust
	export table.
	* lib/std/list.lua (elems): Re-export base.ielems when we are not
	argchecking, otherwise check types and call base.ielems when
	successful.
	* lib/std/debug.lua (tabify): Use non-argchecked base.ielems.
	* lib/std/list.lua (concat, depair, filter, foldl, map)
	(map_with): Likewise.
	* lib/std/set.lua (Set._init): Likewise.
	* lib/std/table.lua (merge_namedfields): Likewise.
	* lib/std/tree.lua (Tree.__index): Likewise.
	* specs/functional_spec.yaml (fold): Use List objects
	consistently.
	* specs/list_spec.yaml (elems): Adjust error message
	expectations.

	list: add argchecks.
	* specs/list_spec.yaml (append, compare, concat, cons, depair)
	(elems, enpair, filter, flatten, foldl, foldr, index_key)
	(index_value, map, map_with, project, relems, rep, reverse)
	(shape, sub, tail, traspose, zip_with): Specify behaviours for
	missing or wrong type arguments.
	8 specs/object_spec.yaml: Decouple from list implementation
	details.
	* lib/std/list.lua (append, compare, concat, cons, depair)
	(elems, enpair, filter, flatten, foldl, foldr, index_key)
	(index_value, map, map_with, project, relems, rep, reverse)
	(shape, sub, tail, traspose, zip_with): Check argument types
	when not disabled by _DEBUG.
	* build-aux/sanity-cfg.mk: Disable bogus failures when rejecting
	uppercase error messages with lib/std/list.lua.

2014-06-08  Gary V. Vaughan  <gary@gnu.org>

	refactor: use list copying constructor to simplify list.append.
	* lib/std/list.lua (append): Use implicit copy of argument object
	constructor rather than slower __call constructor and explicit
	unpack of argument elements.

	list: index_value and index_key return raw tables.
	* specs/list_spec.yaml (index_key, index_value): Specify proper
	behaviours.
	* lib/std/list.lua (index_key, index_value): A non-contiguous
	set of valid results cannot be represented as a std.list object,
	so return a raw table.

2014-06-07  Gary V. Vaughan  <gary@gnu.org>

	doc: improve object LDocs, and add usage examples.
	* lib/std/object.lua: Add usage examples to apis.
	(clone): Normally we'd use the __call metamethod to clone from a
	given object, so mark the LDocs for clone as @static because it
	is primarily a module function.
	(prototype): Mark the function documentation as @static, and add
	equivalent method documentation.

	doc: add usage examples to container LDocs.
	* lib/std/container.lua (__call, __tostring, __totable): Add
	usage examples to LDocs.

	container: argcheck apis.
	* lib/std/container.lua (mapfields, __call, __tostring)
	(__totable): While it would be extremely convoluted to dig out
	the functions behind these apis to call them with non-object
	initial arguments, add type checking for completeness.

	doc: add usage examples to array LDocs.
	* lib/std.array.lua: Add usage examples to LDocs.

	doc: move stringification functions to their own section.
	* lib/std/string.lua (render, tostring, prettytostring, pickle):
	Move to a new 'Stringification Functions' section.

	string: split on whitespace by default.
	* specs/string_spec.yaml (split): Add an example with no explicit
	split-pattern argument.
	* lib/std/base.lua (split): Default split-pattern to `%s+` when
	no argument provided.
	* lib/std/string.lua (split): LDocs cite `%s+` as the default
	pattern instead of `%s*`.
	* NEWS: Update.

2014-06-06  Gary V. Vaughan  <gary@gnu.org>

	std: use argcheck instead of assert for type checking.
	* specs/std_spec.yaml (barrel, monkey_patch): Make bad argument
	examples more specific.
	* lib/std.lua.in (barrel, monkey_patch): Use argcheck calls for
	type checking insntead of assert.

	debug: support trailing "?" in place of separate "nil" in argcheck.
	* specs/debug_spec.yaml (argcheck): Specify behaviour of trailing
	"?" in type specifiers.
	* lib/std/base.lua (argcheck): Strip trailing "?" from acceptable
	argument types, appending a "nil" entry to the list if any "?"
	is stripped.
	* lib/std/base.lua, lib/std/debug.lua, lib/std/functional.lua,
	lib/std/math.lua, lib/std/package.lua, lib/std/string.lua,
	lib/std/table.lua: Adjust all callers to use trailing "?" instead
	of separate explicit "nil" in type list.

	string: add argchecks and improve LDocs.
	* specs/string_spec.yaml (assert, caps, chomp, escape_pattern)
	(escape_shell, finds, format, ltrim, monkey_patch, numbertosi)
	(ordinal_suffix, pad, prettytostring, render, require_version)
	(rtrim, split, tfind, trim, wrap): Specify behaviours with bad
	or missing arguments.
	* lib/std/string.lua (assert, caps, chomp, escape_pattern)
	(escape_shell, finds, format, ltrim, monkey_patch, numbertosi)
	(ordinal_suffix, pad, prettytostring, render, require_version)
	(rtrim, split, tfind, trim, wrap): Use argcheck or argscheck to
	ensure argument types are validated when _DEBUG is not `false`.
	Improve LDocs with @usage examples and parameter types.
	* NEWS: Update.

	specs: add missing std.string specs.
	* specs/string_spec.yaml (assert, pickle, render, require_version)
	(tostring): Specify behaviour of these calls.
	(require_version): Add pending examples for newly discovered
	issue with non-numeric ordering.

2014-06-05  Gary V. Vaughan  <gary@gnu.org>

	string: fix number extraction in require_version.
	* lib/std/string.lua (require_version): Change the match pattern
	to actually extract the numeric part of the version string.
	Also update LDocs to cite correct module._VERSION (with an under-
	score).
	* NEWS: Update.

	tree: remove std.object dependency.
	No need to pull in all of std.object when loading std.tree.
	* lib/std/tree.lua: Use base.prototype directly instead of via
	re-exported object.prototype, which allows complete removal of
	std.object dependency.
	While we're here, use imported functions from locals to speed up
	access a tiny bit.

	tree: remove std.list dependency requirement.
	No need to pull in all of std.list when loading std.tree, just
	for the foldl function.
	* lib/std/tree.lua (__index): Use func.fold and base.elems from
	existing required modules instead of list.foldl.

	string: remove unused string.__append metamethod.
	The __append metamethod was added in commit 7a548ba, but only
	ever had one client in the defunct std.lcs module which was
	removed in commet 5f0a8af.
	* lib/std/string.lua (__append): Remove. No longer required.
	* specs/string_spec.yaml: Remove __append examples and references.

	refactor: put api and helper functions in sections.
	* lib/std/array.lua, lib/std/container.lua, lib/std/io.lua,
	lib/std/optparse.lua, lib/std/package.lua, lib/std/set.lua,
	lib/std/string.lua, lib/std/table.lua, lib/std/tree.lua: To make
	it clear that user-facing code ("api functions") need argument
	checking, but internal code ("helper functions") does not,
	explicitly separate those kinds of functions, and add some
	block headers.

	array: remove duplicate nested argcheck, correctly this time.
	* lib/std/array.lua: Where a function or metamethod is called via
	`dispatch`, which already checks that the first argument is an
	Array object, don't recheck type of self.  If that leaves only
	arguments of type "any" then don't spend any time checking
	argument types at all.

	array: remove duplicate nested argcheck.
	* lib/std/array.lua (dispatch): Remove duplicate nested argcheck.
	The dispatched to functions already run a full argscheck, so no
	need to check again here.

	maint: minimize overhead with argchecks disabled.
	* lib/std/array.lua (__call): Wrap argchecking block in
	`if debug._ARGCHECK`.
	* lib/std/functional.lua (compose): Likewise.
	* lib/std/io.lua (catdir, catfile): Likewise.
	* lib/std/package.lua (normalize, insert): Likewise.
	* lib/std/base.lua (split): Use argscheck instead of assert.
	* lib/std/math.lua (monkey_patch): Likewise.
	* specs/math_spec.yaml (monkey_patch): Adjust bad argument
	behaviours.

	table: complete specs and improve LDocs.
	* lib/std/table.lua (clone, clone_select, empty, invert, keys)
	(merge, merge_select, monkey_patch, new, pack, ripairs, size)
	(sort, totable, values): Add argcheck calls, and improve LDocs
	with usage examples & cross-references.
	(clone, clone_select, merge, merge_select): Minimise overhead
	when argchecking is disabled by wrapping complex argument
	checking in `if init._ARGCHECK`.
	* specs/table_spec.yaml (pack, ripairs, totable): Add missing
	specifications.
	(clone, clone_select, empty, invert, keys, merge, merge_select)
	(monkey_patch, new, size, sort, values): Improve specs to match
	argcheck behaviours.

2014-06-04  Gary V. Vaughan  <gary@gnu.org>

	refactor: move _ARGCHECK calculation into std.debug_init.
	* lib/std/base.lua (_ARGCHECK): Move from here...
	* lib/std/debug_init.lua (M._ARGCHECK): ...to here.
	Adjust clients.

	maint: remove workaround for legacy LuaRocks bug.
	* local.mk (dist_luastddebug_DATA): Move
	lib/std/debug_init/init.lua from here...
	(dist_luastd_DATA): ...to lib/std/debug_init.lua.
	(luastddebugdir, dit_luastddebug_DATA): Remove.

	doc: consolidate LDoc headers for core extension modules.
	* lib/std/debug.lua, lib/std/io.lua, lib/std/math.lua,
	lib/std/package.lua, lib/std/string.lua, lib/std/table.lua:
	Consolidate LDoc headers for consistency.

2014-06-03  Gary V. Vaughan  <gary@gnu.org>

	package: check api call argument types, and improve LDocs.
	* specs/package_spec.yaml (find, insert, mappath, normalize)
	(remove): Specify bad argument behaviours.
	* lib/std/package.lua (find, insert, mappath, normalize)
	(remove): Use argscheck to diagnose bad arguments.
	Add usage examples to LDocs.

	debug: support ":foo" parameter types with argcheck.
	* specs/debug_spec.yaml (argcheck): Specify behaviours of using
	":foo" as a parameter type.
	* lib/std/base.lua (argcheck): Implement ":foo" parameter checking.
	* lib/std/debug.lua (argcheck): Update LDocs.

	refactor: reduce module dependencies of std.debug.
	* lib/std/debug.lua: Remove std.io dependency by using core
	file:write instead of std.io.writelines.
	Remove std.list dependency by using lighter functional.map instead
	of list.map.
	Remove unused std.object dependency.
	(tabify): Instead of a deeply nested in-situ call to list.map
	and others, functionally compose an equivalent and use that to
	simplify.

	maint: use "int" argcheck type as appropriate.
	* lib/std/array.lua, lib/std/functional.lua: Use "int" parameter
	type with argcheck as appropriate.
	* lib/std/debug.lua (argscheck): Adjust usage example.
	* specs/array_spec.yaml, specs/functional_spec.yaml: Adjust.

	math: check api call argument types.
	* specs/math_spec.yaml (floor, round): Specify bad argument
	behaviours.
	* lib/std/math.yaml (floor, round): Use argscheck to diagnose
	bad arguments.

	debug: support "int" parameter type with argcheck.
	* specs/debug_spec.yaml (argcheck): Specify behaviours of using
	"int" as a parameter type.
	* lib/std/base.lua (argcheck): Implement "int" parameter checking.

	math: complete specs and improve LDocs.
	* lib/std/math.lua (floor, monkey_patch, round): Improve LDocs
	with usage examples.
	* specs/io_spec.yaml (floor, round): Add missing specifications.

	maint: add an LDoc module header to private std.base module.
	* lib/std/base.lua: Add LDoc module header.

	refactor: move split implementation from string to base.
	Decouple std.io from std.string (and hence std.table, std.list,
	std.functional, std.object, and std.container) by moving
	implementation of split into lib/std/base.lua.
	* lib/std/string.lua (split): Move from here...
	* lib/std/base.lua (base): ...to here, and export.
	* lib/std/string.lua: Re-export base.split as string.split.
	* lib/std/io.lua: Don't pull all of string.lua and it's
	dependencies into memory; use base.split instead of string.split.

	maint: use 2 blank lines between function definitions.
	* lib/std/package.lua, lib/std/strict.lua, lib/std/string.lua:
	Use 2 blank lines between function definitions.

	debug: complete specs and improve LDocs.
	* lib/std/debug.lua (__call, _DEBUG, argcheck, argerror)
	(argscheck, say, trace): Improve LDocs with usage examples and
	cross-references.
	* specs/debug_spec.yaml (_DEBUG): Remove. _DEBUG behaviours are
	specified in the api calls that are affected by it.
	(say, trace): Add missing specificatons.

	specs: account for different error messages between 5.1 and 5.2.
	* specs/io_spec.yaml (process_files): Accept either of the
	error message formats for passing a non-existent file to io.input
	for Lua 5.1 or Lua 5.2.

2014-06-02  Gary V. Vaughan  <gary@gnu.org>

	std: improve LDocs.
	* lib/std.lua.in: Improve LDocs with usage examples and
	clearer language.

	io: complete specs and improve LDocs.
	* lib/std/io.lua (catdir, catfile, die, monkey_patch)
	(process_files, readlines, shell, slurp, splitdir, warn)
	(writelines): Improve LDocs with usage examples and cross-
	references.
	* specs/io_spec.yaml (catdir, catfile, die, monkey_patch)
	(process_files, readlines, shell, slurp, splitdir, warn)
	(writelines): Add missing specificatons.
	* specs/spec_helper.yaml (concat_file_content): New function to
	support new specifications.
	(luaproc): Support subprocess arguments and standard input.

2014-06-01  Gary V. Vaughan  <gary@gnu.org>

	object: enhance prototype to recognize file objects.
	* specs/object_spec.yaml (prototype): Specify results of passing
	file handles and Lua primitives to prototype.
	* lib/std/object.lua (prototype): Improve LDocs.
	* lib/std/base.lua (prototype): Enhance implementation to meet
	new specifications.
	* NEWS: Update.

	io: use argcheck for api functions.
	* specs/io_spec.yaml (catdir, catfile, die, monkey_patch)
	(process_files, readlines, shell, slurp, splitdir, warn)
	(writelines): Specify argument type mismatch messages.
	* lib/std/io.lua (catdir, catfile, die, monkey_patch)
	(process_files, readlines, shell, slurp, splitdir, warn)
	(writelines): Call argcheck to validate arguments and meet
	specifications.

2014-05-31  Gary V. Vaughan  <gary@gnu.org>

	debug: add file object matching to argcheck.
	* specs/debug_spec.yaml (argcheck): Specify behaviour when
	matching against a file type argument.
	* lib/std/debug.lua (argcheck): Add LDocs for file type.
	* lib/std/base.lua (argcheck): When the required type is "file"
	use io.type () to ensure that an open file object argument was
	passed.

	io: don't pull in tree and dependencies with `require "io"`.
	* lib/std/io.lua (tree): Remove requirement.
	(base): Replace with much lighter module.
	(writelines): Call base.leaves instead of tree.ileaves. In
	addition to reducing coupling, this also saves another round
	of `argscheck`ing, and a callstack frame.

2014-05-30  Gary V. Vaughan  <gary@gnu.org>

	array: support ipairs iteration over elements.
	* specs/array_spec.yaml (__ipairs): Specify behaviour of ipairs
	with arrays.
	* lib/std/array.lua (core_metatable.__ipairs)
	(alien_metatable.__ipairs): Implement ipairs support for table
	and alien.buffer managed table elements.

	maint: demonstrate new and legacy bind api correctly.
	Seems like I was confused over which functional.bind api was the
	old, and which was the new.  Correct that.
	* specs/functional_spec.yaml (bind): Swap examples of new bind
	api labelled legacy and vice versa.
	* NEWS: Update.

2014-05-29  Gary V. Vaughan  <gary@gnu.org>

	refactor: merge std.base_array into std.array.
	Instead of a one-way degrading from alien.buffer managed elements
	to table managed elements with a sub-type, combine both sets of
	optimised methods and metamethods back into a single `std.array`
	container, which decides with each clone operation how to manage
	elements of the named type.
	* specs/array_spec.yaml: Specify behaviours for Array object that
	dispatches module function calls at runtime, and assigns
	optimized methods and metamethods on cloned objects according to
	element type.
	* lib/std/base_array.lua (pop, push, realloc, set, shift, unshift)
	(__index, __newindex, __len, __tostring): Move from here...
	* lib/std/array.lua (core_functions.pop, core_functions.push)
	(core_functions.realloc, core_functions.set, core_functions.shift)
	(core_functions.unshift, core_metatable.__index)
	(core_metatable.__newindex, core_metatable.__len)
	(core_metatable.__tostring: ...to here.
	(pop, push, realloc, set, shift, unshift, __index, __newindex):
	Move from here...
	(alien_functions.pop, alien_functions.push, alien_functions.set)
	(alien_functions.realloc, alien_functions,shift)
	(alien_functions.unshift, alien_metatable.__index)
	(alien_metatable.__newindex): ...to here.
	(core_metatable.__call): Clone a new Array object, setting the
	method and metatables with functions optimised for alien.buffer
	or Lua table based element management according to availability of
	alien, and element type name.
	(dispatch): New runtime virtual table dispatch function.
	(Array): Dispatch module functions at runtime based on element
	type.
	* lib/std/base_array.lua: Remove.
	* local.mk (dist_luastd_DATA): Remove lib/std/base_array.lua.
	* specs/base_array_spec.yaml: Remove.
	* specs/specs.mk (specl_SPECS): Remove specs/base_array_spec.yaml.
	* NEWS: Update.

	functional: complete specs and improve LDocs.
	* lib/std/functional.lua (bind, case, curry, compose, eval)
	(collect, map, filter, fold): Improve LDocs with usage examples,
	and cross-references.
	* specs/functional_spec.yaml (collect, compose, curry, eval)
	(filter, fold, id, map, memoize): Add missing specifications.

	debug: argcheck can match functable with "function".
	* specs/debug_spec.yaml (argcheck): Specify correct behaviour
	when matching a functable against a "function" argument.
	* lib/std/base.lua (argcheck): Allow functables when a "function"
	type argument is required.
	* lib/std/debug.lua (argcheck): Update LDocs.

	functional: bind should not require respecifying fixed args.
	* specs/functional_spec.yaml (bind): Move incumbent examples to
	a new legacy example.  Rewrite original examples with new api.
	Add specifications for behaviour when not all arguments are
	given in the call to the bound function.
	* lib/std/functional.lua (bind): Fill initial argument positions
	from original bind arguments, and then propagate final call
	arguments into non-fixed parameter positions.
	* NEWS: Update.

	functional: use argscheck for api functions.
	* specs/functional_spec.yaml (metamethod): Remove.  This method
	has moved to std.table.
	(bind, case, collect, compose, curry, eval, filter, fold, map)
	(memoize): Specify behaviour with missing or wrong type
	arguments.
	* lib/std/functional.yaml (bind, case, collect, compose, curry)
	(eval, filter, fold, map, memoize): Add argscheck calls to
	validate arguments when _DEBUG or _DEBUG.argcheck are not false.

	refactor: omit spurious parentheses around require result dereferences.
	* lib/std/container.lua, lib/std/object.lua, lib/std/set.lua,
	lib/std/string.lua, lib/std/tree.lua, specs/container_spec.yaml,
	specs/list_spec.yaml, specs/object_spec.yaml,
	specs/set_spec.yaml, specs/spec_helper.lua.in: Omit spurious
	parentheses around require result dereferences.

	base: use argscheck for api functions.
	* specs/base_spec.yaml (deprecate), specs/list_spec.yaml (elems):
	Specify bad argument behaviours.
	* specs/table_spec.yaml (metamethod): Add missing specifications,
	including bad argument behaviours.
	* lib/std/base.lua (deprecate, elems, metamethod): Use argscheck
	to implement specified behaviours.

	refactor: don't pull in all of debug's dependencies for array.
	* lib/std/array.lua, lib/std/base_array.lua: Import argcheck and
	argscheck from std.base.

	refactor: move argscheck et.al. into std.base module.
	Unfortunately, debug.say is a very high level function that pulls
	in a lot of other modules, modules that we'd like to be able to
	add debug.argscheck to... since argscheck has almost no pre-
	requisites, move it into the base module where it can then be
	available everywhere else.
	* lib/std/container.lua (prototype): Move from here...
	* lib/std/base.lua (prototype): ...to here.
	* lib/std/debug.lua (concat, argerror, argcheck, argscheck):
	Move from here...
	* lib/std/base.lua (concat, argerror, argcheck, argscheck): ...to
	here.
	Be sure to disable argument checking if _DEBUG or _DEBUG.argcheck
	are false.

2014-05-27  Reuben Thomas  <rrt@sc3d.org>

	functional.lua: add missing parameter name to docstring

2014-05-24  Gary V. Vaughan  <gary@gnu.org>

	alien: remove surplus std.alien module.
	* lib/std/array.lua: Factor away dependencies on std.alien.
	(__call): Instead of an _init call built for container.__call,
	we now use a custom __call metamethod that returns a base_array
	object that is optimized for Lua table buffers when the element
	type is not recognized (either because there is no alien module
	installed, or it does not support buffers of the given type), or
	else builds an alien.buffer optimised object and returns that.
	* lib/std/alien.lua, specs/alien_spec.yaml: Remove.
	* build-aux/config.ld.in (file): Remove lib/std/alien.lua.
	* local.mk (dist_luastd_DATA): Likewise.
	(dist_modules_DATA): Remove doc/modules/std.alien.html.
	* specs/specs.mk (specl_SPECS): Remove specs/alien_spec.yaml.

	base_array: non-alien capable base class for std.array.
	* specs/base_array_spec.yaml: New file.  Specify behaviour for
	base_array.
	* specs/specs.mk (specl_SPECS): Add specs/base_array_spec.yaml.
	* lib/std/base_array.lua: New file. Implement base_array class to
	satisfy specification.
	* local.mk (dist_luastd_DATA): Add lib/std/base_array.lua.

	debug: argcheck "any" does not match `nil`.
	* specs/debug_spec.yaml (argcheck): Passing a nil argument does
	not satisfy the "any" spec.
	* lib/debug.lua (argcheck): Require non-nil argument before
	setting passing status for an "any" spec.
	(argscheck): Remove "any" shortcut.

2014-05-21  Gary V. Vaughan  <gary@gnu.org>

	optparse: fix another global symbol leak.
	* lib/std/optparse.lua (on): Declare `key` as a local variable.

	optparse: fix a global symbol leak.
	* lib/std/optparse.lua (on): Declare `normal` as a local variable.
	* NEWS (Bug fixes): Updated.

	configury: don't require specific git version.
	* bootstrap.conf (buildreq): Don't set a git version number, or
	else `GIT=true ./bootstrap` doesn't work.

	slingshot: sync with upstream.
	* slingshot: Sync with upstream for grep GNUism fix.

2014-05-20  Gary V. Vaughan  <gary@gnu.org>

	array: support simultaneous alien and Lua array objects.
	* lib/std/array.lua (alien_type): A set of valid types for
	arrays to be implemented with alien.array.
	(topointer): Default offset to 1.
	(setzero): Use memset for alien arrays, direct element buffer
	copying for Lua arrays.
	(shift, unshift): Use memmove for manipulating alien.arrays, or
	else table.insert and table.remove for Lua tables.
	(copy): Remove.
	(clone): Use memmove for copying elements between same-size
	element alien arrays, direct element buffer copying otherwise.
	(_init): Simplify accordingly.

	array: a new Object based array for queue and stack-like ops.
	* specs/array_spec.yaml: New file. Specify base behaviours for a
	new array object.
	* specs/specs.mk (specl_SPECS): Add specs/array_spec.yaml.
	* lib/std/array.lua: New file. Implement specified behaviours.
	* build-aux/config.ld.in (files): Add lib/std/array.lua.
	* local.mk (dist_classes_DATA): Add doc/std.array.html.
	(dist_luastd_DATA): Add lib/std/array.lua.
	* NEWS: Update.

	debug: fix argerror diagnostics on luajit.
	Luajit seems to treat `return error` (where error never returns
	anyway) as subject to some kind of optimisation that loses a call
	stack level by the time `error` looks up the line number for the
	targetted level. Removing the `return` results in the same call
	stack frame reference in luajit, 5.2 and 5.1.
	* lib/std/debug.lua (argerror): Drop the extraneous `return`
	statement.

	debug: fix argcheck diagnostics on Lua 5.1.
	Lua 5.2 seems to treat `return argerror` (where argerror never
	returns anyway) as subject to some kind of optimisation that loses
	a call stack level by the time control flow reaches the `error`
	call inside. Removing the `return` results in the same call stack
	frame reference in 5.2 and 5.1, but requires incrementing the
	level for the correct result.
	* lib/std/debug.lua (argcheck): Drop the extraneous `return`
	statement, and increment `level` before calling `argerror`.

2014-05-19  Gary V. Vaughan  <gary@gnu.org>

	alien: implement a subset of alien to simplify wrappers.
	* specs/alien_spec.yaml: Specify behaviour for a useful subset
	of the alien APIs.
	* specs/specs.mk (specl_SPECS): Add specs/alien_spec.yaml.
	* local.mk (dist_modules_DATA): Add doc/modules/std.alien.html.
	* lib/std/alien.lua: New file, provide pure Lua implementation
	of alien.array, alien.memmove and alien.memset.
	* build-aux/config.ld.in (files): Add lib/std/alien.lua.
	* local.mk (dist_luastd_DATA): Add lib/std/alien.lua.

	debug: make sure to use debug.getinfo ().
	* lib/std/debug.lua (trace): Use debug.getinfo instead of bare
	getinfo.
	* NEWS: Update.

	debug: add argcheck APIs.
	* specs/debug_spec.yaml (argcheck, argerror, argscheck): Specify
	behaviour of argument checking functions based on luaL_argerror
	and luaL_argcheck, for standardised argument error diagnostics.
	* lib/std/debug.lua: Tidy up LDocs.
	(argcheck, argerror, argscheck): New functions to satisfy the
	specifications.
	* NEWS: Update.

2014-05-01  Gary V. Vaughan  <gary@gnu.org>

	maint: post-release administrivia.
	* configure.ac (AC_INIT): Bump version to 41.
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* ./local.mk (old_NEWS_hash): Auto-update.

	Release version 40
	* NEWS: Record release date.

	refactor: remove unused `std.modules`.
	* lib/std/modules.lua: Remove.
	* local.mk (dist_luastd_DATA): Adjust.

	refactor: use `t[#t + 1] = v` rather than `table.insert (t, v)`.
	Save a function call by factoring away calls to table.insert.
	* lib/std/container.lua, lib/std/functional.lua, lib/std/io.lua,
	lib/std/list.lua, lib/std/optparse.lua, lib/std/set.lua,
	lib/std/strbuf.lua, lib/std/string.lua, lib/std/table.lua,
	lib/std/tree.lua: Substitute accordingly.

	refactor: factor out merge_allfields and merge_namedfields.
	* lib/std/table (clone, merge): Move shared functionality from
	here...
	(merge_allfields): ...to here.
	(clone_select, merge_select): Move shared funtionality from
	here...
	(merge_namedfields): ...to here.

	refactor: move leaves and ileaves from base to tree module.
	* lib/std/base.lua (ileaves, leaves): Move from here...
	* lib/std/tree.lua (ileaves, leaves): ...to here.
	* lib/std/base.lua (_leaves): Rename from this...
	(leaves): ...to this.
	* lib/std/list.lua (flatten): Adjust.

	refactor: move unshared methods out of std.base.
	* lib/std/base.lua (merge): Move from here...
	* lib/std/table.lua (merge): ...to here.
	* lib/std/base.lua (append, compare, concat): Move from here...
	* lib/std/list.lua (append, compare, concat): ...to here.
	* specs/object_spec.yaml (std.object): Adjust.

	refactor: remove deprecated methods.
	* lib/std/base.lua (new, metatable): Remove.
	(concat, M): Simplify accordingly.
	* lib/std/functional.lua: No need to require std.base.
	* lib/std/set.lua (_functions): Move into object declaration,
	removing `new`.
	* lib/std/strbuf.lua (new): Remove.
	* lib/std/tree.lua (new): Remove.
	* NEWS: Update.

	tree: allow objects as keys.
	* lib/std/tree.lua (Tree.__index): Only fold key list when key
	parameter is a raw list, and not when it is a std.object derived
	table.
	(Tree.__newindex): Only descend the key list creating sub-Trees
	when key parameter is a raw list, and not when it is a std.object
	derived table.
	* NEWS: Update.

	functional: generalize memoize with normalization parameter.
	* lib/std/functional.lua (memoize): Don't rely on tostring
	having been monkey-patched to std.string.tostring already, but
	also don't automatically load all of std.string into memory
	unless memoize is called without a normalization function.
	* NEWS: Update.

	list: remove deprecated methods.
	* lib/std/list.lua: Remove indexKey, indexValue, mapWith, zipWith,
	new and slice.
	* NEWS: Update.

	specs: std.table.pack is present for any supported Lua release.
	* specs/table_spec.yaml (extend_base): List "pack" unconditionally.

	specs: Lua 5.1 does not call tostring on format "%s" arguments.
	* specs/string_spec.yaml (..): Explicitly stringify nil argument.

2014-04-26  Gary V. Vaughan  <gary@gnu.org>

	std: barrel of monkey(patche)s!
	Close #56.
	Segregate monkey patching into module functions that have to
	be called explicitly.
	* lib/std.lua.in: Don't clobber any core metatables, or change
	any global symbols on load.
	* specs/io_spec.lua (monkey_patch): Specify behaviour of
	std.io.monkey_patch function.
	* lib/std/io.lua (monkey_patch): Add readlines and writelines
	methods to core file objects.
	(processFiles): Remove.
	* specs/math_spec.lua (monkey_patch): Specify behaviour of
	std.math.monkey_patch function.
	* lib/std/math.lua (monkey_patch): Overwrite core math.floor.
	* specs/string_spec.lua (monkey_patch): Specify behaviour of
	std.string.monkey_patch function.
	* lib/std/string.lua (monkey_patch): Overwrite core assert and
	tostring functions, and add methods and metamethods to core
	string objects.
	(escapePattern, escapeShell, ordinalSuffix): Remove.
	* specs/table_spec.lua (monkey_patch): Specify behaviour of
	std.table.monkey_patch function.
	* lib/std/table.lua (monkey_patch): Overwrite core table.sort.
	* specs/table_spec.lua (barrel, monkey_patch): Specify behaviour
	of std.barrel and std.monkey_patch functions.
	* lib/std.lua.in (monkey_patch): New function for patching core
	symbols and metatables by calling submodule `monkey_patch`
	functions.
	(barrel): New function for scribbling all over the given
	namespace, as well as installing all std monkey_patches.
	* specs/debug_spec.yaml, specs/functional_spec.yaml,
	specs/io_spec.yaml, specs/math_spec.yaml, specs/package_spec.yaml,
	specs/std_spec.yaml, specs/string_spec.yaml, specs/table_spec.yaml,
	specs/tree_spec.yaml: Update to reflect removal of default
	monkey patching.

	refactor: move `metamethod` from `functional` to `table` module.
	* lib/std/functional.lua (metamethod): Move from here...
	* lib/std/base.lua (metamethod): ...to here; and...
	* lib/std/table.lua (metamethod): ...re-export from here.
	Break dependency on `std.functional`.
	Adjust all callers.
	* NEWS: Update.

	refactor: move clone and clone_rename back into std.table.
	* lib/std/base.lua (clone, clone_rename): Move from here...
	* lib/std/table.lua (clone, clone_rename): ...to here.

	refactor: break std.container dependency on std.base.
	* lib/std/container.lua (instantiate): New function; a faster
	equivalent to `merge (clone (proto), t or {})`.
	Adjust all callers.

	specs: fix a garbage-in, garbage-out example.
	Close #44.
	* specs/tree_spec.yaml (tostring): The assumption that tostring
	should recurse by itself, or that the Tree constructor should
	massage subtables on instantiation were both flawed.  Fix the
	input to be properly nested tree, and `tostring` will indeed
	output a properly nested tree.

2014-04-25  Gary V. Vaughan  <gary@gnu.org>

	docs: add missing doc for nometa arg of merge_select.
	* lib/std/table.lua (merge_select): Add missing nometa doc.

	table: add merge_select, and support map and nometa args to merge.
	Close #56.
	* specs/table_spec.yaml (extend_base): Add merge_select.
	(merge): Specify behaviour of new `map` and `nometa` args.
	(merge_select): Specify behaviour of new `merge_select` api.
	(clone, clone_select): Refactor for clarity and orthogonality.
	* lib/std/base.lua (merge): Rewrite to support clone-like `map`
	and `nometa` parameters, according to improved specifications.
	(clone): Rewrite as a call to `merge`.
	* lib/std/table.lua (merge_select): New `clone_select` like api
	satisfying specs.
	(clone_select): Rewrite as a call to `merge_select`.
	* NEWS: Update.

2014-04-23  Gary V. Vaughan  <gary@gnu.org>

	maint: post-release administrivia.
	* configure.ac (AC_INIT): Bump release number to 40.
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* ./local.mk (old_NEWS_hash): Auto-update.

	Release version 39
	* NEWS: Record release date.

	string: leave global string metatable alone.
	Close #30.
	* lib/std/string.lua (__append, __concat, __index): Move these
	metamethods together at the start of the file, and store them in
	the returned module table rather than setting them in the global
	string metatable.
	Improve header comments, to describe namespace issues.
	* lib/std.lua.in: Set string metatable elements from string module
	as before.
	* specs/string_spec.yaml: Adjust to compensate for changes in
	returned string module table.
	* NEWS: Update.

	specs: no need to explicitly require spec_helper any more.
	Since Specl 11, every spec-file automatically loads the
	spec_helper.lua from the same directory, if any.
	* specs/container_spec.yaml, specs/debug_spec.yaml,
	specs/functional_spec.yaml, specs/io_spec.yaml,
	specs/list_spec.yaml, specs/math_spec.yaml,
	specs/object_spec.yaml, specs/optparse_spec.yaml,
	specs/package_spec.yaml, specs/set_spec.yaml,
	specs/strbuf_spec.yaml, specs/string_spec.yaml,
	specs/table_spec.yaml, specs/tree_spec.yaml: Remove explicit
	`require "spec_helper"`.

	specs: take advantage of improvements to Specl DSL.
	* specs/container_spec.yaml, specs/debug_spec.yaml,
	specs/functional_spec.yaml, specs/io_spec.yaml,
	specs/list_spec.yaml, specs/math_spec.yaml,
	specs/object_spec.yaml, specs/optparse_spec.yaml,
	specs/package_spec.yaml, specs/set_spec.yaml,
	specs/std_spec.yaml, specs/strbuf_spec.yaml,
	specs/string_spec.yaml, specs/table_spec.yaml,
	specs/tree_spec.yaml: Use `not_to_` instead of `should_not`,
	`to_` instead of `should_` and `to_copy` instead of
	`should_equal` plus `should_not_be`.

2014-04-22  Gary V. Vaughan  <gary@gnu.org>

	maint: update raw urls to new github url scheme.
	* README.md: Use new `raw.githubusercontent.com` url scheme
	throughout.

	maint: regenerate spec_helper.lua for `make check` if necessary.
	* specs/specs.mk (specl-check-local): Add dependency on
	specs/spec_helper.lua, so that it is regenerated before the main
	`check-local` body is executed if necessary.

	specs: capture stub should return nil to match Specl 12.
	* specs/spec_helper.lua.in (capture): Return `nil` for stdout
	and stderr to match Specl 12 API.
	* specs/table_spec.yaml (clone_rename): Test for `nil`.

	specs: skip deprecation warning expectation when Specl < 12.
	* specs/table_spec.yaml (clone_rename): Skip deprecation warning
	expectation when the ""-returning stub is being used.

	specs: return empty out and err values from `capture` stub.
	* specs/spec_helper.lua.in (table.clone_rename): Return empty
	strings for stderr and stdout from fallback stubbed `capture`
	implementation.

	specs: elide clone_rename deprecation warning, with Specl 12.
	Fix #54.
	* specs/spec_helper.lua.in (capture): Stub inprocess.capture if
	installed Specl is too old to implement it.
	* specs/table_spec.yaml (clone_rename): Wrap clone_rename in
	inprocess.capture to elide deprecation warning on stderr.

	refactor: restore alphabetical ordering to table specs.
	* specs/table_spec.yaml (clone_rename): Move back into alpha-
	betical order.

2014-04-21  Gary V. Vaughan  <gary@gnu.org>

	maint: move repository to its own project.
	* README.md, configure.ac, rockspec.conf,
	* specs/optparse_spec.yaml: Replace rrthomas with lua-stdlib.

	specs: ignore local LUA_INIT and LUA_INIT_5_2 settings.
	Fix #53.
	* specs/specs.mk (SPECL_ENV): Until the next Specl release is
	available, manually reset LUA_INIT and LUA_INIT_5_2.
	* bootstrap.conf (buildreq): Add a reminder to clean up after
	Specl 12.

2014-04-21  Reuben Thomas  <rrt@sc3d.org>

	Reverse order of arguments to functional.compose; closes #52

2014-04-21  Gary V. Vaughan  <gary@gnu.org>

	tree: return tree root from tree[{}].
	Fix #41.
	* specs/tree_spec.yaml (returns tree root for an empty list): New
	specification.
	* lib/std/tree.lua (__index): Allow empty list as a valid key.
	* specs/tree_spec.yaml (std.tree): Remove pending call for
	newly passing examples.
	* NEWS: Update.

	table: no need to pull all of std.list into memory.
	* lib/std/table (elems): Capture base.elems in a local.
	(clone_select): Use it.

2014-04-21  Reuben Thomas  <rrt@sc3d.org>

	Modify API of functional.bind, and add spec; closes #48

	Add a missing require to table.lua

	Add clone_select, closing #50.

	Don’t imply that clone requires its nometa argument to be the literal `true`, thereby blessing our use of string "nometa" argument.

	Remove comment that gives a false impression that the behaviour is there to support backwards-compatibility, whereas in fact it’s necessary for the current API.

2014-04-21  Gary V. Vaughan  <gary@gnu.org>

	container: discard unmapped positional parameters.
	Fix #35.
	* lib/std/container.lua (mapfields): When `map` argument is
	given, discard unmapped positional parameters.
	(metatable._init): Remove to imply a `nil` value (copy all
	fields), because `{}` now discards all positional parameters.
	(metatable.__call): Reverse type check of `_init`, so that
	mapfields is still called when _init is `nil`.
	* specs/object_spec.yaml (std.object): Remove pending call from
	newly passing examples.
	* NEWS: Update.

	tree: always return nil for non-existent key path.
	Fix #39.
	* lib/std/functional.lua (function.op["[]"]): Return nil instead
	of dereferencing a nil valued table argument.
	* specs/tree_spec.yaml (std.tree): Remove pending call prior to
	newly passing example.

	functional: handle false valued elements correctly in `map`.
	Fix #34.
	* lib/std/functional.lua (map): Also insert `false` values into
	the results table.
	* specs/list_spec.yaml (std.list): Remove pending call from newly
	passing example.

2014-04-16  Gary V. Vaughan  <gary@gnu.org>

	table: fold `clone_rename` into `clone`.
	* specs/table_spec.yaml (std.table): Specify new behaviour with
	optional `map` argument.
	* lib/std/base.lua (clone): Implement new behaviours.
	* lib/std/table.lua (clone_rename): Add deprecation warning, and
	move out of the LDoc export table.
	(clone): Update doc-comments.
	* NEWS: Update.

	base: provide a deprecation mechanism for gentle API upgrades.
	* specs/base_spec.yaml: New file. Specify behaviour for a
	deprecation wrapper.
	* specs/specs.mk (specl_SPECS): Add base_spec.yaml.
	* lib/std/base.lua (deprecate): New function.  Implement the
	specification.

	maint: remove trailing whitespace in NEWS.
	* NEWS: Remove trailing whitespace.

	specs: set package.path for in tree specl calls.
	Specl 11 works well when called directly in a project root dir,
	eg. `specl -freport -v1`, but only if the package path is set
	appropriately in each `spec_helper.lua` or similar.
	* specs/spec_helper.lua.in: Use `package.normalize` to safely
	inject ./lib/?.lua into the head of package.path.

2014-04-15  Reuben Thomas  <rrt@sc3d.org>

	Fix a comment typo

	Fix a comment typo

2014-04-15  Gary V. Vaughan  <gary@gnu.org>

	slingshot: sync with upstream.
	* slingshot: Sync with latest upstream master.
	* bootstrap: Update from slingshot.
	* .travis.yml: Regenerate.

	specs: update custom matchers for Specl 11.
	* bootstrap.conf (buildreq): Bump specl minimum version to 11.
	* specs/spec_helper.lua (matchers.have_size, matchers.have_member):
	Matcher object functions require an initial `self` parameter.
	(matchers.fail_with): Remove.

	specs: fix a typo; there is no 'a' in should_output.
	* specs/optparse_spec.yaml: Fix a typo.

2014-04-14  Reuben Thomas  <rrt@sc3d.org>

	Fix a comment typo

	Fix documentation of table.clone_rename: the parameters got swapped during the earlier re-org

2014-02-06  Gary V. Vaughan  <gary@gnu.org>

	package: new path management apis.
	* specs/package_spec.yaml: Specify behaviour of new apis.
	* lib/std/io.lua (pathsep): Recalculate rather than introduce a
	require loop with std.package.
	* lib/std/package.lua (find, insert, mappath, normalize, remove):
	New functions for maintaining clean pathstrings.
	* NEWS: Update.

	functional: new `case` module function.
	* specs/functional_spec.yaml: Add specifications for a `case`
	function.
	* lib/std/functional.lua (case): New function.
	* NEWS: Update.

2014-02-05  Gary V. Vaughan  <gary@gnu.org>

	optparse: simplify default option setting.
	* specs/optparse_spec.yaml: Specify behaviour of new option
	defaults parameter.
	* lib/std/optparse.lua (parser): Add an optional default options
	parameter.
	* NEWS: Update.

2014-02-03  Gary V. Vaughan  <gary@gnu.org>

	configury: use a sentinel file for multi-target rules.
	With thanks to
	http://stackoverflow.com/questions/17216048/parallel-gnu-make-and-rules-that-create-several-targets-at-once
	* local.mk (ldoc_DEPS): Remove.
	$(dist_doc_DATA) $(dist_classes_DATA) $(dist_modules_DATA):
	Depend on sentinel file.
	($(srcdir)/doc): Make and populate doc tree atomically for
	parallel make.

	configury: be nicer to parallel make.
	* local.mk ($(srcdir)/doc): Factor out of...
	($(dist_doc_DATA)): ...here.
	(ldoc_DEPS): Add $(srcdir)/doc.

2014-02-01  Gary V. Vaughan  <gary@gnu.org>

	optparse: fix a parse error with unhandled opt in combined options.
	* specs/optparse_spec.yaml: Add specifications for behaviour
	when encountering unhandled options in various circumstances.
	* lib/std/optparse.lua (normalise): Meet specifications.
	* NEWS: Update.

	specs: remove last vestiges of optparse's specl origins.
	* specs/optparse_spec.yaml (std.optparse): Update category, bug
	address, and copyright to be stdlib appropriate.

2014-01-30  Gary V. Vaughan  <gary@gnu.org>

	maint: post-release administrivia.
	* configure.ac (AC_INIT): Bump release number to 39.
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* ./local.mk (old_NEWS_hash): Auto-update.

	Release version 38
	* NEWS: Record release date.

	specs: commit new have_size matcher.
	* specs/spec_helper.lua.in (matchers.have_size): New matcher
	used by std.string.split specs.
	* configure.ac (AC_CONFIG_FILES): Remove write permission from
	generated spec_helper so I don't edit the wrong file next time.

	specs: remove trailing whitespace.
	* specs/optparse_spec.yaml: Remove trailing whitespace.

	NEWS: reword a doubled 'to' to satisfy sanity checks.
	* NEWS: Reword a doubled 'to'.

	string: split now splits on consecutive whitespace by default.
	* lib/std/string.lua (split): Improve LDocs.
	Remove @todo. We now have whitespace default split pattern unless
	otherwise specified, just like Python.  I didn't consider Perl,
	because my brain starts to haemorrhage whenever I do that. :-p
	* specs/string_spec.yaml (split): Remove spec for string `sep`
	argument now that it is optional.
	* NEWS: Update.

	string: simplify and speed up `std.string.split`.
	* lib/std/string.lua (split): It's a bit more code, but it is
	much easier to understand, and it's a lot faster now!
	* specs/string_spec.yaml (split): Uncomment pending infinite loop
	fix.
	* NEWS: Update.

	specs: more comprehensive specs for std.string.split.
	* specs/string_spec.yaml (split): Add a lot more specs.
	Empty separator causes an infinite loop with the current
	implementation.

2014-01-28  Gary V. Vaughan  <gary@gnu.org>

	specs: use Specl 10 `a_permutation_of` adaptor for tighter specs.
	* specs/tree_spec.yaml: Use `a_permutation_of` instead of
	`all_of` to enforce some reordering of only the specified
	elements.

	specs: use a custom matcher to specify process status and error.
	* specs/spec_helper.lua.in (matchers.fail_with): Custom matcher
	to specify process non-zero exit as well as stderr content.
	* specs/io_spec.yaml (io.die), specs/optparse_spec.yaml (io.die):
	Use it to ensure that in addition to the correct error output,
	the exit status is non-zero.

	optparse: integrate with `io.die` and `io.warn`.
	* specs/io_spec.yaml: Additional specs for what to do when
	`opts.program` and/or `opts.line` are set.
	* specs/optparse_spec.yaml (io.die, io.warn): New specs how to
	behave when `io.die` or `io.warn` are called after a successful
	`parser:parse` call.
	* lib/std/io.lua (warn): Implement specified behaviour for new
	`opts.line` and `opts.warn` specs.
	* lib/std/optparse.lua: Add LDocs for new behaviour.
	(parser:parse): Set a metatable on the returned opts table so
	than `opts.program` etc. can be found by `io.die` and `io.warn`.
	* NEWS: Update.

	io: fix actual and latent bugs in `io.die` and `io.warn`.
	* specs/spec_helper.lua.in (luaproc): Factor out of
	`tabulate_output`.
	(tabulate_output): Adjust.
	* specs/io_spec.lua (die, warn): Add new behaviour examples.
	* lib/std/io.lua (warn): Adjust to work properly with new specs.
	* NEWS: Update.

2014-01-23  Gary V. Vaughan  <gary@gnu.org>

	container: inline calls to `empty`.
	* lib/std/container (mapfields, metatable._init): Replace
	`not empty` with `next`.
	(empty): Remove.

	container: drastically simplify and speed up `prototype`.
	* lib/std/container.lua (prototype): Inline metaentry, and
	simplify.
	(metatable.__tostring): Use it.
	(metaentry): Remove.
	* NEWS: Update.

	container: inline `filter` to only caller.
	* lib/std/container.lua (filter): Remove from here.
	(metatable.__totable): Inline `filter` here.

	container: cleanup, speedup and bonus bugfix.
	* lib/std/container.lua (mapfields): Factored out of
	`metatable.__call` and optimised for speed.
	(metatable.__call): Adjust accordingly.
	(empty): Copied from table.empty to avoind introducing a require
	loop.
	(modulefunction): Wrap argument in a functable for easily
	recognising what not to copy during cloning.
	(metatable): Simplify.
	* lib/std/object.lua: Import mapfields from Containec, but unwrap
	it along with Container.prototype before saving in the Object
	metatable for faster access.
	Add appropriate LDocs.
	* NEWS: Update.

	container: distinguish between the two `functions` tables.
	One is the core of Container with metatable as its metatable; the
	other is metatable._functions, and is just a list of unpropagated
	method functions. We don't want to give the latter a __tostring
	metamethod or printing gets very weird.
	* lib/std/container.lua (metatable._functions): Make a nometa
	clone of the table we return.
	* NEWS: Update.

2014-01-21  Gary V. Vaughan  <gary@gnu.org>

	configury: update rockspecs in buildreq.
	* bootstrap.conf (buildreq): LDoc is now available in the required
	version from the official luarocks repo.

	travis: remove unrelease ldoc workarounds.
	* .travis.yml: Regenerate, to delete local patches for LDoc.

	doc: vastly improve optparse LDocs.
	* lib/std/optparse.lua: Vastly improve optparse LDocs.
	* NEWS: Update.

2014-01-20  Reuben Thomas  <rrt@sc3d.org>

	optparse.lua: move "default" options to bottom of help
	A more standard position.

2014-01-19  Gary V. Vaughan  <gary@gnu.org>

	maint: post-release administrivia.
	* configure: Bump revision to 38.
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* ./local.mk (old_NEWS_hash): Auto-update.

	Release version 37
	* NEWS: Record release date.

	doc: keep config.ld out of doc/ for LuaRocks docdir install.
	* doc/config.ld.in: Move from here...
	* build-aux/config.ld.in: ...to here.
	* configure.a (AC_CONFIG_FILES): Adjust.
	* local.mk ($(dist_lua_DATA)): Adjust.
	* NEWS: Update.

	refactor: rearrange methods and functions for backwards compatibility.
	* lib/std/list.lua: Make use of `_function` table to reinstate
	backwards compatible module functions.

	maint: retract release 36.
	Release 36 intentionally, but unnecessarily, broke backwards
	compatibility in list, set, strbuf and tree.  Reinstate
	compatibility with v35 and earlier where possible.
	* lib/std/list.lua (list.filter, list.foldl, list.foldr)
	(list.indexKey, list.indexValue, list.map, list.mapWith)
	(list.new, list.project, list.shape, list.zipWith): Accept
	parameters in the original v35 order.
	* lib/std/set.lua, lib/std/strbuf.lua, lib/std/tree.lua (new):
	Reinstate for undocumented backwards compatibility.
	* News: Update.

	object: share metatables more aggressively.
	* lib/std/container.lua (clone): Don't create a new metatable
	unnecessarily just because the base object has a `_function`
	element -- which is not copied in any case.

	string: use new syntax for List instantiation.
	* lib/std/string.lua: List is an Object now.
	(split): Use `List` instead of `list`.
	(require_version): Use new syntax for List instantiation.

	Revert "maint: post-release administrivia."
	This reverts commit 846fd4e578cf8a57c8268979c9fbd2495b0e7b5b.

2014-01-17  Gary V. Vaughan  <gary@gnu.org>

	maint: post-release administrivia.
	* configure.ac (AC_INIT): Bump version to 38.
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* ./local.mk (old_NEWS_hash): Auto-update.

	Release version 37
	* NEWS: Record release date.

	specs: make sure hell.spawn uses the same Lua as Specl examples.
	* slingshot: Sync with upstream, for build-aux/specs.mk fix.
	* configure.ac (AC_CONFIG_FILES): Add specs/spec_helper.lua.
	* specs/spec_helper.lua: Move from here...
	* specs/spec_helper.lua.in: ...to here.
	* .gitignore: Add spec_helper.lua.
	* specs/specs.mk (SPECL_ENV): Add $builddir/specs to LUA_PATH
	for generated spec_helper.lua.
	* specs/spec_helper.lua.in (LUA): Don't dig through `_G.arg`,
	wait for configure substitution.

	specs: remove duplicate examples.
	* specs/math_spec.yaml: forgot to remove the old namespace
	corruption tests from this file when adding new check in 3507e84.

	specs: compatibility with Specl < 11.
	* specs/specs.mk (specl_SPECS): Move std_spec.yaml to the end of
	the list, where symbol leaks don't affect subsequent examples.

	specs: compensate for table.pack differences between Lua 5.1/5.2.
	* specs/table_spec (before): Make sure `extend_base` and
	`enhance_base` reflect whether core table library has a `pack`
	entry.

	std: lazy load submodules on demand.
	* specs/std_spec.yaml: New specifications for lazy loading.
	* specs/specs.mk (specl_SPECS): Add specs/std_spec.yaml.
	* lib/std.lua.in (std.__index): Implement it.
	* NEWS: Update.

	doc: add the package name and version to html doc page titles.
	* doc/config.ld: Move from here...
	* doc/config.ld.in: ...to here.  Add a title setting incorporating
	@PACKAGE@ and @VERSION@.
	* configure.ac (AC_CONFIG_FILES): Add doc/config.ld.
	* .gitignore: Add doc/config.ld.
	Suggested by Dirk Laurie <dirk.laurie@gmail.com>

	maint: plug symbol leaks with working specifications.
	* specs/spec_helper.lua (show_apis): New function. Compare table
	entries in a sub-process, to support tracking namespace changes
	when requiring modules by various means.
	* specs/functional_spec.yaml: New file.  Use it to ensure
	"std.functional" doesn't leak symbols.
	* specs/debug_spec.yaml, specs/functional_spec.yaml,
	specs/io_spec.yaml, specs/list_spec.yaml, specs/math_spec.yaml,
	specs/object_spec.yaml, specs/optparse_spec.yaml,
	specs/package_spec.yaml, specs/set_spec.yaml,
	specs/spec_helper.lua, specs/specs.mk, specs/strbuf_spec.yaml,
	specs/string_spec.yaml, specs/table_spec.yaml,
	specs/tree_spec.yaml: Rewrite specs that check symbol leaks
	using show_apis().
	* lib/std/base.lua (new): Don't forget the forward declaration.
	* lib/std/set.lua (proper_subset): Likewise.
	* NEWS: Update.
	Reported by Dirk Laurie <dirk.laurie@gmail.com>

	rockspecs: update detailed description text.
	* rockspec.conf (description.detailed): Remove mention of regexps
	and getopt.  Add mention of civilised option parsing.

	maint: cosmetic fix to imported module list.
	* lib/std/modules.lua: Replace `getopt` with `optparse`.

	maint: workaround a luarocks bug handling debug_init.lua.
	LuaRocks misinstalls build.modules entries ending in `init.lua`,
	so rearrange the source tree and Automake rules so that
	`require "std.debug_init"` still works as before even though
	the file ends up in the wrong directory after installation.
	* lib/std/debug_init.lua: Move from here...
	* lib/std/debug_init/init.lua: ...to here.
	* slingshot: upgrade for `.../init.lua` handling in mkrockspecs.
	* local.mk (dist_luastd_DATA): Remove lib/std/debug_init.lua.
	(dist_luastddebug_DATA): New installation dir.  Add
	lib/std/debug_init/init.lua.

	optparse: replace getopt with an easier to use option parser.
	* specs/optparse_spec.yaml: Specify behaviour for a civilised
	option parsing API.
	* lib/std/optparse.lua: New module.
	* lib/std/getopt.lua: Remove.
	* doc/config.ld (file), local.mk (dist_luastd_DATA): Adjust.
	* specs/getopt_spec.yaml: Remove.
	* local.mk (dist_modules_DATA, dist_classes_DATA): Adjust.
	* specs/specs.mk (specl_SPECS): Likewise.
	* build-aux/sanity-cfg.mk: New file.  Don't fail sanity checks on
	account of 'OptionParser' in optparse.lua error message.
	* NEWS: Update.

2014-01-17  Reuben Thomas  <rrt@sc3d.org>

	string.lua: fix a missing close paren in a docstring

2014-01-16  Gary V. Vaughan  <gary@gnu.org>

	slingshot: resync for `mkrockspecs --repository` support.
	* slingshot: Sync with upstream.
	* local.mk (mkrockspecs_args): Add `--repository lua-stdlib`.
	* .travis.yml: Regenerate.

2014-01-15  Gary V. Vaughan  <gary@gnu.org>

	slingshot: sync with upstream, for bootstrap git detection fix.
	* slingshot: Sync with upstream.
	* bootstrap: Sync with slingshot.

	maint: post-release administrivia.
	* NEWS: Add header line for next release.
	* configure.ac: Bump version number to 37.
	* .prev-version: Record previous version.
	* ./local.mk (old_NEWS_hash): Auto-update.

	Release version 36
	* NEWS: Record release date.

2014-01-13  Gary V. Vaughan  <gary@gnu.org>

	configury: use explicit lists instead of $(wildcard ...).
	* local.mk (dist_classes_DATA, dist_modules_DATA): Only GNU make
	supports $(wildcard ...) expressions, and Automake complains
	every time it sees one. List files explicitly.
	($(dist_doc_DATA)): Add $(dist_classes_DATA) and
	$(dist_modules_DATA) to LHS of this rule so that make knows it
	has to run LDoc to create those files.

	slingshot: resync for subdirectory bootstrap fix.
	* slingshot: Sync with upstream.

	slingshot: sync with upstream, for rockspecs in $buildreq.
	* slingshot: Sync with upstream.
	* bootstrap: Sync with slingshot.
	* configure.ac (SPECL_MIN): Remove.
	* bootstrap.conf (buildreq): Add ldoc and specl rockspecs.
	* .travis.yml: Regenerate, but manually splice in the LDoc-1.4.0
	luarocks install while waiting for a luarocks release.

2014-01-05  Gary V. Vaughan  <gary@gnu.org>

	slingshot: sync with upstream.
	Fix the annoying contest.sed file dropping bug.
	* slingshot: Sync with upstream.
	* bootstrap: Sync with slingshot.

	doc: distribute ldoc classes and modules documentation.
	* local.mk (filesdir, dist_files_DATA): Rename from these...
	(classesdir, dist_classes_DATA): ...to these.
	(dist_classes_DATA, dist_modules_DATA): Use correct paths in
	gmake wildcard expression.

2014-01-04  Gary V. Vaughan  <gary@gnu.org>

	maint: update copyright notices to include 2014.
	* .x-update-copyright: New file. Exclude files not owned by this
	project from update-copyright rules.
	* boootstrap.conf, configure.ac, local.mk: Bump copyright year.

	travis: horrid workaround for crashy LDoc master vs apt-get luarocks.
	* slingshot: Sync for Travis fixes.
	* .travis.yml: Temporary code to fetch a custom stable version of
	LDoc that doesn't crash on stdlib doc-comments.

	maint: fix copyright attribution in COPYING.
	* COPYING: Correct year and authors in copyright statement.

	slingshot: sync with upstream and simplify accordingly.
	* slingshot: Sync with upstream.
	* bootstrap: Update from slingshot.
	* configure.ac (AM_INIT_AUTOMAKE): Remove 'foreign'. Slingshot
	now handles missing README automatically.
	* bootstrap.slingshot: Remove.  No longer required.
	* bootstrap.conf: Remove bootstrap.slingshot source boilerplate.
	(stdlib_force_changelog): Remove.  Automated by slingshot now.
	* INSTALL: Remove.  Autotools copies in the canonical version
	automatically.
	* COPYING: New file, with MIT License, to avoid Autotools
	copying over a standard GPLv3 COPYING boilerplate.
	* .gitignore: Update.

	slingshot: sync with upstream, and update copyright years.
	* slingshot: Update, particularly for update-copyright support.
	* bootstrap, bootstrap.slingshot: Update from slingshot.

2014-01-01  Gary V. Vaughan  <gary@gnu.org>

	slingshot: sync with upstream.
	* slingshot: Sync with latest upstream, particularly for Travis fixes.
	* .travis.yml: Regenerate.  Plus temporary patch to run gvvaughan/next
	branch of LDoc during integration until stevedonovan/master is fixed.

2013-12-11  Gary V. Vaughan  <gary@gnu.org>

	tree: derive from std.container.
	* specs/tree_spec.yaml: Replace object methods with module
	functions throughout.
	Add specs for inheritted functionality.
	* lib/std/tree.lua: Rewrite as a derivative of std.container.
	Change object methods to Container style module functions.
	* NEWS: Update.

	doc: update object constructor _function documentation.
	* lib/std/container.lua: Update module doc-comment to reflect
	simplification of passing module functions in _functions table.
	(std.container): Update _function description.
	* lib/std/object.lua (std.object): Likewise.
	* lib/std/set.lua (std.set): Likewise.

	specs: improve expectation description.
	* specs/set_spec.yaml: Write "shows the type name" instead of
	"contains the type".

2013-12-10  Gary V. Vaughan  <gary@gnu.org>

	refactor: automatically fill method functions form _functions table.
	* lib/std/container.lua (metatable.__call): Copy entries from
	newly passed _functions table to object.
	* lib/std/set.lua (Set): Delete manual copy of method functions.

	set: derive from std.container, keys no longer clash with method names.
	* specs/set_spec.yaml: Replace object methods with prototype
	functions through out.
	Check that set elements with the same name as a prototype
	function behave properly.
	* lib/std/set.lua: Rewrite as a derivative of std.container.
	Change object methods to Container style prototype functions.
	* NEWS: Update.

	list: remove trailing whitespace.
	* lib/std/list.lua: Remove trailing whitespace.

	container: new module for objects that use [] to access contents.
	* specs/container_spec.yaml: Specify behaviour of Container
	objects.
	* specs/specs.mk (specl_SPECS): Add specs/container_spec.yaml.
	* specs/object_spec.yaml: Remove duplicate tests.
	* doc/config.ld (file), local.mk (dist_luastd_DATA): Add
	lib/std/container.lua.
	* lib/std/container.lua: New file. Implement Container objects.
	They have no methods, so that __index can be used for accessing
	contents instead.
	* lib/std/object.lua: Vastly improved doc-comments.
	Simplify drastically in light of Container implementation.
	* NEWS: Update.

2013-12-09  Gary V. Vaughan  <gary@gnu.org>

	Revert "maint: move lua extension sources to $top_srcdir/ext."
	This reverts commit 4d51ca63a1eedd3759201db8b3df850a658856e6.

	I have no idea why I thought moving Lua libraries from the lib
	tree to the Lua C extensions ext tree seemed like a good idea.
	Undo the damage.
	* ext/: Rename back to lib/.
	* local.mk (std_path, dist_lua_DATA, dist_luastd_DATA)
	(mkrockspecs_args, EXTRA_DIST, dist_files_DATA)
	(dist_modules_DATA): Adjust.
	* doc/config.ld (file): Adjust.
	* .gitignore: Update.

2013-12-09  Gary V. Vaughan  <gary@gnu.org>

	table: add string support to totable function.
	* ext/std/table.lua (totable): When passed a string, return a
	table of each character in the string.
	* NEWS: Update.

	specs: simplify the tree merge specs.
	* specs/tree_spec.yaml (tree merge): comparing non-leaf nodes
	is not a fair test, better to set k3 to a different string
	that can be tested before and after the merge without worrying
	about whether a table node is coerced to a tree node.

2013-11-28  Gary V. Vaughan  <gary@gnu.org>

	specs: don't assume in order traversal by tree.nodes.
	* specs/tree_spec.yaml (node): Use `should_contain.all_of`
	in place of `should_equal` to avoid enforcing a particular
	traversal order.

	tree: fix broken tests, and improve doc-comments (Fixes #40)
	* specs/tree_spec.yaml (inodes, nodes): Be sure to clone iterator
	returned paths before storing. Some corrections to the expected
	results.
	Remove pending "see issue #40" instances.
	(merge): Fix tests. Remove pending "see issue #40" instances.
	* ext/std/tree.lua (nodes): Much improved doc-comment.
	(merge): Assert the arguments are actual tree nodes, because
	raw tables do not work!

	doc: update doc-comments for latest LDoc master.
	* doc/config.ld (metamethod): Delete. Metamethods are now
	separated out automatically.
	* ext/std/list.lua: Describe use of object methods as module
	functions.
	Update doc-comments.
	* ext/std/object.lua, ext/std/set.lua, ext/std/strbuf.lua,
	ext/std/strict.lua, ext/std/tree.lua: Update doc-comments.

2013-11-27  Gary V. Vaughan  <gary@gnu.org>

	tree: add specl specs, and fix simple API inconsistencies.
	* specs/tree_spec.yaml: New file. Examples of how tree APIs
	should behave.
	* specs/specs.mk (specl_SPECS): Add specs/tree_spec.yaml.
	* ext/std/base.lua (ileaves, leaves): Report non-table arguments.
	* ext/std/tree.lua (clone, inodes, nodes, merge): Likewise.

	string: report assert failures from assert caller level.
	* ext/std/string.lua (assert): Call error with level 2, to report
	errors from the assert caller not assert itself.

	tree: fix argument order for list.foldl call.
	The argument order for list.foldl changed in 9fe27bb, but one
	call site wasn't updated to match.
	* ext/std/tree.lua (metatable.__index): Use new argument order
	for list.foldl call.

2013-11-26  Reuben Thomas  <rrt@sc3d.org>

	Remove some spurious comment markers in docstrings.
	These were introduced by commit 31b314c835 converting doc-comments to
	LDoc 1.4.

2013-11-26  Gary V. Vaughan  <gary@gnu.org>

	travis: replace recently missing links for libyaml
	Rerunning previously passing integration test shows that the
	multilibbed libyaml libraries are no longer available from
	/usr/lib alongside other libs - maybe an OS upgrade, or an
	upstream packaging error?
	* .travis.yml (install): Remove libyaml-dev reinstall.
	Run a shell find command to link the multilib libyaml libs
	back into /usr/lib.  If this command starts failing in future
	then it should mean libyaml has moved back to the proper place
	and we're failing to relink it manually, so this workaround
	can be removed.

	maint: install libyaml-dev for Travis.
	Seems recent tests have been failing because libyaml-dev is no
	longer installed by default.
	* .travis.yml (install): Add libyaml-dev which pulls in libyaml.

	doc: distinguish object and class methods in object doc-comments.
	* ext/std/object.lua (clone): Rename first argument to self, and
	remove associated @param as a hint to LDoc.
	(stringify, totable): Likewise.
	(metatable): Document important fields.
	(metatable.__call): Add documentation.

	doc: use a more topographical ordering for document sidebar.
	Now that the latest LDoc doesn't enforce strict alphabetical
	ordering, reorder the documentation into a more topographical
	order for easier reading.
	* doc/config.ld (file): Reorder for clarity.

	doc: separate camelCaseCompat methods to avoid LDoc warnings.
	Using the @export feature of LDoc provides the flexibility to
	change the exported functions from a single table, but we also
	have to be careful not to sweep up undocumented access points
	in the same table, otherwise LDoc correctly warns us that those
	functions have no doc-comments.
	* ext/std/getopt.lua (getOpt, processArgs, usageInfo): Move
	to a separate table, and merge back into the module table before
	return.
	* ext/std/io.lua (processFiles): Likewise.
	* ext/std/list.lua (indexKey, indexValue, mapWith, zipWith):
	Likewise.
	* ext/std/string.lua (escapePattern, escapeShell, ordinalSuffix):
	Likewise.

	doc: markup std.string.escape_string correctly for LDoc.
	* ext/std/string.lua (escape_string): Add missing leading hyphen.

	doc: LDoc master now handles local references differently.
	* .travis.yml (install): Switch to github master rockspec.
	* ext/std/list.lua (enpair, depair, __concat, __add): Adjust
	@see argument.
	* ext/std/object.lua (__totable, __tostring): Likewise.
	* ext/std/set.lua (__add, __sub, __mul, __div, __le, __lt):
	Likewise.
	* ext/std/strbuf.lua (__concat, __tostring): Likewise.

2013-11-18  Gary V. Vaughan  <gary@gnu.org>

	doc: point to updated online LDoc documentation.
	* README.md (Documentation): Refer to latest LDoc docs.

	maint: remove last references to luadoc.
	* local.mk (dist_doc_DATA): Remove luadoc.css. Add ldoc.css.

	travis: use unofficial ldoc 1.4.0 release candidate.
	We're using features from the release candidate already, so
	temporarily point the travis installer to that rockspec while
	waiting for an official release.
	* .travis.yml: Adjust ldoc rockspec location.

	list: fix broken specs.
	*  ext/std/list.lua (depair): Needs to be the inverse operation of
	enpair, which requires returning a bare table, and not a List
	object.

	.gitignore: ignore ldoc output, not luadoc output.
	* .gitignore: Remove /doc/luadoc.css. Add /doc/ldoc.css.

	getopt: revert an accidental comment deletion.
	* ext/std/getopt.lua (makeOptions): Revert accidental deletion.

	doc: convert doc-comments to LDoc 1.4.
	* doc/config.ld: New file. Configuration for LDoc.
	* local.mk (EXTRA_DIST): Add it.
	(dist_doc_DATA): Remove Luadoc files. Add LDoc files.
	($(dist_doc_DATA)): Invoke LDoc.
	* configure.ac (SS_CONFIG_TRAVIS): Request ldoc instead of luadoc.
	* .travis.yml: Regenerate.
	* .gitignore: Adjust.
	* ext/std.lua.in, ext/std/base.lua, ext/std/debug.lua,
	ext/std/functional.lua, ext/std/getopt.lua, ext/std/io.lua,
	ext/std/list.lua, ext/std/math.lua, ext/std/modules.lua,
	ext/std/object.lua, ext/std/package.lua, ext/std/set.lua,
	ext/std/strbuf.lua, ext/std/strict.lua, ext/std/string.lua,
	ext/std/table.lua, ext/std/tree.lua: Convert doc-comment syntax to
	richer LDoc 1.4 format.

2013-11-15  Gary V. Vaughan  <gary@gnu.org>

	maint: move lua extension sources to $top_srcdir/ext.
	For consistency with other Lua projects I maintain, rename the
	lib directory to ext.
	* lib/: Rename to ext/.
	* local.mk (std_path, dist_lua_DATA, dist_luastd_DATA)
	(mkrockspecs_args, EXTRA_DIST, dist_doc_DATA, dist_files_DATA)
	(dist_modules_DATA): Adjust.
	* .gitignore: Update.

	bootstrap: drop 'lua-' prefix from project name.
	* configure.ac (AC_INIT): Set name to 'stdlib'.
	* .travis.yml: Regenerate.

2013-09-15  Gary V. Vaughan  <gary@gnu.org>

	slingshot: sync with upstream.
	* slingshot: Update to latest revision, particularly to get the
	fix for release announcement content.
	* bootstrap: Upgrade from latest slingshot.
	* .travis.yml: Regenerate.

2013-06-27  Gary V. Vaughan  <gary@gnu.org>

	list: std.list returns the List prototype object.
	Removing the separation between List prototype and the module
	table that used to wrap it, for consistency with the other
	Object specialisations.  We break backwards compatibilitf here
	though because the argument ordering used to be different for
	several functions depending on whether they were called through
	the module table, or as List methods.  The List method ordering
	(i.e. list argument first) wins out here, because that is a
	prerequisite of being able to call object methods with the Lua
	: syntax.
	* specs/list_spec.yaml: Remove examples of constructing a List
	from the module table, and with the `new` command.
	* lib/std/list.lua: Much simplified by removal of the module
	table.
	(filter, foldl, foldr, index_key, index_value, map, map_with)
	(project, shape, zip_with): The list operand is always first
	now, whether called with a `.' or a `:'.
	Adjust all callers.
	(new): Remove.  Adjust all callers.
	* NEWS: Update.

	strbuf: std.strbuf returns the strbuf prototype object.
	Fix some latent bugs caused by the artificial separation between
	the metatable of strbuf and strbuf.StrBuf, by removing the
	distinction between the two.  `require "std.strbuf"` returns the
	actual StrBuf object, ready to go!
	* specs/strbuf_spec.yaml: Remove examples of constructing a StrBuf
	from the module table, and with the `new` command.
	* lib/std/strbuf.lua: No need to wrap the StrBuf prototype in an
	additional layer of abstraction to return a module table containing
	the StrBuf prototype.  Just return StrBuf directly.
	(strbuf.new): Remove.
	Adjust all callers.

	set: std.set returns the Set prototype object.
	Fix some latent bugs caused by the artificial separation between
	the metatable of set and set.Set, by removing the distinction
	between the two.  `require "std.set" returns the actual Set object,
	ready to go!
	* specs/set_spec.yaml: remove examples of constructing a set from
	the module table, and with the `new` command.
	* lib/std/set.lua: No need to wrap the Set prototype in an
	additional layer of abstraction to return a module table containing
	the Set prototype.  Just return Set directly.
	(set.new): Remove.
	Adjust all callers.

	object: std.object returns the root object.
	Fix some latent bugs caused by the artificial separation between
	the metatable of object and object.Object, by removing the
	distinction between the two.  `require "std.object"` returns the
	actual root object, ready to go!
	* specs/object_spec.yaml: Remove examples of constructing an
	object from the object module table and the `new` method.
	* lib/std/object.lua: No need to wrap the root object in an
	additional layer of abstraction to return a module table containing
	the root object.  Just return the root object directly.
	(object.new): Remove.
	Adjust all callers.
	* NEWS: Update.

	object: don't assume object metatable __index is always a table.
	* lib/std/object.lua (clone): Only merge new object metatable
	methods when both metatables have a table type __index entry.
	(metatable:__call): Let Lua do the lookup for an object clone
	function, incase __index is a function.

	object: be consistent with various object constructors.
	* specs/object_spec.yaml: Specify behaviour for Object:clone {}
	and object.new () constructors, with single table initialiser and
	parameter list respectively, plus the Object {} and object ()
	syntactic sugars for each.
	* specs/list_spec.yaml, specs/set_spec.yaml,
	specs/strbuf_spec.yaml: Likewise for other objects to make sure
	all are consistent.
	* lib/std/list.lua, lib/std/set.lua, lib/std/strbuf.lua: Implement
	the specified behaviours.

	object: fix __lt and __le support with shared metatables.
	* specs/object_spec.yaml: Specify desired behaviour with new
	examples for metatable sharing.
	* lib/std/object.lua (metaentry): New helper function.
	(object_type, clone, stringify, totable): Factor out of root
	object initialiser.
	(clone): Maintain separation between "_" prefixed fields, kept
	in the new object metatable, and everything else in the object.
	If the newly instantiated object requires a new metatable to
	support the additional "_" prefixed keys, create it, otherwise
	share the prototype's metatable.
	Additionally, when creating a new metatable, be sure to merge
	in __index methods from the prototype metatable.
	(Object): Much simplified!
	(metatable): Set type, methods and metamethods for root object.
	* lib/std/list.lua (methods, metalist, new): Refactored from
	these...
	(List, new): ...to these, also simplifed accordingly.
	* lib/std/set.lua (M, metaset, new): Refactored from these...
	(M, new): ...to this, much simplified.
	* specs/list_spec.yaml, specs/set_spec.yaml: Add more examples
	to specify metatable propagation behaviour, and refactor for
	clarity and consistency.
	* NEWS: Update.

	set: share metatable so that __le and __lt work.
	* specs/set_spec.yaml: Many more examples, in particular to check
	behaviour of __le and __lt comprehensively.
	* lib/std/set.lua (metaset): New metatable shared by all sets.
	(new): Adjust.
	* NEWS: Update.

	travis: regenerate .travis.yml.
	* .travis.yml: specl-8 is out, so don't try to work around it
	any more!

	specs: update spec_helper for Grand Renaming II™.
	* specs/spec_helper.lua: Fix table_ext reference for name change
	to straight table.

2013-05-29  Gary V. Vaughan  <gary@gnu.org>

	object: __tostring should call __totable metamethod, not method.
	* lib/std/object.lua (new.__tostring): Because we have to set a
	separate metatable for objects that have __lt or __le metamethods,
	self:__totable () is not always the same as getmetatable (self).
	__totable (self).  Use the longhand so that __tostring calls the
	right function in both cases.

2013-05-22  Gary V. Vaughan  <gary@gnu.org>

	travis: use specl from git until specl 8 is released.
	* .travis.yml: Fetch the rockspec from github. Install it.

	list: derive from `std.object`.
	* specs/list_spec.yaml: Describe expected behaviour of list as an
	Object.
	* specs/specs.mk (specl_SPECS): Add specs/list_spec.yaml.
	* lib/std/list.lua (metalist): __lt and __le metamethods only
	work if both objects share the same metatable... this one for
	list objects.
	(new): Return a new Object, with metalist as the metatable,
	and _clone doctored to propagate the metalist metatable.
	(M): Return a callable table that forwards module calls to the
	`new` function.
	* NEWS: Update.

	object: be sure to run tostring on array elements before table.concat.
	* lib/std/object.lua (new.__tostring): table.concat requires that
	all elements already be strings, so call tostring on the array
	part of the object table before passing to table.concat.

	object: respond to tostring() with stringified table of non-hidden fields.
	Rather than add individual __tostring metamethods to every object
	type, implement a general stringification algorithm in the base
	object, to return the type followed by the array part of the object,
	and then the dictionary part of the object.
	* specs/object_spec.yaml (__tostring): Describe desired behaviour.
	* specs/set_spec.yaml (__tostring): Likewise.
	* lib/std/object.lua: Don't overwrite core table functions with
	std.base. Adjust all callers.
	(new.__tostring): return stringification of non-hidden fields.
	* lib/std/set.lua (new.__tostring): Remove. Inheritted base object
	metamethod is equivalent.

	configury: specl 8 required for stdlib compatible objects.
	* configure.ac (SPECL_MIN): Bump to Specl 8. Earlier versions use
	an incompatible object system, which crash when fed recently
	enhanced stdlib objects.

	string: prettyprint valid symbol keys without spurious quoting.
	* specs/string_spec.yaml (prettytostring): Remove quoting from
	examples with valid symbols as keys.  Add an example with some
	invalid symbol names as table keys.
	* lib/std/string.lua (prettytostring): Skip the key quoting
	code unless a key is not a string, or contains any non-word
	character.

	string: display prettyprinted table keys in table.sort order.
	When comparing actual and expected output in unit tests, or with
	Specl matchers, it's quite difficult to write robust examples when
	the output of prettyprint is randomised for tables.  This commit
	ensures that table keys are always output in the same order.
	* specs/string_spec.yaml (prettytostring): Examples of desired
	behaviour for string.prettytostring.
	* lib/std/string.lua (render): Use a sorted list of keys to
	determine the order in which they are output.
	* NEWS: Update.

	object: __totable and __index support.
	Provide object.type, analagously to io.type.
	* specs/object_spec.yaml (__totable): Specify desired
	behaviour.
	* specs/set_spec.yaml (__totable): Likewise.
	* specs/strbuf_spec.yaml (__totable): Likewise.
	* lib/std/object.lua (typeof): Rename from this...
	(M.type): ...to this, to support e.g. object:type ().
	(new.__totable): Return a table of non `_` prefixed object
	elements.
	(new.__index): Defer to methods in M, when the object itself has
	none.
	* lib/std/getopt.lua (argtype): Set of valid argtype keys.
	(getopt): Comparing an Option's type field to nil doesn't work,
	because of the Object:type () method it shadows.  Instead check
	for a value not in the argtype set.
	(usageinfo): Reorder type tests to avoid the same Object:type()
	problem.
	* lib/std/set.lua: Use object.type instead of object.typeof.
	* specs/object_spec.yaml, specs/set_spec.yaml,
	specs/strbuf_spec.yaml: Adjust.
	* NEWS: Update.

	maint: The Grand Renaming II™ - use `require "std.string"` etc.
	Now that individual modules are loaded from the std subdirectory,
	remove the spurious "_ext" suffix so that `require "std.io_ext"`
	is not needed any more.
	* lib/std/debug_ext.lua, specs/debug_ext_spec.yaml,
	lib/std/io_ext.lua, specs/io_ext_spec.yaml,
	lib/std/math_ext.lua, specs/math_ext_spec.yaml,
	lib/std/package_ext.lua, specs/package_ext_spec.yaml,
	lib/std/string_ext.lua, specs/string_ext_spec.yaml,
	lib/std/table_ext.lua, specs/table_ext_spec.yaml: Rename from
	these...
	* lib/std/debug.lua, specs/debug_spec.yaml, lib/std/io.lua,
	specs/io_spec.yaml, lib/std/math.lua, specs/math_spec.yaml,
	lib/std/package.lua, specs/package_spec.yaml, lib/std/string.lua,
	specs/string_spec.yaml, lib/std/table.lua, specs/table_spec.yaml:
	...to these. Adjust all require calls.
	* specs/io_spec.yaml, specs/string_spec.yaml, specs/table_spec.yaml
	(extensions): Add some missing apis.
	* lib/std.lua.in, lib/std/modules.lua: Adjust and simplify.
	* specs/specs.mk (specl_SPECS): Adjust.
	* local.mk (dist_luastd_DATA): Adjust.
	* NEWS: Update.

	object: don't trigger table metamethods for type lookup.
	* lib/std/object.lua (typeof): When looking up the type of an
	object table with no _type field, don't use __index metamethod.

2013-05-19  Gary V. Vaughan  <gary@gnu.org>

	configury: support non-autotool LuaRocks installation.
	* slingshot: Sync with upstream.
	* local.mk (mkrockspecs_args): Add --module-dir so that latest
	mkrockspecs will use the LuaRocks builtin build.type.
	* std/std.lua.in, std/base.lua, std/debug_ext.lua,
	std/debug_init.lua, std/functional.lua, std/getopt.lua,
	std/io_ext.lua, std/list.lua, std/math_ext.lua, std/modules.lua,
	std/oject.lua, std/package_ext.lua, std/set.lua,
	std/strbuf.lua, std/strict.lua, std/string_ext.lua,
	std/table_ext.lua, std/tree.lua: Move from here...
	* lib/std.lua.in, lib/std/base.lua, lib/std/debug_ext.lua,
	lib/std/debug_init.lua, lib/std/functional.lua, lib/std/getopt.lua,
	lib/std/io_ext.lua, lib/std/list.lua, lib/std/math_ext.lua,
	lib/std/modules.lua, lib/std/oject.lua, lib/std/package_ext.lua,
	lib/std/set.lua, lib/std/strbuf.lua, lib/std/strict.lua,
	lib/std/string_ext.lua, lib/std/table_ext.lua, lib/std/tree.lua:
	...to here.
	* local.mk (std_path): Adjust.
	* std/.gitignore: Remove. Consolidate into...
	* .gitignore: ...here.
	* std/std.mk: Remove. Consolidate into...
	* local.mk: ...hore.
	* NEWS: Update.

2013-05-16  Gary V. Vaughan  <gary@gnu.org>

	NEWS: fix poor grammar in set to object entry.
	* NEWS: Fix poor grammar in set to object entry.

	object: rename object.Object to object.new for consistency.
	* std/object.lua (Object): Rename from this...
	(new): ...to this. Adjust all callers.
	* specs/object_spec.yaml: Adjust.
	* NEWS: Update.

2013-05-15  Gary V. Vaughan  <gary@gnu.org>

	set: derive from `std.object.Object`.
	* specs/set_spec.yaml: Describe expected behaviour of set as an
	Object.
	* specs/spec_helper.lua (have_member): New custom Specl matcher.
	* specs/specs.mk (specl_SPECS): Add specs/set_spec.yaml.
	(EXTRA_DIST): Add specs/spec_helper.lua.
	* std/set.lua (delete, insert): Return the modified set.
	(difference, intersection, propersubset, subset)
	(symmetric_difference, union): Coerce a table in argument 2 to a
	set.
	(new): Return a new Object, with metamethods rolled in.
	(M): Return a callable table that forwards module calls to the
	`new` function.
	* NEWS: Update.

	strbuf: derive from `std.object.Object`.
	* specs/strbuf_spec.yaml: Describe expected behaviour of strbuf as
	an Object.
	* specs/specs.mk (specl_SPECS): Add specs/strbuf_spec.yaml.
	* std/strbuf.lua (new): Return a new Object, with metamethods and
	object methods rolled in.
	(M): Return a callable table that forwards module calls to the
	`new` function.
	* NEWS: Update.

2013-05-14  Gary V. Vaughan  <gary@gnu.org>

	object: bake in inherited object type names.
	* specs/object_spec.yaml: New file. Examples of how typed objects
	should behave.
	* specs/specs.mk (specl_SPECS): Add specs/object_spec.yaml.
	* std/table_ext.lua (clone, clone_rename, merge): Move from here...
	* std/base.lua (clone, clone_rename, merge): ...to here.
	* std/table_ext.lua (M.clone, M.clone_rename, M.merge): Re-export
	implementations from `std.base`.
	* std/object.lua (Object._type): Name the `type` of this object.
	(typeof): Insepet the type of an object, falling back on system
	type for non-objectes.
	Return the public interface table, with a `__call`able metatable
	that delegates to Object for instantiation.

	configury: bump minimum specl version to release 7.
	Specl 6 has a bug in `should_contain` matcher that makes the
	package_ext checks fail spuriously.
	* configure.ac (SPECL_MIN): Bump to 7.

2013-05-12  Gary V. Vaughan  <gary@gnu.org>

	string_ext: make escape_pattern compatible with Lua 5.2.
	Lua 5.2 complains of an illegal character if a non-pattern meta
	character is preceded by a '%'.
	* std/string_ext.lua (escape_pattern): Escape only meta-chars.
	* specs/string_ext_spec.yaml (escape_pattern): Adjust example
	code to match.
	* NEWS: Update.

	refactor: move base.lua methods to more appropriate modules.
	Move things around to remove more trampling of _G, and break the
	remaining dependency loops, so that modules can all be required
	independently.
	* std/list.lua (M.append, M.compare, M.concat, M.elems, M.ileaves)
	(M.leaves, M.new): Move from here...
	* std/base.lua (M.append, M.compare, M.concat, M.elems, M.ileaves)
	(M.leaves, M.new): ..to here, for breaking remaining dependency loops.
	* std/list.lua (M.append, M.compare, M.concat, M.elems, M.new):
	Import from base, and reexport.
	* std/base.lua (_G.inodes, _G.nodes): Move from here...
	* std/tree.lua (M.inodes, M.nodes): ...to here.
	(M.leaves, M.ileaves): Import from base, and reexport.
	* std/base.lua (_G.pack, _G.ripairs, _G.totable): Move from here...
	* std/table_ext.lua (M.pack, M.ripairs, M.totable): ...to here.
	* specs/table_ext_spec.yaml (pack, ripairs, totable): Add pending
	example descriptions.
	* std/base.lua (_G.metamethod, _G.id, _G.bind, _G.curry, _G.compose)
	(_G.memoize, _G.eval, _G.collect, _G.map, _G.filter, _G.fold, _G.op):
	Move from here...
	* std/functional.lua (M.metamethod, M.id, M.bind, M.curry, M.compose)
	(M.memoize, M.eval, M.collect, M.map, M.filter, M.fold, M.op):
	New new module. ...to here.
	* std/modules.lua: Add std.functional.
	* std/std.mk (nobase_dist_lua_DATA): Add std/functional.lua.
	* std/base.lua (_G.die, _G.warn): Move from here...
	* std/io_ext.lua (M.die, M.warn): ...to here.
	* std/std.lua.in: Reexport all recently modularized APIs into _G.
	* std/getopt.lua: Explicitly import used modules.
	* std/set.lua, std/strbuf.lua: Rearrange definitions to match other
	modules.
	* std/string_ext.lua: Require std.functional for metamethod().
	(_tostring): Be explicit when saving a handle for _G.tostring.
	* NEWS: Update.

	debug_ext: use correct require dependencies.
	* std/debug_ext.lua (say): Be explicit about the use of enhanced
	string.tostring.
	Be sure to require "list" before using its methods.

2013-05-11  Gary V. Vaughan  <gary@gnu.org>

	configury: bump release number to 36.
	* configure.ac (AC_INIT): Bump release number to 36.

	maint: no need to gitignore files we no longer generate.
	* .gitignore: Remove luarocks-config.lua and release-notes-* from
	ignore list.

2013-05-06  Gary V. Vaughan  <gary@gnu.org>

	slingshot: Update.
	* slingshot: Update.
	* configure.ac (AC_INIT): Package name has to match gnulib repo-
	name for generated rockspecs to find the tag zipballs.
	* .gitignore: Move /stdlib-*.tar.gz to /lua-stdlib-*.tar.gz.
	* .travis.yml: Regenerate.

	travis: make the lua5.1 hacked luadoc executable.
	* slingshot: Upgrade.
	* .travis.yml: Regenerate.

	travis: don't install luadocs twice.
	* slingshot: Update.
	* .travis.yml: Regenerate.

	travis: update slingshot, for better luadoc handling.
	* slingshot: Update.
	* configure.ac: Adjust.
	* .travis.yml: Regenerate.

2013-05-05  Gary V. Vaughan  <gary@gnu.org>

	Revert "travis: force luadoc to run only using Lua 5.1."
	This reverts commit d54819f8b58988b10f8a298746abc28ce30b41c8.

	travis: force luadoc to run only using Lua 5.1.
	* slingshot: Update.
	* configure.ac (EXTRA_ROCKS): Ugly hack to inject the interpreter
	substitution without requiring a locally modified travis.yml.in.
	* .travis.yml: Regenerate.

	slingshot: update.
	* slingshot: Update.
	* bootstrap.slingshot: Manually update.
	* bootstrap.conf (slingshot_files): Add m4/slingshot.m4.
	* configure.ac: Adjust.
	* .travis.yml: Regenerate.

	travis: install luadoc before running luarocks make.
	* configure.ac (EXTRA_ROCKS): Add luadoc.
	* .travis.yml: Regenerate.

	slingshot: update.

	travis: regenerate .travis.yml.
	* .travis.yml: Regenerate.

	travis: specify EXTRA_ROCKS correctly.
	* configure.ac (EXTRA_ROCKS): Add lyaml rock.
	* .travis.yml: Regenerate.

	slingshot: use the public slingshot url.
	* slingshot: Update.
	* bootstrap.slingshot: Sync from upstream.

	maint: post-release administrivia.
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* ./local.mk (old_NEWS_hash): Auto-update.

	Release version 35
	* NEWS: Record release date.

	slingshot: sync with upstream.
	* .gitmodules: Remove. Slingshot regenerates on demand.
	* .gitignore: Ignore .gitmodules.
	* slingshot: Update.
	* bootstrap.slingshot: Copied from slingshot, for clean checkout
	bootstrapping before slingshot subproject is populated.
	* bootstrap.conf: Adjust.

	maint: collect previous release notes into NEWS.
	* NEWS: new file, required for the Slingshot release process.
	* local.mk (old_NEWS_hash): Update.

	formatting: fix whitespace errors flagged by slingshot syntax-check.
	* INSTALL, specs/debug_ext_spec.yaml: Remove trailing blank lines.
	* specs/io_ext_spec.yaml, specs/match_ext_spec.yaml,
	specs/table_ext_spec.yaml: Remove trailing spaces.
	* std/std.mk: Remove SPACE-TAB sequence.

	configury: adopt slingshot release mechanism.
	* GNUmakefile, Makefile.am, build-aux/mkrockspecs,
	m4/ax_compare_version.m4, m4/ax_lua.m4, m4/ax_with_prog.m4:
	Remove.  These files are handled by slingshot now.
	* bootstrap: New file. Copied from slingshot subproject.
	* bootstrap.conf (stdlib_copy_slingshot): Install missing slingshot
	files.
	* configure.ac: Adjust to drive slingshot processes.
	* local.mk: New file.  Project local make rules.
	* rockspec.conf: New file.  Slingshot rockspec template.
	* specs/specs.mk: Simplified.
	* .gitignore: Update.
	* .travis.yml: Regenerate.

	slingshot: add slingshot as a git submodule.
	* .gitmodules: New file.
	* slingshot: New submodule.

2013-04-30  Gary V. Vaughan  <gary@gnu.org>

	configury: there is no distinct top_srcdir with non-recursive make.
	* std/std.mk (dist_doc_DATA, dist_files_DATA, dist_modules_DATA):
	Use plain $(srcdir).

	std: don't overwrite lua library tables.
	Overwriting a global library table causes hard-to-debug problems
	when the C part of Lua is holding references to the original
	(overwritten) table.
	* std/std.lua.in: When injecting new entry points into a core
	library, do it an entry at a time to avoid breaking references to
	the original address in the core.  This fixes a problem with the
	`package.path` and `package.cpath` being lost when set from
	LUA_INIT, among many other potential issues.

2013-04-13  Reuben Thomas  <rrt@sc3d.org>

	Remove non-core modules, which go into separate lua-rrtlib for ad-hoc modules

2013-04-11  Gary V. Vaughan  <gary@gnu.org>

	specs: upgrade to Specl 5.
	* specs/string_ext_spec.yaml, specs/table_ext_spec.yaml: Update
	all 'should_error' matchers to saner Specl 5 ordering.
	* specs/specs.mk (SPECL_MIN): Bump to 5.

	getopt: also requires io_ext module to be loaded.
	* std/getopt.lua: Load io_ext into a local table.

2013-04-10  Gary V. Vaughan  <gary@gnu.org>

	configury: install correctly with configure or luarocks.
	For the classic './configure; make; make install' to work we need
	to install to '$luadir' as discovered by ax_lua.m4.  But we also
	need to install directly to luarocks '$(LUADIR)' otherwise the
	stdlib source files are not copied onto the LUA_PATH properly by
	'luarocks make stdlib-*-1.rockspec'.
	* mkrockspecs.lua: Move from here...
	* build-aux/mkrockspecs: ...to here.
	* GNUmakefile (rockspecs): Adjust accordingly.
	* build-aux/mkrockspecs: Synchronise with the version that loads
	a template, interpolates the variables and writes out the result.
	* rockspecs.lua (build.install_command): Pass luadir to ensure
	installation to the correct directory for luarocks.
	* stdlib.rockspec.in: Remove.
	* bootstrap: New script to call autoreconf for compatibility with
	new build-aux/mkrockspecs.
	* GNUmakefile (Makefile.in): Use it.

2013-04-08  Gary V. Vaughan  <gary@gnu.org>

	docs: point to github pages documentation.
	* README.md (Documentation): Point to github pages documentation.

	docs: fix stupid typo.
	* README.md (Installation): That would be luarOCKS not luarCOKS :-$

	maint: correct git master installation instructions.
	* README.md (Installation): Provide working instructions for
	installing git master with Luarocks.
	Liberal use of additional useful links.

2013-04-07  Reuben Thomas  <rrt@sc3d.org>

	README.md: simplify installation instructions, and other minor tweaks

2013-04-07  Gary V. Vaughan  <gary@gnu.org>

	maint: remove spurious LUA override in Travis CI build.
	* .travis.yml (script): No need to force Lua 5.1 when running
	initial make now that we fixed up luadocs.

	docs: we need to autoreconf a master branch github checkout.
	* README.md (Installation): Show missing autoreconf invocation.

2013-04-07  Gary V. Vaughan  <gary@gnu.org>

	Revert "maint: support rerunning check-local in multiple lua environments."
	This reverts commit e052c045cfc5b837e2dcb36db2e1cd34791a3c69.

	Conflicts:
		Makefile.am

2013-04-07  Gary V. Vaughan  <gary@gnu.org>

	docs: rename README to README.md for github display goodness.
	* README: Move from here...
	* README.md: ...to here.
	* Makefile.am (EXTRA_DIST): Add README.md.

	maint: tweak luadoc wrapper to work with Travis CI.
	* .travis.yml (script): luadoc is a shell wrapper that calls the
	wrong lua, so make a copy, patch it to call a compatible lua binary,
	and run that instead.

	maint: run luadoc in a Lua 5.1 environment for Travis CI.
	* .travis.yml (script): luadoc only works with Lua 5.1, so set the
	execution environment up carefully for it to run correctly.

	maint: make luadoc available to Travis CI.
	* .travis.yml (install): Install a system luarocks, and a luadoc
	binary that uses it.

	maint: don't forget to make std/std.lua for Travis CI.
	* .travis.yml (script): Run a full make to ensure std.lua is
	generated in time for running mkrockspecs.lua!

	configury: don't hardcode specl, use $(SPECL) everywhere.
	* specs/specs.mk (specs-check-local): Use $(SPECL), because bare
	specl may not be on PATH, or otherwise correctly enabled.
	* .travis.yml (script): Always call make with V=1 for better
	logging.

	maint: install help2man for Travis CI specl build.
	* .travis.yml (script): specl-v4 build currently fails when trying
	to regenerate specl.1.in, so install help2man until that bug is
	fixed.

	maint: set LUA_PATH for specl build with Travis CI.
	* .travis.yml (script): Make sure local specl install can find
	ansicolors and lyaml in local luarocks tree.

	maint: remove unnecessary manual ansicolors installation for Travis CI.
	* .travis.yml: The previous error was caused by a bug in specl
	release 3, not a lack of ansicolors.  Remove the bogus ansicolors
	installation now that specl-v4 is released.

	maint: make sure ansicolors is installed for Travis CI.
	* .travis.yml (script): Install ansicolors to local luarocks tree.

	maint: make sure specl is installed for Travis CI.
	* .travis.yml (script): Install specl, and use it for make check.

	configury: respect `make V=0` in rockspecs rule.
	* GNUmakefile (rockspecs): Be quieter by default.

	std: strip leading "std." from global namespaces.
	* std/std.lua.in: Before injecting symbols into the global
	namespace, strip off the leading "std." added by std.modules.lua.

	configury: use uninstalled stdlib again. Again. (issue #24)
	* specs/specs.mk (std_path): Move from here...
	* Makefile.am (std_path): ...to here.
	(LUA_ENV): Make sure to set this so that mkrockspecs rule uses
	uninstalled stdlib again.
	* specs/specs.mk (SPECL_ENV): Simplify accordingly.

	configury: fix a typo in luarocks-config.lua generation.
	* GNUmakefile (luarocks-config.lua): Only one e in 'echo'.

	maint: integration with Travis CI system.
	* .travis.yml: configure, build and test with each of Lua 5.1,
	Lua 5.2 and luajit.
	* GNUmakefile (luarocks-config.lua): Set interpreter environment
	variables for luarocks invocations.
	* mkrockspecs.lua: Invoke luarocks via user LUAROCKS setting.
	* stdlib.rockspec.in (build.build_command): Pass LUA as a
	configure precious variable so that recent ax-lua.m4 uses it as
	passed instead of running the hardcoded search for a lua binary.
	* README: Add travis build status badge markup.  Plus some
	indentation corrections for correct markdown code rendering.

2013-04-01  Gary V. Vaughan  <gary@gnu.org>

	docs: improved installation instructions.
	* README: improve installation instructions.

	maint: The Grand Renaming™ - use `require "std.list"` etc.
	* Makefile.am (SPEC_ENV, SPECL, SPECL_MIN, SPECS, MULTICHECK)
	(check-local, src_spec): Split out from here...
	* specs/specs.mk (SPECL_ENV, SPECL, SPECL_MIN, specl_SPECS)
	(MULTICHECK, specs-check-local, std_path): New file.  ...to here.
	* Makefile.am (SOURCES, dist_data_DATA, dist_doc_DATA)
	(dist_files_DATA, dist_modules_DATA): Split out from here...
	* std/std.mk (nobase_dist_lua_DATA, dist_lua_DATA, std/std.lua)
	(dist_doc_DATA, dist_files_DATA, dist_modules_DATA): New file.
	...to here.
	* specs/debug_ext_spec.yaml, specs/getopt_spec.yaml,
	specs/io_ext_spec.yaml, specs/math_ext_spec.yaml,
	specs/package_ext_spec.yaml, specs/string_ext_spec.yaml,
	specs/table_ext_spec.yaml: Adjust require calls.
	* src/base.lua, src/bin.lua, src/debug_ext.lua, src/debug_init.lua,
	src/fstable.lua, src/getopt.lua, src/io_ext.lua, src/lcs.lua,
	src/list.lua, src/math_ext.lua, src/mbox.lua, src/modules.lua,
	src/object.lua, src/package_ext.lua, src/parser.lua, src/set.lua,
	src/std.lua.in, src/strbuf.lua, src/strict.lua, src/string_ext.lua,
	src/table_ext.lua, src/tree.lua, src/xml.lua: Move from here...
	* std/base.lua, std/bin.lua, std/debug_ext.lua, std/debug_init.lua,
	std/fstable.lua, std/getopt.lua, std/io_ext.lua, std/lcs.lua,
	std/list.lua, std/math_ext.lua, std/mbox.lua, std/modules.lua,
	std/object.lua, std/package_ext.lua, std/parser.lua, std/set.lua,
	std/std.lua.in, std/strbuf.lua, std/strict.lua, std/string_ext.lua,
	std/table_ext.lua, std/tree.lua, std/xml.lua: ...to here. Adjust
	require calls.
	* std/modules.lua: Add "std." prefix.
	* std/std.lua.in: Strip "std." prefix before injecting required
	symbols into global namespace.

2013-03-29  Gary V. Vaughan  <gary@gnu.org>

	maint: support rerunning check-local in multiple lua environments.
	* .luamultienv: Example multienv runner.
	* Makefile.am (SPECL): Allow overriding.
	(MULTICHECK): Location of multicheck script.
	(check-local): Run multicheck without looping, if present.

	getopt: ensure we find _G.arg from Specl nested setfenv environments.  (issue #27)
	Although only necessary for Lua 5.1, this fix is harmless for Lua
	5.2, and we support both!
	* src/getopt.lua (processArgs): Use only fully qualified _G.arg
	references, for Lua 5.1 Specl compatibility.
	Fixes issue #27.

2013-03-29  Reuben Thomas  <rrt@sc3d.org>

	getopt: instead of parsing undefined options, stop at first non-option
	This is a configurable behaviour in C getopt, and does what I actually
	wanted in the first place. If the other behaviour has a use case, it
	can be reinstated later.

2013-03-26  Gary V. Vaughan  <gary@gnu.org>

	string_ext: propagate string metamethods correctly. (issue #26)
	* specs/string_ext_spec.yaml (describe caps, describe chomp)
	(describe escape_pattern, describe escape_shell, describe finds)
	(describe format, describe ltrim, describe pad, describe rtrim)
	(describe split, describe tfind, describe trim, describe wrap):
	Add new specifications for metamethods.
	* src/string_ext.lua (M): Declare at the beginning, and then
	copy function references in at the end.
	(__index metamethod): Delegate to M for unknown metamethods, now
	that it carries all string functions too.
	Fixes issue #26.

	refactor: eliminate forward declarations by reordering string_ext.lua.
	* src/string_ext.lua (split): Move above require_version, the
	earliest caller. Declare as a local.  Rewove forward declaration.
	(finds): Move above split, the earliest caller.
	(tfind): Move above finds, the earliest caller.
	(format): Move above assert, the earliest caller. Declare as
	local. Remove forward declaration.

	refactor: don't over simplify specs/string_ext_spec.yaml.
	* specs/string_ext_spec.yaml (context by name): Add back
	accidentally deleted line.

	refactor: simplify specs/string_ext_spec.yaml.
	* specs/string_ext_spec.yaml (context by name): Unroll a function.
	(it adds extension apis to the global table): Remove debug code.

	std: propagate methods into global environment correctly. (issue #25)
	* specs/string_ext_spec.yaml (keywords): List of methods that
	should propagate into the global environment.
	(it propagates keywords to the global environment): New
	specification.
	* src/std.lua.in: Propagate global methods correctly.
	Fixes issue #25.

	configury: mkrockspecs uses uninstalled stdlib again. (issue #24)
	* GNUmakefile (ROCKSPEC_ENV): Default to same value as LUA_ENV.
	(MKROCKSPECS): Now uses lua-stdlib from the build tree, not the
	previously installed version.

2013-03-25  Gary V. Vaughan  <gary@gnu.org>

	debug_ext: don't perturb the global environment by default.
	For backwards compatibility, `require "std"` will still write
	symbols into the global environment, but when loaded directly be
	much more hygienic and return everything in a table, like most
	other modules:
	* src/debug_ext.lua (M): Return a table of previous debug_ext
	globals.
	* src/debug_init.lua: Wrap _DEBUG in a returned table, but
	initialize from _G._DEBUG when first loaded.
	* specs/debug_ext_spec.yaml: New specs. Specify behaviour of
	loading just debug_ext, or indirectly via `require "std"`.
	Add pending examples for remaining debug_ext APIs.
	* Makefile.am (SPECS): Add specs/debug_ext_spec.yaml.

	math_ext: don't perturb the global environment by default.
	For backwards compatibility, `require "std"` will still write
	symbols into the global environment, but when loaded directly be
	much more hygienic and return everything in a table, like most
	other modules:
	* src/math_ext.lua (M): Return a table of previous math_ext
	globals.
	* specs/math_ext_spec.yaml: New specs. Specify behaviour of
	loading just math_ext, or indirectly via `require "std"`.
	Add pending examples for remaining math_ext APIs.

	io_ext: don't perturb the global environment by default.
	For backwards compatibility, `require "std"` will still write
	symbols into the global environment, but when loaded directly be
	much more hygienic and return everything in a table, like most
	other modules:
	* src/io_ext.lua (M): Return a table of previous io_ext globals.
	(file_metatable): Move from here...
	* src/std.lua.in: ...to here.
	* specs/io_ext_spec.yaml: New specs. Specify behaviour of loading
	just io_ext, or indirectly via `require "std"`.
	Add pending examples for remaining io_ext APIs.

	refactor: move leaves and ileaves from base to list.
	Break another dependency loop.
	* src/base.lua (_leaves, _G.ileaves, _G.leaves): Move from here...
	* src/list.lua (_leaves, ileaves, leaves): ...to here.
	(M): Adjust.
	* src/io_ext.lua: For ileaves, `require "list"` instead of "base".
	(writelines): Adjust.
	* src/tree.lua (M): Re-export list.ileaves and list.leaves as
	tree.ileaves and tree.leaves.
	* src/std.lua (_G): Re-export list.ileaves and list.leaves to the
	global environment.

	string_ext: don't perturb the global environment by default.
	For backwards compatibility, `require "std"` will still write
	symbols into the global namespace, but when loaded directly be
	much more hygienic and return everything in a table, like most
	other modules:
	* src/base.lua: Don't depend on list or string_ext modules to
	break a depndency loop.
	(_G.require_version, _G.render, _G.tostring, _G._tostring)
	(_G.prettytostring, _G.pickle, _G.assert): Move these "stringy"
	functions from here...
	* src/string_ext.lua: ...to here, breaking another dependency
	loop.
	(M): Define module symbols in this table and return it.
	* specs/string_ext_spec.yaml: Add pending examples for the
	relocated APIs.
	* src/std.lua.in: Inject string_ext module symbols into global
	string namespace, and newly relocated base functions directly
	into _G.
	* src/debug_ext.lua, src/getopt.lua, src/xml.lua: Use required
	string_ext return value from a local table.
	* specs/string_ext_spec.yaml: Specify new behaviour, being
	careful about `require "std"` side-effects.

	table_ext: don't perturb the global environment by default.
	For backwards compatibility, `require "std"` will still write
	symbols into the global namespace, but when loaded directly be
	much more hygienic and return everything in a table, like most
	other modules:
	* src/table_ext.lua (unextended): Remove.
	(M): Include core lua table.sort function as M._sort, and
	return M.
	* src/std.lua.in: Inject table_ext module symbols into global
	namespace.
	* specs/table_ext_spec.yaml: Specify new behaviour, being
	careful about `require "std"` side-effects in global namespace..
	* src/base.lua, src/fstable.lua, src/getopt.lua, src/object.lua,
	src/string_ext.lua: Save "table_ext" import into a local table and
	call APIs directly from there.

	package_ext: don't perturb the global environment by default.
	For backwards compatibility, `require "std"` will still write
	symbols into the global namespace, but when loaded directly be
	much more hygienic and return everything in a table, like most
	other modules:
	* src/package_ext.lua (M): Define module symbols in this table
	and return it.
	* src/std.lua.in: Inject package_ext module symbols into global
	namespace.
	* specs/package_ext_spec.yaml: Specify new behaviour, being
	careful about `require "std"` side-effects.

	configury: bump release number to 35.
	* configure.ac (AC_INIT): Bump release number to 35.

2013-03-24  Gary V. Vaughan  <gary@gnu.org>

	configury: warn if `make check` needs a newer Specl.
	* Makefile.am (SPECL_MIN): Oldest release capable of running our
	spec files.
	(check-local): If actual Specl version is older than SPECL_MIN
	show a diagnostic rather than try to run the specs.

	maint: move GNU make only rules to GNUmakefile.
	* Makefile.am (SPECL_OPTS, specl_verbose_, specl_verbose_0)
	(specl_verbose_1): Move from here...
	* GNUmakefile: ...to here.
	(specl_verbose_1): Now that Specl-3 passes --verbose on to the
	selected formatter to handle, explicitly request the long-form
	report formatter for `make check V=1`.

	maint: revert premature merge of pull request #23.
	Reverse apply 5508adb.

2013-03-23  Reuben Thomas  <rrt@sc3d.org>

	README: make formatting consistent

	GNUmakefile: change to using a separate checkout for release branch

2013-03-15  Reuben Thomas  <rrt@sc3d.org>

	Merge pull request #23 from rrthomas/gary/ext-hygiene
	package_ext: don't perturb the global environment by default.

2013-03-15  Gary V. Vaughan  <gary@gnu.org>

	package_ext: don't perturb the global environment by default.
	For backwards compatibility, `require "std"` will still write
	symbols into the global namespace, but when loaded directly be
	much more hygienic and return everything in a table, like most
	other modules:
	* src/package_ext.lua (M): Define module symbols in this table
	and return it.
	* src/std.lua.in: Inject package_ext module symbols into global
	namespace.
	* specs/package_ext_spec.yaml: Specify new behaviour, being
	careful about `require "std"` side-effects.

	string_ext: fix a bad assumption in a spec example.
	Running string.format in the expectation `should` uses the core
	Lua string.format which doesn't prettify tables, but we're
	comparing it to the string_ext `..` operator which uses the std
	enhanced string.format, and that *does* prettify tables.
	* specs/string_ext_spec.yaml (stringifies non-string arguments):
	Manually expand the the stringified table in should to match the
	std prettified table stringification.

	list: fix standalone loading of string_ext module.
	This fix reenables simple 'require "string_ext"' without an additional
	'require "std"'.
	* src/string_ext.lua: Load the list module, which is used in split().
	Store APIs from `require "strbuf"`.

2013-03-14  Gary V. Vaughan  <gary@gnu.org>

	list: fix standalone loading of list module.
	This fix reenables simple 'require "getopt"' without an additional
	'require "std"'.
	* src/list.lua (new): Add a forward declaration.
	(sub, concat, rep, reverse, transpose, enpair, flatten, shape)
	(indexKey, indexValue): Use new, rather than list.new.
	* src/getopt.lua (processArgs): Call local 'getOpt' function. Global
	getopt.getOpt may never exist!

2013-03-09  Reuben Thomas  <rrt@sc3d.org>

	README: mention all extra dependencies of fstable

	getopt: remove the need for ugly getopt.Option constructor

2013-03-09  Gary V. Vaughan  <gary@gnu.org>

	maint: support 'make check V=1' and 'SPECL_OPTS=-v make check'.
	* Makefile.am (SPECL_OPTS): Unless set in the environment already,
	pass -v to specl according to whether or not V=1 was given to make.
	(check-local): Use it.

2013-03-09  Reuben Thomas  <rrt@sc3d.org>

	getopt: allow parsing of undefined options; useful for programs which wrap other programs

2013-03-07  Gary V. Vaughan  <gary@gnu.org>

	specs: update to cleaner Specl-2 YAML spec format.
	* specs/getopt_spec.lua, specs/package_ext_spec.lua,
	specs/string_ext_spec.lua, specs/table_ext_spec.lua: Rename from
	these...
	* specs/getopt_spec.yaml, specs/package_ext_spec.yaml,
	specs/string_ext_spec.yaml, specs/table_ext_spec.yaml: ...to
	these.  Reformat as YAML.
	* Makeflie.am (SPECS): Remove old _spec.lua filenames, and add
	new _spec.yaml filenames.

2013-03-06  Gary V. Vaughan  <gary@gnu.org>

	specs: allow for package.config differences in Lua 5.1.
	* specs/package_ext_spec.lua (it splits package.config up): Allow
	for optional trailing \n present in 5.2 but not 5.1.

2013-02-27  Gary V. Vaughan  <gary@gnu.org>

	configury: bump release number to 34.
	* configure.ac (AC_INIT): Bump release number to 34.

	specs: rely on installed specl rather than shipping our own.
	* specs/specl, specs/lib/specl.lua: Remove.
	* Makefile.am (EXTRA_DIST): Adjust accordingly.
	(lib_spec): Remove.
	(SPEC_ENV): Adjust accordingly.
	(SPECS): Add $(srcdir) prefix for distcheck.
	(check-local): Run listed SPECS using installed specl.

	maint: don't checkout master again before running woger.
	* GNUmakefile (check-in-release): Move current_branch save and
	restore from here...
	(release): ...to here.

	maint: mkrockspecs simplifications.
	* luarocks-config.lua.in: Remove.
	* configure.ac (AC_CONFIG_FILES): Remove luarocks-config.lua.
	* GNUmakefile (luarocks-config.lua): Make on demand.
	* Makefile.am (rockspecs): Move from here...
	* GNUmakefile (rockspecs): ...to here.
	(WOGER_ENV, WOGER_OUT): Factored out of release rule.
	(release): Simplify accordingly.

	maint: don't forget to distribute GNUmakefile.
	* Makeflie.am (EXTRA_DIST): Add GNUmakefile.

2013-02-25  Gary V. Vaughan  <gary@gnu.org>

	io_ext: remove spurious access to global 'prog' variable.
	* src/io_ext.lua (processFiles): The supplied function receives
	a copy of each file name, so no need to make assumptions about
	global variables in here.

2013-02-23  Gary V. Vaughan  <gary@gnu.org>

	specs: add a skeleton specl spec for getopt module.
	* src/getopt.lua (test): Remove.
	* specs/getopt_spec.lua: Reimplement as specs.
	* Makefile.am (SPECS): Add spects/getopt_spec.lua.
	* specs/getopt_spec.lua): More specs for default option overrides.
	* src/getopt.lua (processArgs): Fix a small scoping bug uncovered
	by the new specs.

	getopt: don't display the full help for option errors.
	* src/getopt.lua (processArgs): Show the error and a short help
	message for option errors, and save the full blown help screens
	for '--help'.
	(usage): Simplify concatenations slightly.

	getopt: support GNU style --help and --version output.
	* src/getopt.lua (usage): Take arguments from the prog parameter
	instead of inspecting global variables.
	If present, wrap paragraphs from prog.description and display
	between purpose and option table.
	(version): New function. Display version info according to prog.
	version and prog.copyright.
	(processArgs): Use it.
	* template.lua: Update.
	* specs/specl: Update.

	getopt: insert a blank line between usage and purpose.

	getopt: move options and prog out of the global namespace.
	* src/getopt.lua (usage): Require prog as a parameter with options
	inside it.
	(processArgs): Likewise.
	* template.lua: Update.

	getopt: only add default help and version when user supplied none.
	* src/getopt.lua (makeOptions): Make two passes through the option
	list. The first to collect all option declarations, and the second
	to make an index.
	(appendOpt): Factor out, and add a nodupes parameter to prevent
	addition option specs being added when any of the option letters
	they use have been claimed already.
	Use it to only add default help and version options when the user
	didn't specify their own already.

	getopt: format long and short options properly.
	* src/getopt.lua (fmtOpt): Display two leading dashes for long
	options.
	(usageInfo): Indent past the short option column where only a
	long option is being displayed.

	getopt: move Option out of the global namespace.
	* src/getopt.lua (_G.Option): Rename from this...
	(Option): ...to this local declaration.
	(M): Export Option as a new public interface.
	Remove TODO.
	* template.lua, specs/specl: Update.

2013-02-22  Reuben Thomas  <rrt@sc3d.org>

	Fix some spec failures in string.wrap, and one error in a spec.

	string_ext.lua: fix a reference to string.sub.

2013-02-22  Gary V. Vaughan  <gary@gnu.org>

	string_ext: prefer snake_case to camelCase APIs.
	* src/string_ext.lua (escapePattern, escapeShell, ordinalSuffix):
	Rename from these...
	(escape_pattern, escape_shell, ordinal_suffix): ...to these.
	(M): Continue to support camelCase calls for backwards compatibility.
	* specs/string_ext_spec.lua: Update.
	Add specs to ensure camelCase APIs continue to work.

	maint: update string_ext to use Lua 5.2 style modules.
	* src/string_ext.lua: Save unextended string table, returning
	that after injecting stdlib extensions.
	* specs/string_ext_spec.lua (context when requiring the module): A
	few new specifications for requiring string_ext.

	specs: add missing specs for string.finds and string.tfind.
	* specs/string_ext_spec.lua (describe string.finds (), describe
	string.tfind ()): New specs for these APIs.

	specl: ensure that failing to meet specs kills make distcheck.
	* specs/lib/specl.lua (run): Return true unless there are
	expectation failures.
	* specs/specl: Exit with non-zero status for with expectation
	failures.

	string_ext: bail out early with fatal type mismatch errors.
	* src/string_ext.lua (wrap): Rather than letting the guts of wrap
	choke unpredictably later on, assert the required types at the
	outset.
	(tfind): Likewise.  These currently bubble up to finds and split
	as well.

	specl: update ordinalSuffix () error specs to match the new error messages.
	* specs/string_ext_spec.lua (describe string.ordinalSuffix): Make the
	expectations match reality.

2013-02-22  Reuben Thomas  <rrt@sc3d.org>

	Fix ordinalSuffix for negative arguments (issue #20).

	string_ext.lua: use Lua terminology "pattern" rather than "regex"

2013-02-22  Gary V. Vaughan  <gary@gnu.org>

	specs: add specl specification for string_ext module.
	* specs/string_ext_spec.lua: New file. Specl specs for
	string_ext.
	* Makefile.am (SPECS): Add specs/string_ext_spec.lua.

	specl: sync from upstream.
	* specs/lib/specl.lua: Upgrade to the latest upstream, where the
	contain and match matchers are not broken!

	string_ext: don't use math.mod, which doesn't exist in Lua 5.2.
	* string_ext.lua (ordinalSuffix): Use '%' operator instead of
	math.mod, which is compatible with Lua 5.1 and 5.2.

	maint: move maintainer rules into GNUmakefile.
	* Makefile.am: Move maintainer rules from here...
	* GNUmakefile.am: New file. ...to here.
	Automatically autoreconf the directory if configure is missing.

	configury: make sure WOGER has a default value.
	* Makefile.am (WOGER): Set it to 'woger' by default.

	configury: bump release number to 33.
	* configure.ac (AC_INIT): Bump release number to 33.

2013-02-21  Gary V. Vaughan  <gary@gnu.org>

	configury: make the release rules more robust.
	* Makefile.am (GIT, GIT_REMOTE, LN_S): Set as macros that can be
	overridden during testing.
	Adjust all callers.
	(tag-release, check-in-release): Move the push commands that
	publish changes upstream from here...
	(release): ...to here.
	(check-in-release): Rather than rely on having a parallel checkout
	in a particular sibling directory, just switch branches from here
	temorarily.
	(unpack-distcheck-release): Once in the relase branch, overwrite
	the previous release with the tarball from distcheck.

	configury: bump release number to 32.
	* configure.ac (AC_INIT): Bump release number to 32.

	specs: add specl specification for package_ext module.
	* specs/package_ext_spec.lua: New file. Specl specs for
	package_ext.
	* Makefile.am (SPECS): Add specs/package_ext_spec.lua.

	maint: update package_ext to use Lua 5.2 style modules.
	* src/package_ext.lua: Save unextended package table, returning
	that after injecting stdlib extensions.

	specs: specify return of the unextended module from table_ext.
	* specs/table_ext_spec.lua (context when requiring the module): A
	few new specifications for requiring table_ext.

	maint: update table_ext.lua to use Lua 5.2 style modules.
	* src/table_ext.lua: Save unextended package table, returning that
	after injecting stdlib extensions.
	Declare everything locally.
	(M): Public interface.

	specl: new specification testing framework.
	* specs/lib/specl.lua: New file for specification testing.
	* specs/specl: New file.  Command line wrapper for specl.lua.
	* specs/table_ext_spec.lua: New file. Specl tests for
	src/table_ext.lua.
	* Makefile.am (src_spec, lib_spec): Lua search path strings for
	directories in the source tree.
	(LUA_ENV): Adjust.
	(SPEC_ENV): New macro. Set Lua environment for calling specl.
	(SPECS): New macro.  A list of specs/*_spec.lua files.
	(EXTRA_DIST): Add new specification testing files.
	(check-local): Hook the specl tests into the Automake test
	framework.

	bugfix: make sure getopt.opt is updated in the module table.
	Fix a bug preventing visibility of getopt.opt after port to Lua
	5.2 style modues.
	* src/getopt.lua (M): Add opt table. Move declaration above...
	(processArgs): ...here, and update M.opt instead of undeclared
	opt variable.
	Merge other public entry points into M table before returning.

	configury: use static list of SOURCES instead of $(filter)ing.
	* Makefile.am (SOURCES): Remove the GNU Make extensions used to
	dynamically build the list, and just list each file statically.

2013-02-20  Reuben Thomas  <rrt@sc3d.org>

	Makefile.am: bump version to 31.

	list.lua: rename slice to sub, for compatibility with strings.

	list.lua: add list methods.

	Makefile.am: re-add explicit setting for release notes file, which we can once more prepare ahead of time

	Makefile.am: no longer need to re-bootstrap after checking in release files.

2013-02-18  Reuben Thomas  <rrt@sc3d.org>

	m4/ax_lua.m4: get latest version; no code changes, but some pleasing spelling corrections.

	list.lua: allow list.new to take no arguments to create an empty list.
	The previous commit relied on this behaviour; oops.

	list.lua: make all methods that return lists make them with list.new, not {}.
	Also rename result variables consistently to r, not, in some cases, m.

2013-02-17  Reuben Thomas  <rrt@sc3d.org>

	Makefile.am: checking out release branch in same directory doesn't work; use another directory.

	Makefile.am: since git clean deletes release notes file, don't supply it to woger (which will prompt for release notes).

	Makefile.am: need to git clean directories too.

	Makefile.am: run git clean to ensure we can check out the release branch.

	Makefile.am: only supply std.lua once (fixes make distcheck in some setups)

2013-02-15  Reuben Thomas  <rrt@sc3d.org>

	Makefile.am: copy a couple of fixes from luaposix.

	rockspecs.lua: add luarocks include path to configure command.

	Makefile.am: remove reference to defunct stdlib.rockspec.in

	rockspecs.lua: remove lrexlib-specific comment

2013-02-12  Gary V. Vaughan  <gary@gnu.org>

	maint: bump version to 30.
	* configure.ac (AC_INIT): Bump version to 30.

2013-02-12  Gary V. Vaughan  <gary@vaughan.pe>

	Merge pull request #14 from gvvaughan/pull-request/move-to-lua52-module-style
	Pull request/move to lua52 module style

2013-02-12  Gary V. Vaughan  <gary@gnu.org>

	configury: make sure we build std.lua when necessary.
	Using wildcard for SOURCES before std.lua has been built now that
	configure no longer makes it for us, means standard make or
	luarocks install after building from a fresh checkout results in
	std.lua not being built or installed.
	* Makefile.am (SOURCES): Add src/std.lua.

2013-02-12  Gary V. Vaughan  <gary@vaughan.pe>

	Merge pull request #12 from gvvaughan/pull-request/fix-luadocs-hard-dependency
	configury: fix hard dependency on luadocs.

	Merge pull request #11 from gvvaughan/pull-request/use-uninstalled-stdlib
	configury: load local std modules as expected by mkrockspecs.lua.

2013-02-11  Reuben Thomas  <rrt@sc3d.org>

	parser.lua: update to current stdlib and Lua 5.2, fixing a couple of small bugs
	Remove a debugging line accidentally left in before.

	base.lua: fix die; previously produced rubbish!

2013-02-11  Gary V. Vaughan  <gary@gnu.org>

	maint: update parser to use lua 5.2 style modules.
	* src/parser.lua: Simply return the Parser object.

	maint: update object to use lua 5.2 style modules.
	* src/object.lua: Simply return the callable Object table.
	Adjust all callers.

	maint: update setbuf to use lua 5.2 style modules.
	* src/strbuf.lua: Declare everything locally, and return a table
	of interfaces, per lua 5.2 module style.
	Adjust all callers.

	maint: update mbox to use lua 5.2 style modules.
	* src/mbox.lua: Declare parse locally, and return a table with a
	reference, per lua 5.2 module style.

	maint: update lcs to use lua 5.2 style modules.
	* src/lcs.lua: Declare longestCommonSubseq locally, and return a
	table containing a reference to it, per lua 5.2 module style.

	maint: update getopt to use lua 5.2 style modules.
	* src/getopt.lua: Declare everything locally, and return a table
	of interfaces, per lua 5.2 module style.

	maint: update fstable to use lua 5.2 style modules.
	* src/fstable.lua: Declare everything locally, and return a table
	of interfaces, per lua 5.2 module style.

	maint: update bin to use lua 5.2 style modules.
	* src/bin.lua: Declare everything locally, and return a table of
	interfaces, per lua 5.2 module style.

	maint: update trees to lua 5.2 style modules.
	* src/tree.lua: Declare everything locally, and return a table of
	interfaces, per lua 5.2 module style.

	maint: update lists to use lua 5.2 style modules.
	* src/list.lua: Declare everything locally, and return a table of
	interfaces, per lua 5.2 module style.
	Adjust all callers.

	maint: update sets to use lua 5.2 style modules.
	This is backwards compatible with lua 5.1, and allows use of sets
	with the strict module loaded, which raised a bogus error before.
	* src/std.lua.in (version): Return this in the module namespace.
	Require the bundle of "std" modules into the global namespace.
	* src/set.lua: Declare everything locally, and return a table
	of interfaces, per lua 5.2 module style.

	configury: fix hard dependency on luadocs.
	* m4/ax_with_prog.m4: New file.
	* configure.ac (AX_WITH_PROG): Use it to find a luadocs binary.
	* Makefile.am ($(dist_doc_DATA)): Use the substituted binary.
	* rockspecs.lua: Remove insertion of luadocs dependency.

	* configury: load  local std modules as expected by mkrockspecs.lua.
	Rather than having to manually update the installed lua-stdlib
	behind luarocks' back, let the mkrockspecs.lua script find the
	modules it was written for in the source tree.
	* Makefile.am (LUA_PATH): Default to compiled-in search path.
	(LUA_ENV): Load modules from the source tree instead of potentially
	outdated versions from the lua installation.
	(rockspecs): Run lua with LUA_ENV set.

2013-02-09  Reuben Thomas  <rrt@sc3d.org>

	rockspecs.lua: add luadoc as a dependency for git rockspec.

2013-02-08  Reuben Thomas  <rrt@sc3d.org>

	rockspecs.lua: fix build command for building from git.

	mkrockspecs.lua: whitespace fix.

	Add a rockspec for building from git, and machinery for building variant rockspecs.

	tree.lua: add tree.merge.

	set.lua: fix broken elems iterator (issue #10)

	strict.lua: tweak formatting to match other modules

	base.lua: note availability of original tostring as _tostring.

2013-02-07  Reuben Thomas  <rrt@sc3d.org>

	set.lua: add missing dependency on list.lua

	Avoid rebuilding documentation in distributed sources, so users don't need luadoc installed.

2013-02-06  Reuben Thomas  <rrt@sc3d.org>

	Makefile.am: some more fixups to release-by-git.

	.gitignore: we have reverted from zip to tgz tarballs.

	Makefile.am: don't try to rebuild documentation if not necessary (doesn't work in VPATH build, so breaks distcheck).

	Makefile.am: distcheck is really a dependency of check-in-release, not of release.

	stdlib.rockspec.in: correct name of git tag to source release tag.

	Makefile.am: check in sources before trying to check them out for test build.

	Fix issue #8: members with the same names as class methods cause problems.

	Bump version to 29.

	Makefile.am: add check-in-release to push release files to git.

	Makefile.am: enable building of documentation from git checkout.

	Change to building (with LuaRocks) direct from git, not releasing a zip.

	README: update installation instructions and mention GitHub, not LuaForge.

	Update to latest ax_lua.m4.

2013-02-05  Reuben Thomas  <rrt@sc3d.org>

	README: Make Lua 5.2 compatibility definite, and update copyright years.

2012-12-23  Reuben Thomas  <rrt@sc3d.org>

	stdlib.rockspec.in: remove redundant dir setting

2012-10-30  Reuben Thomas  <rrt@sc3d.org>

	.gitignore: add luarocks directory

2012-10-28  Reuben Thomas  <rrt@sc3d.org>

	Add testing of luarock against uploaded archive before mailing announcement

	base.lua: user simpler default require_version pattern that works in more cases

2012-10-28  Reuben Thomas  <rrt@sc3d.org>

	Generate Lua version in rockspec from that in configure.ac
	Bump version to 28

	Use newer ax_lua.m4

	Tweak pattern used to substitute MD5 sum into rockspec to be
	compatible with gnulib syntax checks, should we ever use them.

2012-10-28  Reuben Thomas  <rrt@sc3d.org>

	Bump version to 28, and simplify slightly, requiring automake 1.11

2012-10-15  Reuben Thomas  <rrt@sc3d.org>

	base.lua: move a documentation stanza to a more apt location

2012-10-04  Reuben Thomas  <rrt@sc3d.org>

	release: fix call to woger to generate correct URLs

2012-10-03  Reuben Thomas  <rrt@sc3d.org>

	rockspec: fix homepage URL

	Makefile.am: really distribute all docs

	rockspec: fix download URL (thanks, Hisham Muhammad)

2012-10-01  Reuben Thomas  <rrt@sc3d.org>

	base.lua: add require_version

2012-09-26  Reuben Thomas  <rrt@sc3d.org>

	Make build_command in rockspec more robust.

	Install documentation with 'make install' and from luarocks.

2012-09-22  Reuben Thomas  <rrt@sc3d.org>

	Rename table.indices to table.keys, and use term 'keys' more.

2012-09-21  Reuben Thomas  <rrt@sc3d.org>

	getopt.lua: output usage information to stdout, not stderr

	configure.ac: bump version to 27

	configure.ac: accept Lua 5.2

2012-09-18  Reuben Thomas  <rrt@sc3d.org>

	getopt.lua: remove func member of Option; simply gather all option values into a list

	getopt.lua: improve some comments and remove a redundant require

2012-09-17  Reuben Thomas  <rrt@sc3d.org>

	set.lua: fix last commit: elements should be elems

	base.lua: remove a spurious blank line

	set.lua: revert elements iterator to being pairs; leaves is wrong!

2012-09-12  Reuben Thomas  <rrt@sc3d.org>

	Turn on debugging by default and tweak what the global debug function does.

2012-09-12  Reuben Thomas  <rrt@sc3d.org>

	I misunderstood what finds did, and didn't spot that it was needed for split!
	Revert "string_ext: remove finds; map should be used with string.find instead"

	This reverts commit 5a62e3ee7ad2514b681ff6f348c43b797088b089.

2012-09-11  Reuben Thomas  <rrt@sc3d.org>

	string_ext: remove finds; map should be used with string.find instead

2012-09-06  Reuben Thomas  <rrt@sc3d.org>

	Remove string.gsubs: the order of substitutions was undefined, and map can be used just as well.

2012-07-06  Reuben Thomas  <rrt@sc3d.org>

	build: Check MD5 sum of rockspec against tarball before releasing

2012-05-31  Reuben Thomas  <rrt@sc3d.org>

	object: fix an incorrect simplification in the previous commit.

	object: add the ability to have a constructor function.

2012-05-31  Reuben Thomas  <rrt@sc3d.org>

	Tweak a couple of table functions.
	Rename table.rearrange to the more descriptive table.clone_rename, and
	clarify the documentation.

	Make table.merge not clone its left-hand argument, but modify it, as
	the user has reason to expect.

2012-05-31  Reuben Thomas  <rrt@sc3d.org>

	parser.lua: fix call to renamed method.

2012-05-29  Reuben Thomas  <rrt@sc3d.org>

	object.lua: fix inconsistency and missing HTML close tag in doc comments.

2012-02-22  Reuben Thomas  <rrt@sc3d.org>

	base.lua: Fix minor formatting variation.

	Merge pull request #5 from gvvaughan/pull-request/for-fame-and-glory
	AUTHORS: Add myself.

2012-02-22  Gary V. Vaughan  <gary@gnu.org>

	base.lua: new memoize function.
	* src/base.lua (memoize): Memoize a single result function by
	wrapping it in a functable.

2012-02-22  Reuben Thomas  <rrt@sc3d.org>

	Update URL to point to github.

	Reformat some code to make lua-mode happier (most of the time, sigh).

2012-02-22  Gary V. Vaughan  <gary@gnu.org>

	AUTHORS: Add myself.
	* AUTHORS: List the few small contributions I've made.

2012-02-18  Reuben Thomas  <rrt@sc3d.org>

	Update rockspec for github.

	Makefile.am: Update call to woger.

	Makefile.am: Update call to woger.

	Makefile.am: Update call to woger.

	Makefile.am: Update call to woger.

	Makefile.am: Update call to woger.

	Makefile.am: Update call to woger.

	Makefile.am: Update call to woger.

	Rename set.elements to set.elems for consistency with list.elems.

2012-01-21  Reuben Thomas  <rrt@sc3d.org>

	base.lua: add missing require of strbuf.

	strict.lua: improve error message.

2012-01-19  Reuben Thomas  <rrt@sc3d.org>

	Add leaves, ileaves and inodes tree iterators; simplify nodes slightly.
	Use ileaves to simplify flatten.

	Rename io.writeline to io.writelines and allow it to flatten table
	arguments.

	Use list.elems instead of ipairs in several places.

	Fix FIXME in set: use leaves as elements to return only the key.

2012-01-18  Reuben Thomas  <rrt@sc3d.org>

	src/io_ext.lua: Improve docstring for readlines.

2012-01-17  Reuben Thomas  <rrt@sc3d.org>

	string_ext: fix new string.__concat metamethod to run tostring on both args, thus avoiding infinite recursion.

	string_ext: add __concat metamethod for strings which runs tostring.
	Reformat some code to please lua-mode and add some missing quotes in a
	comment.

2012-01-09  Reuben Thomas  <rrt@sc3d.org>

	io_ext: Add slurp; use it in various places.

2011-12-16  Reuben Thomas  <rrt@sc3d.org>

	Bump version to 26.

2011-12-16  Reuben Thomas  <rrt@sc3d.org>

	Merge pull request #1 from gvvaughan/patch-1
	tree: fix bugs when using a list of tables as keys
	
	Thanks for this. I don't currently have another use case than Zile to test with.

2011-12-16  Gary V. Vaughan  <gary@vaughan.pe>

	tree: fix bugs when using a list of tables as keys
	To be fully general, tree should allow table keys so that it's
	possible to write:
	  $ lua -lstd
	  > t, k1, k2 = tree.new(), {key='a'}, {key='b'}
	  > t[{"k1", "k2"}] = "string keys"; t[{k1, k2}] = "table keys"
	  > = t[{"k1", "k2"}], t[{k1, k2}]
	  string keys    table keys
	This patch fixes 3 bugs that prevent that from working.
	* src/tree.lua (metatable.__newindex): Detect subtrees correctly
	by comparing against the tree metatable, rather than assuming any
	"table" type is a correct match.
	Use rawset to insert a new node without triggering the __index
	metamethod.
	(metatable.__index): Don't recurse into table key members, only
	the list entries to be folded, by checking whether the table has
	a length first - for t[{k1, k2}], {k1, k2} is a list (with length)
	and should be folded, but k1 (k1 = {key='a'}) is not a list and
	should not.

2011-09-30  Reuben Thomas  <rrt@sc3d.org>

	io_ext: unset prog.file at the end of io.processFiles

2011-09-27  Reuben Thomas  <rrt@sc3d.org>

	getopt: improve output and conformance to best practice
	Make the short option for -version be -V, not -v.

	Remove short option -? for -help.

	In help, show short options first, so that display is easier to read.

	Remove publicly Options constructor, as it’s not needed externally.

2011-09-19  Reuben Thomas  <rrt@sc3d.org>

	Makefile.am: tweak rockspec's deps.

	src/.gitignore: add std.lua.

	Bump version to 25.

	std.lua: add a version string to the std module

	list: add list.compare, and __le and __lt metamethods.

	Makefile.am: make release message shorter and more precise.

	Makefile.am: distribute rockspec source.

	.gitignore: ignore correct zip name.

	configury: rename project to stdlib for consistency and to make luarocks happy.

	Make rockspec on release.

	Bump version to 24.

	string_ext.lua: fix old call of findl (is now called tfind).

2011-09-17  Reuben Thomas  <rrt@sc3d.org>

	Makefile.am: fix getting summary description, and reminder message output by make release.

	rockspec: Keep old name (stdlib) for the rock.
	Also fix LuaForge URL, which of course hasn’t changed.

	.gitignore: Add Makefile.

	Build system: autotoolize and generate rockspec.

2011-09-11  Reuben Thomas  <rrt@sc3d.org>

	Rename findl to tfind to conform to lrexlib.
	Also fix a bug in the LuaDoc documentation of the return values.

2011-09-07  Reuben Thomas  <rrt@sc3d.org>

	Remove posix_ext module (is going in luaposix instead).
	Update documentation about LuaDoc.

	Add posix.creat.

2011-09-02  Reuben Thomas  <rrt@sc3d.org>

	Fix typo.

	Add a new module with some binary to number/string conversion routines.

	Add simple string buffers and use them for default table tostring.

	Fix mode on .gitignore.

	Remove some non-LuaDoc markup.

2011-08-19  Reuben Thomas  <rrt@sc3d.org>

	Fixup.

	Add some more LuaDoc stuff.

	Partial conversion of documentation to LuaDoc.

2011-06-06  Reuben Thomas  <rrt@sc3d.org>

	Push tags, but don’t tag until we’ve successfully released.

	Update woger call to new keyword style.

	Add fstable module for storing tables as file trees.

	Replace reference to ldoc with one to LuaDoc.

	Convert documentation to LuaDoc, and retire ldoc.

2011-06-05  Reuben Thomas  <rrt@sc3d.org>

	Add index.html.

2011-05-22  Reuben Thomas  <rrt@sc3d.org>

	Fix faulty ldoc tags.

2011-05-21  Reuben Thomas  <rrt@sc3d.org>

	Fix return code on --help to be 0.
	Make dieWithUsage into plain usage, and don’t exit at end.

2011-05-19  Reuben Thomas  <rrt@sc3d.org>

	Add some missing param tags.

2011-05-03  Reuben Thomas  <rrt@sc3d.org>

	Comment out strict from default set to make co-existence with other code easier.

	Fix calls to writeLine to be to writeline.

2011-05-02  Reuben Thomas  <rrt@sc3d.org>

	Add readlines and writeline to file handle metatable.

	Fix capitalization of readlines and writeline in docstrings.

2011-04-15  David Favro  <lua@meta-dynamic.com>

	Fixed bug: ldoc used writeLine() rather than writeline().

2011-04-12  Reuben Thomas  <rrt@sc3d.org>

	Always return nil on error, not -1.

2011-04-04  Reuben Thomas  <rrt@sc3d.org>

	Rename readLines to readlines and writeLine to writeline.

2011-03-23  Reuben Thomas  <rrt@sc3d.org>

	Only set _DEBUG to false if it’s not already initialised.

2011-03-19  Reuben Thomas  <rrt@sc3d.org>

	Fix splitdir.

2011-03-12  Reuben Thomas  <rrt@sc3d.org>

	Initialise _DEBUG early so that it can be overridden by app and still be strict.lua-compatible.

	Shorten a TODO.

2011-03-09  Reuben Thomas  <rrt@sc3d.org>

	Restore modules.lua as holding standard list, to un-break std.lua.

	Allow mk1file to generate customized sets of modules, with the standard set as the default.

2011-03-08  Reuben Thomas  <rrt@sc3d.org>

	Remove unnecessary posix. prefix.

	Correct name of package_ext.

	Remove redundant comments.

	Update documentation of standard set, and add prerequisites.

	Merge branch 'origin' of github.com:rrthomas/lua-stdlib into origin

	Remove posix_ext and object from standard set.

2011-03-07  Reuben Thomas  <rrt@sc3d.org>

	Remove posix prefix from function calls.

	Add euidaccess.

	Improve a comment.

	Merge branch 'origin' of github.com:rrthomas/lua-stdlib into origin

	Add __index method to allow OO syntax use of methods.
	Add delete method.

2011-03-01  Reuben Thomas  <rrt@sc3d.org>

	Reverse order of list methods for convenient OO use.

	Merge from HEAD.

2011-02-26  Reuben Thomas  <rrt@sc3d.org>

	In future, make zip distros.

	Fix message.

	Use package.dirsep once more.

	Put package.config reflexion into a new package_ext module.

	Make message clearer.

	Leave dist tarball in source dir, not above.

	Add tarball to .gitignore.

	Add sensible access to package.config.

	Bump copyright year.

	Bump copyright year.

	Use undocumented package.config to get platform’s directory separator.

2011-02-08  Reuben Thomas  <rrt@sc3d.org>

	Improve release target to tag releases.

2011-02-07  Reuben Thomas  <rrt@sc3d.org>

	Fix missing math. prefix, and swap incorrect sign in sub. Thanks to Bob Chapman.

2010-12-14  Reuben Thomas  <rrt@sc3d.org>

	Speed up math.floor for case where p is 0 or absent (thanks, Lukáš Procházka).

2010-12-09  Reuben Thomas  <rrt@sc3d.org>

	Change rules from using CVS to using git.

	Reinstate string __index metamethod fallback so that OO uses of strings work.
	Switch argument order of ltrim, rtrim and trim so they work in OO
	syntax.

	Point to tree.clone for deep copies.

2010-10-12  Reuben Thomas  <rrt@sc3d.org>

	Restore 'dubious' but used string metamethod fallback.

2010-10-09  Reuben Thomas  <rrt@sc3d.org>

	Move .cvsignore's to .gitignore's.

2010-10-08  Reuben Thomas  <rrt@sc3d.org>

	Fix typo in io.catfile.

	Add commit that seems to be missing from import from CVS.

	Add new posix_ext module.

	Add posix_ext to list.

	Remove spurious full stop.

2010-10-07  Reuben Thomas  <rrt@sc3d.org>

	Add catfile and fix catdir to return `/' when necessary.

2010-10-06  Reuben Thomas  <rrt@sc3d.org>

	Fix permissions.

2010-06-20  rrt  <rrt>

	Remove dubious metamethod fallback for string.__index.

2010-06-13  rrt  <rrt>

	Fix and simplify tree.__newindex: there was a variable name typo, and sub-tables should also be initialised to trees, as otherwise the relevant metamethods are not called.

	Fix an incompatibility with strict.lua.

2010-06-11  rrt  <rrt>

	Simplify nodes iterator and make it more efficient; thanks to Alistair Turnbull for the hint.

	Simplify, generalise and rename (from treeIter to nodes) tree iterator.

	Whitespace correction.

	Simplify implementation of empty, using next as per manual.

2010-06-09  rrt  <rrt>

	Rename table.subscript to op["[]"], and move table.deepclone and table.lookup into a new module, tree, as the clone method and __index metamethod respectively. The tree module also has a constructor, new, and a __newindex metamethod.
	Rename table.newDefault to table.new.

	Fix writeLine and add an explanatory comment.

	Make the set metatable a local variable.

2010-06-08  rrt  <rrt>

	Add Lua distribution’s strict.lua to standard modules.

	Have a single list of modules in modules.lua and use it to load them in std.lua and generate the single-file version in mk1file, which latter is now a Lua script.

2010-06-07  rrt  <rrt>

	Fix list.foldl, list.foldr, and the fold iterator combinator.
	Simplify the op table functions to be exactly the primitive operators,
	not list versions thereof.

	(Possibly) improve the commented-out simpler version of treeIter.

2010-06-07  rrt  <rrt>

	Remove table.subscripts function: it’s easily replaced by subscript plus string.split, as in its definition.

2010-06-07  rrt  <rrt>

	Initialise _DEBUG to nil so stdlib works with strict.lua.
	Rename debug.traceCall to debug.trace (more Lua-ish).

	Use math.max rather than just (incorrectly) max.

	Improve some documentation.

2010-06-02  rrt  <rrt>

	Remove redundant redefinition of print (it already calls tostring).
	Fix op table so that base can require list without breaking; fixes
	FIXME.

	Remove lcs module from std set.
	Update FIXME about autogeneration of mk1file to make it more precise.

	Bump copyright year to 2010.

2010-03-18  rrt  <rrt>

	Add missing dependency on list.

2009-09-14  rrt  <rrt>

	Improve formatting slightly.

2009-09-07  rrt  <rrt>

	Avoid using removed function io.changeSuffix.

	Remove rex module altogether.

	Don’t need pcre_rex any more.
	Remove FIXME about external dependencies as we no longer have any, nor
	intend to.

	Remove need for rex_pcre in xml.
	Remove xml, rex, parser and mbox from standard list of libraries.

	Remove dependency on lposix; in the process remove addSuffix and changeSuffix, as they reliedon basename and dirname, and it wasn't worth reimplementing them as they're not used.

	Add explanatory comment.

2009-08-31  rrt  <rrt>

	Add requirement of posix and copyright notice to output.

	Add lua-posix to list of dependencies.

2009-08-24  rrt  <rrt>

	Fix basename and dirname calls

	Remove basename and dirname as they are now implemented in lposix.
	Rename pathConcat to catdir and pathSplitDir to splitdir and make them
	behave like the corresponding Perl functions.

	Add FIXME.

2009-03-20  rrt  <rrt>

	Use the original _floor in round rather than chaining via floor for a bit of extra speed; thanks to David Kantowitz.

2009-03-16  rrt  <rrt>

	Update 'usage' message.

	Make 'make release' do 'make dist'

	Simplify assert.

2009-03-15  rrt  <rrt>

	Simplify string.format.

	Remove string.join, which is the same as table.concat. Thanks to David Kantowitz for spotting it.

2009-03-14  rrt  <rrt>

	Add support for not cloning metatables.

2009-03-13  rrt  <rrt>

	Check no outstanding changes and tag release.

	Fix typo.

	Update copyright year.

	Fix variable substitution in release target.

	Ignore release-notes-*

	Add release target, and exclude release notes from tarball.

	Copy metatables in deepclone, so that it does what it says. Patch from David Kantowitz.

2009-02-19  rrt  <rrt>

	Add final newline for neatness.

	In the single file, make the special "require" function local so that other files can be required after the single-file std.

	Update object module to correspond with Lua Gems version.

2008-09-04  rrt  <rrt>

	Fix Diego Nehab's name. Sorry Diego! Thanks to Shmuel Zeigerman for pointing out my error.

2008-09-04  rrt  <rrt>

	Fix set.difference.
	Add set.symmetric_difference.

	Make s * t do intersection for sets, and s / t do symmetric
	difference, as in Modula 3 and (at least for *) "Programming in Lua".

2008-09-04  rrt  <rrt>

	Fix equal. Thanks to report from Jiutian Yanling.

2008-07-28  niklas  <niklas>

	Cope with nil values in map.

2008-07-27  niklas  <niklas>

	Fix elems and relems

	Fix make dist; $REL -> ${REL}, add --exclude for .#*, and no longer exclude template-rrt.lua, which no longer lives in the tree.

2008-06-20  niklas  <niklas>

	Add collect, from Patrick Walton, to run an iterator and collect the results in a table.
	As a result, rewrite all the table functionals to be iterator
	functionals (in base) and reimplement the list functionals in terms of
	them. Add two iterators for lists, elems and relems, that return only
	the elements and not the indices, in order to implement the list
	functionals.

	A couple of old fixes where the Lua 5.1 table count is used (#).

	Simplify ripairs slightly.

	Fix a comment typo.

2008-03-28  rrt  <rrt>

	Add some TODOs to make the prog structure a bit more sensible.

2008-03-04  rrt  <rrt>

	Make a note to compare pathSplit and pathConcat with Perl equivalents.

	Add TODO to use LuaDoc instead.

2008-03-03  rrt  <rrt>

	Add Makefile with dist target

	Fix typo in comment.

	No dependency on LFS.

	No longer have any sort of dependency on bitlib.

	Remove _INTEGER_BITS and unneeded dependency

	Update date and prerequisites.

2008-03-01  rrt  <rrt>

	Require external deps before neutering "require".

	We may add bit to stdlib, but it's not currently there, nor is it actually used by anything in stdlib.

	rex is not an external dependency

	Simplify length function.

	Use LFS for length() function.

2008-01-19  niklas  <niklas>

	Add pathSplit and pathConcat from nancy.

2008-01-12  rrt  <rrt>

	Make calls to find and gsub get the function from the pattern, meaning that in theory they could work with other regex engines than Lua's.

	Remove pointless object notation on a string.

2007-11-19  rrt  <rrt>

	Now that INTEGER_BITS is added to the math namespace, no need to prefix it with _.

	Note that bitlib is needed.

2007-10-06  rrt  <rrt>

	Rename 'permute' to the more accurate 'rearrange'

	Update some comments to match changes in the Lua Gem about this code.

2007-10-05  rrt  <rrt>

	Fix from Roberto Ierusalimschy.

2007-05-11  rrt  <rrt>

	Fix up single-file stdlib

	Clarify TODO.

2007-04-26  rrt  <rrt>

	Tidy length slightly.

	Clarify documentation a little further

	Ignore built docs

	Format prerequisites to allow for more than one!
	Explain ldoc better.

	Revert to plain implementation of length to avoid using POSIX library which is currently unmaintained.

2007-04-25  rrt  <rrt>

	Clear up uses of old vararg "arg" syntax (thanks Matt).

2007-03-01  rrt  <rrt>

	Add list.rep

	Add FIXME for commented-out require

	Make join cope with empty lists.

	Remove default separator in string.split, and hence a TODO.
	Add string.join.

2007-02-25  rrt  <rrt>

	Mention the dependency on lrexlib.

2007-02-24  rrt  <rrt>

	Use __append metamethod, not __concat, which was wrong

	Add __append metamethod and constructor for LCS

	Add __append metamethod for LCS

	Set had been left rather broken; fix it up.

	Remove no-longer-needed LCS method. Thanks to Enrico Tassi for noticing it.

2007-02-22  rrt  <rrt>

	Cosmetic changes to finds (comments and a variable rename) for clarity.
	Use list.flatten (l) instead of list.concat (unpack (l)) in split to
	avoid overflowing the parameter stack (with the unpack) when splitting
	large strings. Clarify the comment for this code.

2007-02-21  rrt  <rrt>

	Fix indexKey and indexValue: the function passed to table.process wasn't returning the accumulator as it should have.

2007-02-20  rrt  <rrt>

	Make a note to find better names for enpair and depair, which are useful but confusing. Something like pairsToTable and tableToPairs?

2007-01-26  rrt  <rrt>

	Add missing dirname and basename

2007-01-05  rrt  <rrt>

	Sync with reality.

2007-01-04  rrt  <rrt>

	Document.
	Set rex = rex_pcre, so that we actually have the functions we expect
	under "rex".

	Now that lrexlib no longer has a Lua component or a default library, add a library to load it (currently just require rex_pcre).

2006-12-06  rrt  <rrt>

	Remove TODOs that apply to lrexlib.

2006-11-27  rrt  <rrt>

	Use non-list-capable math.max correctly

2006-11-20  rrt  <rrt>

	Fix from Jerôme Vuarand to string subscription that deals with oldmetas that are functions.

2006-11-08  rrt  <rrt>

	Stop string subscription operator from hiding other methods.

2006-11-05  rrt  <rrt>

	Note that rex is now an external dependency.

	Note problem with external dependencies.

	Sort out adding to module metatables.

	Add a FIXME

	As 5.1 has all the metamethods we need, rewrite LCS to use them. Hence, no need for wrapper string.lcs.
	Remove named string concat, need for which is mostly obviated by
	concat metamethod.

	Remove @module from list of tags to add, as we already have it.

	Clarify Reuben's role.

	Remove rex.lua, now imported from lrexlib

	No longer need to lift std modules into global environment as they are already there.

	Remove std/ prefix for module files, and no longer include std.lua, which does nothing.

	Remove std directory, having all modules at the root, and with root names (no "std." prefix), so that stdlib can rely on external libraries, and the namespace is simplified.

	file.lua is no more

	Rewrite io.length using posix.stat and move it to io.lua.

	Move TODO from rex.lua

2006-11-03  rrt  <rrt>

	No longer mention defunct bit.lua.

	Remove listable and listabled functions. This wasn't really that useful, and could confuse.

2006-11-01  rrt  <rrt>

	Correct @function to @func

	Really cope with multiple params under a single @param.

	Add template for std-using scripts.

	Clarify gmatch metamethod

	Cope with multiple params under a single @param, by insisting on the : at the end.

2006-10-30  rrt  <rrt>

	Fix list.concat (thanks to Avi Yagodnick for reporting the bug).

2006-10-28  niklas  <niklas>

	Remove require loops by commenting out looping requires. This needs fixing properly (by permitting them).
	Where possible without further change, remove the "std" prefix from
	module declarations.

	Where possible, remove module prefixes from function definitions.

	Use ... in more places.

	Move pathSubscript to table.lua.

	Move assert.lua's contents to base.lua (we can't have a module called
	assert, and this is in the base library in any case).

	Move function forms of operators to base.lua.

	Make headings of modules consistent (add @module lines).

	Remove io.exists, as it's dodgy, and posix.stat is much better.
	Lighterweight environments are probably going to roll their own
	anyway.

	Remove "zip" and "unzip" aliases for list.transpose. Add a note to the
	documentation instead.

	In io.lua, remove some io. prefixes (that don't make the code less
	clear) as we're already in io, and instead prefix type with _G (oops,
	that's ugly).

	Improve changeSuffix, and make it use posix.dirname and
	posix.basename.

	Add two functions to list module: flatten and shape, to flatten and
	reshape arbitrarily nested lists.

	Add a paragraph of documentation to the top of the rex module in
	preparation for lrexlib 1.20 (rex.lua will leave stdlib and move to
	lrexlib).

	Add rex.gmatch (as well as adding a metatable method for rex objects).

	Update set.lua to current practices, including the (still
	commented-out) metamethods.

	Probable bug-fixing in string module obscured by removal of string.
	prefix from function definitions and calls.

	Make redefinitions of existing functions more consistent, and fix some
	faulty ones.

	Add deepclone to table from Jamie Webb's code.

2006-10-08  rrt  <rrt>

	Update to match stdlib. Remove revision history as it's in CVS, and replace version number with CVS Revision tag.

	table.getn --> #

2006-09-30  rrt  <rrt>

	Remove io.readDir, as it is replaced by posix.dir.

	Remove io.dirname, as it is replaced by posix.dirname.

	Fix changeSuffix to work with paths containing dots by only operating on basename, not the whole file name.

2006-09-18  rrt  <rrt>

	Fix ordering of deps

2006-07-14  rrt  <rrt>

	Escape quotes and apostrophes in string.escapeShell.

	Escape square brackets too in string.escapeShell.

2006-04-25  rrt  <rrt>

	Prepend redefinition of require to the output.

	Use string methods rather than functions so that the functions here work on regexs as well. Add a note to make the whole API work properly with regexs as well as Lua patterns.

	Add TODO

	Reformat and improve comments.

2006-04-24  rrt  <rrt>

	Simplify assignment of retry.

	Correct name of table.filterItem (was table.mapItem).

2006-04-15  rrt  <rrt>

	Reformat.

	Use variadic bit.or.

	Add table.filter and table.filterItem. Add list.filterItem and implement list.filter in terms of it.

	Fix more bugs, patch from Shmuel Zeigerman.
	Call rex:flags() to inject flags into rex table.

	Remove unnecessary local line from gmatch, and initialise st to 1, not 0 (thanks to Shmuel Zeigerman).

2006-04-09  rrt  <rrt>

	Reorganise libraries with simpler names

	Move all modules out of string

	Reflect simplified structure

	Move all modules out of io

	Rename io.getopt to getopt

	Rename string.xml to xml

	Add utility to make a single file stdlib

	Use env to run script and reverse Changelog order

	Rename algorithm.lcs to lcs

2006-04-09  rrt  <rrt>

	Rewrite string.split to be regex-system-neutral.
	Change string.findl to return from and to in list form, not {from = f,
	to = t}.

	Update string.regex to Lua 5.1 vararg syntax.

	Make io.exists use stat if available.

	Add io.dirname.

2006-04-09  rrt  <rrt>

	Update Lua code from Shmuel's version and write gmatch in Lua.

	Update concat to Lua 5.1 vararg syntax.
	Remove flatten alias for concat, as concat doesn't flatten.

	Update to 5.1 vararg syntax

2006-03-30  rrt  <rrt>

	string.gfind is now string.gmatch.

	Reactivate tests, but make them conditional on running in debug mode.

	Improve installation instructions.

	Fix mailing list address.

	Update to match reality.

	Fix handling of global arg table.

	Use new form of message-less error.

2006-03-29  rrt  <rrt>

	Deal with C modules like Lua modules.

	Don't mention require for Lua 4 any more.

	Rename modules *-ext to *_ext to avoid problem with version number parser in require.

	Simplify adding functions to global table.

2006-03-28  rrt  <rrt>

	Add module calls everywhere, and do some necessary renaming to avoid clashes

2006-03-22  rrt  <rrt>

	Use module and require in properly 5.1-compatible way, and change module names to work better with 5.1.
	This should all still work fine with 5.0 using compat-5.1.lua.

2006-02-03  rrt  <rrt>

	More fixes and tests from Shmuel Zeigerman.

2006-01-28  rrt  <rrt>

	Add tests from Shmuel Zeigerman, reorganised somewhat. They are run when the module is loaded.

	Rename sub to cap for clarity (Shmuel Zeigerman).

2006-01-26  rrt  <rrt>

	More fixes from Shmuel to mimic string.gsub better.

2006-01-24  rrt  <rrt>

	Fix endless loop when pattern is .* (bug reported by Shmuel Zeigerman).

	Cope with capture being false (Shmuel Zeigerman).

	Fix bug when n == 0 (thanks Shmuel Zeigerman), and tidy up.

2006-01-23  rrt  <rrt>

	Fix from Shmuel Zeigerman to match string.gsub better: when the pattern contains no captures, pass the entire match to the replacement function.

2006-01-21  rrt  <rrt>

	More bug fixes; thanks to Shmuel Zeigerman for reporting the bugs and in one case giving the fix.

	Fix bugs with %n replacements in rex.gsub

	Make rex.gsub a full gsub for rex.

2006-01-19  rrt  <rrt>

	Don't escape & in entities

	Improve rex.gsub

2006-01-16  rrt  <rrt>

	Escape <, > and & in XML output.

2005-11-23  rrt  <rrt>

	Replace deepipairs with treeIter to iterate properly over trees.

2005-11-22  rrt  <rrt>

	Remove table.filterItem, as it really only works for lists. Inline the function in list.filter.
	Add table.map.

	Add XML output, assuming Lua tables created by luaexpat.

2005-11-21  rrt  <rrt>

	Add generic printing framework, and use it to add prettytostring.

2005-11-18  rrt  <rrt>

	Use table.process to implement list processing functions.

	Add generic table-processing function table.process and action functions for map, filter &c.

	Add two iterators: ripairs which is like ipairs, but in reverse, and deepipairs, which recurses into nested tables.

2005-11-09  rrt  <rrt>

	Remove import.

	Update year to 2005.

	import has been removed.

	Fix bogus version in history

	Remove import, and instead use 5.1-style require (tested with compat-5.1.lua).
	Assume a LUA_DIR of "/", hence rename files accordingly.

2005-09-04  rrt  <rrt>

	Fix string.ltrim and string.rtrim to return only the advertised return value.
	Fix string.trim to do what it says on the tin; it was completely
	broken.

2004-09-08  rrt  <rrt>

	Fix assert when called with only one argument: arg has the value {n=0} when there are no variadic arguments, not nil as I assumed.

2004-02-17  rrt  <rrt>

	Comment the constructor.

	Check error return when loading file, so that if file is not found we don't abort immediately so that all LUA_PATH entries are checked.

2004-02-04  rrt  <rrt>

	Tidy up abstract syntax rules: there's now only one per production.
	Keep action functions for more complex rules. Looks as though we only
	ever have one or the other (because simple rules don't take into
	account any housekeeping info) so perhaps simplify this again.

	Make lists not have a ty field, but just be lists of whatever they
	contain.

	Return false instead of nil for empty parse trees, so as not to upset
	ipairs iterations over lists.

2004-02-04  rrt  <rrt>

	Tidy up the code, mostly by shortening the names of frequently-used variables.

	Allow import to report errors during importing.

2004-02-03  rrt  <rrt>

	Added Diego Nahab for his mbox parser.

	Added Diego Nahab's mbox parser.

2004-02-03  rrt  <rrt>

	Rework the API: now has a single method exposed, parse, and the other methods have been moved inside parse as local functions. The constructor no longer takes a token list.
	Also, provide support for producing an abstract parse tree rather than
	the (default) concrete one.

	Full details in the all-new documentation.

2004-02-03  rrt  <rrt>

	Clarify note about import and add TODO about markup tags.

2004-02-01  rrt  <rrt>

	Massacre the object implementation, reverting to implementing sets as simple tables, which seems to be better for general use. A lot of the code in this file is now non-functional; I'll be making it work later, integrating it with Jamie Webb's code. The module may get folded back into table.

	Make list.map and list.filter work on lists that have nil elements.

	Fix __call metamethod.

	writeLine -> io.writeLine

	Fix io.writeLine (somehow two lines had become swapped).

	writeLine -> io.writeLine

	Various modifications prompted by Jamie Webb's submission of his own standard library. So far I have assimilated improvements that map directly on to existing code, and also removed some functions that didn't seem to be that useful. Looking at the code again provoked other miscellaneous improvements.

2004-01-31  rrt  <rrt>

	In the previous commit, which had a bogus log message, I fixed io.readDir: split --> string.split.
	In this one, I improved the formatting of io.readDir slightly.

	Improve spacing of comments.

	If -version is given and no command-line args, then terminate after showing the version message.

	Explain that although import is used internally, users should use require (as in README) and why.

	Removed bit._INTEGER_BITS, because it's the same as math._INTEGER_BITS. I suspect I meant to do this ages ago.

	Added a few more people I thought of.

	Formalise the README: this project is no longer just mine.
	Add a list of AUTHORS: the first contributions have arrived.

	This script was trivial and wrong.

	Added math.floor and math.round, based on code from Johann Hibschman.

	Add math.floor and math.round, based on code from Johann Hibschman.

	Fix pickle: format->string.format (thanks to Johann Hibschman).

2004-01-28  rrt  <rrt>

	Default the from and to parameters of list.slice to the start and end of the list respectively.

	Add primitive way to cope with missing non-standard C libraries, and a TODO to deal with missing C libraries properly.

	Fix table.newDefault to use correct name for __index metamethod.

	Improve module description in first line.

	Fix tostring to work on self-referential tables.

2004-01-27  rrt  <rrt>

	Corrected misnaming of functions and added documentation.

2004-01-26  rrt  <rrt>

	Add string.format extension to make it not try to format if there is only one argument.

2004-01-25  rrt  <rrt>

	Update to Lua 5. This is an old change which I forgot to check in; ldoc is *not* the way forward for stdlib documentation. This checkin is just for completeness.

2004-01-10  rrt  <rrt>

	*** empty log message ***

2004-01-10  rrt  <rrt>

	Change "returns" lines to "@returns" for better LuaDoc-ness.
	Add string.tonumbersi.

	Minor corrections and LuaDocification of some other comments.

2003-10-22  rrt  <rrt>

	More Lua 5 tweaks, and a couple of minor bugfixes.

2003-10-20  rrt  <rrt>

	Oops; added file with incorrect name; re-add with correct name.

	Add "import" from LTN 11 to overcome require's problem with circular dependencies.
	Remove string.next, as string.gfind provides an equivalent iterator.

	More renaming for consistency, and move more code around. This introduced the first cyclic dependency between modules since I moved to Lua 5, and I've had to cure this with a C include-style trick, since Lua 5 require just overflows the stack when there's a recursive call of require.

	Add an iterator for the values in a set, and use it; methods are now organised into those that access the data structure and those that call other methods.

2003-10-19  rrt  <rrt>

	Objectify the implementation, and add LuaDoc-style markup to the comments.

	Write methods outside object prototype (i.e. in more consistent form for stdlib).

2003-10-18  rrt  <rrt>

	Rename std.data.logic to std.bit, as it extends the C bit library.

	Make a namespace for list routines.

	Fix bug in curry properly.

	Finish renaming in io.io. Update TODO for getopt in std.lua.

	Re-add mistakenly removed logic (I confused the ability to take multiple args with the ability to take lists).

	assert lives again! math added to hold math function extensions.

	Remove logic (no longer needed; _INTEGER_BITS moved to math, band &c. already work on lists). Various other movements and renaming of modules.

	Routines moves to std.list and std.base.

	More renaming. Remove boolean routines for when bitlib is not present. There's no excuse in Lua 5!

	Use ipairs instead of table.getn loops.

	Use pairs () instead of deprecated for "i, v in t" form.

	Rename table routines. Simplify compose.

	Renamed some libraries for Lua 5-ification reasons.

2003-10-17  rrt  <rrt>

	Fix a minor bug and remove some debugging code.

2003-10-17  rrt  <rrt>

	A new module (and family): algorithm, with first member algorithm.lcs, which implements the longest common subsequence algorithm needed for diff.
	std.object has been reworked, and now fits much better with Lua 5,
	although the interface to it is pretty much the same as before.

	Some other Lua 5-isation has been done, but not much; there's still a
	lot left to do in std.data in particular.

2003-10-13  rrt  <rrt>

	Fix call to writeLine (now io.writeLine).

2003-09-27  rrt  <rrt>

	More Lua 5-ification changes, mostly to the io modules this time.

2003-09-25  uid30086  <uid30086>

	Another round of changes for Lua 5-ification. This completes the changes to the string library (used to be the text library), and adds std.rex (complements my C rex library). Other changes are mostly to accomodate this; a few extras have snuck in.

2003-09-24  rrt  <rrt>

	First set of changes moving to Lua 5-like naming conventions for the libraries.

2003-09-14  rrt  <rrt>

	Use math.mod rather than bit.mod for wider compatibility.

	Wrap notes field of prog structure before output.

2003-09-12  rrt  <rrt>

	More changes to update to Lua 5.0. Nearly there now, I think, as I have several scripts working!

2003-09-11  rrt  <rrt>

	Another few search-and-replace function names to update to Lua 5. Mostly string functions this time.

2003-09-09  rrt  <rrt>

	More search-and-replace and wholesale code removal (notably POSIX getopt) for Lua 5.

	Another swathe of Lua 5 updates. Now my little script that I'm testing nearly works, which means that quite a lot of the code in the libraries is at least vaguely correct!

2003-09-08  rrt  <rrt>

	A slew of updates in the march to Lua-5-ify the libraries. I've just been working on a particular small script and changing things "on demand", and I've not even managed to make the script work yet, so there's almost certainly a lot of work still to go.

2003-06-03  rrt  <rrt>

	Convert to Lua 5.0, and some slight tidying.

	Do TODOs for Lua 5 (use "le" tagmethod -- will have to become a metamethod) and ability to force a function to return only one result.

	Update std.patch40 to std.patch50 for Lua 5. Now none of the other modules need it.

	Make readDir return an unsorted list of files. Unfortunately, -U isn't supported by ls on all platforms.

2003-03-13  rrt  <rrt>

	Update to match new directory structure (rather overdue!).

2003-01-05  rrt  <rrt>

	Use endOfLine in chomp and wrap.

2002-10-17  rrt  <rrt>

	Removed std.logic; now folded into std.data.logic

	std.logic now merged into std.data.logic.

	Merge the two logic modules.

2002-09-28  rrt  <rrt>

	Add tabulate function to use tabulator methods, and use it.

2002-09-10  rrt  <rrt>

	Sigh. New bnot didn't work. Next time I'll think and test rather better before straying from the path of righteousness.

	I was being very dim about bnot. Oops. Roberto pointed it out. I hang my head in shame.

	Revert to previous version to avoid losing precision (specifically, LSB).

2002-09-09  rrt  <rrt>

	Shorter implementation of bxor, and bnot thanks to a remark by Paul Hsieh on lual (Message-Id: <0H26009OMQ9J59@mta5.snfc21.pbi.net>).
	Kept band (as the primitive to make bxor) and bor (because de
	Morganising it would involve a call to bnot and two to band, hence
	making it three times slower).

2002-09-08  rrt  <rrt>

	Poor man's logic functions (for those who can't use bitlib). Also calculate the number of bits in the word.

	Add std.logic

2002-09-06  rrt  <rrt>

	Improve layout of usage message when no command line options (don't have trailing blank line).

2002-09-05  rrt  <rrt>

	Add withFileOrHandle, which takes a filename, handle or uses a default handle, opens the file if appropriate, and passes the handle to a given function.
	Use it to generalise readLines and readFile.

	It's tempting to generalise writeLine too, but writeLine ("foo", "bar") is
	ambiguous: do we want to write "foo" and "bar" to _OUTPUT, or "bar" to
	file "foo"?

2002-09-05  rrt  <rrt>

	Make patches work with any version that starts with "Lua 4.0", to cope with 4.0.1 and any future point releases.
	Replace unpack with a recursive version (based on code from John
	Belmonte) that copes with any number of values.

	Change "key" to "index" everywhere for consistency.

	Improve comments for tinvert

	Change intersect tag method to division, and add TODO to implement proper subset tagmethod in Lua 5.0.

	Rename intersect to setintersect for consistency, and define setunion (= merge).

2002-08-28  rrt  <rrt>

	Allow stringifier methods again, but they are now only used by tostring. Allows more cosmetic stringification, while not stopping pickling from working.

2002-08-27  rrt  <rrt>

	Don't need stringify and pickler tables any more, and tostring and pickle can be simplified. They both use tabulator where necessary.

	Remove interaction between pickle and tostring, which is no longer needed, as they both now use tabulator methods where necessary.

	Add tabulator method table for turning arbitrary objects (typically tagged userdata) into tables. Use this to finally fix tostring and pickle. Oh, yes.

2002-08-23  rrt  <rrt>

	A last gamble. Then I'll have to sit down and work it out again.

	Another desperate attempt.

	Fix up. I hope. This is starting to drive me insane.

	Typo.

	Fix default case for pickling.

	Fix typo.

	More fixes.

	More fixes to pickling. I got in a pickle with this one.

	Make pickling work properly on numbers and nil by having a "self" parameter for stringifier and pickler functions. They're more like classes now.

	Fix buglet (can't concat to nil).

	Make pickle work for numbers and nil.

	Add tinvert, and update some comments to LDoc format.

2002-08-22  rrt  <rrt>

	Correct call of warn to expand arg list.

2002-08-15  rrt  <rrt>

	Add utility for making zip dist of stdlib.

	Add empty to test whether a table is.

	Fix paths for new directory structure and get rid of one or two gremlins.

	Finish editing std.cfg into new form (configuration file with require implementation tacked on the end) and rename it.

	Update some TODOs.

	Rename std->modules and remove stray std.lua

2002-08-14  rrt  <rrt>

	Standardize code style, and make changes (mostly to the comments) to prepare for renaming to std.config, as per John's suggestion. This file will only secondarily contain require, and will typically be built into the Lua system anyway. When we move to Lua 5.0, require will disappear, anyway.

	John Belmonte's replacement require implementation (5.0-compatible).

	Reorganise directory structure to a flat directory, to cope with Lua 5.0 require patterns (so that the libraries can be loaded without making assumptions about directory separators).

2002-08-13  rrt  <rrt>

	Add the format library to text.

	Fix buglet in warn.

	Move some functions to format.lua to avoid dependency loop text<->assert and to make way for the new pretty printing functions described in a big TODO in format.lua.
	Override format in text, so that if it's only passed one argument, it
	just returns it.

	Use capability of warn to take format arguments.

2002-08-13  rrt  <rrt>

	Rename affirm to assert, and pass its arguments to the new format function.
	Remove the *f functions (which called format); these were unused. Now
	warn, die and assert can all take format arguments.

	affirm->assert in file.lua

2002-08-13  rrt  <rrt>

	Correct punctuation.

2002-08-12  rrt  <rrt>

	Fix a typo loading pickle.lua in text.lua
	Make pickle escape characters in strings that need it

	Restructure stringifying so that functions in stringifier can produce either a string or a table of stringified index = stringified value pairs.
	Use this to write a simple pickle function that can pickle anything
	that tostring can stringify. pickle and tostring are now effectively
	just different renderers for the functions in stringifier.

	Fix spacing in comments.

	Allow new tostring methods to be registered.

	*** empty log message ***

	Debug defaultTable so it uses the initial value given rather than always creating an empty table.

	Add defaultTable to macro.
	Move lookup to macro, reimplement it in terms of foldl and subscript,
	and reimplement pathSubscript in terms of it.

	Add a logic module to extend band, bor and bxor to lists (just listable them).

	Comment list.lua in ldoc format. The other modules will probably follow.

	Include the new macro module.

	Move pathSubscript out of table.lua to avoid a circular dependency, into the new macro.lua module, which also includes some material moved from global.lua.

2002-08-01  rrt  <rrt>

	Move print from assert to debug. This not only makes sense, but breaks a recursive dependency between assert and text/text.

2002-07-30  rrt  <rrt>

	Remove require for now-defunct time.lua, and tidy up the TODOs.

	Correct endofLine -> endOfLine again; this must have crept back in with the last diff. Using CVS everywhere rather than manual copying will be a Good Thing in this respect!

2002-07-29  rrt  <rrt>

	Generalised daySuffix to ordinalSuffix. Still English-specific :-(

2002-07-27  rrt  <rrt>

	Improve comment for mapIter

2002-07-26  rrt  <rrt>

	Add constant, a constant function generator.

	Use pathSubscript in methodify to allow more convenient macroization of tables.

	A simple documentation extracter, relying completely on specially formatted comments. There's no documentation at the moment except the patterns in the program, which should be obvious! I'll ldocify all the code shortly and check in instructions with it.
	This tool is provisional, and subject to improvement. The TODOs in the
	file indicate some of my first thoughts in that direction.

2002-07-24  rrt  <rrt>

	Move methodify to table.lua where it belongs (it has nothing to do with lists!)

	Allow scripts to have no arguments. If you want to display help when just the script is run with no arguments, you'll have to do it manually.

	Throw away stderr from shell commands (we don't expect the output to clutter up the screen; it's always possible to capture it by adding a redirection to the command, which will override the one we add).

	Add subscript, which exposes [] as a function.

2002-06-22  rrt  <rrt>

	Correct endofLine -> endOfLine

	Initial revision
