From 579ffacc836e695b0416fde0c642eba4f5abe7f0 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 9 Jan 2010 14:42:18 +0000 Subject: [PATCH] replae module->compiled-module-expression with module->imports and module->exports svn: r17588 original commit: 349c15d47824d83cb08a2b2a8239062848b85503 --- collects/scribble/search.ss | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/collects/scribble/search.ss b/collects/scribble/search.ss index e2420d5b..796ef575 100644 --- a/collects/scribble/search.ss +++ b/collects/scribble/search.ss @@ -17,8 +17,8 @@ (module-path-index-join name (module-path-index-rejoin base rel-to))]))) - (define (try thunk) - (with-handlers ([exn:fail? (lambda (exn) #f)]) + (define (try thunk fail-thunk) + (with-handlers* ([exn:fail? (lambda (exn) (fail-thunk))]) (thunk))) (define (find-scheme-tag part ri stx/binding phase-level) @@ -110,21 +110,20 @@ rmp (lambda () (let-values ([(valss stxess) - (let ([exp - (or - (try - (lambda () - ;; First, try using bytecode: - (get-module-code (resolved-module-path-name rmp) - #:choose (lambda (src zo so) 'zo)))) - (try - (lambda () - ;; Bytecode not available. Declaration in the - ;; current namespace? - (module->compiled-module-expression rmp))))]) - (if exp - (module-compiled-exports exp) - (values null null)))]) + (try + (lambda () + ;; First, try using bytecode: + (module-compiled-exports + (get-module-code (resolved-module-path-name rmp) + #:choose (lambda (src zo so) 'zo)))) + (lambda () + (try + (lambda () + ;; Bytecode not available. Declaration in the + ;; current namespace? + (module->exports rmp)) + (lambda () + (values null null)))))]) (let ([t ;; Merge the two association lists: (let loop ([base valss]