Andy Wingo [Thu, 17 Jun 2010 09:12:58 +0000 (11:12 +0200)]
psyntax, primitive expander, and memoizer support for letrec*
* libguile/expand.c (expand_letrec_helper): Factor out common code.
(expand_letrec): Use expand_letrec_helper.
(expand_letrec_star): New primitive syntax: letrec*.
* libguile/memoize.c (memoize): Add memoizer support for in-order letrec
(letrec*).
* module/ice-9/psyntax.scm (build-letrec): Another arg, `in-order?'.
(chi-body): Adapt to build-letrec change. We don't yet use letrec* for
internal definitions.
(letrec): Adapt to build-letrec change.
(letrec*): New expander.
* module/ice-9/psyntax-pp.scm: Regenerated.
Andy Wingo [Thu, 17 Jun 2010 08:49:00 +0000 (10:49 +0200)]
beginnings of letrec* support in the expander
* libguile/expand.h (SCM_EXPANDED_LETREC_IN_ORDER_P)
(SCM_MAKE_EXPANDED_LETREC): Add a new field to letrec, in-order?. Will
be used to support letrec*.
* libguile/expand.c (LETREC, expand_named_let, expand_letrec): Adapt
code.
* module/language/elisp/compile-tree-il.scm (compile-pair):
* module/ice-9/psyntax.scm (build-named-let, build-letrec): Pass #f for
in-order? to `make-letrec'.
* module/ice-9/psyntax-pp.scm: Regenerate.
* module/language/tree-il.scm: Add letrec-in-order? accessor.
(parse-tree-il, unparse-tree-il): Parse and unparse an in-order?
letrec as `letrec*'.
(tree-il->scheme): Serialize letrec*.
Andy Wingo [Thu, 17 Jun 2010 08:45:34 +0000 (10:45 +0200)]
fix bug in memoize
* libguile/memoize.c (memoize): Fix a bug where LETREC was being
accessed as LET, and it just happened to coincide.
Ludovic Courtès [Wed, 16 Jun 2010 22:44:34 +0000 (00:44 +0200)]
Remove outdated sponsorship info from `THANKS'.
Ludovic Courtès [Wed, 16 Jun 2010 22:42:20 +0000 (00:42 +0200)]
Update `THANKS'.
Ludovic Courtès [Wed, 16 Jun 2010 22:06:20 +0000 (00:06 +0200)]
Use Alex Shinn's pattern matcher for (ice-9 match).
* module/ice-9/match.scm: Rewrite to simply load `match.upstream.scm'.
* module/ice-9/match.upstream.scm: New file.
* module/Makefile.am (NOCOMP_SOURCES): Add `ice-9/match.upstream.scm'.
* test-suite/Makefile.am (SCM_TESTS): Add `tests/match.test'.
* test-suite/tests/match.test: New file.
Andy Wingo [Wed, 16 Jun 2010 20:20:28 +0000 (22:20 +0200)]
remove encoding of versions into the file system (for now?)
* module/ice-9/boot-9.scm (find-versioned-module): Remove. Still had
some bugs (e.g. for "." in the path and in finding compiled files),
did too much computation and statting, and we don't really want to
promote versioning. Nor do we want to hard-code a particular encoding
of versions in the file-system. Perhaps the real way to do this is to
be extensible somehow.
(try-module-autoload): Just dispatch to primitive-load-path in all cases.
* module/rnrs
* module/rnrs.scm:
* module/rnrs/arithmetic/bitwise.scm:
* module/rnrs/arithmetic/fixnums.scm:
* module/rnrs/arithmetic/flonums.scm:
* module/rnrs/base.scm:
* module/rnrs/conditions.scm:
* module/rnrs/control.scm:
* module/rnrs/enums.scm:
* module/rnrs/eval.scm:
* module/rnrs/exceptions.scm:
* module/rnrs/files.scm:
* module/rnrs/hashtables.scm:
* module/rnrs/io/simple.scm:
* module/rnrs/lists.scm:
* module/rnrs/mutable-pairs.scm:
* module/rnrs/mutable-strings.scm:
* module/rnrs/programs.scm:
* module/rnrs/r5rs.scm:
* module/rnrs/records/inspection.scm:
* module/rnrs/records/procedural.scm:
* module/rnrs/records/syntactic.scm:
* module/rnrs/sorting.scm:
* module/rnrs/syntax-case.scm:
* module/rnrs/unicode.scm: Move these files, eliding the "6/" infix, so
that they are in the normal (unversioned) module path.
Andy Wingo [Wed, 16 Jun 2010 19:32:52 +0000 (21:32 +0200)]
set module version in module-export-all!
* module/ice-9/boot-9.scm (module-export-all!): Set the interface
version as well.
Andy Wingo [Wed, 16 Jun 2010 07:38:36 +0000 (09:38 +0200)]
load modules from within a known environment
* module/ice-9/boot-9.scm (try-module-autoload): Init the module
excursion with a fresh user module.
Thien-Thi Nguyen [Tue, 15 Jun 2010 11:19:35 +0000 (13:19 +0200)]
[maint] Add configure.ac abstraction: GUILE_CONFIG_SCRIPT
* configure.ac (GUILE_CONFIG_SCRIPT): New ‘AC_DEFUN’; use it for:
check-guile, benchmark-guile, meta/guile, meta/uninstalled-env,
meta/gdb-uninstalled-guile, meta/guile-tools, libguile/guile-snarf,
libguile/guile-doc-snarf, libguile/guile-func-name-check,
libguile/guile-snarf-docs test-suite/standalone/test-use-srfi,
test-suite/standalone/test-fast-slot-ref.
Thien-Thi Nguyen [Mon, 14 Jun 2010 19:57:01 +0000 (21:57 +0200)]
Init shell var properly in git-version-gen.
* build-aux/git-version-gen: Ensure shell var
is not influenced by an env var of the same name.
Thien-Thi Nguyen [Fri, 12 Feb 2010 15:01:16 +0000 (16:01 +0100)]
Add tmpfile(3) to libguile.
* libguile/posix.c (scm_tmpfile): New primitive.
* libguile/posix.h (scm_tmpfile): New func decl.
* doc/ref/posix.texi (File System): Document `tmpfile'.
Andy Wingo [Mon, 14 Jun 2010 08:46:02 +0000 (10:46 +0200)]
fix bug in collect
* module/ice-9/deprecated.scm (collect): Fix bug.
Andy Wingo [Sun, 13 Jun 2010 18:17:49 +0000 (20:17 +0200)]
attempted microoptimization in eval.scm.
* module/ice-9/eval.scm (primitive-eval): Try using list-ref instead of
cdring in the vm. We'll check the hydra build times to see if this has
any actual merit. Surely the best solution is another representation
of environments, though.
Andy Wingo [Fri, 11 Jun 2010 21:04:42 +0000 (23:04 +0200)]
compile (ice-9 deprecated) earlier
* module/Makefile.am (ICE_9_SOURCES): Reorder placement of (ice-9
deprecated), as it's getting bigger, so we should compile it earlier.
Andy Wingo [Fri, 11 Jun 2010 15:16:12 +0000 (17:16 +0200)]
handler of a prompt is in tail context
* module/language/tree-il/analyze.scm (analyze-lexicals): The handler of
a prompt is in tail context.
Andy Wingo [Fri, 11 Jun 2010 14:57:50 +0000 (16:57 +0200)]
while in terms of syntax-case
* module/ice-9/boot-9.scm (while): Reimplement in terms of syntax-case.
Prompt inlining is coming later.
* test-suite/tests/syntax.test ("while"): Update the expected syntax
errors.
Andy Wingo [Fri, 11 Jun 2010 14:56:56 +0000 (16:56 +0200)]
comment in fix-letrec
* module/language/tree-il/fix-letrec.scm (simple-expression?): Add a
small FIXME.
Andy Wingo [Fri, 11 Jun 2010 14:28:55 +0000 (16:28 +0200)]
fix lexical call naming bug
* module/ice-9/psyntax.scm: Fix bug in which the whole syntax object was
being recorded as the name of the operator in a lexical call, instead
of just the symbolic name.
* module/ice-9/psyntax-pp.scm: Regenerated.
Andy Wingo [Fri, 11 Jun 2010 14:11:37 +0000 (16:11 +0200)]
unparse the tag of a prompt
* module/language/tree-il.scm (unparse-tree-il): Properly unparse the
tag of a prompt.
Andy Wingo [Fri, 11 Jun 2010 13:33:09 +0000 (15:33 +0200)]
make-prompt-tag is an effect-free primitive
* module/language/tree-il/primitives.scm
(*interesting-primitive-names*, *effect-free-primitives*): Recognize
make-prompt-tag as interesting and effect-free.
Andy Wingo [Fri, 11 Jun 2010 13:30:55 +0000 (15:30 +0200)]
add inliner cases for conditionals
* module/language/tree-il/inline.scm (boolean-value, inline!): Add a
case for inlining conditional expressions.
* test-suite/tests/tree-il.test: Fix conditional tests to have a
non-inlinable condition.
Andy Wingo [Fri, 11 Jun 2010 11:24:14 +0000 (13:24 +0200)]
deprecate `collect'
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (collect): Deprecate, and fix to ensure
sequential collection.
Andy Wingo [Fri, 11 Jun 2010 11:14:03 +0000 (13:14 +0200)]
define-option-interface in terms of syntax-rules
* module/ice-9/boot-9.scm (define-option-interface): Rewrite using
syntax-rules.
Andy Wingo [Fri, 11 Jun 2010 10:55:44 +0000 (12:55 +0200)]
a failed resolve-interface does not leave behind an empty module
* module/ice-9/boot-9.scm (resolve-interface): Pass #:ensure #f to
resolve-module, so that in the case of module-not-found we don't leave
behind an empty module without an interface.
Andy Wingo [Fri, 11 Jun 2010 10:50:49 +0000 (12:50 +0200)]
cleanups to version-matches?
* module/ice-9/boot-9.scm (version-matches?): Some cleanups: use
and-map, or-map; prefer case to cond; abbreviate and scope helper
functions.
Andy Wingo [Fri, 11 Jun 2010 10:16:45 +0000 (12:16 +0200)]
deprecate get-option, for-next-option, display-usage-report, transform-usage-lambda
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (get-option, for-next-option)
(display-usage-report, transform-usage-lambda): Deprecate these
option-parsing utils. We can revive them in a non-deprecated module if
there is interest, but I suspect there will be no interest.
Andy Wingo [Fri, 11 Jun 2010 09:40:31 +0000 (11:40 +0200)]
deprecate `scheme-file-suffix'
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (scheme-file-suffix): Deprecate.
Andy Wingo [Fri, 11 Jun 2010 09:36:57 +0000 (11:36 +0200)]
comments in boot-9
* module/ice-9/boot-9.scm: Add comments.
Andy Wingo [Fri, 11 Jun 2010 09:31:21 +0000 (11:31 +0200)]
deprecate `bad-throw'
* module/ice-9/boot-9.scm:
* module/ice-9/scm-style-repl.scm (bad-throw): Move here. This function
was never documented, but has been around since guile-ii. It's not
used with current code though.
* module/ice-9/deprecated.scm: Provide bad-throw in default env.
* module/ice-9/debugger/commands.scm: Import bad-throw from
scm-style-repl.
Andy Wingo [Fri, 11 Jun 2010 09:17:44 +0000 (11:17 +0200)]
error in terms of case-lambda
* module/ice-9/boot-9.scm (error): Redefine using case-lambda.
Andy Wingo [Thu, 10 Jun 2010 23:35:41 +0000 (01:35 +0200)]
deprecate has-suffix?
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (has-suffix?): Deprecate.
* test-suite/guile-test:
* benchmark-suite/guile-benchmark: Fix uses of deprecated has-suffix?.
Andy Wingo [Thu, 10 Jun 2010 22:13:12 +0000 (00:13 +0200)]
comments in boot-9
* module/ice-9/boot-9.scm: Add some comments about the nature of
properties.
Andy Wingo [Thu, 10 Jun 2010 21:55:35 +0000 (23:55 +0200)]
deprecate apply-to-args
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (apply-to-args): Deprecate.
Andy Wingo [Thu, 10 Jun 2010 21:39:19 +0000 (23:39 +0200)]
remove annotation?
* module/ice-9/boot-9.scm (annotation?): Remove unused new definition.
Andy Wingo [Thu, 10 Jun 2010 21:28:23 +0000 (23:28 +0200)]
scm-style-repl -> (ice-9 scm-style-repl)
* module/Makefile.am:
* module/ice-9/scm-style-repl.scm: New file, to hold the old
scm-style-repl.
* module/ice-9/deprecated.scm: Provide scm-style-repl and
error-catching-loop and error-catching-repl in the default env, but
with deprecation warnings.
Andy Wingo [Thu, 10 Jun 2010 17:59:17 +0000 (19:59 +0200)]
resolve-module #:ensure argument
* module/ice-9/boot-9.scm (resolve-module): Add #:ensure kwarg,
defaulting to true. If true we make an empty module if none was found
(the old behavior). Otherwise we return false.
* test-suite/tests/modules.test ("resolve-module"): Add tests for old
and new behavior.
Andy Wingo [Thu, 10 Jun 2010 16:14:02 +0000 (18:14 +0200)]
expt / integer-expt fixes
* libguile/numbers.c (scm_integer_expt): Validate the first arg as a
number.
(scm_expt): Delegate to scm_integer_expt iff x is exact. Fixes
fractions.test, which I broke recently
* test-suite/tests/numbers.test ("integer-expt"): Add test for
(integer-expt #t 0).
Andy Wingo [Thu, 10 Jun 2010 15:53:47 +0000 (17:53 +0200)]
Fix build bug, manifested as failure to find libguile-srfi-srfi-1-v-4
* module/ice-9/boot-9.scm (top-repl): This use of @ is not safe, because
it will cause (system repl repl) to be loaded at expand time, which
will eventually cause (srfi srfi-1) to be loaded, which won't work
with a fresh build tree because the helper lib isn't compiled. Gross.
(load): Add a note about why this use of @ is safe.
Andy Wingo [Thu, 10 Jun 2010 15:29:48 +0000 (17:29 +0200)]
brown-paper-bag to uninstalled-env
* meta/uninstalled-env.in: Fix lack of test.
Andy Wingo [Thu, 10 Jun 2010 15:23:51 +0000 (17:23 +0200)]
more uninstalled-env fixen
* meta/uninstalled-env.in: Don't implicitly add . to LTDL
search paths if no LTDL_LIBRARY_PATH was set. Avoid a duplicate to
PATH.
Andy Wingo [Thu, 10 Jun 2010 15:13:06 +0000 (17:13 +0200)]
uninstalled-env cleanups
* meta/uninstalled-env.in: Clean up setting of GUILE_LOAD_PATH and
GUILE_LOAD_COMPILED_PATH.
Andy Wingo [Thu, 10 Jun 2010 14:53:27 +0000 (16:53 +0200)]
don't forget to set GUILE_SYSTEM_PATH in uninstalled mode
* meta/uninstalled-env.in (GUILE_SYSTEM_PATH): Set this var too in
uninstalled mode.
Andy Wingo [Thu, 10 Jun 2010 11:56:13 +0000 (13:56 +0200)]
deprecate error-catching-loop, error-catching-repl
* module/ice-9/deprecated.scm (error-catching-loop)
(error-catching-repl): Deprecate.
Andy Wingo [Thu, 10 Jun 2010 11:53:33 +0000 (13:53 +0200)]
remove commented-out code from boot-9
* module/ice-9/boot-9.scm: Remove commented-out code.
Andy Wingo [Thu, 10 Jun 2010 11:52:14 +0000 (13:52 +0200)]
deprecate scm-style-repl
* module/ice-9/deprecated.scm (scm-style-repl): Deprecate.
Andy Wingo [Thu, 10 Jun 2010 11:44:37 +0000 (13:44 +0200)]
fix error handling when reading debugger args
* module/system/vm/debug.scm (debugger-repl): Errors reading debugger
args no longer drop us out of the debugger.
Andy Wingo [Thu, 10 Jun 2010 11:41:44 +0000 (13:41 +0200)]
bind debugging i/o ports in start-repl
* module/system/repl/repl.scm (start-repl): If the debugging ports are
unbound, bind them to the current i/o ports. Allows errors within
with-output-to-foo / with-input-from-foo to be sensibly debugged.
Andy Wingo [Thu, 10 Jun 2010 11:37:01 +0000 (13:37 +0200)]
repl.scm simplifications
* module/system/repl/repl.scm (prompting-meta-read): Use
call-with-error-handling.
* module/system/vm/debug.scm (call-with-error-handling): Add case for
#:on-error 'pass. Have the catch handler return the unspecified value.
Andy Wingo [Thu, 10 Jun 2010 11:30:55 +0000 (13:30 +0200)]
start cleaning up repl/debugger error handling
* module/system/repl/repl.scm (prompting-meta-read): Catch and print
read errors here, returning unspecified in that case.
(start-repl): Don't enable the debugger while reading expressions.
Adapt with-backtrace to with-error-handling.
* module/system/vm/debug.scm (run-debugger, debugger-repl): No need to
take a stack, the frames vector is sufficient.
(call-with-error-handling, with-error-handling): New public utilities.
Notably they do not poke the-last-stack.
Andy Wingo [Thu, 10 Jun 2010 10:05:25 +0000 (12:05 +0200)]
hygienic with-backtrace
* module/system/repl/repl.scm (with-backtrace): Make a syntax-rules
macro.
Julian Graham [Thu, 10 Jun 2010 03:57:00 +0000 (23:57 -0400)]
Resolve issues in `find-versioned-module'.
* module/ice-9/boot-9.scm (find-versioned-module): Perform a stable sort on
version numbers of matched libraries; eliminate extra path separator in
library file path.
Andy Wingo [Wed, 9 Jun 2010 21:27:33 +0000 (23:27 +0200)]
fix build error with Compaq C V6.3-025
* libguile/hashtab.c: Re-arrange functions to avoid the need for
pre-declaring character arrays with no length. Fixes compilation on
Compaq C V6.3-025. Thanks to Jay Krell for the report.
Andy Wingo [Wed, 9 Jun 2010 06:55:02 +0000 (08:55 +0200)]
r6rs `import' accepts multiple clauses
* module/ice-9/r6rs-libraries.scm (import): Accept multiple clauses.
* test-suite/tests/rnrs-libraries.test: Add test.
Andy Wingo [Mon, 7 Jun 2010 21:27:55 +0000 (23:27 +0200)]
fix (expt #t 0)
* libguile/numbers.c (scm_expt): Fix check regarding when to dispatch to
integer-expt.
* test-suite/tests/numbers.test ("expt"): Add test.
Andy Wingo [Sun, 6 Jun 2010 22:33:57 +0000 (00:33 +0200)]
modules have field for their filenames, for debugging
* module/ice-9/boot-9.scm (module-filename, set-module-filename!): Add a
new field to modules, the filename that is associated with the module.
For debugging purposes.
(process-define-module): Parse out a #:filename argument.
(make-module, make-autoload-interface): Adapt to module-constructor
change.
(define-module): Init module-filename from (current-source-location).
Andy Wingo [Sun, 6 Jun 2010 21:21:24 +0000 (23:21 +0200)]
add current-source-location
* module/ice-9/boot-9.scm (current-source-location): New macro, returns
the, um, current source location.
Andy Wingo [Sun, 6 Jun 2010 20:51:03 +0000 (22:51 +0200)]
add syntax-source accessor
* module/ice-9/psyntax.scm: Add syntax-source accessor.
* module/ice-9/psyntax-pp.scm: Regenerated.
* module/ice-9/boot-9.scm: Declare syntax-source.
Andy Wingo [Sun, 6 Jun 2010 20:09:08 +0000 (22:09 +0200)]
srfi-34 #:replace raise fix
* module/srfi/srfi-34.scm: #:replace the binding for `raise'
Ludovic Courtès [Sun, 6 Jun 2010 14:58:01 +0000 (16:58 +0200)]
Add tests for `program-sources' (bug #29817).
* test-suite/tests/compiler.test ("program-sources"): New test prefix.
Ludovic Courtès [Sun, 6 Jun 2010 14:22:37 +0000 (16:22 +0200)]
Don't build any generated source file at "make dist" time.
* srfi/Makefile.am
(libguile_srfi_srfi_1_v_@LIBGUILE_SRFI_SRFI_1_MAJOR@_la_SOURCES,
libguile_srfi_srfi_4_v_@LIBGUILE_SRFI_SRFI_4_MAJOR@_la_SOURCES,
libguile_srfi_srfi_13_14_v_@LIBGUILE_SRFI_SRFI_13_14_MAJOR@_la_SOURCES,
libguile_srfi_srfi_60_v_@LIBGUILE_SRFI_SRFI_60_MAJOR@_la_SOURCES):
Remove `.x' files so that they're not built by "make dist".
* test-suite/standalone/Makefile.am (libtest_asmobs_la_SOURCES): Remove
`test-asmobs-lib.x'.
(libtest_ffi_la_SOURCES): Remove `test-ffi-lib.x'.
(BUILT_SOURCES): Likewise.
Ludovic Courtès [Sun, 6 Jun 2010 10:25:57 +0000 (12:25 +0200)]
Add tests for `procedure-name'.
This is a followup to
22cf27c815b756cac6893b5b239898767e6cb498 ("fix
procedure naming").
* test-suite/tests/compiler.test ("procedure-name"): New test prefix.
Andy Wingo [Sun, 6 Jun 2010 11:46:53 +0000 (13:46 +0200)]
fix `format' with %f and exact rationals
* module/ice-9/format.scm (format:parse-float): Accept a number, and
when stringifying the number, first convert to inexact.
* test-suite/tests/format.test ("~f fixed-point"): Add exact rational
test.
Andy Wingo [Sun, 6 Jun 2010 11:39:44 +0000 (13:39 +0200)]
simplify macro representation in the wake of module hygiene changes
* module/ice-9/psyntax.scm (chi-install-global, chi-macro)
(eval-local-transformer): Now that we handle module hygiene through
syntax objects, there is no more need to record the current module
when installing syntax transformers.
* module/ice-9/psyntax-pp.scm: Regenerated (trickily).
* libguile/_scm.h: Bump objcode version for macro representation change.
* libguile/macros.c (scm_macro_transformer): Adapt to change in macro
representation.
Andy Wingo [Sun, 6 Jun 2010 11:00:59 +0000 (13:00 +0200)]
fix module-hygiene corner case by relying more on syntax objects
* module/ice-9/psyntax.scm (chi-macro): Instead of assuming that output
of a macro should be scoped relative to the module that was current
when the macro was defined, allow the module information associated
with the syntax object itself to pass through unmolested. Fixes bug
29860.
(datum->syntax): Propagate the module of the identifier through to the
new syntax object, so that datum->syntax preserves module hygiene in
addition to lexical hygiene.
(include, include-from-path): Refactor to plumb though the hygiene
information from the filename instead of the `include', allowing
hygiene from the original caller of include-from-path to propagate
through.
* module/ice-9/psyntax-pp.scm: Regenerated.
* test-suite/tests/syncase.test ("macro-generating macro"): Add test for
bug 29860.
Andy Wingo [Sat, 5 Jun 2010 17:40:43 +0000 (19:40 +0200)]
source location propagation fixes in psyntax
* module/ice-9/psyntax.scm (syntax-type): Add some comments about source
locations. In calls to chi-macro, pass the source location
information. Propagate source location information when unpacking
syntax objects.
(chi-macro): Add a comment about source locations. Decorate output
introduced by the macro with the source location of macro use.
* module/ice-9/psyntax-pp.scm: Regenerate.
Fixes bug #29817.
Ludovic Courtès [Sat, 5 Jun 2010 14:18:38 +0000 (16:18 +0200)]
Update `.gitignore' for new Gnulib-generated files.
Ludovic Courtès [Sat, 5 Jun 2010 14:18:01 +0000 (16:18 +0200)]
Update Gnulib to
v0.0-3966-g9f737c8 for `libunistring' m4 fixes.
Andy Wingo [Wed, 2 Jun 2010 20:56:10 +0000 (22:56 +0200)]
brown-paper-bag commit
* module/system/vm/debug.scm (frame->module): In which our author
misunderstands git's index.
Andy Wingo [Wed, 2 Jun 2010 20:52:49 +0000 (22:52 +0200)]
flesh out recursive repl module with local vars
* module/system/vm/debug.scm (frame->module): Actually bind frame-local
variables to values in the new anonymous module. Setting settable vars
should work too :)
Andy Wingo [Tue, 1 Jun 2010 21:06:25 +0000 (23:06 +0200)]
recursive repl support
* module/system/repl/common.scm (*repl-level*): New public fluid.
(repl-prompt): If *repl-level* is a positive integer, add it to the
prompt.
* module/system/repl/repl.scm (start-repl): The `lang' argument is now
optional, and defaults to (current-language). New kwargs level and
welcome; level defaults to 0, or 1+ the existing level, and the
welcome is a boolean, true if level is 0. Parameterize *repl-level*
during the dynamic extent of this repl. Also, parameterize
the-last-stack to #f for the duration of this repl.
* module/system/vm/debug.scm (frame->module, debugger-repl): Stubs of a
recursive repl implementation. The idea is to be a repl in the lexical
context of the error; but it would be nice to be able to operate in
the module of the proc too, for example to export bindings. Hmm.
Andy Wingo [Tue, 1 Jun 2010 20:53:59 +0000 (22:53 +0200)]
current-language fluid refactoring
* module/system/base/compile.scm:
* module/system/base/language.scm (*current-language*, current-language):
Move this fluid and thunk down to (system base language).
Andy Wingo [Tue, 1 Jun 2010 20:20:57 +0000 (22:20 +0200)]
boot-9 top-repl tweak
* module/ice-9/boot-9.scm (top-repl): More concisely drill down to
start-repl.
Andy Wingo [Tue, 1 Jun 2010 20:18:24 +0000 (22:18 +0200)]
some repl doc updates
* doc/ref/tour.texi (Reporting Bugs): Update instructions for generating
a backtrace.
* doc/ref/scheme-using.texi: Update examples of Guile prompts, and add
an explanation of the prompt format.
Andy Wingo [Tue, 1 Jun 2010 20:02:06 +0000 (22:02 +0200)]
minor NEWS tweaks
* NEWS: Fix wordings.
Andy Wingo [Tue, 1 Jun 2010 20:00:28 +0000 (22:00 +0200)]
add #:version (6) to rnrs bytevectors and ports
* module/rnrs/bytevectors.scm:
* module/rnrs/io/ports.scm: Add #:version (6) to these modules.
* module/6/rnrs.scm: Add versions to the import specs for bytevectors
and ports.
Andy Wingo [Wed, 2 Jun 2010 20:19:03 +0000 (22:19 +0200)]
fix argument tab-completion
* guile-readline/readline.c (scm_init_readline): Space is a
word-breaking char too. Fixes tab-completion for args; thanks to Jao
for the patch!
Andy Wingo [Wed, 2 Jun 2010 14:07:11 +0000 (16:07 +0200)]
fix procedure naming
* module/ice-9/psyntax.scm (define-expansion-accessors): New helper, to
define accesors for a particular expansion data structure. Use it
later to define lambda?, lambda-meta, and set-lambda-meta!.
(maybe-name-value): Update to work with the newly defined accessors.
(build-global-reference, build-let, build-named-let, build-letrec):
Re-enable naming of procedures.
* module/ice-9/psyntax-pp.scm: Regenerated.
Ludovic Courtès [Tue, 1 Jun 2010 21:34:33 +0000 (23:34 +0200)]
Fix `git-version-gen' sed script.
* cfg.mk (git-version-gen-tag-sed-script): Remove trailing dash in
regexp.
* configure.ac: Likewise in the second argument to `AC_INIT'.
Ludovic Courtès [Tue, 1 Jun 2010 21:27:20 +0000 (23:27 +0200)]
Bump version number for 1.9.11.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
Ludovic Courtès [Tue, 1 Jun 2010 20:57:39 +0000 (22:57 +0200)]
Make `@' visible in the sxml-match documentation.
* doc/ref/sxml-match.texi (sxml-match): Quote `@' in the examples.
Ludovic Courtès [Tue, 1 Jun 2010 20:56:49 +0000 (22:56 +0200)]
Remove unused symbols.
* libguile/debug.c (scm_sym_procname, scm_sym_dots): Remove.
Andy Wingo [Tue, 1 Jun 2010 12:19:52 +0000 (14:19 +0200)]
NEWS is ready
* NEWS: Finalize.
Andy Wingo [Tue, 1 Jun 2010 12:18:22 +0000 (14:18 +0200)]
remove docs for removed procedures
* doc/ref/api-procedures.texi (Compiled Procedures): Remove docs for
removed procedures.
Andy Wingo [Tue, 1 Jun 2010 12:16:10 +0000 (14:16 +0200)]
more NEWS
* NEWS: More updates.
Andy Wingo [Tue, 1 Jun 2010 12:11:14 +0000 (14:11 +0200)]
small NEWS updates
* NEWS: Some updates.
Andy Wingo [Tue, 1 Jun 2010 12:10:59 +0000 (14:10 +0200)]
r6rs docs in the manual
* doc/ref/r6rs.texi (R6RS Support): Skeleton of docs on our R6RS
support.
* doc/ref/guile.texi:
* doc/ref/Makefile.am: Add r6rs.texi.
* doc/ref/intro.texi: Add a link to r6rs.texi.
Andy Wingo [Tue, 1 Jun 2010 12:04:01 +0000 (14:04 +0200)]
(rnrs bytevectors) fallout
* module/Makefile.am (RNRS_SOURCES): Fix for (rnrs bytevectors) rename.
Andy Wingo [Tue, 1 Jun 2010 11:26:11 +0000 (13:26 +0200)]
rename (rnrs bytevector) to (rnrs bytevectors)
* module/rnrs/bytevectors.scm: Rename to (rnrs bytevectors), from (rnrs
bytevector), to match the name from the R6RS.
* benchmark-suite/benchmarks/bytevectors.bm:
* doc/ref/api-data.texi:
* doc/ref/api-foreign.texi:
* libguile/bytevectors.c:
* module/6/rnrs.scm:
* module/language/assembly.scm:
* module/language/assembly/compile-bytecode.scm:
* module/language/assembly/decompile-bytecode.scm:
* module/language/glil/compile-assembly.scm:
* module/language/tree-il/primitives.scm:
* module/srfi/srfi-4.scm:
* module/srfi/srfi-4/gnu.scm:
* module/system/foreign.scm:
* test-suite/standalone/test-ffi:
* test-suite/tests/asm-to-bytecode.test:
* test-suite/tests/bytevectors.test:
* test-suite/tests/foreign.test:
* test-suite/tests/r6rs-ports.test: Update all referrers.
Andy Wingo [Tue, 1 Jun 2010 10:21:08 +0000 (12:21 +0200)]
more 1.9.11 NEWS updates
* NEWS: More updates.
Ludovic Courtès [Mon, 31 May 2010 22:42:58 +0000 (00:42 +0200)]
Fix `VM_VALIDATE_BYTEVECTOR' macro wrt. trailing semicolons.
* libguile/vm-i-scheme.c (VM_VALIDATE_BYTEVECTOR): Enclose in "do { }
while (0)".
Ludovic Courtès [Mon, 31 May 2010 22:40:00 +0000 (00:40 +0200)]
Fix unaligned accesses by the bytevector instructions.
* libguile/vm-i-scheme.c (ALIGNED_P): New macro.
(BV_FIXABLE_INT_REF, BV_INT_REF, BV_FLOAT_REF, BV_FIXABLE_INT_SET,
BV_INT_SET, BV_FLOAT_SET): Check the alignment of the pointer instead
of checking "i % size == 0". This fixes bus errors on
`sparc64-linux-gnu'.
* libguile/vm.c: Include <alignof.h>.
Ludovic Courtès [Mon, 31 May 2010 22:02:35 +0000 (00:02 +0200)]
Upgrade manual to GFDLv1.3+.
* doc/ref/fdl.texi: Upgrade to GFDLv1.3.
* doc/ref/guile.texi: Change copying notice to "Version 1.3 or any later
version".
(GNU Free Documentation License): New node, formerly in `fdl.texi'.
Ludovic Courtès [Sun, 30 May 2010 20:56:58 +0000 (22:56 +0200)]
Ignore `.version'.
Ludovic Courtès [Sun, 30 May 2010 20:56:17 +0000 (22:56 +0200)]
Have `test-ffi' run all the tests even after a failure.
* test-suite/standalone/test-ffi (failed?): New variable.
(test): Set `failed?' to #t upon error and display an error message.
Have the exit code depend on FAILED?.
Ludovic Courtès [Sun, 30 May 2010 20:54:39 +0000 (22:54 +0200)]
Fix argument and return value alignment in `scm_i_foreign_call'.
* libguile/foreign.c (scm_i_foreign_call): Fix the computation of
ARG_SIZE wrt. alignment. Arrange so that the address ARGS[i] is
aligned, rather than checking whether OFF is aligned. Have the RVALUE
be at least word-aligned, which fixes calls to `char'-returning
functions on `armv5tel-*-linux-gnueabi'.
Ludovic Courtès [Sun, 30 May 2010 20:41:36 +0000 (22:41 +0200)]
Fix parenthesizing of the `ROUND_UP' macro; factorize.
* libguile/_scm.h (ROUND_UP): New macro.
* libguile/continuations.c (ROUND_UP): Remove.
* libguile/control.c (ROUND_UP): Remove.
* libguile/foreign.c (ROUND_UP): Remove.
Ludovic Courtès [Sun, 30 May 2010 20:39:23 +0000 (22:39 +0200)]
Relax the `(version)' test.
* test-suite/tests/version.test ("version reporting works"): Test
whether `(version)' contains MAJOR.MINOR.MICRO, rather than being
equal to it.
Ludovic Courtès [Sat, 29 May 2010 22:14:02 +0000 (00:14 +0200)]
Use Gnulib's `git-version-gen'.
* GUILE-VERSION (GUILE_VERSION): Remove.
* Makefile.am (dist-hook): Depend on `gen-tarball-version'.
(BUILT_SOURCES): New variable.
($(top_srcdir)/.version, gen-tarball-version): New targets.
* cfg.mk (git-version-gen-tag-sed-script): New variable.
* configure.ac: Use `build-aux/git-version-gen' to generate the VERSION
argument of `AC_INIT'. Initialize Automake without `check-news'.
Define $GUILE_VERSION as an alias for $PACKAGE_VERSION.
Ludovic Courtès [Sat, 29 May 2010 22:01:54 +0000 (00:01 +0200)]
Import Gnulib's `git-version-gen' module.
* m4/gnulib-cache.m4: Add `git-version-gen'.