Mark Carter
2018-08-15 10:11:18 UTC
Chicken scheme has modules, extensions, units, eggs, etc., and I'm
confused as to how it all works.
I have written a module mcutils.scm, containing:
(module
mcutils
(export define-syntax-rule displayln
file->lines hello-utils until)
(import chicken extras scheme)
...
;;; a proc calling read-line
...
)
The calling program, vas-parser.scm, contains the lines:
(include "mcutils.scm")
(use mcutils)
When I execute
csi vas-parser.scm
it all works fine.
I can compile successfully using
csc vas-parser.scm
but when I try to run vas-parser, it says that there is an unbound
variable read-line; which is in unit extras, I believe.
I think that's because the interpreter loads the extras unit
automatically, but the compiler doesn't??
But my module says to import extras, so why doesn't it work?
I must admit, I'm a bit baffled about what distinguishes
include/import/use/require-extension and when to use what under which
circumstances.
confused as to how it all works.
I have written a module mcutils.scm, containing:
(module
mcutils
(export define-syntax-rule displayln
file->lines hello-utils until)
(import chicken extras scheme)
...
;;; a proc calling read-line
...
)
The calling program, vas-parser.scm, contains the lines:
(include "mcutils.scm")
(use mcutils)
When I execute
csi vas-parser.scm
it all works fine.
I can compile successfully using
csc vas-parser.scm
but when I try to run vas-parser, it says that there is an unbound
variable read-line; which is in unit extras, I believe.
I think that's because the interpreter loads the extras unit
automatically, but the compiler doesn't??
But my module says to import extras, so why doesn't it work?
I must admit, I'm a bit baffled about what distinguishes
include/import/use/require-extension and when to use what under which
circumstances.