bug#36682: Error in Guile scripting examples

2022-12-12 Thread Maxim Cournoyer
Hi, Maxim Cournoyer writes: [...] > I have the following two files: > > fact: > > #!/run/current-system/profile/bin/guile \ > -e main -s > !# > (define-module (fact) > #:export (fact)) > > (define (fact n) > (if (zero? n) 1 > (* n (fact (- n 1) > > (define (main args) > (display (f

bug#36682: Error in Guile scripting examples

2022-12-12 Thread Maxim Cournoyer
Hello, Arne Babenhauserheide writes: > Hello Hans-Werner Roitzsch, > > It looks like you’re mixing up two concepts: the fac creates a module > and loads the fact which is not a module, so basically main and choose > live in another namespace than fact (define-module starts a new > namespace). >

bug#36682: Error in Guile scripting examples

2019-07-15 Thread Arne Babenhauserheide
Hello Hans-Werner Roitzsch, It looks like you’re mixing up two concepts: the fac creates a module and loads the fact which is not a module, so basically main and choose live in another namespace than fact (define-module starts a new namespace). And it seems that this is indeed a bug in the docume

bug#36682: Error in Guile scripting examples

2019-07-15 Thread Hans-Werner Roitzsch
Hello GNU Team! I wish to report a bug in either Guile's documentation or Guile's code with regard to running scripts. There are some examples of that given in Guile's documentation at: https://www.gnu.org/software/guile/manual/html_node/Scripting-Examples.html#Scripting-Examples In the followi