[plt-scheme] Re: managed-compile-zo
Oh, thanks -- and sorry about that. Is there a way to tell mzscheme
to say "error during module expansion for module <module name> using
macro <macro name>"?
Daniel
On Fri, 28 Jan 2005 10:04:34 -0700, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> If I reduce your code to just
>
> (module user mzscheme
>
> (require-for-syntax (lib "class.ss"))
>
> (define-syntax (warn stx)
> (syntax-case stx ()
> [(_ src msg)
> #`(printf #,(string-append
> "~a ("
> (format "~a"
> (let ([src (syntax-source stx)]
> [src-module (syntax-source-module stx)])
> (cond
> [(symbol? src-module) src-module]
> ;;[(module-path-index? src-module)
> ;; (let-values ([(path base)
> ;; (module-path-index-split src-module)])
> ;; (list path base))]
> ;;[(is-a? src text%) "some text"]
> [(string? src) src]
> [src (send src get-position)]
> [else src])))
> " line "
> (number->string (syntax-line stx))
> "): ~a~n")
> src msg)]))
>
> (warn 'foo "barrr")
> (provide warn)
> )
>
> then it still fails with "cm.ss", and it doesn't even work with `load'
> in MzScheme. The problem is that a syntax object's source can be a
> path. (In fact, it's usually a path.)
>
> Matthew
>
>