unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Problems with LOAD and latest build
@ 2009-08-29 15:49 Barry Fishman
  2009-08-30 14:17 ` Andy Wingo
  0 siblings, 1 reply; 6+ messages in thread
From: Barry Fishman @ 2009-08-29 15:49 UTC (permalink / raw)
  To: guile-devel

This concerns an August 28 build of guile master.

I have a simple syntax definition:

(define-syntax dotimes
  (syntax-rules ()
    ((dotimes (<var> <count>) <body> ...)
     (let ((count <count>))
       (let loop ((<var> 0))
	 (if (< <var> count)
	     (begin
	       <body> ...
	       (loop (+ <var> 1)))
	     #f))))
    ((dotimes (<var> <count> <return>) <body> ...)
     (let ((count <count>))
       (let loop ((<var> 0))
	 (if (< <var> count)
	     (begin
	       <body> ...
	       (loop (+ <var> 1)))
	     <return>))))))

If I store it in a file "dotimes.scm" and use the script "tryme"

#! /bin/sh
# -*- scheme -*-
exec guile -s "$0" $*
!#

(load "dotimes.scm")

(dotimes (indx 5)
  (display indx)
  (newline))

I get the following output:

$ ./tryme
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling ./tryme
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home2/barry/work/tryme.go
;;; compiling dotimes.scm
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home2/barry/work/dotimes.scm.go
ERROR: In procedure module-lookup:
ERROR: unbound variable: indx

Also (from a clean cache)

$ guile
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling /home/util64/guile/share/guile/1.9/ice-9/readline.scm
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home/util64/guile/share/guile/1.9/ice-9/readline.scm.go
Guile Scheme interpreter 0.5 on Guile 1.9.2
Copyright (C) 2001-2008 Free Software Foundation, Inc.

Enter `,help' for help.
scheme@(guile-user)> (load "tryme")
;;; compiling tryme
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home2/barry/work/tryme.go
;;; compiling dotimes.scm
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home2/barry/work/dotimes.scm.go
ERROR: In procedure module-lookup:
ERROR: unbound variable: indx
scheme@(guile-user)>

And from a clean cache:

$ guile
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling /home/util64/guile/share/guile/1.9/ice-9/readline.scm
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home/util64/guile/share/guile/1.9/ice-9/readline.scm.go
Guile Scheme interpreter 0.5 on Guile 1.9.2
Copyright (C) 2001-2008 Free Software Foundation, Inc.

Enter `,help' for help.
scheme@(guile-user)> (load "dotimes.scm")
;;; compiling dotimes.scm
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home2/barry/work/dotimes.scm.go
scheme@(guile-user)>
$ ./tryme
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling ./tryme
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home2/barry/work/tryme.go
ERROR: In procedure module-lookup:
ERROR: unbound variable: indx
$

But (also with a clean cache):

$ guile
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling /home/util64/guile/share/guile/1.9/ice-9/readline.scm
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home/util64/guile/share/guile/1.9/ice-9/readline.scm.go
Guile Scheme interpreter 0.5 on Guile 1.9.2
Copyright (C) 2001-2008 Free Software Foundation, Inc.

Enter `,help' for help.
scheme@(guile-user)> (load "dotimes.scm")
;;; compiling dotimes.scm
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home2/barry/work/dotimes.scm.go
scheme@(guile-user)> (load "tryme")
;;; compiling tryme
;;; compiled /home2/barry/.cache/guile/ccache/1.9-0.D-LE-8/home2/barry/work/tryme.go
0
1
2
3
4
#f
scheme@(guile-user)>
$ ./tryme
0
1
2
3
4
$

-- 
Barry Fishman





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-03 16:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-29 15:49 Problems with LOAD and latest build Barry Fishman
2009-08-30 14:17 ` Andy Wingo
2009-08-30 15:54   ` Barry Fishman
2009-08-31  8:46   ` Ludovic Courtès
2009-09-03  8:43     ` Andy Wingo
2009-09-03 16:14       ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).