chicken-janitors
[Top][All Lists]
Advanced

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

[Chicken-janitors] Re: #562: Chicken reader does not maintain quotes on


From: Chicken Trac
Subject: [Chicken-janitors] Re: #562: Chicken reader does not maintain quotes on |#:| (was: chicken-doc does not properly index #:)
Date: Sat, 09 Apr 2011 00:12:03 -0000

#562: Chicken reader does not maintain quotes on |#:|
-----------------------------+----------------------------------------------
  Reporter:  zbigniew        |       Owner:  felix                   
      Type:  defect          |      Status:  assigned                
  Priority:  major           |   Milestone:  4.7.0                   
 Component:  core libraries  |     Version:  4.6.x                   
Resolution:                  |    Keywords:  the colossal colon caper
-----------------------------+----------------------------------------------
Changes (by zbigniew):

  * owner:  zbigniew => felix
  * status:  new => assigned
  * component:  extensions => core libraries


Old description:

> The node (chicken read-syntax #:) is not properly indexed.  It can be
> accessed directly but not via the index, because the index entry looks
> like (: (chicken read-syntax)) instead of (|#:| (chicken read-syntax)).
>
> Cause not immediately obvious, read-write invariant is preserved with
> symbol |#:|.
>
> Indirectly reported by mario.

New description:

 string->symbol on |#:| works, but reading it does not.  See comment below.

 This causes node (chicken read-syntax #:) to be not properly indexed.  It
 can be accessed directly but not via the index, because the index entry
 looks like (: (chicken read-syntax)) instead of (|#:| (chicken read-
 syntax)).  Although it is written out correctly initially, once the index
 goes through a read/modify/write cycle (on a different symbol) the |#:|
 becomes #: and then eventually :.

 Indirectly noticed by mario.

--

Comment:

 This is a bug in core.  string->symbol on |#:| works, but reading it does
 not.  It works fine for other symbols, such as |#?|.  This appears to be a
 bug in the reader not the writer.

 {{{
 #;7> (string->symbol "#:")
  ; => |#:|

 (with-input-from-string "((|#:|))" read)
   ; => ((#:))

 #;4> '((|#:|))
  ; => ((#:))

 #;5> '|#:|
  ; => #:

 #;12> (write '|#:|)
  ; => #:

 #;13> (write (string->symbol "#:"))
  ; => |#:|

 (with-input-from-string "((|#?|))" read)
   ; => ((|#?|))

 #;6> '|#?|
  ; => |#?|
 }}}

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