diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-10-15 00:12:20 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-10-15 00:12:20 +0200 |
commit | 99120bc1b7920261e1020d501de139c71a381492 (patch) | |
tree | 3cff69ace21de886e8a412b6f1f703efb47b3f3a /module/vcomponent/search.scm | |
parent | Clarify use of sandbox. (diff) | |
download | calp-99120bc1b7920261e1020d501de139c71a381492.tar.gz calp-99120bc1b7920261e1020d501de139c71a381492.tar.xz |
Datetime bindings for search.
Diffstat (limited to 'module/vcomponent/search.scm')
-rw-r--r-- | module/vcomponent/search.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/module/vcomponent/search.scm b/module/vcomponent/search.scm index 7d039a24..fef0b100 100644 --- a/module/vcomponent/search.scm +++ b/module/vcomponent/search.scm @@ -52,6 +52,13 @@ (define-public (prepare-string str) (call-with-input-string (close-parenthese str) read)) +;; TODO place this in a proper module +(define (bindings-for module-name) + ;; Wrapping list so we can later export sub-modules. + (list (cons module-name + (module-map (lambda (a . _) a) + (resolve-interface module-name))))) + ;; Evaluates the given expression in a sandbox. ;; NOTE Should maybe be merged inte prepare-query. The argument against is that ;; eval-in-sandbox is possibly slow, and that would prevent easy caching by the @@ -65,7 +72,7 @@ `( ((vcomponent base) prop param children type) ((ice-9 regex) string-match) - ;; TODO datetime + ,@(bindings-for '(datetime)) ,@all-pure-bindings) ))) |