Skip to content
R7RS libraries in R6RS library format
Scheme Shell
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
docs
lib-base
lib-r6rs
lib
load
src/srfi
tests
.gitignore
README

README

R7RS-bridge Project
===================

R7RS-bridge project is a research project which aims to:

 - Prepare R6RS library which implements R7RS small language
 - Tryout R7RS small language by implementing various library

Non-Implemented Features
------------------------

- cond-expand
- port-open?, char-ready?, u8-ready?

Supported Implementation
------------------------

- nmosh / mosh ( http://github.com/higepon/mosh )

We use nmosh as a baseline interpreter.

- Vicare (0.2d3-1)
  Unsupported features: 
    load, repl

- Guile 2.x (2.0.3)
  Unsupported features: 
    load, repl
    cond-expand (SRFI-0)

- Petite Chez Scheme 8.x (8.4)
  Unsupported features: 
    load, repl
    get-environment-variables (SRFI-98)

- IronScheme (1.0 RC6)
  Unsupported features:
    load, repl
    Compile (pre-expand program/library)

- Sagittarius (0.2.2)
  Unsupported features:
    load, repl
    weak-vectors

- Larceny (0.98b1)
  Unsupported features:
    load with environment
    repl
    Compile (pre-expand program/library)
    char-ready? for string port
    u8-ready? for bytevector port

- (Other R6RS, except Racket)

Racket cannot use R6RS libraries without #!r6rs marker.
TODO: Test other R6RS impl and list here..

- "Patched" chibi-scheme ( https://github.com/okuoku/chibi-scheme )

Original chibi-scheme cannot recognize the file with ".sls" extension as a
library.


How to use
----------

 - MOSH -

   nmosh --loadpath=lib-r6rs:lib SCRIPT.SPS

 - VICARE -

   vicare -L lib-r6rs -L lib SCRIPT.SPS
   (--r6rs-repl SCRIPT.SPS needed under some circumstances..)

 - GUILE -

   guile -l load/guile.scm SCRIPT.SPS

 - CHEZ SCHEME -

   petite --libdirs lib-r6rs:lib --libext sls --program SCRIPT.SPS

   In Win32, use --libdirs lib-r6rs;lib (semicolon)

 - IronScheme -

   IronScheme.Console.exe load/ironscheme.scm SCRIPT.SPS

 - Sagittarius Scheme -

   sash -Llib-r6rs -Llib -Lload/sagittarius SCRIPT.SPS

 - Larceny -

   larceny -r6rs -path lib-r6rs:lib -program SCRIPT.SPS

   In Win32, use --libdirs lib-r6rs;lib (semicolon)

 - Patched chibi-scheme -

   chibi-scheme -Ilib SCRIPT.SPS


Library format
--------------

"R7RS-bridge" formatted libraries are valid R6RS library with R7RS friendly
structure.

   (library (example library)
            (export func)
            (import (scheme base)
                    (another library))
            (begin
               ;;; Library content ....

               ))

Note that the "export - import - begin" sequence is mandatory for compatibility
with R7RS. (ie. don't forget to add a begin around library body...)

In this format, just replacing s/library/define-library/ will create valid
R7RS library.

In library entry, you cannot use R6RS-only reader syntax. Namely:

   Bytevectors:   #vu8( ... ) notation is not supported by R7RS.
   Flags:         #!r6rs ...
   Syntax, Quasi-syntax: #'...


R6RS Backend Libraries
----------------------

surfage - win32 patched version of Surfage library.

 Source : https://github.com/dharmatech/surfage
 License: Checking (BSD like)


TESTS
-----

chibi-scheme - chibi-scheme R7RS tests
 Source : chibi-scheme
 License: Unknown. (chibi-scheme + R7RS)

laceny-R6RS - R6RS benchmarks
 Source : (Larceny)
 License: Unknown. 


Something went wrong with that request. Please try again.