1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
Commit graph

10 commits

Author SHA1 Message Date
Mark H Weaver
e082b13b66 pmatch: always wrap with let, even if the expression appears atomic
* module/system/base/pmatch.scm (pmatch): Always wrap with 'let', even
  if the expression appears atomic, because in the presence of
  'identifier-syntax', we cannot know what an atomic expression will
  later expand to.  Also use '#:export-syntax' instead of '#:export'
  to export 'pmatch'.
2012-03-01 16:16:27 -05:00
Andy Wingo
5c43d9c783 pmatch license clarification clarifications
* module/system/base/pmatch.scm: Clarify the clarifications (somehow
  didn't make it into my last commit).
2010-03-14 17:48:49 +01:00
Andy Wingo
8137c9d5e7 clarify pmatch licensing
* module/system/base/pmatch.scm: Clarify licensing.
2010-03-14 17:46:13 +01:00
Andy Wingo
112edbaea3 inline calls to some primitives
* module/system/base/pmatch.scm: Wrap consequents in (let () ) instead of
  (begin ) so that they can have local definitions.

* module/language/tree-il/compile-glil.scm: Inline some calls to
  primitives.
2009-05-17 23:24:26 +02:00
Andy Wingo
7c72fe0bb5 ice-9 syncase now deprecated, woo
Remove #:use-module (ice-9 syncase) from lots of places, as it's no
longer needed.
2009-04-24 14:34:23 +02:00
Andy Wingo
c5cc65ac0c fix hygiene + modules + local macros
* module/ice-9/psyntax-pp.scm: Regenerate.

* module/ice-9/psyntax.scm (syntax-type): Look up the type of the car of
  a form relative to its module, if it is a syntax object. Fixes hygiene
  wrt modules and private macros.

* module/ice-9/syncase.scm (sc-macro): Add a comment.

* module/system/base/pmatch.scm: The big test case: just export pmatch,
  not ppat too.
2009-04-17 15:20:19 +02:00
Andy Wingo
8899057d65 match bare literals with eq? in pmatch, not equal?
* module/system/base/pmatch.scm (ppat): Match atoms with eq?, not equal?.
  This speeds up compilation considerably, as we never match against
  numbers or strings or what-have-you. Note, you can match against
  literals with equal? via quoting the literal in the pattern.
2009-02-10 13:18:36 +01:00
Andy Wingo
1b8abe5514 compile all of base/; some arbitrary changes; more "fixes" to `link'
* module/language/scheme/translate.scm (lookup-transformer): When
  expanding syncase macros, use the eval closure from the ghil-env.
  Probably doesn't make any difference whatsoever.

* module/system/base/Makefile.am (SOURCES): Compile pmatch.scm, now that
  it works :-))

* module/system/base/compile.scm (compile-in): Compile inside a
  save-module-excursion, so that side effects of evaluation don't leak
  out.

* module/system/base/pmatch.scm: Change from :use-syntax/:export-syntax
  to simply :use-modules/:export. Also probably has no effect.

* module/system/il/ghil.scm (fix-ghil-mod!): Suppress warnings resulting
  from compilation of define-module.

* src/vm_loader.c (link): So, referencing variables defined but not
  exported from the current module didn't work. Fixed that, but it's
  hacky. There are still some uncaught cases.
2008-05-19 12:57:48 +02:00
Andy Wingo
f245e62cf8 Refactor (language scheme translate) to use pmatch
* module/language/scheme/translate.scm: Refactor use of `match' to use
  `pmatch'. Relatively straightforward.

* module/system/base/pmatch.scm (ppat): Fix some copy-n-paste bugs: the _
  rule, the quote rule.
2008-05-04 13:26:00 +02:00
Andy Wingo
e9b8c501d6 start using pmatch instead of match
* module/system/base/Makefile.am: Add pmatch.scm.

* module/system/base/pmatch.scm: New file, taken from Dan Friedman's
  alpha-kanren paper. Implements a less magical match syntax, pmatch.

* module/system/vm/assemble.scm: No more need for (ice-9 match).

* module/system/vm/conv.scm (code-pack, code->object): Change to use
  pmatch.
2008-05-03 19:23:45 +02:00