[racket-dev] code coverage coloring

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Sep 14 16:16:55 EDT 2011

An hour ago, Shriram Krishnamurthi wrote:
> Can't comment on option (b), but option (a) is what I was thinking
> of.

Just to clarify (a) is a kind of a cheap way out: there's a facility
to shove random information into languages, so add one more bit.  The
(b) option is much more interesting in that the code can decide to
report some extra stuff to render, and drr will listen and show it
when asked.

> One thing is it'd be nice to make these things "work" even in
> textual mode (for shell/Emacs users) -- things like coverage
> coloring presumably just get ignored in that case, as opposed to the
> code not running at all because of a MrEd dependency.

It does work from the repl -- only needs someone enthusiastic enough
to wire the information in some better looking way.  And it would be
really nice if someone makes check-syntax produce gui-independent
information that could be used elsewhere (like binding arrows
appearing in the documentation).

| -> ,cover /tmp/x
| #lang racket/base
| (define (foo x)
|   (if (zero? x)
|       (+ x 10)
|       ^^^^^^^^
|       (* x 100)))
| (foo 10)

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.