aboutsummaryrefslogtreecommitdiff
path: root/gendoc.scm
blob: f493b42384ff64f36cc5798133c42979ce7fa82e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/guile \
-e main -s
!#

(add-to-load-path (dirname (current-filename)))

(use-modules (texinfo reflection)
             (texinfo serialize)
             (texinfo indexing)
             (sxml simple))

(define name     "Haskell-like Monads")
(define filename "monad.info")
(define infile   "monad.texi")
(define version  "0.7")
(define years    '(2019))

(define last-updated (strftime "%Y-%m-%d" (localtime (current-time))))

(define modules
  '(((monad) "Base module")
    ((monad optional) "Optional (Maybe) type")
    ((monad state) "State monad")
    ((monad stack) "Stacks implemented on top of the state monad")
    ))

(define prolog
  (package-stexi-standard-prologue
   name filename
   "The Algorithmic Language Scheme"    ; (dir) Top category
   "Haskell like monads in Scheme"      ; For (dir) Top

   (package-stexi-standard-copying
    name version last-updated years
    "Hugo Hörnquist" "Permissions?")

   (package-stexi-standard-titlepage
    name
    version last-updated
    '(("Hugo Hörnquist" . "hugo@lysator.liu.se")))

   (package-stexi-standard-menu
    name
    (map car modules)
    (map cdr modules)
    '())))

(define stexi-doc
 (package-stexi-documentation
  (map car modules)
  name filename
  prolog
  '()))

(define (main args)
  (with-output-to-file infile
    (lambda () (display (stexi->texi stexi-doc-real)))))