[racket] Question about package, library and module

From: prad (prad at towardsfreedom.com)
Date: Fri Dec 17 13:53:45 EST 2010

On Fri, 17 Dec 2010 06:20:47 -0700
Matthew Flatt <mflatt at cs.utah.edu> wrote:

> Putting "utils.rkt" in a "collects" directory like
> "~/.racket/5.0.2/collects" doesn't work because a single file cannot
> be a collection. Instead, create "utils/main.rkt".
>
thx for the great explanation, matt!
it all worked perfectly according to your instruction, though i had
erred setting up the module initially. once i rewrote it as follows:

(module utils racket
  (provide rp)

  (define (rp ostr lst)
    (apply format ostr lst)))

as per 6.2 module_syntax

instead of the way it is for 6.1 module_basics:

(provide rp)

(define (rp ostr lst)
  (apply format ostr lst)))

which seems to be for a file to which you provide a direct path as in
(require "utils.rkt")


many thanks!


-- 
In friendship,
prad

                                      ... with you on your journey
Towards Freedom
http://www.towardsfreedom.com (website)
Information, Inspiration, Imagination - truly a site for soaring I's




Posted on the users mailing list.