This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
parameters not working?
- From: mikel evins <mevins at me dot com>
- To: Kawa mailing list <kawa at sourceware dot org>
- Cc: mikel evins <mevins at me dot com>, Per Bothner <per at bothner dot com>
- Date: Tue, 13 May 2014 20:19:02 -0500
- Subject: parameters not working?
- Authentication-results: sourceware.org; auth=none
- References: <9F312D97-98C6-4F47-BDD9-B6CAF3868A28 at me dot com> <5371CFD0 dot 7070708 at bothner dot com> <7D1A5D60-5997-4B7A-9176-8F6FA315F016 at me dot com> <ED4375FE-30EE-4ABC-A9DC-2C6C4D67A87A at me dot com> <54132084-D633-4AAA-B2A4-9008FF37F779 at me dot com>
My next issue: parameters appear to work fine in interactive sessions from loaded files, but not in required or compiled files.
More specifically, if I define a parameter like so:
(define foo (make-parameter #f))
at the top level of a source file and then require or compile that file, I will find at run time that foo is bound to a null pointer.
I assume that this is because requiring or compiling the source file does not execute the toplevel forms (unless it's the main file).
Am I guessing correctly about the execution model of required and compiled code? If so, how are parameters meant to be used in compiled code?
(Where's eval-when when you need it? ;-)