From 78026f645672d48f5baa9b46be9e32b42213ae33 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Wed, 11 May 2011 02:13:00 -0600 Subject: [PATCH] fix warnings original commit: 761a4025ca88cea7166fe25edb9fec8507b4e8c1 --- .../macro-debugger/model/hiding-policies.rkt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/collects/macro-debugger/model/hiding-policies.rkt b/collects/macro-debugger/model/hiding-policies.rkt index 3f0f01b..58d4995 100644 --- a/collects/macro-debugger/model/hiding-policies.rkt +++ b/collects/macro-debugger/model/hiding-policies.rkt @@ -64,7 +64,7 @@ (from-collection ("racket")))) (and hide-libs? '(or (from-collection ()) - #;(from-planet-collection #f #f ()))) + #|(from-planet-collection #f #f ())|#)) (and hide-contracts? '(symbol-like #rx"^provide/contract-id-")) (and hide-phase1? @@ -74,26 +74,23 @@ ;; entries->function : (listof Entry) (id -> choice) -> (id -> choice) (define (entries->function entries base-fun) (if (pair? entries) - (let ([first-fun (entry->function (car entries))] - [rest-fun (entries->function (cdr entries) base-fun)]) - (lambda (id) - (or (first-fun id) - (rest-fun id)))) + (entry->function (car entries) + (entries->function (cdr entries) base-fun)) base-fun)) ;; entry->function : Entry -> (id -> choice) -(define (entry->function entry) +(define (entry->function entry base-fun) (match entry [(list 'show-if condition) (let ([pred (condition->predicate condition)]) (lambda (id) - (if (pred id) 'show #f)))] + (if (pred id) 'show (base-fun id))))] [(list 'hide-if condition) (let ([pred (condition->predicate condition)]) (lambda (id) - (if (pred id) 'hide #f)))] + (if (pred id) 'hide (base-fun id))))] [(list 'splice entries) - (entries->function entries)])) + (entries->function entries base-fun)])) ;; condition->predicate : condition -> (id -> boolean) (define (condition->predicate condition)