commit 3fdfbc772f1b460a7bbc8e30eff8acc5875cb7db parent dcf745ce4a9365a4411b888f4fc1f537bd482a64 Author: Vincent St-Amour <stamourv@racket-lang.org> Date: Tue, 31 May 2011 14:02:27 -0400 Add show-requires, which is friendlier on the eyes than check-requires. original commit: b39f21775a10d753b4f3a967497c80a89cf6844d Diffstat:
| M | collects/macro-debugger/analysis/check-requires.rkt | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/collects/macro-debugger/analysis/check-requires.rkt b/collects/macro-debugger/analysis/check-requires.rkt @@ -12,6 +12,7 @@ "private/util.rkt") (provide/contract [check-requires (-> module-path? list?)] + [show-requires (-> module-path? list?)] [add-disappeared-uses? (parameter/c boolean?)] [mpi->key (-> module-path-index? any/c)]) @@ -316,6 +317,21 @@ A recommendation is one of (nom-use-alg refs compiled)))) #| +A displayed-recommendation is one of + (list 'keep string phase string/#f) + (list 'bypass string phase) + (list 'drop string phase) +A displayed-recommendation is similar to a recommendation, but prints +out the module-path-index for easier user consumption. +|# + +;; show-requires: module-path -> (listof displayed-recommendation) +(define (show-requires mod-path) + (map (match-lambda [(list-rest key mpi rest) + (list* key (mpi->key mpi) rest)]) + (check-requires mod-path))) + +#| TODO ====