On Fri, 14 Aug 2015 07:29:37 -0500,
Robby Findler wrote:
> 
> For that you would have to write a (straightforward) compiler that
> transformed a fully expanded Racket program into another program (in
> that same language), inserting with-continuation-mark expressions
> around every subexpression. Run the transformed program. Then, at the
> point that you wish to compare with another, you can get the marks and
> compare them with another set you got earlier. This won't be a short
> function (as Racket is not a toy language), but it will be a
> straightforward one; you do not need to cps-convert or
> defunctionalize.
> 
> We have few transformations along these lines implemented already that
> you may wish to look at. The most commonly used one is errortrace and
> it is what we use to get the precise stacktraces that DrRacket shows
> you. A similar transformation is used to do test coverage and another
> to get profiling information. The library is called "errortrace" and
> that search key in the docs should provide you with more information.

To expand a little on that, I think you should be able to reuse
errortrace out of the box (e.g., by running your code with `racket -l
errortrace my-file.rkt`), and looking up the continuation marks with key
`errortrace-key` (from `errortrace/errortrace-key`).

Errortrace is usable both as a standalone annotator (as in the
instructions above), and as a library. The former is easier to use, and
it sounds like it may be enough for your purposes.

Vincent

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