On Jun 19, 2009, at 2:27 AM, Derick Eddington wrote:

That's clever, but it's broken:

Here's another attempt.  All the (for ---) stuff is mocked up of course
just so that larceny does not throw exceptions at uses of free-id=? and
so that PLT does not mark things that are actually bound as unbound.

Aziz,,,

$ cat b/bound.sls b/bound-ctxt.sls
#!r6rs
(library (b bound)
  (export unbound-identifier?)
  (import (for (rnrs) (meta -1)) (for (b bound-ctxt) (meta -1) run))
  (define (unbound-identifier? x)
    (and
       (not (free-identifier=? x #'define))
       (not (free-identifier=? x #'syntax))
       (not (free-identifier=? x #'ctxt))
       (free-identifier=? x ;; for larceny, this must come last
         (datum->syntax ctxt (syntax->datum x))))))

#!r6rs
(library (b bound-ctxt)
  (export ctxt)
  (import (only (rnrs) define syntax))
  (define ctxt #'here))


Reply via email to