diff options
Diffstat (limited to 'dump/documentation.scm')
-rw-r--r-- | dump/documentation.scm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/dump/documentation.scm b/dump/documentation.scm index 4c0fd88..81eec43 100644 --- a/dump/documentation.scm +++ b/dump/documentation.scm @@ -4,7 +4,9 @@ dump-configuration? dump-configuration-triples? dump-configuration-table-metadata? - dump-configuration-path)) + dump-configuration-path + call-with-documentation)) + (define-immutable-record-type <dump-configuration> (%dump-configuration triples? table-metadata? path) @@ -22,3 +24,12 @@ (%dump-configuration triples? table-metadata? path)) +(define (call-with-documentation conf proc) + (let ((port #f) + (path (dump-configuration-path conf))) + (when path + (dynamic-wind + (lambda () + (set! port (open-file path "w"))) + (cut proc port) + (cut close port))))) |