diff options
author | Arun Isaac | 2022-06-26 11:10:49 +0530 |
---|---|---|
committer | Arun Isaac | 2022-06-27 00:19:50 +0530 |
commit | 0e9c4f8c903c72c8a9fe8b744cf778666f7b7cfe (patch) | |
tree | 2045d542cf1b33c7d51685dc952655d05aed8453 | |
parent | 162f6b4a4c933f49428f8d41ad308dc6e7a9b4d2 (diff) | |
download | tissue-0e9c4f8c903c72c8a9fe8b744cf778666f7b7cfe.tar.gz tissue-0e9c4f8c903c72c8a9fe8b744cf778666f7b7cfe.tar.lz tissue-0e9c4f8c903c72c8a9fe8b744cf778666f7b7cfe.zip |
bin: Add <indexed-document> type.
* bin/tissue: Import (srfi srfi-9).
(<indexed-document>): New type.
-rwxr-xr-x | bin/tissue | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -23,6 +23,7 @@ exec guile --no-auto-compile -s "$0" "$@" (import (rnrs exceptions) (rnrs io ports) (srfi srfi-1) + (srfi srfi-9) (srfi srfi-19) (srfi srfi-26) (srfi srfi-37) @@ -49,6 +50,16 @@ exec guile --no-auto-compile -s "$0" "$@" (define %xapian-index (string-append %state-directory "/xapian")) +(define-record-type <indexed-document> + (indexed-document reader web-uri) + indexed-document? + ;; A thunk that returns a document object (currently either an + ;; <issue> or a <document> object), presumably by reading it from a + ;; file or other source + (reader indexed-document-reader) + ;; A string URI linking to this document on the web + (web-uri indexed-document-web-uri)) + (define (invoke program . args) (unless (zero? (apply system* program args)) (error "Invocation of program failed" (cons program args)))) |