1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 04:40:29 +02:00
Commit graph

673 commits

Author SHA1 Message Date
Andy Wingo
b38507c1af comments in boot-9
* module/ice-9/boot-9.scm: Add comments.
2010-06-11 16:58:31 +02:00
Andy Wingo
4100dc5dee 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.
2010-06-11 16:58:31 +02:00
Andy Wingo
4eeaf67c8c error in terms of case-lambda
* module/ice-9/boot-9.scm (error): Redefine using case-lambda.
2010-06-11 16:58:31 +02:00
Andy Wingo
010b159f56 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?.
2010-06-11 16:58:24 +02:00
Andy Wingo
02b582cef5 comments in boot-9
* module/ice-9/boot-9.scm: Add some comments about the nature of
  properties.
2010-06-11 00:13:12 +02:00
Andy Wingo
0f509ab5e3 deprecate apply-to-args
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (apply-to-args): Deprecate.
2010-06-10 23:55:35 +02:00
Andy Wingo
e979130b66 remove annotation?
* module/ice-9/boot-9.scm (annotation?): Remove unused new definition.
2010-06-10 23:39:19 +02:00
Andy Wingo
b2e27da35b 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.
2010-06-10 23:28:23 +02:00
Andy Wingo
7e3147666b 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.
2010-06-10 20:03:15 +02:00
Andy Wingo
02fcbf78b2 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.
2010-06-10 17:53:47 +02:00
Andy Wingo
4ae3d5aae8 deprecate error-catching-loop, error-catching-repl
* module/ice-9/deprecated.scm (error-catching-loop)
  (error-catching-repl): Deprecate.
2010-06-10 14:15:26 +02:00
Andy Wingo
974a74d224 remove commented-out code from boot-9
* module/ice-9/boot-9.scm: Remove commented-out code.
2010-06-10 14:15:26 +02:00
Andy Wingo
03af6e0953 deprecate scm-style-repl
* module/ice-9/deprecated.scm (scm-style-repl): Deprecate.
2010-06-10 14:15:26 +02:00
Julian Graham
dc232ed059 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.
2010-06-09 23:57:25 -04:00
Andy Wingo
ffd48603b0 r6rs `import' accepts multiple clauses
* module/ice-9/r6rs-libraries.scm (import): Accept multiple clauses.

* test-suite/tests/rnrs-libraries.test: Add test.
2010-06-09 08:55:02 +02:00
Andy Wingo
78f79f18e2 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).
2010-06-07 00:33:57 +02:00
Andy Wingo
41147ee732 add current-source-location
* module/ice-9/boot-9.scm (current-source-location): New macro, returns
  the, um, current source location.
2010-06-06 23:21:24 +02:00
Andy Wingo
750ae8b7b7 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.
2010-06-06 22:51:03 +02:00
Andy Wingo
625b43acc7 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.
2010-06-06 13:46:53 +02:00
Andy Wingo
f42d8bd8ff 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.
2010-06-06 13:39:44 +02:00
Andy Wingo
9846796b6a 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.
2010-06-06 13:00:59 +02:00
Andy Wingo
a96434cc33 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.
2010-06-05 19:40:43 +02:00
Andy Wingo
3ece779a67 boot-9 top-repl tweak
* module/ice-9/boot-9.scm (top-repl): More concisely drill down to
  start-repl.
2010-06-02 22:19:40 +02:00
Andy Wingo
22cf27c815 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.
2010-06-02 16:07:11 +02:00
Julian Graham
04186f2006 Ignore explicit phase specification for imports in `library' form.
* module/ice-9/r6rs-libraries.scm (library): Unwrap the `for' sub-form
  during export resolution the same way that `import' does.
* test-suite/tests/rnrs-libraries.test ("implicit phasing"): New test
  prefix and tests.
