[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Exporting proc and macro that references it?
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] Exporting proc and macro that references it? |
Date: |
Mon, 5 Jul 2010 13:25:51 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Mon, Jul 05, 2010 at 01:04:02PM +0200, Alejandro Forero Cuervo wrote:
>
> Am I doing something wrong? I've tried various combinations of 'use',
> 'import', 'require-library', 'import-for-syntax' and
> 'require-extension' to no avail. How does one make a macro transform
> a form into a call to a procedure from its own module (that the module
> exports)?
I didn't get the error you're getting, but I think what you need is this
section from the manual:
"EXPORT may be a symbol or a list of the form
(IDENTIFIER1 IDENTIFIER2 ...). In the former case the identifier given
is exported from the module and can be imported at the toplevel or in
other modules. The latter case exports IDENTIFIER1 (which should name
a macro) and also arranges for the remaining identifiers in the list
to be visible in the expansion of the macro (this is a hint to the
module expander to export bindings referenced by syntax-definitions
which make use of them, but which would normally be internal to the
module - which gives more opportunities for optimization)."
--- http://chicken.wiki.br/man/4/Modules%20and%20macros
In other words, do (module embedded-test ((test register)) ...)
I think it worked because the code you pasted in the mail also exported
REGISTER, which your real code perhaps does not?
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
- [Chicken-users] Compiling files that 'import' eggs that aren't installed?, Alejandro Forero Cuervo, 2010/07/03
- [Chicken-users] Re: Compiling files that 'import' eggs that aren't installed?, Alejandro Forero Cuervo, 2010/07/03
- Re: [Chicken-users] Compiling files that 'import' eggs that aren't installed?, Thomas Chust, 2010/07/03
- [Chicken-users] Re: Compiling files that 'import' eggs that aren't installed?, Felix, 2010/07/03
- [Chicken-users] Re: Compiling files that 'import' eggs that aren't installed?, Alejandro Forero Cuervo, 2010/07/04
- [Chicken-users] How to load an extension?, Alejandro Forero Cuervo, 2010/07/04
- [Chicken-users] bug in let-optionals in 4.5.0?, Alejandro Forero Cuervo, 2010/07/04
- [Chicken-users] Exporting proc and macro that references it?, Alejandro Forero Cuervo, 2010/07/05
- Re: [Chicken-users] Exporting proc and macro that references it?,
Peter Bex <=
- Re: [Chicken-users] Exporting proc and macro that references it?, Alejandro Forero Cuervo, 2010/07/05
- Re: [Chicken-users] Exporting proc and macro that references it?, Peter Bex, 2010/07/05
- Re: [Chicken-users] Exporting proc and macro that references it?, Alejandro Forero Cuervo, 2010/07/05
- Re: [Chicken-users] Exporting proc and macro that references it?, Alejandro Forero Cuervo, 2010/07/05
- Re: [Chicken-users] Exporting proc and macro that references it?, Stephen Eilert, 2010/07/05
- Re: [Chicken-users] Exporting proc and macro that references it?, Felix, 2010/07/05
- Re: [Chicken-users] Exporting proc and macro that references it?, Alejandro Forero Cuervo, 2010/07/05
- Re: [Chicken-users] bug in let-optionals in 4.5.0?, Felix, 2010/07/05
- Re: [Chicken-users] bug in let-optionals in 4.5.0?, Alejandro Forero Cuervo, 2010/07/05
- Re: [Chicken-users] bug in let-optionals in 4.5.0?, Felix, 2010/07/06