glob: Add an extra glob pattern compilation stage.
authorLudovic Courtès <ludo@gnu.org>
Sun, 18 Mar 2018 21:54:34 +0000 (22:54 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 18 Mar 2018 21:57:17 +0000 (22:57 +0100)
commit71e08fde28fa335bdba2ec2150fd6663390bba5a
tree71d35060faa1f92b6e15236098a58c4da6e8d84f
parente914b398af11f909e88a8bc85eeebb0768aacd54
glob: Add an extra glob pattern compilation stage.

* guix/glob.scm (compile-glob-pattern): Rename to...
(string->sglob): ... this.
(compile-sglob, string->compiled-sglob): New procedures.
(glob-match?): Replace '?, 'range, and 'set with a single clause.
* tests/glob.scm (test-compile-glob-pattern): Rename to...
(test-string->sglob): ... this.  Adjust accordingly.
(test-glob-match): Use 'string->compiled-sglob' instead of
'compile-glob-pattern'.
* gnu/build/linux-modules.scm (read-module-aliases): Use
'string->compiled-sglob' instead of 'compile-glob-pattern'.
gnu/build/linux-modules.scm
guix/glob.scm
tests/glob.scm