unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Bug in eval-string?
@ 2002-08-08 12:56 rm
  2002-08-08 21:03 ` Marius Vollmer
  2002-08-08 21:27 ` Bug in eval-string? Neil Jerram
  0 siblings, 2 replies; 19+ messages in thread
From: rm @ 2002-08-08 12:56 UTC (permalink / raw)


Hello list,

according to the documentation, 'eval-string' 
evaluation "... takes place in the environment 
returned by the procedure interaction-environment".
Unfortunately this doesn't seem to work for me
(see the following test case):


 tia  Ralf Mattes

------------------------x--------------------------------

;; File: eval-test.scm
;; create an evaluation context
(define boxx (make-module))
(set-module-kind! boxx 'directory)

;; fill it with _some_ bindings
(module-define! boxx 'define define)

(eval '(define meaning-of-life 42) boxx)

;; test the bindings
(eval 'meaning-of-life boxx)

;; => 42

(let ((interaction-environment (lambda () boxx)))
  (format #t "Meaning of life in a box is: ~A\n"
          (eval-string "meaning-of-life")))

;; Backtrace:
;;  16: 1* (let (#) (format #t "Meaning of life in a box is: ~A " #))
;;  17: 2  [simple-format #t "Meaning of life in a box is: ~A " ...
;;  18: 3*  [eval-string "meaning-of-life"]
;; In unknown file:
;;   ?: 4*  meaning-of-life
;;
;; <unnamed port>: In expression meaning-of-life:
;; <unnamed port>: Unbound variable: meaning-of-life
;; ABORT: (unbound-variable)


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2002-08-31 13:51 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-08 12:56 Bug in eval-string? rm
2002-08-08 21:03 ` Marius Vollmer
2002-08-09  9:06   ` Matthias Koeppe
2002-08-09  9:19     ` Marius Vollmer
2002-08-09 10:24       ` Matthias Koeppe
2002-08-10 14:18         ` Marius Vollmer
2002-08-12 18:20           ` Matthias Koeppe
2002-08-13  0:39             ` Marius Vollmer
2002-08-14 19:07               ` Marius Vollmer
2002-08-17 11:09               ` Neil Jerram
2002-08-20 11:39               ` Matthias Koeppe
2002-08-21 19:26                 ` Marius Vollmer
2002-08-27 14:18                   ` Emacs variables (was: Bug in eval-string?) Matthias Koeppe
2002-08-31 13:51                     ` Marius Vollmer
2002-08-08 21:27 ` Bug in eval-string? Neil Jerram
2002-08-09  9:35   ` rm
2002-08-10 14:43     ` Marius Vollmer
2002-08-12 10:49       ` rm
2002-08-13 20:55       ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).