Andy Wingo [Fri, 16 Jul 2010 09:50:51 +0000 (11:50 +0200)]
lower fill-column in .dir-locals.el
* .dir-locals.el: Fill-columns back down to 72.
Michael Gran [Fri, 16 Jul 2010 13:44:59 +0000 (06:44 -0700)]
read-line should use port's encoding, not locale's encoding
* libguile/rdelim.c (scm_read_line): modified, use port's encoding
* test-suite/test/ports.test: new test
Michael Gran [Fri, 16 Jul 2010 12:39:52 +0000 (05:39 -0700)]
More explicit variable names in scm_i_scan_for_encoding
Note especially that the variable 'i' has two different uses in this
function, and they get confused.
* libguile/read.c (scm_i_scan_for_encoding): cleanup
Ludovic Courtès [Thu, 15 Jul 2010 16:49:12 +0000 (18:49 +0200)]
Remove heap allocations in `scm_getc', `scm_ungetc', and `find_valid_encoding'.
* libguile/ports.c (scm_getc): Provide `u32_conv_from_encoding' with the
RESULT_BUF stack-allocated buffer to avoid heap allocation.
(find_valid_encoding): Likewise.
(scm_ungetc): Ditto with `u32_conv_to_encoding'.
Ludovic Courtès [Thu, 15 Jul 2010 16:45:29 +0000 (18:45 +0200)]
Expose `scm_encoding_error'.
* libguile/strings.c (scm_encoding_error): Make public.
* libguile/strings.h (scm_encoding_error): New internal declaration.
Ludovic Courtès [Thu, 15 Jul 2010 16:39:49 +0000 (18:39 +0200)]
sxml-match: Always use the same prompt tag.
* module/sxml/match.scm (%call/ec-prompt): New variable.
(call/ec): Use it instead of creating a new prompt tag.
Ludovic Courtès [Thu, 15 Jul 2010 16:38:39 +0000 (18:38 +0200)]
Declare `ice-9/psyntax-pp.scm.gen' as a phony target.
* module/Makefile.am (.PHONY): Add `ice-9/psyntax-pp.scm.gen'.
Andy Wingo [Thu, 15 Jul 2010 10:47:58 +0000 (12:47 +0200)]
don't re-print the error by default in call-with-error-handling
* module/system/repl/error-handling.scm (call-with-error-handling):
Previous post-error changed to "report"; now "catch", the default,
doesn't re-print the error.
Andy Wingo [Thu, 15 Jul 2010 10:46:02 +0000 (12:46 +0200)]
error-handling tweak
* module/system/repl/error-handling.scm (call-with-error-handling):
Remove extra newline.
Andy Wingo [Thu, 15 Jul 2010 10:44:15 +0000 (12:44 +0200)]
better error reporting from the vm
* libguile/vm-engine.c: Add func_name local, for error reporting.
(vm_error_apply_to_non_list): New error case.
(vm_error_wrong_type_arg): Remove this generic error case.
(vm_error_wrong_type_apply): Remove FUNC_NAME -- no sense in seeing
"vm-debug-engine" in the error report.
(vm_error_not_a_pair, vm_error_not_a_bytevector)
(vm_error_not_a_struct, vm_error_not_a_thunk): Use func_name instead
of FUNC_NAME, so we can indicate what caused the error.
* libguile/vm-i-scheme.c (VM_VALIDATE_CONS, car, cdr, set-car!)
(set-cdr!): Indicate provenance of errors.
(VM_VALIDATE_STRUCT, struct-vtable):
(VM_VALIDATE_BYTEVECTOR, BV_FIXABLE_INT_REF, BV_INT_REF)
(BV_FLOAT_REF, BV_FIXABLE_INT_SET, BV_INT_SET, BV_FLOAT_SET): Same.
* libguile/vm-i-system.c (apply, tail-apply): Use
vm_error_apply_to_non_list.
Andy Wingo [Thu, 15 Jul 2010 10:13:15 +0000 (12:13 +0200)]
pass a frame to display-error in system repl error-handling
* module/system/repl/error-handling.scm (call-with-error-handling): Pass
a frame to display-error.
Andy Wingo [Thu, 15 Jul 2010 10:11:34 +0000 (12:11 +0200)]
display-error takes a frame, shows source if possible
* libguile/backtrace.h:
* libguile/backtrace.c (scm_display_error): Change "stack" arg to
"frame". Still accept stacks for backward compatibility.
(display_header, display_error_body): Show the source of the error, if
possible.
Andy Wingo [Wed, 14 Jul 2010 17:45:05 +0000 (19:45 +0200)]
fix boostrapping error with srfi-1 (for the third time!)
* module/ice-9/deprecated.scm (set-repl-prompt!): Avoid @, so as to
avoid a bootstrapping error. Horrible.
Julian Graham [Wed, 14 Jul 2010 05:16:19 +0000 (01:16 -0400)]
Fix argument passing for external hash functions in `(rnrs hashtables)'.
Guile implements this library in terms of SRFI-69, which is a bit vague on
the arity of hash functions, whereas `(rnrs hashtables)' explicitly
specifies unary ones.
* module/rnrs/hashtables.scm (wrap-hash-function): Assume SRFI-69 will pass
the table capacity as the second argument; return the result of proc
modulo the capacity.
* test-suite/tests/r6rs-hashtables.test (make-hashtable): New test case for
hash functions that return large values.
Andy Wingo [Tue, 13 Jul 2010 19:53:41 +0000 (21:53 +0200)]
fix '(] infinite loop
* libguile/read.c (scm_read_sexp): Fix reader infinite loop. Thanks to
Bill Schottstaedt for the report.
* test-suite/tests/reader.test: Add test.
Andy Wingo [Tue, 13 Jul 2010 08:48:19 +0000 (10:48 +0200)]
fix psyntax-pp.go dependency
* module/Makefile.am (ice-9/psyntax-pp.go): Fix dep.
Andy Wingo [Tue, 13 Jul 2010 08:42:42 +0000 (10:42 +0200)]
ctrl-d with readline exits one recursive repl instance
* module/ice-9/buffered-input.scm (make-buffered-input-port): Instead of
always returning EOF once EOF is seen once, call the producer again.
Allows Ctrl-D to cause one EOF at the REPL, returning once from a
recursive edit, but input continues normally. Thanks to Andrew
Bagdanov for a clue that led to the fix.
Andy Wingo [Tue, 13 Jul 2010 08:40:18 +0000 (10:40 +0200)]
don't automatically generate psyntax-pp.scm any more
* module/Makefile.am (ice-9/psyntax-pp.scm.gen): No longer automatically
regenerate psyntax-pp.scm, as the gensym dance is getting too
complicated. Instead when you change psyntax.scm now you should make
ice-9/psyntax-pp.scm.gen.
Ludovic Courtès [Mon, 12 Jul 2010 22:02:54 +0000 (00:02 +0200)]
Have `benchmark-guile' honor the current $GUILE_LOAD_PATH.
* benchmark-guile.in (GUILE_LOAD_PATH): Extend the current value instead
of overwriting it completely.
Ludovic Courtès [Mon, 12 Jul 2010 22:01:43 +0000 (00:01 +0200)]
Add missing benchmark files to the distribution.
* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
`benchmarks/chars.bm' and `benchmarks/srfi-13.bm'.
Ludovic Courtès [Mon, 12 Jul 2010 15:31:38 +0000 (17:31 +0200)]
Fix type-checking in the optimized path of `string=?'.
* libguile/srfi-13.c (scm_string_eq): Properly type-check S1 and S2.
* test-suite/tests/strings.test ("string=?")["1st argument EOF", "2nd
argument EOF"]: New tests exposing the problem.
Andy Wingo [Sat, 10 Jul 2010 10:32:24 +0000 (12:32 +0200)]
print column numbers in backtraces
* module/system/repl/debug.scm (print-frame): Print column numbers too.
Andy Wingo [Sat, 10 Jul 2010 10:21:50 +0000 (12:21 +0200)]
finally, backtraces only showing frames for the computation
* module/system/repl/repl.scm (run-repl): Run the thunk in a stack in a
prompt, similar to the default prompt. Gives proper backtraces.
* module/system/repl/error-handling.scm (call-with-error-handling):
Narrow one more outer frame, for the %start-stack thunk invocation.
* module/ice-9/boot-9.scm (%start-stack): Reindent.
Andy Wingo [Sat, 10 Jul 2010 09:38:47 +0000 (11:38 +0200)]
update manual for value history on by default
* doc/ref/compiler.texi: Update for new ,pp meta-command.
* doc/ref/scheme-using.texi (Using Guile Interactively): Show value
history in examples.
(Value Historyx): Update docs to mention the repl option and the
programmatic interface.
Andy Wingo [Sat, 10 Jul 2010 09:19:19 +0000 (11:19 +0200)]
validating repl options; value-history on by default
* module/system/repl/common.scm: Use (ice-9 history). Turns on value
history by default.
(repl-default-options): Expand the format of options to include an
optional value transformer, run when setting a value. Add prompt and
value-history options.
(repl-prepare-eval-thunk): Use repl-option-ref.
(repl-option-ref): Error if the option is unknown.
(repl-option-set!, repl-default-option-set!): Error if the option is
unknown. Pass the val through the transformer procedure.
(repl-default-prompt-set!): Just use repl-default-option-set!.
* module/system/repl/command.scm (option): Update for the new options
format.
Andy Wingo [Sat, 10 Jul 2010 09:16:16 +0000 (11:16 +0200)]
value-history-enabled? accessor
* module/ice-9/history.scm (value-history-enabled?): Add accessor.
(enable-value-history!, disable-value-history!): Adapt.
Andy Wingo [Sat, 10 Jul 2010 08:49:01 +0000 (10:49 +0200)]
heap/literal fixes for repl-default-options
* module/system/repl/common.scm (repl-default-options): Heap-allocate
the repl-default-options, to avoid mutating a literal.
(make-repl): Copy repl-default-options.
Andy Wingo [Sat, 10 Jul 2010 08:44:29 +0000 (10:44 +0200)]
add utils to turn value history on and off, and to clear it
* module/ice-9/history.scm (enable-value-history!)
(disable-value-history!, clear-value-history!): New exports.
Andy Wingo [Sat, 10 Jul 2010 08:21:22 +0000 (10:21 +0200)]
capture default dynamic state in (guile-user)
* libguile/init.c (scm_i_init_guile): Move the call to
scm_init_threads_default_dynamic_state after the call to
scm_load_startup_files, so that the default dynamic state is in the
(guile-user) module, not (guile).
No Itisnt [Sat, 10 Jul 2010 02:22:27 +0000 (21:22 -0500)]
Remove trailing whitespace
* module/language/tree-il.scm: Remove trailing whitespace
Andy Wingo [Fri, 9 Jul 2010 16:58:01 +0000 (18:58 +0200)]
avoid running the debugger during parsing or compilation at the repl
* module/system/repl/repl.scm (abort-on-error): New helper.
(run-repl): Don't enter the debugger during parsing or compilation of
a repl expression. If you want to debug compilation, run compilation
from the repl, not as part of the repl.
Andy Wingo [Fri, 9 Jul 2010 16:39:15 +0000 (18:39 +0200)]
fix up a repl command docstring
* module/system/repl/command.scm (procedure): Fix up docstring.
Andy Wingo [Fri, 9 Jul 2010 16:34:24 +0000 (18:34 +0200)]
tweaks to print-locals
* module/system/repl/debug.scm (print-locals): Run the before-print-hook
on the values, so we can hook into (ice-9 history) if available. Don't
bother printing binding indices. Give a little per-line-prefix.
Andy Wingo [Fri, 9 Jul 2010 16:22:08 +0000 (18:22 +0200)]
tweaks to new repl
* module/system/repl/command.scm (read-command): Remove a pk.
* module/system/repl/repl.scm (run-repl): Export. Use % and abort to
implement the prompt.
Andy Wingo [Fri, 9 Jul 2010 15:04:34 +0000 (17:04 +0200)]
integrate the debugger into the repl
* module/system/repl/debug.scm: New file, defines a data type to hold
state for a debugger stack, and some helper procedures to print the
stack or print a frame. Most pieces are from (system vm debug).
* module/system/repl/error-handling.scm: New file, implements
call-with-error-handling and with-error-handling, and instead of going
into a debugger, we go into a recursive repl that happens to have
debugging information. Will be removing the old debugger from (system
vm debug) shortly.
* module/Makefile.am (SYSTEM_SOURCES): Add error-handling and debug scm
files.
* module/system/repl/repl.scm (prompting-meta-read): Better error
handling -- we don't want to go into a debugger when reading a
command.
(start-repl): Add #:debug keyword argument, and just dispatch to
run-repl.
(run-repl): New function, with the guts of the old start-repl. Added a
prompt, to which a throw to 'quit will abort.
* module/system/repl/common.scm (repl-prepare-eval-thunk): New
helper. In the future we will use this to not enter the debugger on
errors that happen at compile time.
(repl-eval): Use repl-prepare-eval-thunk.
(repl-print): Run the before-print-hook when printing a value.
* module/system/repl/command.scm (*command-table*): Move `option' to the
`system' group. Move `trace' to the `profile' group. Add `debug' and
`inspect' groups.
(command-abbrevs): Rename from command-abbrev, and allow multiple
abbreviations.
(display-group): Fix the case where abbrev? was #f.
(display-summary): Fix alignment of the command and
abbreviations. Allow multiple abbreviations.
(read-command): Rename from read-datum, and have better error
handling.
(meta-command): Better error handling.
(define-meta-command): Better error handling.
(help, show, import, compile, disassemble, time, profile, trace): Fix
docstrings and error messages.
(define-stack-command): New helper, for commands that operate on a
saved stack.
(backtrace, up, down, frame, procedure, locals): New debugger
commands, in the REPL now.
(inspect, pretty-print): New "inspect" commands.
Andy Wingo [Fri, 9 Jul 2010 14:48:30 +0000 (16:48 +0200)]
readline only handles SIGWINCH
* acinclude.m4 (GUILE_READLINE): Check for rl_catch_signals and
rl_catch_sigwinch.
* guile-readline/readline.c (scm_init_readline): If we can, turn off
readline's signal handling, because we can do our own.
(scm_readline): Use dynwinds to handle resetting readline's state on
nonlocal exit, not catches.
(unwind_readline): Rename from handle_error.
Andy Wingo [Fri, 9 Jul 2010 08:57:51 +0000 (10:57 +0200)]
remove use-emacs-interface check from ice-9 readline
* guile-readline/ice-9/readline.scm (activate-readline): Remove check
for use-emacs-interface in guile-user, an interface that was removed.
Andy Wingo [Thu, 8 Jul 2010 16:18:21 +0000 (17:18 +0100)]
define* in ice-9 regex
* module/ice-9/regex.scm (match:start, match:end, match:substring)
(fold-matches, list-matches): Reimplement using define*.
Andy Wingo [Thu, 8 Jul 2010 16:13:08 +0000 (17:13 +0100)]
untabify (ice-9 regex)
* module/ice-9/regex.scm: Untabify.
Andy Wingo [Thu, 1 Jul 2010 11:10:02 +0000 (12:10 +0100)]
fix (set! MACRO exp) hygiene
* module/ice-9/psyntax.scm (lookup): Reflow comment.
(chi-top, syntax): Add comments about mod for lookup.
(set!): Lookup the identifier in the module attached to its syntax
object. In the (set! MACRO foo) case, after expanding the macro, chi
the resulting expression with the empty wrap, as syntax-type
does. Seems to fix the case where the expansion references
lexically-bound variables.
* module/ice-9/psyntax-pp.scm: Regenerated.
* test-suite/tests/syncase.test: Add a bunch of tests.
Neil Jerram [Sun, 4 Jul 2010 20:07:49 +0000 (21:07 +0100)]
Fix TeXing of doc/ref/r6rs.texi
* doc/ref/r6rs.texi (rnrs conditions): Add "{Condition Type}" to
@deffn line for each condition type. Add one missing "{Scheme
Procedure}".
Ludovic Courtès [Sun, 4 Jul 2010 16:44:08 +0000 (18:44 +0200)]
Optimize `string=' for the common case.
* libguile/srfi-13.c (scm_string_eq): Add a fast path for the common
case.
Ludovic Courtès [Sun, 4 Jul 2010 16:38:53 +0000 (18:38 +0200)]
Add `scm_i_string_data'.
* libguile/strings.c (STRINGBUF_CONTENTS): New macro.
(STRINGBUF_CHARS, STRINGBUF_WIDE_CHARS): Use it.
(scm_i_string_data): New function.
* libguile/strings.h (scm_i_string_data): New declaration.
Neil Jerram [Thu, 10 Jun 2010 22:40:41 +0000 (23:40 +0100)]
Fix hanging of popen.test
The "open-output-pipe":"no duplicate" test has been hanging, on and
off, and not completely reliably, for a few years. It's now doing so
fairly reliably for me, and investigation shows that
- the child shell process is in a tight loop (99% CPU)
- the parent Guile process is stuck calling waitpid().
The problem is that the child hasn't got the SIGPIPE that the test
intends, and so is continuing to echo "closed" forever; and Guile is
waiting for it to terminate, forever.
I haven't fully debugged the SIGPIPE problem, but it sounds very like
what Chet Ramey describes here:
http://old.nabble.com/Re%3A-SIGPIPE-not-properly-reset-with-%27trap---PIPE%27-p20985595.html.
(And my version of bash is 3.2.39.)
So, a fix should be to use something other than shell to implement the
child; and it appears that this works.
* check-guile.in (TEST_SUITE_DIR): Export.
* test-suite/tests/popen-child.scm: New script file.
* test-suite/tests/popen.test ("open-output-pipe", "no duplicate"):
Use Guile for the child process, instead of shell.
Andy Wingo [Tue, 29 Jun 2010 10:20:09 +0000 (12:20 +0200)]
fix repl level printing
* module/system/repl/common.scm (repl-prompt): Fix repl level printing.
Tristan Colgate [Tue, 29 Jun 2010 08:14:33 +0000 (09:14 +0100)]
Update #:procedure method for <applicable-struct>
* modules/oop/goop.scm (initialize-object-procedure): Use slot-set!
instead of set-object-procedure!.
Andy Wingo [Mon, 28 Jun 2010 13:03:34 +0000 (15:03 +0200)]
* module/srfi/srfi-60.scm (bit-count): #:replace core definition.
Andy Wingo [Sat, 26 Jun 2010 20:28:21 +0000 (22:28 +0200)]
use *repl-stack* instead of *repl-level*
* module/ice-9/boot-9.scm (*repl-stack*): Instead of repl-level, have a
stack.
(batch-mode?): Change to poke the stack.
* module/ice-9/deprecated.scm (set-batch-mode?!): Update deprecation
method.
* module/system/repl/common.scm (repl-prompt): Update to poke
*repl-stack* to get the level.
* module/system/repl/repl.scm (start-repl): Bind *repl-stack*
appropriately.
Andy Wingo [Sat, 26 Jun 2010 20:18:37 +0000 (22:18 +0200)]
tweak to ensure-batch-mode!
* module/ice-9/boot-9.scm (ensure-batch-mode!): Fix to be correct
regarding dynamic extent (so far as this hack goes).
Andy Wingo [Sat, 26 Jun 2010 19:55:13 +0000 (21:55 +0200)]
add repl inport and outport fields and accessors
* module/system/repl/common.scm (<repl>): Add inport and outport fields
and accessors.
(make-repl): Add optional "debug" argument. Bind inport and outport to
the current inport and output ports at the time of repl creation.
(repl-read): Read from the repl inport.
(repl-print): Write to the repl outport.
* module/system/repl/command.scm (read-datum, read-line, meta-command):
Respect repl-inport, and bind the outport of meta-commands to the repl
outport.
Andy Wingo [Sat, 26 Jun 2010 19:46:28 +0000 (21:46 +0200)]
allow kwargs to repl metacommands
* module/system/repl/command.scm (define-meta-command): Allow repl
meta-commands to have optional or keyword arguments.
Thien-Thi Nguyen [Fri, 25 Jun 2010 16:47:12 +0000 (18:47 +0200)]
HACKING: Mention (add-hook 'before-save-hook 'delete-trailing-whitespace)
* HACKING (Coding standards):
Mention ‘(add-hook 'before-save-hook 'delete-trailing-whitespace)’.
Julian Graham [Thu, 24 Jun 2010 03:44:24 +0000 (23:44 -0400)]
Edits to R6RS standard libraries documentation proposed by Ludovic Courtès.
* doc/ref/r6rs.texi: Fix erroneous usage of @pxref; add pointers from
`(rnrs conditions)' and `(rnrs arithmetic bitwise)' to SRFI-35 and
SRFI-60 sections; remove reference to `fold'.
Andy Wingo [Tue, 22 Jun 2010 21:50:27 +0000 (23:50 +0200)]
top-repl out to its own module
* module/ice-9/boot-9.scm:
* module/ice-9/top-repl.scm: Move top-repl out here.
* module/Makefile.am: Add new file.
* module/ice-9/deprecated.scm (top-repl): Deprecated shim.
* libguile/script.c (scm_compile_shell_switches): Invoke top-repl from
its new location.
Andy Wingo [Tue, 22 Jun 2010 21:29:43 +0000 (23:29 +0200)]
simplify top-repl
* module/ice-9/boot-9.scm (top-repl): Simplify.
Andy Wingo [Tue, 22 Jun 2010 21:16:49 +0000 (23:16 +0200)]
don't bother catching SIGSEGV et al in top-repl
* module/ice-9/boot-9.scm (exit-hook): Move up with the other hooks.
(top-repl): Don't install handlers for SIGFPE, SIGILL, SIGSEGV, or
SIGBUS, as they will have no effect.
Andy Wingo [Tue, 22 Jun 2010 20:34:23 +0000 (22:34 +0200)]
deprecate named-module-use!, load-emacs-interface, and remove --emacs
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (named-module-use!)
(load-emacs-interface): Deprecate these.
* module/ice-9/gds-client.scm (run-utility): Redefine to not use
named-module-use!.
* libguile/script.c (scm_shell_usage): Remove --emacs option.
(scm_compile_shell_switches): Remove support for --emacs.
* module/ice-9/boot-9.scm (top-repl): Don't muck with --emacs.
* doc/ref/scheme-scripts.texi (Invoking Guile): Remove note about
--emacs.
Andy Wingo [Tue, 22 Jun 2010 20:25:20 +0000 (22:25 +0200)]
require-extension using syntax-case
* module/ice-9/boot-9.scm (require-extension): Implement using
syntax-case.
Andy Wingo [Tue, 22 Jun 2010 20:15:50 +0000 (22:15 +0200)]
cond-expand in syntax-case
* module/ice-9/boot-9.scm: Some spacing improvements.
(cond-expand): Reimplement in syntax-case.
Andy Wingo [Tue, 22 Jun 2010 19:47:15 +0000 (21:47 +0200)]
more aspiration in boot-9
* module/ice-9/boot-9.scm: Spacing fixes for local-ref et al.
Andy Wingo [Tue, 22 Jun 2010 19:43:09 +0000 (21:43 +0200)]
begin-deprecated using syntax-case
* module/ice-9/boot-9.scm (begin-deprecated): In terms of syntax-case.
Julian Graham [Tue, 22 Jun 2010 03:10:13 +0000 (23:10 -0400)]
Integrate complete R6RS standard libraries documentation.
* doc/ref/r6rs.texi: Reshuffle Andy Wingo's introductory notes; add more
detailed @subsubsections for each library.
Andy Wingo [Mon, 21 Jun 2010 19:47:42 +0000 (21:47 +0200)]
relax restriction on _ in literals
* module/ice-9/psyntax.scm: Relax restriction on _ in literals.
* module/ice-9/psyntax-pp.scm: Regen.
Andy Wingo [Mon, 21 Jun 2010 19:06:29 +0000 (21:06 +0200)]
fix matches? test
* test-suite/tests/syntax.test (matches?): Unfortunately this relatively
recent macro fails due to the underscore-in-literals-list prohibition.
But, it seems I was in the minority wanting _ for a literal.
Andy Wingo [Mon, 21 Jun 2010 18:54:14 +0000 (20:54 +0200)]
syntax-case treats _ as placeholder
* module/ice-9/psyntax.scm (underscore?): New helper, like ellipsis?.
(syntax-case): Treat the _ pattern as a matches-all pattern,
disallowing it from the keyword list. Another well-thought part of the
R6RS.
($sc-dispatch): Dispatch _ patterns.
* module/ice-9/psyntax-pp.scm: Regenerated.
* test-suite/tests/syncase.test ("_ is a placeholder"): Add a test.
Andy Wingo [Mon, 21 Jun 2010 09:02:31 +0000 (11:02 +0200)]
fix compilation with automake < 1.11
* configure.ac: On automake < 1.11, define AM_DEFAULT_VERBOSITY so that
our custom silent rules work.
Andy Wingo [Mon, 21 Jun 2010 09:02:00 +0000 (11:02 +0200)]
freshly regenerate psyntax-pp
* module/ice-9/psyntax-pp.scm: A fresh regen to get the lowest gensyms
we can. Needs a better solution in the end.
Andy Wingo [Sun, 20 Jun 2010 22:07:46 +0000 (00:07 +0200)]
fix rnrs duplicate bindings warnings
* module/rnrs.scm: Fix i/o duplicate bindings warnings by excluding some
bindings.
Andy Wingo [Sun, 20 Jun 2010 21:59:57 +0000 (23:59 +0200)]
rnrs modules #:replace as appropriate
* module/ice-9/boot-9.scm (export!): New syntax, as export is to
module-export!, export! is to module-replace!. I thought that taking
up the name `replace' would be presumptuous, hence the name mismatch.
* module/ice-9/r6rs-libraries.scm (library): Calculate not only
re-exports, but replacements as well.
Andy Wingo [Sun, 20 Jun 2010 21:15:29 +0000 (23:15 +0200)]
ensure unicode-capable rnrs string ports
* module/rnrs/io/ports.scm (open-string-input-port):
(open-string-output-port): Ensure that the ports are unicode-capable
by binding %default-port-encoding to "UTF-8".
Ludovic Courtès [Sun, 20 Jun 2010 14:57:06 +0000 (16:57 +0200)]
Canonicalize source file names in `primitive-load-path' (fix bug #30170).
* libguile/load.c (scm_primitive_load_path): Canonicalize
FULL_FILENAME. Fixes bug #30170 ("Auto-compilation erroneously
recompiles dependencies").
Andy Wingo [Sat, 19 Jun 2010 18:07:29 +0000 (20:07 +0200)]
repl compiles with warnings by default
* module/system/repl/command.scm (compile): Remove the bitrotten
options.
* module/system/repl/common.scm (repl-default-options): Add
'compile-options option.
(repl-compile-options): Accessor for compile-options.
(repl-compile): Use repl-compile-options.
(repl-eval): Adapt to repl-compile interface change.
Andy Wingo [Sat, 19 Jun 2010 13:40:47 +0000 (15:40 +0200)]
scheme-mode in syntactic records test
* test-suite/tests/r6rs-records-syntactic.test: Add -*- scheme -*-.
Andy Wingo [Sat, 19 Jun 2010 13:40:25 +0000 (15:40 +0200)]
typo in mutable-strings
* module/rnrs/mutable-strings.scm: Fix typo.
Andy Wingo [Sat, 19 Jun 2010 13:40:11 +0000 (15:40 +0200)]
*unspecified* in rnrs exceptions
* module/rnrs/exceptions.scm (rnrs): Import *unspecified*.
Andy Wingo [Sat, 19 Jun 2010 13:20:02 +0000 (15:20 +0200)]
don't unconditionally restore signals in ensure-batch-mode!
* module/ice-9/boot-9.scm (ensure-batch-mode!): Remove comment about
restoring signals, and that behavior, as it was making popen.test
hang. I should investigate further, but instead I'm just going to hope
that this fixes it.
Andreas Rottmann [Sat, 19 Jun 2010 12:52:56 +0000 (14:52 +0200)]
Fix SRFI-9 for records without fields
* module/srfi/srfi-9.scm (define-record-type): Deal with fieldless records.
* test-suite/tests/srfi-9.test: Add a fieldless record definition.
Andreas Rottmann [Sat, 19 Jun 2010 12:52:21 +0000 (14:52 +0200)]
Ignore the SRFI name component(s) in R6RS imports
* module/ice-9/r6rs-libraries.scm (resolve-r6rs-interface): To avoid having to
create alias libraries for all the SRFIs, we simply ignore the name
components, so (srfi :n foo bar) will resolve to (srfi :n).
Andreas Rottmann [Sat, 19 Jun 2010 12:51:48 +0000 (14:51 +0200)]
ice-9 receive without define-macro
* module/ice-9/receive.scm: Replace define-macro usage with syntax-rules.
Andreas Rottmann [Sat, 19 Jun 2010 12:51:04 +0000 (14:51 +0200)]
add rnrs unicode to the compound rnrs module
* module/rnrs.scm: import rnrs unicode and export all of its procedures.
Andy Wingo [Sat, 19 Jun 2010 12:45:03 +0000 (14:45 +0200)]
fix ^L typo
* module/rnrs/mutable-pairs.scm: Fix ^L typo.
Andy Wingo [Sat, 19 Jun 2010 11:56:16 +0000 (13:56 +0200)]
set! name (lambda ...) names the lambda
* module/ice-9/psyntax.scm (build-lexical-assignment)
(build-global-assignment): Maybe name the RHS.
* module/ice-9/psyntax-pp.scm: Regenerated.
* module/ice-9/boot-9.scm (catch, with-throw-handler, throw): Rework to
use set! instead of define! so that we get names.
Andy Wingo [Sat, 19 Jun 2010 11:43:33 +0000 (13:43 +0200)]
deprecate the-last-stack
* libguile/backtrace.h (scm_the_last_stack_fluid_var)
* libguile/backtrace.c (scm_init_backtrace): No more
scm_the_last_stack_fluid_var. The replacement is to resolve
`the-last-stack' in (ice-9 stack-catch).
(scm_backtrace_with_highlights): Accordingly, instead of backtracing
the last stack, backtrace the current stack.
* libguile/throw.h:
* libguile/throw.c:
* libguile/deprecated.h:
* libguile/deprecated.c (scm_internal_stack_catch): Deprecate this
function.
* module/ice-9/save-stack.scm (the-last-stack): Move here from boot-9.
* module/ice-9/debug.scm:
* module/ice-9/debugger.scm: Use (ice-9 save-stack) for the-last-stack.
* module/ice-9/deprecated.scm (the-last-stack): Add deprecated shim.
Andy Wingo [Sat, 19 Jun 2010 11:36:53 +0000 (13:36 +0200)]
don't bind the-last-stack in repl.scm
* module/system/repl/repl.scm (start-repl): Don't bind the-last-stack.
Andy Wingo [Sat, 19 Jun 2010 11:36:23 +0000 (13:36 +0200)]
no the-last-stack in ice-9 threads
* module/ice-9/threads.scm (thread-handler): Don't muck with
the-last-stack.
Andy Wingo [Sat, 19 Jun 2010 11:35:36 +0000 (13:35 +0200)]
remove the-last-stack from boot-9
* module/ice-9/boot-9.scm (false-if-exception): Use syntax-rules. Don't
muck with the-last-stack, it is going away. Remove a later comment
about the-last-stack.
Andy Wingo [Sat, 19 Jun 2010 10:57:31 +0000 (12:57 +0200)]
deprecate save-stack, stack-saved?
* module/Makefile.am:
* module/ice-9/boot-9.scm:
* module/ice-9/save-stack.scm (stack-saved?, save-stack): Move these
bindings to their own module.
* module/oop/goops.scm (goops-error):
* module/ice-9/boot-9.scm (error, top-repl): Remove calls to save-stack.
* module/ice-9/deprecated.scm (stack-saved?, save-stack): Add deprecated
shims.
* module/ice-9/emacs.scm:
* module/ice-9/stack-catch.scm:
* module/ice-9/debugger/command-loop.scm:
* module/ice-9/scm-style-repl.scm: Import (ice-9 save-stack).
Andy Wingo [Sat, 19 Jun 2010 10:43:40 +0000 (12:43 +0200)]
add support for variable transformers: settable identifier syntax
* module/ice-9/psyntax.scm (set!): Handle variable transformers; though,
they cannot produce definitions.
(make-variable-transformer): New procedure.
(identifier-syntax): Allow the R6RS form that makes variable
transformers.
* module/ice-9/psyntax-pp.scm: Regenerated.
* doc/ref/r6rs.texi (R6RS Incompatibilities): Remove letrec* item, and
add set! restriction.
Andy Wingo [Sat, 19 Jun 2010 09:43:48 +0000 (11:43 +0200)]
handle-system-error to scm-style-repl
* module/ice-9/boot-9.scm:
* module/ice-9/scm-style-repl.scm (handle-system-error): Move here from
boot-9.
* module/ice-9/deprecated.scm (handle-system-error): Keep a deprecated
wrapper in the root environment.
Thien-Thi Nguyen [Tue, 15 Jun 2010 23:01:05 +0000 (01:01 +0200)]
[build] Use UTC, precise format for ‘buildstamp’ value.
* libguile/Makefile.am (libpath.h): For ‘buildstamp’,
specify date(1) output format precisely, and in UTC.
* doc/ref/api-options.texi (Build Config): Update ‘buildstamp’ doc.
Andy Wingo [Fri, 18 Jun 2010 17:27:52 +0000 (19:27 +0200)]
add open-string-{input,output}-port to rnrs io ports
* module/rnrs/io/ports.scm (open-string-input-port)
(open-string-output-port): New procedures.
* module/rnrs.scm (rnrs): Export the new (rnrs io ports) procedures.
Julian Graham [Fri, 18 Jun 2010 13:49:30 +0000 (09:49 -0400)]
Fix `define-condition-type' to use condition-accessors, not record
accessors.
* module/rnrs/conditions.scm (define-condition-type): The generated
accessors should be condition accessors, which know how to unpack a
compound condition; these can then delegate to the appropriate record
accessors.
* test-suite/tests/r6rs-conditions.test: New test case to verify above.
Andy Wingo [Fri, 18 Jun 2010 11:10:33 +0000 (13:10 +0200)]
`(debug)' debugs the current stack.
* module/system/vm/debug.scm (debug): Change to debug the current stack
instead of the last stack.
Andy Wingo [Fri, 18 Jun 2010 11:01:14 +0000 (13:01 +0200)]
remove before-signal-stack
* module/ice-9/boot-9.scm (before-signal-stack): Remove. We're moving
away from using the-last-stack, so this backup copy is not much use.
(top-repl): Don't bother saving a before-signal-stack.
* module/ice-9/debugger/command-loop.scm (debugger-handler): No need to
restore here either.
Andy Wingo [Fri, 18 Jun 2010 10:54:22 +0000 (12:54 +0200)]
has-shown-debugger-hint? to scm-style-repl
* module/ice-9/boot-9.scm:
* module/ice-9/scm-style-repl.scm (has-shown-debugger-hint?): Move to
scm-style-repl.
Andy Wingo [Fri, 18 Jun 2010 10:51:43 +0000 (12:51 +0200)]
reorder hooks in boot-9
* module/ice-9/boot-9.scm: Reorder hooks.
Andy Wingo [Fri, 18 Jun 2010 10:50:32 +0000 (12:50 +0200)]
default-pre-unwind-handler to scm-style-repl
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (default-pre-unwind-handler): Deprecate
root-module definition.
* module/ice-9/scm-style-repl.scm (default-pre-unwind-handler): Move
here.
* module/ice-9/debugging/traps.scm:
* module/ice-9/debugger.scm:
* module/ice-9/stack-catch.scm: Use default-pre-unwind-handler from
scm-style-repl.
Andy Wingo [Fri, 18 Jun 2010 10:43:04 +0000 (12:43 +0200)]
finish deprecating pre-unwind-handler-dispatch
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (pre-unwind-handler-dispatch): Properly
deprecate.
* module/ice-9/debugger.scm (debug-on-error):
* module/ice-9/debugging/traps.scm (on-pre-unwind-handler-dispatch):
Update remaining pre-unwind-handler-dispatch uses.
Andy Wingo [Fri, 18 Jun 2010 10:30:45 +0000 (12:30 +0200)]
deprecate `repl'
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (repl): Deprecate.
Andy Wingo [Fri, 18 Jun 2010 10:28:18 +0000 (12:28 +0200)]
batch-mode? in terms of *repl-level*
* module/ice-9/boot-9.scm (*repl-level*): New global fluid, moved here
from (system repl common).
(batch-mode?): Reimplement in terms of *repl-level*.
(ensure-batch-mode!): A replacement for set-batch-mode?!.
* module/ice-9/deprecated.scm (set-batch-mode?!): Deprecate.
* module/ice-9/popen.scm (open-process): Use ensure-batch-mode!.
* module/ice-9/scm-style-repl.scm (error-catching-loop): Override
ensure-batch-mode!.
* module/system/repl/common.scm: Remove *repl-level*.