chicken-janitors
[Top][All Lists]
Advanced

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

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


From: Chicken Trac
Subject: [Chicken-janitors] #940: Cannot unset read syntax
Date: Wed, 24 Oct 2012 21:11:03 -0000

#940: Cannot unset read syntax
---------------------+------------------------------------------------------
 Reporter:  megane   |       Owner:         
     Type:  defect   |      Status:  new    
 Priority:  minor    |   Milestone:  someday
Component:  unknown  |     Version:  4.8.x  
 Keywords:           |  
---------------------+------------------------------------------------------
 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")        <--
 }}}

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/940>
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]