[plt-scheme] Re: plt-scheme Digest, Vol 9, Issue 14

From: Robby Findler (robby at cs.uchicago.edu)
Date: Thu May 11 20:46:38 EDT 2006

Just in case you've not seen it, you probably want to check this out:

http://www.htus.org/Book/Staging/how-to-use-modules/

Robby

At Thu, 11 May 2006 18:18:09 -0400, Matthias Felleisen wrote:
> If they are in separate files, you need to use file syntax in the 
> require statement : "platonic-letter.ss". -- Matthias
> 
> 
> On May 11, 2006, at 6:14 PM, geb a wrote:
> 
> > Ok,
> > I am getting an error:
> > require: unknown module: platonic-letter
> >
> > The files are exactly as you typed and in the same
> > directory.  I ran the program in module.
> >
> > Am I missing something?
> >
> > Dan
> >
> > --- Matthias Felleisen <matthias at ccs.neu.edu> wrote:
> >
> >> 1. You must require the module.
> >> 2. You must export the structure definition.
> >>
> >> (module platonic-letter mzscheme
> >>    (define-struct letter(instance))
> >>    (define letters
> >>        (map make-letter '(a b c d e f g)))
> >>    (provide (struct letter (instance)) letters)
> >> )
> >>
> >>
> >> (module slip mzscheme
> >>    (require platonic-letter)
> >>    (provide (all-from platonic-letter))
> >>    (map letter-instance letters))
> >>
> >> -- Matthias
> >>
> >>
> >> On May 11, 2006, at 5:50 PM, geb a wrote:
> >>
> >>> Hello...
> >>>
> >>> Can someone tell me why I can't use structure
> >>> accessors for letters in module slip?
> >>>
> >>> Thank you for your time.
> >>>
> >>> Sincerely,
> >>>
> >>> Dan
> >>>
> >>> (module platonic-letter mzscheme
> >>>   (define-struct letter(instance))
> >>>   (define letters
> >>>       (map make-letter '(a b c d e f g)))
> >>>   (provide letter letters)
> >>> )
> >>>
> >>>
> >>> (module slip mzscheme
> >>>   (provide (all-from "platonic-letter.ss"))
> >>>   (map letter-instance letters))
> >>>
> >>> __________________________________________________
> >>> Do You Yahoo!?
> >>> Tired of spam?  Yahoo! Mail has the best spam
> >> protection around
> >>> http://mail.yahoo.com
> >>> _________________________________________________
> >>>   For list-related administrative tasks:
> >>>
> >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >>
> >>
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> 
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.