This directory holds compatibility files for hosting under plt-r5rs,
the r5rs-compatible language provided by PLT Scheme v4.

The setup process mutates bindings in the standard environment
(e.g. load); to allow this in PLT Scheme v4.1.5, one must start
plt-r5rs using the --no-prim flag.

To select these compatibility files when setting up the Larceny build
environment, use 'plt-r5rs as the 'scheme: argument to the setup
procedure in setup.sch.

The follow shell and REPL interactions illustrate the above
instructions showing a load of the Larceny build environment (in R5RS
support mode).

  % /usr/local/lib/plt/bin/plt-r5rs --no-prim
  Welcome to MzScheme v4.1.5 [3m], Copyright (c) 2004-2009 PLT Scheme Inc.
  R5RS legacy support loaded
  > (load "setup.sch")
  > (setup 'scheme: 'plt-r5rs 'host: 'linux86)
  Loading PLT-R5RS compatibility package.
  src/Build/expander.sch
  src/Build/config.sch
  #t
  > 


----

These compatibilty files have also been used with DrScheme v372 when
using the "Standard (R5RS)" language level.  To use these files with
DrScheme v4.1.5 using the "R5RS" language level (under "Legacy"),
first uncheck the "Disallow redefinition of initial bindings" checkbox
in the Details section of the Language menu (this is analogous to
passing the --no-prim option when running plt-r5rs).

Note that these compatility files do not work when invoking PLT Scheme
via the mzscheme application.

----

This compatibility layer has been explicitly designed to be a thin
veneer over the Compat/MzScheme/ compatibility layer.  The only one of
any real interest, compat.sch, uses PLT's special #%require form to
import several non-R5RS procedures into the top-level environment;
after all anticipated dependencies have been satisified, the file
dispatches to load the Compat/MzScheme/compat.sch file.

There are a number of other files in here, but they all immediately
load their counterparts in Compat/MzScheme.

----

The main disadvantage of this design is that changes to
Compat/MzScheme/ code could necessitate changes to
Compat/PLT-R5RS/compat.sch (or elsewhere).  The main advantage is
conceptual simplicity for this compatibility layer.