2010-05-27 21:32:39 -04:00
Ludovic Courtès
adb8f30600 Add copyight/license header in `compile-psyntax.scm'. 2010-05-25 23:31:36 +02:00
Andy Wingo
25f4cd87c2 boot-9 comment cleanup
* module/ice-9/boot-9.scm: Remove needless comment.
2010-05-21 23:44:15 +02:00
Andy Wingo
7df2621d72 lambda* in make-mutable-parameter
* module/ice-9/boot-9.scm (make-mutable-parameter): Use lambda*.
2010-05-21 23:43:58 +02:00
Andy Wingo
17ee350cb2 define* in repl-reader
* module/ice-9/boot-9.scm (repl-reader): Use define*.
2010-05-21 23:43:35 +02:00
Andy Wingo
d9113d47c6 define* in try-module-autoload
* module/ice-9/boot-9.scm (try-module-autoload): Use define*.
2010-05-21 23:43:16 +02:00
Andy Wingo
36d58fc31e define* in resolve-interface
* module/ice-9/boot-9.scm (resolve-interface): Use define* with proper
  keyword arguments, for great justice.
2010-05-21 23:42:54 +02:00
Andy Wingo
6b7d701e73 lambda* in resolve-module
* module/ice-9/boot-9.scm (resolve-module): Use lambda*.
2010-05-21 23:42:17 +02:00
Andy Wingo
5a6621244f define* in load-module
* module/ice-9/boot-9.scm (load-module): Use define*.
2010-05-21 23:41:49 +02:00
Andy Wingo
723ae5b370 define* in module-observe-weak
* module/ice-9/boot-9.scm (module-observe-weak): Use define*.
2010-05-21 23:37:54 +02:00
Andy Wingo
d6e70467ba define* in load
* module/ice-9/boot-9.scm (load): Use define*.
2010-05-21 23:37:35 +02:00
Andy Wingo
02851b26c7 case-lambda in dup->{in,out,}port, dup
* module/ice-9/boot-9.scm (dup->port, dup->inport, dup->outport, dup):
  Use case-lambda. Not particularly elegant.
2010-05-21 23:36:47 +02:00
Andy Wingo
52c9a3381d define* in file-set-position
* module/ice-9/boot-9.scm (file-set-position): Use define*.
2010-05-21 23:36:00 +02:00
Andy Wingo
d44a0d12b4 define* in record-constructor
* module/ice-9/boot-9.scm (record-constructor): Use define*.
2010-05-21 23:35:24 +02:00
Andy Wingo
b2669c41a7 define* in make-record-type
* module/ice-9/boot-9.scm (make-record-type): Use define*.
2010-05-21 23:34:54 +02:00
Andy Wingo
a4c8a02e09 lambda* in string-any, string-every
* module/ice-9/boot-9.scm (string-any, string-every): Use lambda*.
2010-05-21 23:34:06 +02:00
Andy Wingo
f31b7b6a1c lambda* in catch
* module/ice-9/boot-9.scm (catch): Use lambda*.
2010-05-21 23:33:28 +02:00
Andy Wingo
d648f56989 lambda* in make-prompt-tag
* module/ice-9/boot-9.scm (make-prompt-tag): Use lambda*.
2010-05-21 23:32:43 +02:00
Andy Wingo
520caaeba4 eval-when expand for use-modules and export
* module/ice-9/boot-9.scm (use-modules, use-syntax)
  (export, re-export): Add `expand' to the eval-when list, as we did for
  R6RS.
2010-05-20 17:52:44 +02:00
Andy Wingo
e6c7e9ed9c pure r6rs modules
* module/ice-9/r6rs-libraries.scm (library): Make pure modules.
  (import): Also process imports at expand time, for the `eval' case.
2010-05-20 13:59:34 +02:00
Andy Wingo
82c45730af lambda* usage in psyntax.scm
* module/ice-9/psyntax.scm (macroexpand): Use lambda*.
* module/ice-9/psyntax-pp.scm: Regenerated.
2010-05-20 13:28:25 +02:00
Andy Wingo
131ae7b49d remove *mode* fluid from psyntax
* module/ice-9/psyntax.scm: Remove the *mode* fluid. Whee :)
  (macroexpand): No need to bind aa *mode* fluid.

* module/ice-9/psyntax-pp.scm: Regenerated.
2010-05-20 12:54:47 +02:00
Andy Wingo
632ddbf02b iron out inconsistency between eval and compile expansion
* libguile/expand.c (expand_lambda_star_case): Harmonize with tree-il,
  expanding keywords to (aok? (kw name gensym) ...), not
  (aok? (kw . index) ...).

* libguile/memoize.c (memoize): Process the (kw name gensym) format into
  (kw . index).

* module/ice-9/psyntax.scm (build-lambda-case): Remove a
  compile-versus-eval special case.

* module/ice-9/psyntax-pp.scm: Regenerate.
2010-05-20 12:53:21 +02:00
Andy Wingo
a310a1d12e primitive-eval takes expanded, not memoized, source
* module/ice-9/eval.scm (primitive-eval):
* libguile/eval.c (scm_c_primitive_eval): Don't expect a memoized
  expression -- expect either raw source or an *expanded* expression. We
  handle memoization ourselves.

* libguile/expand.c (scm_macroexpand): Settle down into its proper name,
  "macroexpand", even as we comment that it is but a fleeting boot
  expander.
  (scm_macroexpanded_p): New predicate for expanded code.

* libguile/expand.h: Add scm_macroexpanded_p.

* libguile/memoize.c (scm_memoize_expression): Require that the
  expression be expanded.
  (scm_init_memoize): Don't alias memoize-expression to macroexpand.

* module/ice-9/psyntax-pp.scm:
* module/ice-9/psyntax.scm: Always produce macroexpanded expressions,
  and hand them to primitive-eval. No more calls to memoize-expression
  here.

* test-suite/tests/optargs.test: Remove some tests, as unfortunately we
  have no way to invoke the boot expander after boot.
2010-05-20 12:25:52 +02:00
Andy Wingo
bdf7759c2b psyntax produces "expanded" structures directly
* module/ice-9/psyntax.scm: Remove a number of eval-versus-compile
  cases, instead producing "expanded" structures directly, which happen
  to coincide with tree-il.

* module/ice-9/psyntax-pp.scm: Regenerate.
2010-05-20 00:01:10 +02:00
Andy Wingo
3d10018e7f expanded type constructors in psyntax
* module/ice-9/psyntax.scm (define-expansion-constructors): Define
  constructors for expanded types.

* module/ice-9/psyntax-pp.scm: Regenerated.
2010-05-19 23:37:27 +02:00