[plt-scheme] (unsafe!) results in ffi-lib - already imported

Levi Smith moderntelemachus at gmail.com
Thu Aug 7 02:14:44 EDT 2008


I'm working on an SDL binding for PLT Scheme, and could use a hand
understanding some error messages.

As it currently stands I'm using (require scheme/foreign)(unsafe!) in two
seperate modules, sdl and sdl-gfx. I'm using (provide (all-defined-out))
across the board. When both of the aforementioned modules are *require*d at
the same time, say as might be done in "display-test" module, scheme
complains about ffi-lib already being imported from a different source. For
me this has occured in any situation where I have multiple modules that are
defining foreign libraries.

Removing (unsafe!) from the scheme/foreign import, and placing all the
foreign library definitions defined with ffi-lib within a single module
clears this up however. Is (unsafe!) introducing new bindings into the
lexical context of the module, and if so is the proper solution to abandon
(all-defined-out) for something more specific?

-- Levi Smith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080806/9b260e72/attachment.htm


More information about the plt-scheme mailing list