On this page:
http://wiki.call-cc.org/man/5/Modules

Following these instructions:

   If you want to keep macro-definitions in a separate file, use import
   libraries:

   % csc -s hello.scm -j test % csc -s test.import.scm

I get 'unbound variable' for both hello and greet.
My own user error?  Or does something (perhaps doc) need updating?

dortmann@dortmann-linux2:ssax$ cat hello.scm
;; hello.scm

(module test (hello greet)
  (import scheme)

  (define-syntax greet
    (syntax-rules ()
      ((_ whom)
       (begin
         (display "Hello, ")
         (display whom)
         (display " !\n") ) ) ) )

  (define (hello)
    (greet "world") )  )
dortmann@dortmann-linux2:ssax$ rlwrap csi
CHICKEN
(c) 2008-2020, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.2.0 (rev 317468e4)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]

Type ,? for help.
#;1> ,l hello.so
; loading hello.so ...
#;1> (import test)
; loading /usr/local/chicken-5.2.0/lib/chicken/11/test.import.so ...
; loading /usr/local/chicken-5.2.0/lib/chicken/11/chicken.condition.import.so ... ; loading /usr/local/chicken-5.2.0/lib/chicken/11/chicken.irregex.import.so ...
; loading /usr/local/chicken-5.2.0/lib/chicken/11/chicken.port.import.so ...
; loading /usr/local/chicken-5.2.0/lib/chicken/11/chicken.pretty-print.import.so ... ; loading /usr/local/chicken-5.2.0/lib/chicken/11/chicken.process-context.import.so ... ; loading /usr/local/chicken-5.2.0/lib/chicken/11/chicken.string.import.so ...
; loading /usr/local/chicken-5.2.0/lib/chicken/11/chicken.time.import.so ...
#;2> (hello)

_*Error: unbound variable: hello*_

        Call history:

        <syntax>          (hello)
_*        <eval>    (hello)       <--*_
#;2> (greet "you")

_*Error: unbound variable: greet*_

        Call history:

        <syntax>          (greet "you")
_*        <eval>    (greet "you") <--*_
#;2>

Reply via email to