Re: [Scheme-reports] "include" filename resolution
Eli Barzilay 12 Aug 2011 20:38 UTC
7 minutes ago, Andy Wingo wrote:
> Guile does something terrible here.
> [...]
> (define-syntax load
> (make-variable-transformer
> (lambda (x)
> (let* ((src (syntax-source x))
> (file (and src (assq-ref src 'filename)))
> (dir (and (string? file) (dirname file))))
> (syntax-case x ()
> ((_ arg ...)
> #`(load-in-vicinity #,(or dir #'(getcwd)) arg ...))
> (id
> (identifier? #'id)
> #`(lambda args
> (apply load-in-vicinity #,(or dir #'(getcwd)) args))))))))
This is asking for trouble: what if you have (define myload load)? It
looks like it's trying to do the right thing and use *that* mention of
`load', but `myload' is pre-wired to that mention, which means that to
abstract over `load' I now need to write a macro.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports