[plt-scheme] errors when using srfi-1
>>>>> "Alex" == Alex Ott <ott at jet.msk.su> writes:
Alex> For list-related administrative tasks:
Alex> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
Alex> Hello all
Alex> I found one bug in srfi in plt206
Alex> I have code (compatibility mode for our porgramms):
Alex> ----------------------------------------------------------------------
Alex> (module a mzscheme
Alex> (require
Alex> (lib "13.ss" "srfi")
Alex> (lib "1.ss" "srfi")
Alex> )
Alex> (provide
Alex> (all-defined)
Alex> )
Alex> [...]
Alex> but when i load it with (load "a.scm") i get message:
Alex> a.scm:6:2: module: identifier already imported (from a different source) at: reverse! in: (require (lib "13.ss" "srfi") (lib "1.ss" "srfi"))
It's not a bug, it's a feature. See the "SPECIAL NOTE ON SRFI 1" in
the srfi collection documentation:
** SPECIAL NOTE ON SRFI 1 **
Since srfi-1 includes names that collide with mzscheme primitives,
it is available in two forms. The wrapper, (lib "1.ss" "srfi"),
provides names like "map" and "reverse!", and therefore cannot
be required in a module written in the 'mzscheme' language.
The implementation, (lib "list.ss" "srfi" "1"), supplies the
colliding names with a prefix of 's:' (e.g. "s:map", "s:reverse!")
and is therefore suitable for requires in a module. Use the first
if you're writing a top-level program that wants cross-platform
portability, use the second if you're writing a module.
** END OF SPECIAL NOTE **
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla