[plt-dev] Using the `include' macro from R6RS code [retry]
Sorry that I overlooked this before.
The issue is not pairs, but that you need the `lib' binding to go with
`include'. You can import `lib' using `(only (scheme base) lib)'.
At Mon, 14 Dec 2009 21:20:27 +0100, Andreas Rottmann wrote:
> Hi!
>
> [ This is a re-send of my mail from 3rd December
> (http://thread.gmane.org/gmane.lisp.scheme.plt/37267), I thought I'd
> retry in case the initial mail has been overlooked by the PLT R6RS
> Gurus ]
>
> Regarding the R6RS SRFIs, I just noticed that SRFI-67 needs a separate
> R6RS version as well. There already is
> collects/srfi/67/compare-reference.scm, which contains the reference
> implementation for SRFI-67.
>
> Ideally, I'd just include that file from an R6RS library, and I'm
> done. But it seems that `include' from scheme/base doesn't work from
> R6RS code, probably due to mutable pair issues:
>
> /home/rotty/tmp/=plt-collects/srfi/%3a67.ss:24:11: include: not a
> pathname string, `file' form, or `lib' form for file at: (lib
> "srfi/67/compare-reference.scm") in: (include (lib
> "srfi/67/compare-reference.scm"))
>
> The relevant code:
>
> #!r6rs
> (library (srfi :67)
> (export </<=? ...)
> (import (except (rnrs base) error)
> (rnrs r5rs) ; for modulo
> (srfi :27 random-bits) ; for random-integer
> (srfi :23 error)
> (scheme include))
> (include (lib "srfi/67/compare-reference.scm")))
>
> So, how can I include a file from R6RS code, when the regular include
> won't work?
>
> Regards, Rotty
> --
> Andreas Rottmann -- <http://rotty.yi.org/>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-dev