chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is part of the wiki's hello world example broken?


From: Daniel Ortmann
Subject: Re: is part of the wiki's hello world example broken?
Date: Mon, 6 Apr 2020 17:26:57 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

Sorry.  I needed to load the test.import.so ... I was too hasty in my email.

On 4/6/20 5:16 PM, Daniel Ortmann wrote:
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

[Prev in Thread] Current Thread [Next in Thread]