summaryrefslogtreecommitdiff
path: root/scheme/plt/geiser/locations.ss
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-03 03:19:43 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-03 03:19:43 +0200
commit78152318f5e6fb8ad315bd72a8b9257ec4b91b4b (patch)
treefbbdd862ce8001c4332b2390292d51d86cd75060 /scheme/plt/geiser/locations.ss
parent8d4246f0b5cf3cfbe3a0cc3a9526d370ea9c26e1 (diff)
downloadgeiser-chez-78152318f5e6fb8ad315bd72a8b9257ec4b91b4b.tar.gz
geiser-chez-78152318f5e6fb8ad315bd72a8b9257ec4b91b4b.tar.bz2
Hopefully harmless refactoring.
Diffstat (limited to 'scheme/plt/geiser/locations.ss')
-rw-r--r--scheme/plt/geiser/locations.ss13
1 files changed, 10 insertions, 3 deletions
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