From 78152318f5e6fb8ad315bd72a8b9257ec4b91b4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 3 May 2009 03:19:43 +0200 Subject: Hopefully harmless refactoring. --- scheme/plt/geiser/locations.ss | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'scheme/plt/geiser/locations.ss') diff --git a/scheme/plt/geiser/locations.ss b/scheme/plt/geiser/locations.ss index 80040f9..1b13e8f 100644 --- a/scheme/plt/geiser/locations.ss +++ b/scheme/plt/geiser/locations.ss @@ -26,16 +26,23 @@ #lang scheme -(provide symbol-location) +(provide symbol-location + symbol-module-path-name + symbol->module-name) -(define (%symbol-location sym) +(require geiser/utils) + +(define (symbol-module-path-name sym) (let ([binding (identifier-binding sym)]) (and (list? binding) (resolved-module-path-name (module-path-index-resolve (car binding)))))) (define (symbol-location sym) - (let ((file (%symbol-location (namespace-symbol->identifier sym)))) + (let ((file (symbol-module-path-name (namespace-symbol->identifier sym)))) (list (cons 'file (if (path? file) (path->string file) '()))))) +(define symbol->module-name + (compose module-path-name->name symbol-module-path-name)) + ;;; locations.ss ends here -- cgit v1.2.3