[Top][All Lists]

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

guile --listen fix

From: Ian Price
Subject: guile --listen fix
Date: Wed, 19 Sep 2012 17:51:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Hi guys,

It was brought to my attention on #guile that the listen option no
longer works in guile. 

  $ guile --listen
  ice-9/psyntax.scm:1201:48: In procedure syntax-type:
  ice-9/psyntax.scm:1201:48: Syntax error:
  unknown location: source expression failed to match any pattern in form (@@ 
(system repl server) (spawn-server))

I think the relevant commit is a March 8th commit by Mark Weaver
(8210c85), which restricts @@ to ids only. Since this change is
sensible, and in line with what we've documented, I fixed

If you are happy with it I'll push to stable-2.0. I also have a patch to
fix a typo.

Ian Price --

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"

>From a764dcb9735c2478392006287a97dd07541e55ee Mon Sep 17 00:00:00 2001
From: Ian Price <address@hidden>
Date: Wed, 19 Sep 2012 17:33:29 +0100
Subject: [PATCH 1/2] Fix @@ usage in --listen option

* module/ice-9/command-line.scm (compile-shell-switches): @@ no longer
  supports arbitrary expressions, only identifiers.
 module/ice-9/command-line.scm |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/module/ice-9/command-line.scm b/module/ice-9/command-line.scm
index 62a2c9e..d409360 100644
--- a/module/ice-9/command-line.scm
+++ b/module/ice-9/command-line.scm
@@ -325,7 +325,7 @@ If FILE begins with `-' the -s switch is mandatory.
            ((string=? arg "--listen")   ; start a repl server
             (parse args
-                (cons '(@@ (system repl server) (spawn-server)) out)))
+                   (cons '((@@ (system repl server) spawn-server)) out)))
            ((string-prefix? "--listen=" arg) ; start a repl server
@@ -336,14 +336,12 @@ If FILE begins with `-' the -s switch is mandatory.
                  ((string->number where) ; --listen=PORT
                   => (lambda (port)
                        (if (and (integer? port) (exact? port) (>= port 0))
-                           `(@@ (system repl server)
-                                (spawn-server
-                                 (make-tcp-server-socket #:port ,port)))
+                           `((@@ (system repl server) spawn-server)
+                             ((@@ (system repl server) make-tcp-server-socket) 
#:port ,port))
                            (error "invalid port for --listen"))))
                  ((string-prefix? "/" where) ; --listen=/PATH/TO/SOCKET
-                  `(@@ (system repl server)
-                       (spawn-server
-                        (make-unix-domain-server-socket #:path ,where))))
+                  `((@@ (system repl server) spawn-server)
+                    ((@@ (system repl server) make-unix-domain-server-socket) 
#:path ,where)))
                   (error "unknown argument to --listen"))))

>From 9186a57acc30b99ddb93cac0168910222a30a366 Mon Sep 17 00:00:00 2001
From: Ian Price <address@hidden>
Date: Wed, 19 Sep 2012 17:40:17 +0100
Subject: [PATCH 2/2] Fix typo in scheme-using.texi

* doc/ref/scheme-using.texi (System Commands): Fix typo.
 doc/ref/scheme-using.texi |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/doc/ref/scheme-using.texi b/doc/ref/scheme-using.texi
index 3d43913..7eb84de 100644
--- a/doc/ref/scheme-using.texi
+++ b/doc/ref/scheme-using.texi
@@ -457,7 +457,7 @@ show a short error printout.
 Default values for REPL options may be set using
 @code{repl-default-option-set!} from @code{(system repl common)}:
address@hidden {Scheme Procedure} repl-set-default-option! key value
address@hidden {Scheme Procedure} repl-default-option-set! key value
 Set the default value of a REPL option.  This function is particularly
 useful in a user's init file.  @xref{Init File}.
 @end deffn

reply via email to

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