[plt-scheme] my solution to printing out module provides

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Mon Jul 2 18:11:27 EDT 2007

Oops,  I forgot about those :)  Thanks

Corey

On 7/2/07, Jos Koot <jos.koot at telefonica.net> wrote:
> Hi,
>
> I am afraid it does not work for provides hidden in a syntax as in
>
> (module a mzscheme
>  (define-syntax define/provide
>   (syntax-rules ()
>    ((_ (x y ...) . z) (begin (define (x y ...) . z) (provide x)))
>    ((_ x y) (begin (define x y) (provide x)))))
>  (define/provide y 1)
>  (define/provide (incy) (set! y (add1 y))))
>
> :) Jos
>
> ----- Original Message -----
> From: "Corey Sweeney" <corey.sweeney at gmail.com>
> To: "PLT-list" <plt-scheme at list.cs.brown.edu>
> Sent: Monday, July 02, 2007 11:37 PM
> Subject: [plt-scheme] my solution to printing out module provides
>
>
> > Here's my solution to displaying the index of module "provides" in a
> > printable format, if anyone wants to use it for themselfs:
> >
> > ;list your files here
> > (define files
> >  (list "file1.ss"
> >        "file2.ss"))
> >
> > (display "NOTE: IF THERES A MULTIMEDIA FILE IN YOUR FILE LIST, YOUR
> > SCREWED!  don't attempt multimedia files :)")
> >
> > (map (lambda (x)
> >        (let ([file-contents (read (open-input-file x))])
> >          (append (list (second file-contents))
> >                  (filter (lambda (a) (and (list? a)
> >                                           (< 1 (length a))
> >                                           (equal? 'provide (first a))))
> >                          file-contents))))
> >      files)
> >
> >
> > Corey
> >
> > --
> > ((lambda (y) (y y)) (lambda (y) (y y)))
> > _________________________________________________
> >  For list-related administrative tasks:
> >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
>


-- 
((lambda (y) (y y)) (lambda (y) (y y)))


Posted on the users mailing list.