diff --git a/guile-docs/docs.scm b/guile-docs/docs.scm index 2d5c267..cfef0de 100644 --- a/guile-docs/docs.scm +++ b/guile-docs/docs.scm @@ -1,6 +1,4 @@ -(define-module (guile-docs docs) - #:use-module (srfi srfi-9) - #:export (docs-in-module)) +(use-modules (srfi srfi-9)) (define-record-type (make-doc module symbol documentation) diff --git a/public/index.scm b/public/index.scm index b69f5b6..ec5001a 100644 --- a/public/index.scm +++ b/public/index.scm @@ -1,5 +1,5 @@ ;; TODO: move to modules - need to set up pre-inst-env or w/e -(define overall-wrapper (load "overall-wrapper.scm")) +(load "overall-wrapper.scm") (overall-wrapper '(main diff --git a/public/module.scm b/public/module.scm new file mode 100644 index 0000000..1adc54d --- /dev/null +++ b/public/module.scm @@ -0,0 +1,18 @@ +(load "overall-wrapper.scm") + +(load "../guile-docs/docs.scm") + +(define (render-module module) + (let ((docs (docs-in-module module))) + (overall-wrapper + `(main ,(map render-doc docs))))) + + +(define (render-doc doc) + `((hgroup + (h1 ,(doc-symbol doc)) + (p "In " ,(doc-module doc))) + (p ,(or (doc-documentation doc) "")))) + + +(render-module (resolve-interface '(srfi srfi-19))) diff --git a/public/overall-wrapper.scm b/public/overall-wrapper.scm index 49a48b8..2ed01c1 100644 --- a/public/overall-wrapper.scm +++ b/public/overall-wrapper.scm @@ -1,5 +1,5 @@ ;; todo: module -(lambda (content) +(define (overall-wrapper content) `(html (link (@ (rel "stylesheet") (type "text/css")