guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 01/02: New function: install-r6rs!


From: Andy Wingo
Subject: [Guile-commits] 01/02: New function: install-r6rs!
Date: Wed, 25 Sep 2019 16:09:07 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 0bb980f120a41b445d040869b5d9e211910ccf69
Author: Andy Wingo <address@hidden>
Date:   Wed Sep 25 21:57:03 2019 +0200

    New function: install-r6rs!
    
    * doc/ref/r6rs.texi (R6RS Incompatibilities): Document install-r6rs!.
    * module/ice-9/boot-9.scm (install-r6rs!): New function.
---
 doc/ref/r6rs.texi       | 13 +++++++++++++
 module/ice-9/boot-9.scm | 13 +++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/doc/ref/r6rs.texi b/doc/ref/r6rs.texi
index 218dca3..62328be 100644
--- a/doc/ref/r6rs.texi
+++ b/doc/ref/r6rs.texi
@@ -106,6 +106,19 @@ Guile's implementation of @code{equal?} may fail to 
terminate when
 applied to arguments containing cycles.
 @end itemize
 
+Guile exposes a procedure in the root module to choose R6RS defaults
+over Guile's historical defaults.
+
+@deffn {Scheme Procedure} install-r6rs!
+Alter Guile's default settings to better conform to the R6RS.
+
+While Guile's defaults may evolve over time, the current changes that
+this procedure imposes are to add @code{.sls} and @code{.guile.sls} to
+the set of supported @code{%load-extensions}, to better support R6RS
+conventions.  @xref{Load Paths}.  Also, enable R6RS unicode escapes in
+strings; see the discussion above.
+@end deffn
+
 @node R6RS Standard Libraries
 @subsection R6RS Standard Libraries
 
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index f50448c..fd4e19c 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -4069,6 +4069,19 @@ when none is available, reading FILE-NAME with READER."
 
 
 
+;;; {R6RS and R7RS}
+;;;
+
+(define (install-r6rs!)
+  "Make changes to the default environment to better conform to the
+R6RS.  @xref{R6RS Incompatibilities} in the manual."
+  (set! %load-extensions
+        (cons* ".guile.sls" ".sls"
+               (delete ".guile.sls" (delete ".sls" %load-extensions))))
+  (read-enable 'r6rs-hex-escapes))
+
+
+
 ;;; {Deprecated stuff}
 ;;;
 



reply via email to

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