Fix incorrect optimization in cond expansion.

When a constant is used as the condition, the consequence would be
simply taken as-is (or wrapped in a "begin" if it's multiple
statements).  However, if there's a => following the constant, it should
expand to a call of the procedure with the constant as argument.

Reported by Michele La Monaca

Signed-off-by: Evan Hanson <evhan@foldling.org>
Fix list-copy types.db entry to allow any argument type

list-copy accepts any argument type (returning non-pair arguments
unchanged), so its type should be a -> a. This also means it can be
marked pure, and improves the scrutinizer's accuracy on list-copy calls
since the argument type can be preserved as the result type.

Signed-off-by: Peter Bex <peter.bex@xs4all.nl>
Walk nested pair types in special-cased scrutiny for list-ref/list-tail

Also, remove the unused ##sys#list-ref alias and its special case.

Fixes #759.

Signed-off-by: Peter Bex <peter.bex@xs4all.nl>
Add scrutiny special cases for drop & take

This preserves the element types of pair and list arguments in the
result types for these procedures where possible, similarly to the
preexisting special cases for list-ref and list-tail.

Signed-off-by: Peter Bex <peter.bex@xs4all.nl>
Add scrutiny special cases for make-list/make-vector with known sizes

Signed-off-by: Peter Bex <peter.bex@xs4all.nl>
Add scrutiny special case for reverse and specialization for null argument

This preserves the element types of list- and null-type arguments to
reverse in its result type (rather than the less specialized list-of).

Signed-off-by: Peter Bex <peter.bex@xs4all.nl>
Dealias module names in saved module import forms

When import and meta-import forms are saved during module expansion,
they need to respect module aliasing; otherwise, import libraries may
refer to libraries by names that are no longer accessible. In
particular, functors alias their arguments during instantiation, and the
resulting module's import library must refer to these by alias target.

Fixes #1149. Thanks to Juergen Lorenz for reporting this bug.

Signed-off-by: Peter Bex <peter.bex@xs4all.nl>

Conflicts:
	NEWS
Add missing "C_" prefix to a snprintf calls in a tcp module

A functions ##net#getsockname and ##net#getpeername of the tcp module
called bare snprintf without using the "C_" prefix which caused build
errors on Windows platform when using MSVC.

Signed-off-by: Peter Bex <peter.bex@xs4all.nl>
Use correct variable when updating buffer-location in "read-buffered" for tcp ports.

Signed-off-by: Mario Domenech Goulart <mario.goulart@gmail.com>
Flattened history of the cmake-build branch
Do not try to get a dependency location if not emit options was specified
Set CMP0042 value for compatibility with older CMake
Whitespace fix
Use more conventional dyamic library naming scheme on Mac OS X
Removed auto add of -types/-consult-inline-file arguments, cleanup
Skip quoted expressions in extract depends script
Converted cmake files to chicken-5
Removed emit type/inline files options
Added NO_POSIX_POLL flag
Removed C_DEFAULT_TARGET_HEAP_SIZE from chicken-config.h.in