[racket] tool: show module exports

From: Stephen De Gabrielle (stephen.degabrielle at acm.org)
Date: Thu Jul 22 13:03:07 EDT 2010

This is cool,

I'm calling it from drracket, but it seems to be choking on mred-kernel.

S.

On Wednesday, July 21, 2010, Jon Rafkind <rafkind at cs.utah.edu> wrote:
>  I wrote a simple tool (attached) that displays all the exports from a module; their name as well as their phase. I'll probably make it show imports too when I get a chance.
>
> I'd like this sort of information in DrRacket as well, either I can make a plugin or maybe check syntax can do it.
>
> $ racket ~/tmp/check.rkt match.rkt
> Phase 0 (runtime)
>  Variables
>   exn:misc:match? from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match-equality-test from /home/jon/svn/plt/collects/racket/match/match.rkt
>  Syntaxes
>   define-match-expander
>   match from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match* from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match*/derived from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match-define from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match-lambda from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match-lambda* from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match-lambda** from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match-let from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match-let* from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match-letrec from /home/jon/svn/plt/collects/racket/match/match.rkt
>   match/derived from /home/jon/svn/plt/collects/racket/match/match.rkt
>   struct* from /home/jon/svn/plt/collects/racket/match/match.rkt
> Phase 1 (syntax)
>  Variables
>   match-...-nesting from /home/jon/svn/plt/collects/racket/match/match.rkt as match-...-nesting
>  Syntaxes
>
> $ racket ~/tmp/check.rkt -h
> checker [ <option> ... ] <file>
>  where <option> is one of
>   --phase <phase> : Only show identifiers at this phase
>

-- 

--
Stephen De Gabrielle
stephen.degabrielle at acm.org
Telephone +44 (0)20 85670911
Mobile        +44 (0)79 85189045
http://www.degabrielle.name/stephen


Posted on the users mailing list.