[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
environments question
From: |
Nic |
Subject: |
environments question |
Date: |
24 Aug 2003 15:39:38 +0100 |
If somefile.scm looks like this:
;; somefile.scm
(define-public (somefunc-defined-in-somefile . args)
(list "some result"))
;; End file.
And I do this in a Guile repl:
(let ((myenv (interaction-environment)))
(eval '((primitive-load "somefile.scm")) myenv)
(eval '((apply 'somefunc-defined-in-somefile (list))) env)
(somefunc-defined-in-somefile (list)))
Should the second call to somefunc-defined-in-somefile work? It does
but I was suprised by that. I thought that I had loaded somefile.scm
in the environment called myenv.
Is there some way to achieve this? To load a scheme file into a
defined environment without the bindings being imported into the very
top level?
--
Nic Ferrier
http://www.tapsellferrier.co.uk
- environments question,
Nic <=