Re: Stack traces for phase 1 errors?

Alexis King <[email protected]>
Newsgroups gmane.comp.lang.racket.user,gmane.lisp.scheme.plt
Message-ID <[email protected]>
Alright, that makes sense, thanks. I actually did have my code in
question in a separate module, but oddly, I ended up getting different
results for the following two commands:

  $ racket -l errortrace -l hackett/monad
  $ racket -l errortrace -l hackett/private/type -l hackett/monad

The error in question occurs in hackett/private/type. The first
command provides no errortrace backtrace, but the latter command
does. Can you think of any reason for why this could happen? It
seems like somehow the errortrace compile handler isn’t being
automatically used for the transitive require?

I’ve been trying to reproduce this issue with a simpler example,
but I haven’t been able to come up with anything yet. I’ll keep
investigating, though.

> On Jan 9, 2017, at 11:35 AM, Matthew Flatt <mflatt-sDh8Nw2yj/[email protected]> wrote:
> 
> Errortrace cannot currently give you traces for phase-1 code in the
> module being expanded. That's because errortrace works by first fully
> expanding a module and then instrumenting it.
> 
> If you can arrange for the compile-time code to be in a different
> module than the one that triggers the error, you'll get a trace. For
> example, with
> 
> ;; bad.rkt
> #lang racket
> 
> (begin-for-syntax
>   (define (bad-fn x)
>     (string-append x 3)))
> 
> (provide (for-syntax bad-fn))
> 
> and
> 
> ;; use.rkt
> #lang racket
> (require "bad.rkt")
> 
> (define-syntax foo (bad-fn ""))
> 
> then you should get errortrace info that points at the `string-append`
> expression.

-- 
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.