Ok, here is a new one, but first a summary.
To summarize, I originally posted a number of racket error messages that had no
backtrace, or no backtrace nor location information. So far, here is people
have contributed as fixes, though unfortunately cases remain (see below):
1. errortrace is in
Alex, yes thank you, the quote-srcloc works at run time, so for example:
(define-syntax (here3 stx)
(let(
[program `(quote-srcloc ,stx)]
)
(datum->syntax stx program)
))
Will print the call point. What the heck is this macro, as it is being
what is the difference between syntax-case matched identifiers, and those
provided by let. This example crashes and burns on load:
(define-syntax (fine1 stx)
(let (
[a 7]
[b 9]
)
(syntax/loc stx
(+ a b)
)))
Which begs the question,
p.s. for reference here,
Without syntax loc, no location of error in macro:
#|
(define-syntax (messup5 stx)
(datum->syntax stx
(let (
[a 7]
[b 9]
)
(^ a b)
)))
(messup5)
rac...@test-macro-dev-error.rkt> (enter!
>
> What syntax/loc would do is put the source location of the caller in the back
> trace. It only goes one level deep though, so you're not getting the actual
> benefit of using syntax/loc over syntax, unless the error happens in the
> outer let expression instead of one the inner
thank you !!
--
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+unsubscr...@googlegroups.com.
For more options, visit
>
> The calls that are missing appear to tail calls, and Racket performs
> tail-call optimization, so I imagine those missing functions are not
> really "on the stack" at the time of the error.
>
> I don't know that there is a way around this except to deliberately
> subvert the tail-call
The example in the manual for quote-srcloc shows it wrapped as a syntax object,
and it gives the correct call point location answer. however, when the result
from quoteloc is instead put in a variable, then variable has the wrong
location (not the call location of stx).
An explanation of this
I have a related question. I turned on error trace using the command line Robby
suggested, but it doesn't give me a trace, but rather just the call point and
error function. Here is an example, the trace should be f -> gg -> g -> hh ->
h then bang, the error. But instead Racket shows me f
would some kind person clue me in to the raco setup syntax? When I try to
install this, it tells me it is there. When I run setup it says it doesn't
exist .. I must be missing a switch or something?
§lambda1:/home/deep/liquid-extensions> raco pkg install
raco pkg install: package is already
A module ostensibly written for phase 0, can become phase n due to (require
(for-syntax a-module)).
There is a module with test code that only makes sense at phase 0, but because
it is (required "test-code.rkt") inside of another module which itself is
required for syntax, or a higher module
Wrote this for students. Hope it helps.
http://arxiv.org/ftp/arxiv/papers/1507/1507.05956.pdf
If any one is interested in starting a project implementing any of the proposed
extensions or the like in racket let me know.
--
You received this message because you are subscribed to the Google
I created a collection, then used raco to install it.
Ran into a problem where a test function within module X in the collection
accesses a file in the same directory as the source code:
(define (fun-timed-test-2)
(define ip (open-input-file realtime-test-data.rkt))
(match-define
I apologize if this posted before, but given a day I don't see it here..
I have a function with a companion data file (data file is part of the
collection). When I invoke it with a relative path name (just the file name),
racket looks for it in the directory the function is invoked from, not
Tyring to use '@' to run a command on a string, fails:
racket@ (displayln hello)
hello
racket@ (require scribble/base)
racket@ @displayln{hello}
@displayln: undefined;
cannot reference undefined identifier
context...:
/usr/share/racket/collects/racket/private/misc.rkt:87:7
racket@ hello:
Manual says:
remember that the Scribble is just an alternate for S-expressions
Please pardon the question .. ah then what good is it? We already have
S-expressions. Perhaps it looks a lot nicer? .. but if that works for
scribble, do we need one of these looks nicer rewrites for the
16 matches
Mail list logo