mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
discovery: Move 'file-name->module-name' to (guix modules).
* guix/discovery.scm (file-name->module-name): Move to... * guix/modules.scm (file-name->module-name): ... here. * guix/build/compile.scm: Use (guix modules) instead of (guix discovery).
This commit is contained in:
parent
3a9976bfcd
commit
7a51c78c6e
3 changed files with 13 additions and 11 deletions
|
@ -18,15 +18,14 @@
|
|||
|
||||
(define-module (guix discovery)
|
||||
#:use-module (guix ui)
|
||||
#:use-module (guix modules)
|
||||
#:use-module (guix combinators)
|
||||
#:use-module (guix build syscalls)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 vlist)
|
||||
#:use-module (ice-9 ftw)
|
||||
#:export (file-name->module-name
|
||||
|
||||
scheme-modules
|
||||
#:export (scheme-modules
|
||||
fold-modules
|
||||
all-modules
|
||||
fold-module-public-variables))
|
||||
|
@ -90,13 +89,6 @@ DIRECTORY is not accessible."
|
|||
directory (strerror errno)))
|
||||
'())))))
|
||||
|
||||
(define file-name->module-name
|
||||
(let ((not-slash (char-set-complement (char-set #\/))))
|
||||
(lambda (file)
|
||||
"Return the module name (a list of symbols) corresponding to FILE."
|
||||
(map string->symbol
|
||||
(string-tokenize (string-drop-right file 4) not-slash)))))
|
||||
|
||||
(define* (scheme-modules directory #:optional sub-directory)
|
||||
"Return the list of Scheme modules available under DIRECTORY.
|
||||
Optionally, narrow the search to SUB-DIRECTORY."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue