() [EMAIL PROTECTED] (Ludovic Courtès) () Sun, 07 Oct 2007 16:23:55 +0200 I'm not sure I fully understand what `check-r6rs-library' does (and I don't have `(ice-9 accumulate)' also...).
to give you an idea, i have appended the output of running the `compile-command' (see the Local Variables at eof). the module (ice-9 accumulate) is a "reduced strength (ice-9 q)" that started out as just a pet for hobbit (long term goal: aiming for that cool super-\beta optimization), but turned out to be a good fit in many contexts. My guess is that we'd better rewrite the interpreter altogether (in Scheme or a subset thereof) to have one more "manageable", amenable to deep changes like this... towards this end, another approach is to integrate hobbit and gcc. an interpreter would fall out of that (somewhere, at some point). thi
checking: ex-6-4-macros.r6rs checking: <library> checking: <library-name> ok: <library-name> is `(my-helpers id-stuff)' checking: (export <export-spec> ...) ok: one <export-spec> is `find-dup' ok: (export <export-spec> ...) count: 1 checking: (import <import-spec> ...) checking: <import-set> checking: <library-reference> ok: <library-reference> is `(r6rs)' ok: one <import-set> is `(r6rs)' ok: one <import-spec> is `(r6rs)' ok: (import <import-spec> ...) count: 1 ok: one <definition> is `(define (find-dup l) ...)' ok: rest forms count: 1 ok: <library> syntax ok: known: defs ok: : (lambda (l) (and (pair? l) (let loop ((rest (cdr l))) (cond [ (null? rest) (find-dup (cdr l)) ] [ (bound-identifier=? (car l) (car rest)) (car rest) ] [else (loop (cdr rest)) ])))) ok: known: names ok: : find-dup checking: <library> checking: <library-name> ok: <library-name> is `(my-helpers values-stuff)' checking: (export <export-spec> ...) ok: one <export-spec> is `mvlet' ok: (export <export-spec> ...) count: 1 checking: (import <import-spec> ...) checking: <import-set> checking: <library-reference> ok: <library-reference> is `(r6rs)' ok: one <import-set> is `(r6rs)' ok: one <import-spec> is `(r6rs)' checking: <import-spec> `for' checking: <import-set> checking: <library-reference> ok: <library-reference> is `(my-helpers id-stuff)' ok: one <import-set> is `(my-helpers id-stuff)' ok: one <import-level> is `expand' ok: one <import-spec> is `(for (my-helpers id-stuff) expand)' ok: (import <import-spec> ...) count: 2 ok: one <definition> is `(define-syntax mvlet ...)' ok: rest forms count: 1 ok: <library> syntax ok: known: defs ok: : (lambda (stx) (syntax-case stx () [ (_ [ (id ...) expr] body0 body ...) (not (find-dup (syntax (id ...)))) (syntax (call-with-values (lambda () expr) (lambda (id ...) body0 body ...))) ])) ok: known: names ok: : mvlet checking: <library> checking: <library-name> ok: <library-name> is `(let-div)' checking: (export <export-spec> ...) ok: one <export-spec> is `let-div' ok: (export <export-spec> ...) count: 1 checking: (import <import-spec> ...) checking: <import-set> checking: <library-reference> ok: <library-reference> is `(r6rs)' ok: one <import-set> is `(r6rs)' ok: one <import-spec> is `(r6rs)' checking: <import-set> checking: <library-reference> ok: <library-reference> is `(my-helpers values-stuff)' ok: one <import-set> is `(my-helpers values-stuff)' ok: one <import-spec> is `(my-helpers values-stuff)' checking: <import-set> checking: <library-reference> ok: <library-reference> is `(r6rs r5rs)' ok: one <import-set> is `(r6rs r5rs)' ok: one <import-spec> is `(r6rs r5rs)' ok: (import <import-spec> ...) count: 3 ok: one <definition> is `(define (quotient+remainder n d) ...)' ok: one <definition> is `(define-syntax let-div ...)' ok: rest forms count: 2 ok: <library> syntax ok: known: defs ok: : (lambda (n d) (let ([q (quotient n d) ]) (values q (- n (* q d))))) ok: : (syntax-rules () [ (_ n d (q r) body0 body ...) (mvlet [ (q r) (quotient+remainder n d) ] body0 body ...) ]) ok: known: names ok: : quotient+remainder ok: : let-div ok: ex-6-4-macros.r6rs checking: ex-6-4.r6rs checking: <library> checking: <library-name> ok: <library-name> is `(stack)' checking: (export <export-spec> ...) ok: one <export-spec> is `make' ok: one <export-spec> is `push!' ok: one <export-spec> is `pop!' ok: one <export-spec> is `empty!' ok: (export <export-spec> ...) count: 4 checking: (import <import-spec> ...) checking: <import-set> checking: <library-reference> ok: <library-reference> is `(r6rs)' ok: one <import-set> is `(r6rs)' ok: one <import-spec> is `(r6rs)' ok: (import <import-spec> ...) count: 1 ok: one <definition> is `(define (make) ...)' ok: one <definition> is `(define (push! s v) ...)' ok: one <definition> is `(define (pop! s) ...)' ok: one <definition> is `(define (empty! s) ...)' ok: rest forms count: 4 ok: <library> syntax ok: known: defs ok: : (lambda () (list (quote ()))) ok: : (lambda (s v) (set-car! s (cons v (car s)))) ok: : (lambda (s) (let ([v (caar s) ]) (set-car! s (cdar s)) v)) ok: : (lambda (s) (set-car! s (quote ()))) ok: known: names ok: : make ok: : push! ok: : pop! ok: : empty! checking: <library> checking: <library-name> ok: <library-name> is `(balloons)' checking: (export <export-spec> ...) ok: one <export-spec> is `make' ok: one <export-spec> is `push' ok: one <export-spec> is `pop' ok: (export <export-spec> ...) count: 3 checking: (import <import-spec> ...) checking: <import-set> checking: <library-reference> ok: <library-reference> is `(r6rs)' ok: one <import-set> is `(r6rs)' ok: one <import-spec> is `(r6rs)' ok: (import <import-spec> ...) count: 1 ok: one <definition> is `(define (make w h) ...)' ok: one <definition> is `(define (push b amt) ...)' ok: one <definition> is `(define (pop b) ...)' ok: rest forms count: 3 ok: <library> syntax ok: known: defs ok: : (lambda (w h) (cons w h)) ok: : (lambda (b amt) (cons (- (car b) amt) (+ (cdr b) amt))) ok: : (lambda (b) (display "Boom! ") (display (* (car b) (cdr b))) (newline)) ok: known: names ok: : make ok: : push ok: : pop checking: <library> checking: <library-name> ok: <library-name> is `(party)' checking: (export <export-spec> ...) checking: (rename (<identifier> <identifier>) ...) checking: (<identifier> <identifier>) ok: (<identifier> <identifier>) is `(balloon:make make)' checking: (<identifier> <identifier>) ok: (<identifier> <identifier>) is `(balloon:push push)' ok: one <export-spec> is `(rename (balloon:make make) (balloon:push push))' ok: one <export-spec> is `push!' ok: one <export-spec> is `make-party' checking: (rename (<identifier> <identifier>) ...) checking: (<identifier> <identifier>) ok: (<identifier> <identifier>) is `(party-pop! pop!)' ok: one <export-spec> is `(rename (party-pop! pop!))' ok: (export <export-spec> ...) count: 4 checking: (import <import-spec> ...) checking: <import-set> checking: <library-reference> ok: <library-reference> is `(r6rs)' ok: one <import-set> is `(r6rs)' ok: one <import-spec> is `(r6rs)' checking: <import-set> checking: <import-set> checking: <library-reference> ok: <library-reference> is `(stack)' ok: one <import-set> is `(stack)' ok: one <import-set> is `(only (stack) make push! pop!)' ok: one <import-spec> is `(only (stack) make push! pop!)' checking: <import-set> checking: <import-set> checking: <library-reference> ok: <library-reference> is `(balloons)' ok: one <import-set> is `(balloons)' ok: one <import-set> is `(prefix (balloons) balloon:)' ok: one <import-spec> is `(prefix (balloons) balloon:)' ok: (import <import-spec> ...) count: 3 ok: one <definition> is `(define (make-party) ...)' ok: one <definition> is `(define (party-pop! p) ...)' ok: rest forms count: 2 ok: <library> syntax ok: known: defs ok: : (lambda () (let ([s (make) ]) (push! s (balloon:make 10 10)) (push! s (balloon:make 12 9)) s)) ok: : (lambda (p) (balloon:pop (pop! p))) ok: known: names ok: : make-party ok: : party-pop! checking: <library> checking: <library-name> ok: <library-name> is `(main)' checking: (export <export-spec> ...) ok: (export <export-spec> ...) count: 0 checking: (import <import-spec> ...) checking: <import-set> checking: <library-reference> ok: <library-reference> is `(r6rs)' ok: one <import-set> is `(r6rs)' ok: one <import-spec> is `(r6rs)' checking: <import-set> checking: <library-reference> ok: <library-reference> is `(party)' ok: one <import-set> is `(party)' ok: one <import-spec> is `(party)' ok: (import <import-spec> ...) count: 2 ok: one <definition> is `(define p ...)' ok: one <expression> is `(pop! p)' ok: one <expression> is `(push! p (push (make 5 5) 1))' ok: one <expression> is `(pop! p)' ok: rest forms count: 4 ok: <library> syntax ok: known: defs ok: : (make-party) ok: known: names ok: : p ok: ex-6-4.r6rs checking: hello.r6rs checking: <library> checking: <library-name> checking: <version> ok: <version> is `(42 33 21)' ok: <library-name> is `(foo bar zzz (42 33 21))' checking: (export <export-spec> ...) ok: one <export-spec> is `nothing' checking: (rename (<identifier> <identifier>) ...) checking: (<identifier> <identifier>) ok: (<identifier> <identifier>) is `(foo bar)' checking: (<identifier> <identifier>) ok: (<identifier> <identifier>) is `(xxx yy)' ok: one <export-spec> is `(rename (foo bar) (xxx yy))' ok: one <export-spec> is `is' ok: one <export-spec> is `actually' checking: (rename (<identifier> <identifier>) ...) checking: (<identifier> <identifier>) ok: (<identifier> <identifier>) is `(a b)' checking: (<identifier> <identifier>) ok: (<identifier> <identifier>) is `(c d)' ok: one <export-spec> is `(rename (a b) (c d))' ok: one <export-spec> is `here' ok: (export <export-spec> ...) count: 6 checking: (import <import-spec> ...) checking: <import-spec> `for' checking: <import-set> checking: <import-set> checking: <library-reference> ok: <library-reference> is `(sdl misc-utils)' ok: one <import-set> is `(sdl misc-utils)' ok: one <import-set> is `(prefix (sdl misc-utils) MISC:)' ok: one <import-level> is `run' ok: one <import-spec> is `(for (prefix (sdl misc-utils) MISC:) run)' checking: <import-set> checking: <library-reference> checking: <version-reference> ok: <subversion-reference> is `42' checking: <subversion-condition> checking: <subversion-condition> checking: <subversion-condition> ok: <subversion-condition> is `(<= 22)' checking: <subversion-condition> ok: <subversion-condition> is `(>= 44)' ok: <subversion-condition> is `(and (<= 22) (>= 44))' ok: <subversion-condition> is `(not (and (<= 22) (>= 44)))' ok: <subversion-reference> is `(not (and (<= 22) (>= 44)))' checking: <subversion-condition> checking: <subversion-condition> ok: <subversion-condition> is `(<= 22)' checking: <subversion-condition> ok: <subversion-condition> is `(>= 42)' ok: <subversion-condition> is `(or (<= 22) (>= 42))' ok: <subversion-reference> is `(or (<= 22) (>= 42))' ok: <version-reference> count: 3 ok: <library-reference> is `(ice-9 foo (42 (not (and (<= 22) (>= 44))) (or (<= 22) (>= 42))))' ok: one <import-set> is `(ice-9 foo (42 (not (and (<= 22) (>= 44))) (or (<= 22) (>= 42))))' ok: one <import-spec> is `(ice-9 foo (42 (not (and (<= 22) (>= 44))) (or (<= 22) (>= 42))))' ok: (import <import-spec> ...) count: 2 ok: one <definition> is `(define ((a b) c) ...)' ok: one <expression> is `((a 10) 20)' ok: rest forms count: 2 ok: <library> syntax ok: known: defs ok: : (lambda (b) (lambda (c) (+ b c))) ok: known: names ok: : a ok: hello.r6rs checking: hogwash.r6rs checking: <library> checking: <library-name> checking: <version> ok: <version> is `(42 33 21)' ok: <library-name> is `(foo bar zzz (42 33 21))' checking: (export <export-spec> ...) ok: one <export-spec> is `nothing' checking: (rename (<identifier> <identifier>) ...) checking: (<identifier> <identifier>) ok: (<identifier> <identifier>) is `(foo bar)' ok: one <export-spec> is `(rename (foo bar))' ok: one <export-spec> is `is' ok: one <export-spec> is `actually' checking: (rename (<identifier> <identifier>) ...) checking: (<identifier> <identifier>) ok: (<identifier> <identifier>) is `(a b)' checking: (<identifier> <identifier>) ok: (<identifier> <identifier>) is `(c d)' ok: one <export-spec> is `(rename (a b) (c d))' ok: one <export-spec> is `here' ok: (export <export-spec> ...) count: 6 checking: (import <import-spec> ...) checking: <import-set> checking: <import-set> checking: <library-reference> ok: <library-reference> is `(foo bar baz)' ok: one <import-set> is `(foo bar baz)' ok: one <import-set> is `(prefix (foo bar baz) SDL:)' ok: one <import-spec> is `(prefix (foo bar baz) SDL:)' ok: (import <import-spec> ...) count: 1 ok: one <definition> is `(define (a b) ...)' ok: one <expression> is `(a 19)' hogwash.r6rs:16:3: bad `define' placement: `(define f ...)' (while checking <library>) (while checking hogwash.r6rs) ERROR: syntax error
_______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user