chicken-janitors
[Top][All Lists]
Advanced

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

Re: [Chicken-janitors] #940: Cannot unset read syntax


From: Chicken Trac
Subject: Re: [Chicken-janitors] #940: Cannot unset read syntax
Date: Wed, 31 Oct 2012 20:58:38 -0000

#940: Cannot unset read syntax
----------------------+-----------------------------------------------------
  Reporter:  megane   |       Owner:         
      Type:  defect   |      Status:  closed 
  Priority:  minor    |   Milestone:  someday
 Component:  unknown  |     Version:  4.8.x  
Resolution:  fixed    |    Keywords:         
----------------------+-----------------------------------------------------
Changes (by sjamaan):

  * status:  new => closed
  * resolution:  => fixed


Old description:

> This error only shows up with the interpreter.
>
> I've attached a patch.
>
> {{{
> (set-read-syntax!
>  #\!
>  (lambda (port)
>    (read-string 3 port)))
>
> (print (string? !foo))
>
> (set-read-syntax! #\! #f) ; <- try to unset
> (print "here")
> (print (string? !foo))
>
> ;; ; loading bug.scm ...
> ;; #t
> ;; here
>
> ;; Error: call of non-procedure: #f
>
> ;;      Call history:
>
> ;;      parley.scm:587: set-port-name!
> ;;      <syntax>          (set-read-syntax! #\! (lambda (port) (read-
> string 3 port)))
> ;;      <syntax>          (lambda (port) (read-string 3 port))
> ;;      <syntax>          (##core#lambda (port) (read-string 3 port))
> ;;      <syntax>          (##core#begin (read-string 3 port))
> ;;      <syntax>          (read-string 3 port)
> ;;      <eval>    (set-read-syntax! #\! (lambda (port) (read-string 3
> port)))
> ;;      <eval>    (read-string 3 port)
> ;;      <syntax>          (print (string? "foo"))
> ;;      <syntax>          (string? "foo")
> ;;      <eval>    (print (string? "foo"))
> ;;      <eval>    (string? "foo")
> ;;      <syntax>          (set-read-syntax! #\! #f)
> ;;      <eval>    (set-read-syntax! #\! #f)
> ;;      <syntax>          (print "here")
> ;;      <eval>    (print "here")        <--
> }}}

New description:

 This error only shows up with the interpreter.

 I've attached a patch.

 {{{
 (set-read-syntax!
  #\!
  (lambda (port)
    (read-string 3 port)))

 (print (string? !foo))

 (set-read-syntax! #\! #f) ; <- try to unset
 (print "here")
 (print (string? !foo))

 ;; ; loading bug.scm ...
 ;; #t
 ;; here

 ;; Error: call of non-procedure: #f

 ;;      Call history:

 ;;      parley.scm:587: set-port-name!
 ;;      <syntax>          (set-read-syntax! #\! (lambda (port) (read-
 string 3 port)))
 ;;      <syntax>          (lambda (port) (read-string 3 port))
 ;;      <syntax>          (##core#lambda (port) (read-string 3 port))
 ;;      <syntax>          (##core#begin (read-string 3 port))
 ;;      <syntax>          (read-string 3 port)
 ;;      <eval>    (set-read-syntax! #\! (lambda (port) (read-string 3
 port)))
 ;;      <eval>    (read-string 3 port)
 ;;      <syntax>          (print (string? "foo"))
 ;;      <syntax>          (string? "foo")
 ;;      <eval>    (print (string? "foo"))
 ;;      <eval>    (string? "foo")
 ;;      <syntax>          (set-read-syntax! #\! #f)
 ;;      <eval>    (set-read-syntax! #\! #f)
 ;;      <syntax>          (print "here")
 ;;      <eval>    (print "here")        <--
 }}}

--

Comment:

 Fixed by 399f9968848c2dc1d0d7e94df5e2c5a699934e53 (what a pretty commit
 id... so many 9s)

 Thanks!

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/940#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

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