guile-devel
[Top][All Lists]
Advanced

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

[PATCH] r7rs-wip branch: Add reader and print options to support R7RS by


From: Freja Nordsiek
Subject: [PATCH] r7rs-wip branch: Add reader and print options to support R7RS bytevector syntax.
Date: Mon, 19 Jun 2017 01:28:04 +0200

Was fiddling around with using Chibi's R7RS test-suite in Guile and found a major R7RS syntax feature currently missing from Guile. The feature is R7RS bytevector notation, which uses the #u8 prefix like SRFI-4 unsigned 8-bit integer vectors instead of the R6RS prefix #vu8.

I wrote a patch for the r7rs-wip branch (attached) to add and implement reader and print options to enable the use of R7RS bytevector syntax, as well as add unit tests for the options and update the documentation. I made a boolean option for both named 'r7rs-bytevectors to enable the R7RS syntax (default is #f). They syntax options are enabled with

    (read-enable 'r7rs-bytevectors)
    (print-enable 'r7rs-bytevectors)

Turning this syntax option on does mean that SRFI-4 unsigned 8-bit integer vectors cannot be created with the #u8 prefix and that they cannot be distinguished from bytevectors when printed with write or display. The patch adds warnings about this in the Bytevectors and SRFI-4 sections of the documentation.


Freja Nordsiek

Attachment: 0001-Added-read-and-print-options-for-R7RS-bytevector-not.patch
Description: Text Data


reply via email to

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