Re: Question about porting mzscheme code
"D. O'Keeffe" <[email protected]> 18 Feb 2009 16:28:42 +0000
| Newsgroups | gmane.comp.java.sisc.user |
|---|---|
| Message-ID | <[email protected]> |
Hey Scott, Yes that helps a bit, thanks. I thought load would do the importing for me. However when I checked again I noticed I am now getting the same error when I try to use the constructor function for the record i.e. (make-ce-definition 'e 'f) gives: Error undefined variable 'make-ce-definition' I assume that this is because what ever way the module exporting works, it doesn't export the constructor, accessor and predicate functions created by define-struct? Any ideas how to get around this? As an aside, it would be nice if the module export provided some way to export all definitions in the module (e.g. mzscheme has (provide (all-defined))), as opposed to having to list them all explicitly. Thanks, Dan On Feb 18 2009, Scott G. Miller wrote: >> >> My module definition goes something like: >> (module cep-structs >> (ce-definition ce-inst) >> (import record) >> >> (define-struct ce-definition (a b)) >> (define-struct ce-inst (c d)) >> ) >> >> I load the class cep-structs.scm, which seems to work, but when I then >> try and use the loaded definitions (e.g. (display ce-definition)), it >> says Error: undefined variable 'ce-definition' I'm using the Sisc >> interpreter that comes as part of SchemeScript, an Eclipse plugin for >> scheme. > > >Did you issue an (import cep-structs) before the display? > >Scott > ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H