p.s. You could run using errortrace. Although the lambda inferred name
is still elided, the errortrace context should still have a useful
location, which M-x next-error can find if you do it a second time. As
below:

racket -l errortrace -t
srclocasdfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.rkt
map: argument mismatch;
 the given procedure's expected number of arguments does not match
 the given number of lists
  given procedure: ...aaaaaaaaaaaa.rkt:10:7
  expected: 1
  given: 2
  errortrace...:
   
/tmp/srclocasdfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.rkt:10:2:
(map (lambda (x) (/ x 1)) (list 1 2 3) (list 1 2 3))
  context...:
   
/tmp/srclocasdfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.rkt:
[running body]

p.p.s. There are still ways Racket can hide paths you might find
useful for Emac's next-error -- such as replacing a long path with
"<collects>" or "<pkgs>". In racket-mode for Emacs, I use a custom
error-display-handler to catch such lossy transforms and "undo" them:
https://github.com/greghendershott/racket-mode/blob/master/error.rkt

Also in racket-mode, if you C-c C-c to racket-run and get an unhelpful
error context, you can C-u C-c C-c to rerun again with full errortrace
context.  (You can also set racket-error-level to 'high to run with
errortrace all the time; the gotcha is your program will run more
slowly.)


On Mon, Aug 13, 2018 at 1:25 AM Greg Hendershott
<greghendersh...@gmail.com> wrote:
>
> > given procedure: ...amm-3.1/util.scm:58:6
>
> It seems you had something like `(map (lambda (x) x) (list 1 2 3)
> (list 1 2 3))` and the error message wants to show the name of the
> function.
>
> What is the name of an anonymous function?  That sounds like a Zen
> koan. But there is an automatically inferred name, using the source
> location:
>
>   https://docs.racket-lang.org/reference/syntax-model.html#(part._infernames)
>
> So `(object-name (lambda (x) x))` is something like
> `'/path/to/file.rkt:11:22`.  But it seems to be elided for
> /somewhat/long/pathname/for/file.rkt.
>
> How to avoid this? I suppose you could do (procedure-rename (lambda
> (x) x) 'shorter-name). But then you might as well just `define` a
> named function or bind the lambda to a value using `let`.

-- 
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 https://groups.google.com/d/optout.

Reply via email to