1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-21 03:00:19 +02:00

set names of functions defined at the toplevel from `eval'

* module/ice-9/eval.scm (primitive-eval): Set the name of
  toplevel-defined functions.
This commit is contained in:
Andy Wingo 2011-11-15 23:38:40 +01:00
parent f3cf9421cb
commit ee15aa46e3
2 changed files with 10 additions and 2 deletions

View file

@ -26,7 +26,12 @@
(eq? 'display (procedure-name display)))
(pass-if "gsubr"
(eq? 'hashq-ref (procedure-name hashq-ref))))
(eq? 'hashq-ref (procedure-name hashq-ref)))
(pass-if "from eval"
(eq? 'foobar (procedure-name
(eval '(begin (define (foobar) #t) foobar)
(current-module))))))
(with-test-prefix "procedure-arity"