Re: indirect-export in macro Andre van Tonder (01 Dec 2005 17:13 UTC)
Re: indirect-export in macro Matthew Flatt (01 Dec 2005 17:16 UTC)

Re: indirect-export in macro Andre van Tonder 01 Dec 2005 17:13 UTC

 Matthew Flatt wrote:

 > Oh, that's right. You need
 >
 >  (indirect-export (M quotient+remainder))
 >
 > for some locally defined macro M. (Or am I missing something else, too?)

 Ah, that too, but I meant that

   <body> = <impexp-form>* <comdef-form>*

 requires the <impexp-form>s to precede the macro definitions.  Would the
 example work if I put the macro after, like this?  It is not clear
 to me from the spec:

 (library "let-div" "scheme://r6rs"

    (make-export)

    (define-syntax make-export
            (syntax-rules ()
              ((_)
              (indirect-export (quotient+remainder)))))

    (define (quotient+remainder n d) ....)

  Regards
  Andre