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

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Aug 7 21:34:04 EDT 2008

On Aug  6, Levi Smith wrote:
> 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?

Yes.  When you require the foreign library, the bindings are all
hidden in a way, and (unsafe!) is basically defining them for you.
This doesn't play nicely with all-defined, so you need to provide the
bindings that you create.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.