Discussion:
[Chicken-users] functor support (C5)
Jörg F. Wittenberger
2018-08-25 16:50:44 UTC
Permalink
Hi all,

I tried to package an egg exporting a functor.
for reference here: https://github.com/0-8-15/ldif-sexpr

`include` is literally copied to the .import.scm file

The actual code of the functor is in its own file, which is included here
https://github.com/0-8-15/ldif-sexpr/blob/master/ldif-core.scm
around line 33.

This results in the include directive ending up compiled into the import
library. Importing and instancing the functor will work if, and only if,
the named file is found. Along whatever search path whatever content is
found. Intuitively I'd say this defeats the idea of compiling the import
library in the first place.

BTW: Did anything change about the line number information with Chicken 5?
If so, I would have to re-check. Last time, maybe about a year ago when I
tried Chicken 4 functor instances where a pain in the butt when it comes to
error messages. Line numbers pertaining to errors within functors where
always be given as the line of the functor instantiation.

Best

/Jörg

Loading...