[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pre-200 MzScheme compatibility package
`require' has a different semantics than `require-library'. `require'
expects the file to contain a module and `require-library' didn't. So,
your definition of the `require-library' macro should probably expand
to load (and with some caching, like require-library used to do).
It is going to be quite tricky to maintain a single set of sources that
work in 103 and 199. I'm not sure how sucessful you are going to be, to
do that.
Robby
Quoting Alexey Mahotkin:
> >>>>> "MF" == Matthew Flatt <mflatt@cs.utah.edu> writes:
>
> >> Matthew Flatt may have prepared a guide for the 100->199
> >> transition that he wants to share, I'm not sure.
>
> MF> plt/notes/mzscheme/MzScheme_200.txt contains (still growing)
> MF> conversion notes.
>
>
> Ok, I've started writing compat.scm myself (is there a sense to
> publish it when it matures for inclusion into stock MzScheme?).
>
> A question: I've reimplemented `require-library' via
>
> (define-syntax require-library
> (syntax-rules ()
> ((require-library <library> <collection>)
> ;;=>
> (require (lib <library> <collection>)))))
>
> (provide require-library)
>
>
> It works, but `(require-library "calendar.scm" "local")' gives:
>
> require: unknown module in: |,/usr/local/opt/local/bin/collects/local/calendar|
>
> Yes, `calendar.scm' does not contain any module/unit stuff in it and
> is simply a sequence of `(define ...)'.
>
> If I wrap that into (module ... ), it works, but I do not want to edit
> the files as we will use then with older MzScheme for some time yet.
> How could I implement `require' functionality with plain .scm files?
>
>
> Thank you,
>
> --alexm