guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 01/05: Plumbing changes to rename "syntax-module"


From: Andy Wingo
Subject: [Guile-commits] 01/05: Plumbing changes to rename "syntax-module"
Date: Tue, 28 Mar 2017 15:28:28 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 6ba3f35f261293492206892c40b4cd7d29e372f8
Author: Andy Wingo <address@hidden>
Date:   Fri Mar 24 11:00:48 2017 +0100

    Plumbing changes to rename "syntax-module"
    
    * module/ice-9/psyntax.scm (%syntax-module): Rename from syntax-module
      in order to make room for a new syntax-module primitive binding.
    * module/ice-9/psyntax-pp.scm: Regenerate.
    * module/ice-9/boot-9.scm: Push syntax bindings into an internal
      module.
    * module/system/syntax.scm: New file.
    * module/Makefile.am (SOURCES): Add system/syntax.scm.
---
 module/Makefile.am          |  2 ++
 module/ice-9/boot-9.scm     |  6 +++---
 module/ice-9/psyntax-pp.scm |  4 ++--
 module/ice-9/psyntax.scm    |  4 ++--
 module/system/syntax.scm    | 26 ++++++++++++++++++++++++++
 5 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/module/Makefile.am b/module/Makefile.am
index 67f041d..ef7c208 100644
--- a/module/Makefile.am
+++ b/module/Makefile.am
@@ -336,6 +336,8 @@ SOURCES =                                   \
   system/vm/traps.scm                          \
   system/vm/vm.scm                             \
                                                \
+  system/syntax.scm                            \
+                                               \
   system/xref.scm                              \
                                                \
   sxml/apply-templates.scm                     \
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 2777672..07d357d 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -4074,7 +4074,7 @@ when none is available, reading FILE-NAME with READER."
 ;;; modules, removing them from the (guile) module.
 ;;;
 
-(define-module (system syntax))
+(define-module (system syntax internal))
 
 (let ()
   (define (steal-bindings! from to ids)
@@ -4086,9 +4086,9 @@ when none is available, reading FILE-NAME with READER."
      ids)
     (module-export! to ids))
 
-  (steal-bindings! the-root-module (resolve-module '(system syntax))
+  (steal-bindings! the-root-module (resolve-module '(system syntax internal))
                    '(syntax-local-binding
-                     syntax-module
+                     %syntax-module
                      syntax-locally-bound-identifiers
                      syntax-session-id)))
 
diff --git a/module/ice-9/psyntax-pp.scm b/module/ice-9/psyntax-pp.scm
index e410f9f..7749e3c 100644
--- a/module/ice-9/psyntax-pp.scm
+++ b/module/ice-9/psyntax-pp.scm
@@ -2440,7 +2440,7 @@
              (strip form '(()))
              (and subform (strip subform '(()))))))
   (letrec*
-    ((syntax-module
+    ((%syntax-module
        (lambda (id)
          (let ((x id))
            (if (not (nonsymbol-id? x))
@@ -2502,7 +2502,7 @@
          (locally-bound-identifiers
            (syntax-object-wrap id)
            (syntax-object-module id)))))
-    (define! 'syntax-module syntax-module)
+    (define! '%syntax-module %syntax-module)
     (define! 'syntax-local-binding syntax-local-binding)
     (define!
       'syntax-locally-bound-identifiers
diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm
index 74a008e..567f606 100644
--- a/module/ice-9/psyntax.scm
+++ b/module/ice-9/psyntax.scm
@@ -2746,7 +2746,7 @@
                    (and subform (strip subform empty-wrap)))))
 
     (let ()
-      (define (syntax-module id)
+      (define (%syntax-module id)
         (arg-check nonsymbol-id? id 'syntax-module)
         (let ((mod (syntax-object-module id)))
           (and (not (equal? mod '(primitive)))
@@ -2797,7 +2797,7 @@
       ;; compile-time, after the variables are stolen away into (system
       ;; syntax).  See the end of boot-9.scm.
       ;;
-      (define! 'syntax-module syntax-module)
+      (define! '%syntax-module %syntax-module)
       (define! 'syntax-local-binding syntax-local-binding)
       (define! 'syntax-locally-bound-identifiers 
syntax-locally-bound-identifiers))
     
diff --git a/module/system/syntax.scm b/module/system/syntax.scm
new file mode 100644
index 0000000..9d6bc57
--- /dev/null
+++ b/module/system/syntax.scm
@@ -0,0 +1,26 @@
+;;; Syntax utilities
+
+;;; Copyright (C) 2017 Free Software Foundation, Inc.
+
+;;;; This library is free software; you can redistribute it and/or
+;;;; modify it under the terms of the GNU Lesser General Public
+;;;; License as published by the Free Software Foundation; either
+;;;; version 3 of the License, or (at your option) any later version.
+;;;; 
+;;;; This library is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;;; Lesser General Public License for more details.
+;;;; 
+;;;; You should have received a copy of the GNU Lesser General Public
+;;;; License along with this library; if not, write to the Free Software
+;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
+
+;;; Code:
+
+(define-module (system syntax)
+  #:use-module (system syntax internal)
+  #:re-export (syntax-local-binding
+               (%syntax-module . syntax-module)
+               syntax-locally-bound-identifiers
+               syntax-session-id))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]