[plt-scheme] reference to undefined identifier when loading module

From: Terrence Brannon (metaperl at urth.org)
Date: Tue Jul 13 09:06:07 EDT 2004

I created a module called laml.scm:

(module laml mzscheme 

  (define laml-dir "c:/Programs/laml/")
  (display laml-dir)
  (load (string-append laml-dir "laml-init.scm")))

I have a problem when loading it under mzscheme 207:

 > (require (file "laml.scm"))
reference to undefined identifier: laml-dir
 >

1/ Could someone tell me how to fix this?
2/ At some point, I am going to switch to using require() and provide() 
but I wanted to find out why I was having the error I was having.

-- 
  (let recur ((lis x) (k k)) 
    (if (zero? k) (values '() lis) 
	(receive (prefix suffix) (recur (cdr lis) (- k 1)) 
	  (values (cons (car lis) prefix) suffix))))) 



Posted on the users mailing list.