[plt-scheme] Re: managed-compile-zo

From: Daniel Pinto de Mello e Silva (daniel.silva at gmail.com)
Date: Fri Jan 28 12:37:14 EST 2005

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
> 
>



Posted on the users mailing list.