aboutsummaryrefslogtreecommitdiff
path: root/tests/monads.scm
blob: 18bf4119bed816dc85f1cbe5fc0252239cfd43ef (about) (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-monads)
  #:use-module (guix tests)
  #:use-module (guix store)
  #:use-module (guix monads)
  #:use-module (guix grafts)
  #:use-module (guix derivations)
  #:use-module (guix packages)
  #:use-module (gnu packages)
  #:use-module (gnu packages bootstrap)
  #:use-module ((gnu packages base) #:select (coreutils))
  #:use-module (ice-9 match)
  #:use-module (rnrs io ports)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-26)
  #:use-module (srfi srfi-64))

;; Test the (guix monads) module.

(define %store
  (open-connection-for-tests))

;; Globally disable grafts because they can trigger early builds.
(%graft? #f)

(define %monads
  (list %identity-monad %store-monad %state-monad))

(define %monad-run
  (list identity
        (cut run-with-store %store <>)
        (cut run-with-state <> '())))

(define-syntax-rule (values->list exp)
  (call-with-values (lambda () exp)
    list))


(test-begin "monads")

(test-assert "monad?"
  (and (every monad? %monads)
       (every (compose procedure? monad-bind) %monads)
       (every (compose procedure? monad-return) %monads)))

;; The 3 "monad laws": <http://www.haskell.org/haskellwiki/Monad_laws>.

(test-assert "left identity"
  (every (lambda (monad run)
           (let ((number (random 777)))
             (with-monad monad
               (define (f x)
                 (return (* (1+ number) 2)))

               (= (run (>>= (return number) f))
                  (run (f number))))))
         %monads
         %monad-run))

(test-assert "right identity"
  (every (lambda (monad run)
           (with-monad monad
             (let ((number (return (random 777))))
               (= (run (>>= number return))
                  (run number)))))
         %monads
         %monad-run))

(test-assert "associativity"
  (every (lambda (monad run)
           (with-monad monad
             (define (f x)
               (return (+ 1 x)))
             (define (g x)
               (return (* 2 x)))

             (let ((number (return (random 777))))
               (= (run (>>= (>>= number f) g))
                  (run (>>= number (lambda (x) (>>= (f x) g))))))))
         %monads
         %monad-run))

(test-assert "lift"
  (every (lambda (monad run)
           (let ((f (lift1 1+ monad))
                 (g (apply lift1 1+ (list monad))))
             (with-monad monad
               (let ((number (random 777)))
                 (= (run (>>= (return number) f))
                    (run (>>= (return number) g))
                    (1+ number))))))
         %monads
         %monad-run))

(test-assert ">>= with more than two arguments"
  (every (lambda (monad run)
           (let ((1+ (lift1 1+ monad))
                 (2* (lift1 (cut * 2 <>) monad)))
             (with-monad monad
               (let ((number (random 777)))
                 (= (run (>>= (return number)
                              1+ 1+ 1+
                              2* 2* 2*))
                    (* 8 (+ number 3)))))))
         %monads
         %monad-run))

(test-assert "mbegin"
  (every (lambda (monad run)
           (with-monad monad
             (let* ((been-there? #f)
                    (number (mbegin monad
                              (return 1)
                              (begin
                                (set! been-there? #t)
                                (return 2))
                              (return 3))))
               (and (= (run number) 3)
                    been-there?))))
         %monads
         %monad-run))

(test-assert "mlet* + text-file + package-file"
  (run-with-store %store
    (mlet* %store-monad ((guile (package-file %bootstrap-guile "bin/guile"))
                         (file  (text-file "monadic" guile)))
      (return (equal? (call-with-input-file file get-string-all)
                      guile)))
    #:guile-for-build (package-derivation %store %bootstrap-guile)))

(test-assert "package-file, default system"
  ;; The default system should be the one at '>>=' time, not the one at
  ;; invocation time.  See <http://bugs.gnu.org/18002>.
  (run-with-store %store
    (mlet* %store-monad
        ((system -> (%current-system))
         (file   (parameterize ((%current-system "foobar64-linux"))
                   (package-file coreutils "bin/ls")))
         (cu     (package->derivation coreutils)))
      (return (string=? file
                        (string-append (derivation->output-path cu)
                                       "/bin/ls"))))
    #:guile-for-build (package-derivation %store %bootstrap-guile)))

(test-assert "package-file + package->cross-derivation"
  (run-with-store %store
    (mlet* %store-monad ((target -> "mips64el-linux-gnu")
                         (file (package-file coreutils "bin/ls"
                                             #:target target))
                         (xcu  (package->cross-derivation coreutils target)))
      (let ((output (derivation->output-path xcu)))
        (return (string=? file (string-append output "/bin/ls")))))
    #:guile-for-build (package-derivation %store %bootstrap-guile)))

(test-assert "interned-file"
  (run-with-store %store
    (mlet* %store-monad ((file -> (search-path %load-path "guix.scm"))
                         (a       (interned-file file))
                         (b       (interned-file file "b")))
      (return (equal? (call-with-input-file file get-string-all)
                      (call-with-input-file a get-string-all)
                      (call-with-input-file b get-string-all))))
    #:guile-for-build (package-derivation %store %bootstrap-guile)))

(test-assert "mapm"
  (every (lambda (monad run)
           (with-monad monad
             (equal? (run (mapm monad (lift1 1+ monad) (iota 10)))
                     (map 1+ (iota 10)))))
         %monads
         %monad-run))

(test-assert "sequence"
  (every (lambda (monad run)
           (let* ((input (iota 100))
                  (order '()))
             (define (frob i)
               (mlet monad ((foo (return 'foo)))
                 ;; The side effect here is used to keep track of the order in
                 ;; which monadic values are bound.  Perform the side effect
                 ;; within a '>>=' so that it is performed when the return
                 ;; value is actually bound.
                 (set! order (cons i order))
                 (return i)))

             (and (equal? input
                          (run (sequence monad (map frob input))))

                  ;; Make sure this is from left to right.
                  (equal? order (reverse input)))))
         %monads
         %monad-run))

(test-assert "listm"
  (every (lambda (monad run)
           (run (with-monad monad
                  (let ((lst (listm monad
                                    (return 1) (return 2) (return 3))))
                    (mlet monad ((lst lst))
                      (return (equal? '(1 2 3) lst)))))))
         %monads
         %monad-run))

(test-assert "anym"
  (every (lambda (monad run)
           (eq? (run (with-monad monad
                       (anym monad
                             (lift1 (lambda (x)
                                      (and (odd? x) 'odd!))
                                    monad)
                             (append (make-list 1000 0)
                                     (list 1 2)))))
                'odd!))
         %monads
         %monad-run))

(test-equal "set-current-state"
  (list '(a a d) 'd)
  (values->list
   (run-with-state
       (mlet* %state-monad ((init  (current-state))
                            (init2 (set-current-state 'b)))
         (mbegin %state-monad
           (set-current-state 'c)
           (set-current-state 'd)
           (mlet %state-monad ((last (current-state)))
             (return (list init init2 last)))))
     'a)))

(test-equal "state-push etc."
  (list '((z . 2) (p . (1)) (a . (1))) '(2 1))
  (values->list
   (run-with-state
       (mbegin %state-monad
         (state-push 1)    ;(1)
         (state-push 2)    ;(2 1)
         (mlet* %state-monad ((z (state-pop))        ;(1)
                              (p (current-state))
                              (a (state-push z)))    ;(2 1)
           (return `((z . ,z) (p . ,p) (a . ,a)))))
     '())))

(test-end "monads")
44 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687
# htmlxref.cnf - reference file for free Texinfo manuals on the web.
# Modified by Ludovic Courtès <ludo@gnu.org> for the GNU Guix manual.

htmlxrefversion=2020-01-11.22; # UTC

# Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2019, 2020 Free Software Foundation, Inc.
# 
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
#
# The latest version of this file is available at
# http://ftpmirror.gnu.org/texinfo/htmlxref.cnf.
# Email corrections or additions to bug-texinfo@gnu.org.
# The primary goal is to list all relevant GNU manuals;
# other free manuals are also welcome.
#
# To be included in this list, a manual must:
#
# - have a generic url, e.g., no version numbers;
# - have a unique file name (e.g., manual identifier), i.e., be related to the
#   package name.  Things like "refman" or "tutorial" don't work.
# - follow the naming convention for nodes described at
# http://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref.html
#   This is what makeinfo and texi2html implement.
# 
# Unless the above criteria are met, it's not possible to generate
# reliable cross-manual references.
# 
# For information on automatically generating all the useful formats for
# a manual to put on the web, see
# http://www.gnu.org/prep/maintain/html_node/Manuals-on-Web-Pages.html.

# For people editing this file: when a manual named foo is related to a
# package named bar, the url should contain a variable reference ${BAR}.
# Otherwise, the gnumaint scripts have no way of knowing they are
# associated, and thus gnu.org/manual can't include them.

# shorten references to manuals on www.gnu.org.
G = https://www.gnu.org
GS = ${G}/software

3dldf		mono	${GS}/3dldf/manual/user_ref/3DLDF.html
3dldf		node	${GS}/3dldf/manual/user_ref/

alive		mono	${GS}/alive/manual/alive.html
alive		node	${GS}/alive/manual/html_node/

anubis		chapter	${GS}/anubis/manual/html_chapter/
anubis		section	${GS}/anubis/manual/html_section/
anubis		node	${GS}/anubis/manual/html_node/

artanis		mono	${GS}/artanis/manual/artanis.html
artanis		node	${GS}/artanis/manual/html_node/

aspell		section	http://aspell.net/man-html/index.html

auctex		mono	${GS}/auctex/manual/auctex.html
auctex		node	${GS}/auctex/manual/auctex/

autoconf	mono	${GS}/autoconf/manual/autoconf.html
autoconf	node	${GS}/autoconf/manual/html_node/

autogen		mono	${GS}/autogen/manual/html_mono/autogen.html
autogen		chapter	${GS}/autogen/manual/html_chapter/
autogen		node	${GS}/autoconf/manual/html_node/

automake	mono	${GS}/automake/manual/automake.html
automake	node	${GS}/automake/manual/html_node/

avl		node	http://adtinfo.org/libavl.html/

bash		mono	${GS}/bash/manual/bash.html
bash		node	${GS}/bash/manual/html_node/

BINUTILS = https://sourceware.org/binutils/docs
binutils	node	${BINUTILS}/binutils/
 as		node	${BINUTILS}/as/
 bfd		node	${BINUTILS}/bfd/
 gprof		node	${BINUTILS}/gprof/
 ld		node	${BINUTILS}/ld/

bison		mono	${GS}/bison/manual/bison.html
bison		node	${GS}/bison/manual/html_node/

bpel2owfn	mono	${GS}/bpel2owfn/manual/2.0.x/bpel2owfn.html

ccd2cue		mono	${GS}/ccd2cue/manual/ccd2cue.html
ccd2cue		node	${GS}/ccd2cue/manual/html_node/

cflow		mono	${GS}/cflow/manual/cflow.html
cflow		node	${GS}/cflow/manual/html_node/

chess		mono	${GS}/chess/manual/gnuchess.html
chess		node	${GS}/chess/manual/html_node/

combine		mono	${GS}/combine/manual/combine.html
combine		chapter	${GS}/combine/manual/html_chapter/
combine		section	${GS}/combine/manual/html_section/
combine		node	${GS}/combine/manual/html_node/

complexity	mono	${GS}/complexity/manual/complexity.html
complexity	node	${GS}/complexity/manual/html_node/

coreutils	mono	${GS}/coreutils/manual/coreutils
coreutils	node	${GS}/coreutils/manual/html_node/

cpio		mono	${GS}/cpio/manual/cpio
cpio		node	${GS}/cpio/manual/html_node/

cssc		node	${GS}/cssc/manual/

CVS = ${GS}/trans-coord/manual
cvs            mono    ${CVS}/cvs/cvs.html
cvs            node    ${CVS}/cvs/html_node/

ddd		mono	${GS}/ddd/manual/html_mono/ddd.html

ddrescue	mono	${GS}/ddrescue/manual/ddrescue_manual.html

DICO = https://puszcza.gnu.org.ua/software/dico/manual
dico		mono	${DICO}/dico.html
dico		chapter	${DICO}/html_chapter/
dico		section	${DICO}/html_section/
dico		node	${DICO}/html_node/

diffutils	mono	${GS}/diffutils/manual/diffutils
diffutils	node	${GS}/diffutils/manual/html_node/

ed		mono	${GS}/ed/manual/ed_manual.html

EMACS = ${GS}/emacs/manual
emacs		mono	${EMACS}/html_mono/emacs.html
emacs		node	${EMACS}/html_node/emacs/
 #
 ada-mode	mono	${EMACS}/html_mono/ada-mode.html
 ada-mode	node	${EMACS}/html_node/ada-mode/
 #
 autotype	mono	${EMACS}/html_mono/autotype.html
 autotype	node	${EMACS}/html_node/autotype/
 #
 ccmode		mono	${EMACS}/html_mono/ccmode.html
 ccmode		node	${EMACS}/html_node/ccmode/
 #
 cl		mono	${EMACS}/html_mono/cl.html
 cl		node	${EMACS}/html_node/cl/
 #
 ebrowse	mono	${EMACS}/html_mono/ebrowse.html
 ebrowse	node	${EMACS}/html_node/ebrowse/
 #
 ediff		mono	${EMACS}/html_mono/ediff.html
 ediff		node	${EMACS}/html_node/ediff/
 #
 eieio		mono	${EMACS}/html_mono/eieio.html
 eieio		node	${EMACS}/html_node/eieio/
 #
 elisp		mono	${EMACS}/html_mono/elisp.html
 elisp		node	${EMACS}/html_node/elisp/
 #
 epa		mono	${EMACS}/html_mono/epa.html
 epa		node	${EMACS}/html_node/epa/
 #
 erc		mono	${EMACS}/html_mono/erc.html
 erc		node	${EMACS}/html_node/erc/
 #
 dired-x	mono	${EMACS}/html_mono/dired-x.html
 dired-x	node	${EMACS}/html_node/dired-x/
 #
 eshell		mono	${EMACS}/html_mono/eshell.html
 eshell		node	${EMACS}/html_node/eshell/
 #
 eww		mono	${EMACS}/html_mono/eww.html
 eww		node	${EMACS}/html_node/eww/
 #
 flymake	mono	${EMACS}/html_mono/flymake.html
 flymake	node	${EMACS}/html_node/flymake/
 #
 gnus		mono	${EMACS}/html_mono/gnus.html
 gnus		node	${EMACS}/html_node/gnus/
 #
 idlwave	mono	${EMACS}/html_mono/idlwave.html
 idlwave	node	${EMACS}/html_node/idlwave/
 #
 message	mono	${EMACS}/html_mono/message.html
 message	node	${EMACS}/html_node/message/
 #
 mh-e		mono	${EMACS}/html_mono/mh-e.html
 mh-e		node	${EMACS}/html_node/mh-e/
 #
 nxml-mode	mono	${EMACS}/html_mono/nxml-mode.html
 nxml-mode	node	${EMACS}/html_node/nxml-mode/
 #
 org		mono	${EMACS}/html_mono/org.html
 org		node	${EMACS}/html_node/org/
 #
 pcl-cvs	mono	${EMACS}/html_mono/pcl-cvs.html
 pcl-cvs	node	${EMACS}/html_node/pcl-cvs/
 #
 rcirc		mono	${EMACS}/html_mono/rcirc.html
 rcirc		node	${EMACS}/html_node/rcirc/
 #
 semantic	mono	${EMACS}/html_mono/semantic.html
 semantic	node	${EMACS}/html_node/semantic/
 #
 smtp		mono	${EMACS}/html_mono/smtpmail.html
 smtp		node	${EMACS}/html_node/smtpmail/
 #
 speedbar	mono	${EMACS}/html_mono/speedbar.html
 speedbar	node	${EMACS}/html_node/speedbar/
 #
 tramp		mono	${EMACS}/html_mono/tramp.html
 tramp		node	${EMACS}/html_node/tramp/
 #
 vip		mono	${EMACS}/html_mono/vip.html
 vip		node	${EMACS}/html_node/vip/
 #
 viper		mono	${EMACS}/html_mono/viper.html
 viper		node	${EMACS}/html_node/viper/
 #
 woman		mono	${EMACS}/html_mono/woman.html
 woman		node	${EMACS}/html_node/woman/
 # (end emacs manuals)

easejs		mono	${GS}/easejs/manual/easejs.html
easejs		node	${GS}/easejs/manual/

EMACS_GUIX = https://emacs-guix.gitlab.io/website/manual/latest
emacs-guix	mono	${EMACS_GUIX}/emacs-guix.html
emacs-guix	node	${EMACS_GUIX}/html_node/

emacs-muse	node	${GS}/emacs-muse/manual/muse.html
emacs-muse	node	${GS}/emacs-muse/manual/html_node/

emms		node	${GS}/emms/manual/

# The file is called 'find.info' but the package is 'findutils'.
find		mono	${GS}/findutils/manual/html_mono/find.html
find		node	${GS}/findutils/manual/html_node/find_html
findutils	mono	${GS}/findutils/manual/html_mono/find.html
findutils	node	${GS}/findutils/manual/html_node/find_html

flex		node	https://westes.github.io/flex/manual/

gama		mono	${GS}/gama/manual/gama.html
gama		node	${GS}/gama/manual/html_node/

GAWK = ${GS}/gawk/manual
gawk		mono	${GAWK}/gawk.html
gawk		node	${GAWK}/html_node/
 gawkinet	mono	${GAWK}/gawkinet/gawkinet.html
 gawkinet	node	${GAWK}/gawkinet/html_node/

gcal		mono	${GS}/gcal/manual/gcal.html
gcal		node	${GS}/gcal/manual/html_node/

GCC = https://gcc.gnu.org/onlinedocs
gcc		node	${GCC}/gcc/
 cpp		node	${GCC}/cpp/
 gcj		node	${GCC}/gcj/
 gfortran	node	${GCC}/gfortran/
 gnat_rm	node	${GCC}/gnat_rm/
 gnat_ugn_unw	node	${GCC}/gnat_ugn_unw/
 libgomp	node	${GCC}/libgomp/
 libstdc++	node	${GCC}/libstdc++/
 #
 gccint		node	${GCC}/gccint/
 cppinternals	node	${GCC}/cppinternals/
 gfc-internals	node	${GCC}/gfc-internals/
 gnat-style	node	${GCC}/gnat-style/
 libiberty	node	${GCC}/libiberty/

GDB = https://sourceware.org/gdb/current/onlinedocs
gdb		node	${GDB}/gdb/
 stabs		node	${GDB}/stabs/

GDBM = http://www.gnu.org.ua/software/gdbm/manual
gdbm		mono	${GDBM}/gdbm.html
gdbm		chapter	${GDBM}/html_chapter/
gdbm		section ${GDBM}/html_section/
gdbm		node	${GDBM}/html_node/

# XXX: These are actually pages created by texi2html, so no quite following
# the expected naming scheme.
geiser		chapter	http://geiser.nongnu.org/

gettext		mono	${GS}/gettext/manual/gettext.html
gettext		node	${GS}/gettext/manual/html_node/

gforth		node	https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/

global		mono	${GS}/global/manual/global.html

gmediaserver	node	${GS}/gmediaserver/manual/

gmp		node	https://www.gmplib.org/manual/

gnu-arch	node	${GS}/gnu-arch/tutorial/

gnu-c-manual	mono	${GS}/gnu-c-manual/gnu-c-manual.html

gnu-crypto	node	${GS}/gnu-crypto/manual/

gnubg		mono	${GS}/gnubg/manual/gnubg.html
gnubg		node	${GS}/gnubg/manual/html_node/

gnubik		mono	${GS}/gnubik/manual/gnubik.html
gnubik		node	${GS}/gnubik/manual/html_node/

gnulib		mono	${GS}/gnulib/manual/gnulib.html
gnulib		node	${GS}/gnulib/manual/html_node/

GNUN = ${GS}/trans-coord/manual
gnun		mono	${GNUN}/gnun/gnun.html
gnun		node	${GNUN}/gnun/html_node/
 web-trans	mono	${GNUN}/web-trans/web-trans.html
 web-trans	node	${GNUN}/web-trans/html_node/

GNUPG = https://www.gnupg.org/documentation/manuals
gnupg		node	${GNUPG}/gnupg/
 dirmngr	node	${GNUPG}/dirmngr/
 gcrypt		node	${GNUPG}/gcrypt/
 libgcrypt	node	${GNUPG}/gcrypt/
 ksba		node	${GNUPG}/ksba/
 assuan		node	${GNUPG}/assuan/
 gpgme		node	${GNUPG}/gpgme/

gnuprologjava	node	${GS}/gnuprologjava/manual/

gnuschool	mono	${GS}/gnuschool/gnuschool.html

GNUSTANDARDS = ${G}/prep
 maintain	mono	${GNUSTANDARDS}/maintain/maintain.html
 maintain	node	${GNUSTANDARDS}/maintain/html_node/
 #
 standards	mono	${GNUSTANDARDS}/standards/standards.html
 standards	node	${GNUSTANDARDS}/standards/html_node/

gnutls		mono	http://gnutls.org/manual/gnutls.html
gnutls		node	http://gnutls.org/manual/html_node/

gnutls-guile	mono	http://gnutls.org/manual/gnutls-guile.html
gnutls-guile	node	http://gnutls.org/manual/gnutls-guile/

gperf		mono	${GS}/gperf/manual/gperf.html
gperf		node	${GS}/gperf/manual/html_node/

grep		mono	${GS}/grep/manual/grep.html
grep		node	${GS}/grep/manual/html_node/

groff		node	${GS}/groff/manual/html_node/

GRUB = ${GS}/grub/manual
  grub		mono	${GRUB}/grub.html
  grub		node	${GRUB}/html_node/
  #
  multiboot	mono	${GRUB}/multiboot/multiboot.html
  multiboot	node	${GRUB}/multiboot/html_node/

gsasl		mono	${GS}/gsasl/manual/gsasl.html
gsasl		node	${GS}/gsasl/manual/html_node/

gsl		node	${GS}/gsl/manual/html_node/

gsrc		mono	${GS}/gsrc/manual/gsrc.html
gsrc		node	${GS}/gsrc/manual/html_node/

gss		mono	${GS}/gss/manual/gss.html
gss		node	${GS}/gss/manual/html_node/

gtypist		mono	${GS}/gtypist/doc/

guile		mono	${GS}/guile/manual/guile.html
guile		node	${GS}/guile/manual/html_node/

guile-avahi	mono	http://nongnu.org/guile-avahi/doc/guile-avahi.html

GUILE_GNOME = ${GS}/guile-gnome/docs
 gobject 	node	${GUILE_GNOME}/gobject/html/
 glib		node	${GUILE_GNOME}/glib/html/
 atk		node	${GUILE_GNOME}/atk/html/
 pango		node	${GUILE_GNOME}/pango/html/
 pangocairo	node	${GUILE_GNOME}/pangocairo/html/
 gdk		node	${GUILE_GNOME}/gdk/html/
 gtk		node	${GUILE_GNOME}/gtk/html/
 libglade	node	${GUILE_GNOME}/libglade/html/
 gnome-vfs	node	${GUILE_GNOME}/gnome-vfs/html/
 libgnomecanvas	node	${GUILE_GNOME}/libgnomecanvas/html/
 gconf		node	${GUILE_GNOME}/gconf/html/
 libgnome	node	${GUILE_GNOME}/libgnome/html/
 libgnomeui	node	${GUILE_GNOME}/libgnomeui/html/
 corba		node	${GUILE_GNOME}/corba/html/
 clutter	node	${GUILE_GNOME}/clutter/html/
 clutter-glx	node	${GUILE_GNOME}/clutter-glx/html/

guile-gtk	node	${GS}/guile-gtk/docs/guile-gtk/

guile-rpc	mono	${GS}/guile-rpc/manual/guile-rpc.html
guile-rpc	node	${GS}/guile-rpc/manual/html_node/

guix.de		mono	${GS}/guix/manual/de/guix.html
guix.de		node	${GS}/guix/manual/de/html_node/
guix.es		mono	${GS}/guix/manual/es/guix.html
guix.es		node	${GS}/guix/manual/es/html_node/
guix.fr		mono	${GS}/guix/manual/fr/guix.html
guix.fr		node	${GS}/guix/manual/fr/html_node/
guix.ru		mono	${GS}/guix/manual/ru/guix.html
guix.ru		node	${GS}/guix/manual/ru/html_node/
guix.zh_CN	mono	${GS}/guix/manual/zh-cn/guix.html
guix.zh_CN	node	${GS}/guix/manual/zh-cn/html_node/
guix		mono	${GS}/guix/manual/en/guix.html
guix		node	${GS}/guix/manual/en/html_node/

gv		mono	${GS}/gv/manual/gv.html
gv		node	${GS}/gv/manual/html_node/

gzip		mono	${GS}/gzip/manual/gzip.html
gzip		node	${GS}/gzip/manual/html_node/

hello		mono	${GS}/hello/manual/hello.html
hello		node	${GS}/hello/manual/html_node/

help2man	mono	${GS}/help2man/help2man.html

# XXX: These are actually pages created by texi2html, so no quite following
# the expected naming scheme.
hurd		mono	${GS}/hurd/doc/

idutils		mono	${GS}/idutils/manual/idutils.html
idutils		node	${GS}/idutils/manual/html_node/

inetutils	mono	${GS}/inetutils/manual/inetutils.html
inetutils	node	${GS}/inetutils/manual/html_node/

jwhois		mono	${GS}/jwhois/manual/jwhois.html
jwhois		node	${GS}/jwhois/manual/html_node/

libc		mono	${GS}/libc/manual/html_mono/libc.html
libc		node	${GS}/libc/manual/html_node/

LIBCDIO = ${GS}/libcdio
 libcdio	mono	${LIBCDIO}/libcdio.html
 cd-text	mono	${LIBCDIO}/cd-text-format.html

libextractor	mono	${GS}/libextractor/manual/libextractor.html
libextractor	node	${GS}/libextractor/manual/html_node/

libidn		mono	${GS}/libidn/manual/libidn.html
libidn		node	${GS}/libidn/manual/html_node/

librejs		mono	${GS}/librejs/manual/librejs.html
librejs		node	${GS}/librejs/manual/html_node/

libmatheval	mono	${GS}/libmatheval/manual/libmatheval.html

LIBMICROHTTPD = ${GS}/libmicrohttpd
libmicrohttpd		mono	${LIBMICROHTTPD}/manual/libmicrohttpd.html
libmicrohttpd		node	${LIBMICROHTTPD}/manual/html_node/
 microhttpd-tutorial	mono	${LIBMICROHTTPD}/tutorial.html

libtasn1	mono	${GS}/libtasn1/manual/libtasn1.html
libtasn1	node	${GS}/libtasn1/manual/html_node/

libtool		mono	${GS}/libtool/manual/libtool.html
libtool		node	${GS}/libtool/manual/html_node/

lightning	mono	${GS}/lightning/manual/lightning.html
lightning	node	${GS}/lightning/manual/html_node/

# The stable/ url redirects immediately, but that's ok.
# The .html extension is omitted on their web site, but it works if given.
LILYPOND = http://lilypond.org/doc/stable/Documentation
 lilypond-internals	node ${LILYPOND}/internals/
 lilypond-learning	node ${LILYPOND}/learning/
 lilypond-notation 	node ${LILYPOND}/notation/
 lilypond-snippets 	node ${LILYPOND}/snippets/
 lilypond-usage		node ${LILYPOND}/usage/
 lilypond-web		node ${LILYPOND}/web/
 music-glossary		node ${LILYPOND}/music-glossary/

liquidwar6	mono	${GS}/liquidwar6/manual/liquidwar6.html
liquidwar6	node	${GS}/liquidwar6/manual/html_node/

lispintro	mono	${GS}/emacs/emacs-lisp-intro/html_mono/emacs-lisp-intro.html
lispintro	node	${GS}/emacs/emacs-lisp-intro/html_node/index.html

LSH = http://www.lysator.liu.se/~nisse/lsh
  lsh		mono	${LSH}/lsh.html

m4		mono	${GS}/m4/manual/m4.html
m4		node	${GS}/m4/manual/html_node/

mailutils	mono	${GS}/mailutils/manual/mailutils.html
mailutils	chapter	${GS}/mailutils/manual/html_chapter/
mailutils	section	${GS}/mailutils/manual/html_section/
mailutils	node	${GS}/mailutils/manual/html_node/

make		mono	${GS}/make/manual/make.html
make		node	${GS}/make/manual/html_node/

mcron		mono	${GS}/mcron/manual/mcron.html
mcron		node	${GS}/mcron/manual/html_node/

mdk		mono	${GS}/mdk/manual/mdk.html
mdk		node	${GS}/mdk/manual/html_node/

METAEXCHANGE = http://ftp.gwdg.de/pub/gnu2/iwfmdh/doc/texinfo
 iwf_mh		node	${METAEXCHANGE}/iwf_mh.html
 scantest	node	${METAEXCHANGE}/scantest.html

mes		mono	${GS}/mes/manual/mes.html
mes		node	${GS}/mes/manual/html_node/

MIT_SCHEME = ${GS}/mit-scheme/documentation
 mit-scheme-ref	  node	${MIT_SCHEME}/mit-scheme-ref/
 mit-scheme-user  node	${MIT_SCHEME}/mit-scheme-user/
 sos		  node	${MIT_SCHEME}/mit-scheme-sos/
 mit-scheme-imail node	${MIT_SCHEME}/mit-scheme-imail/

moe		mono	${GS}/moe/manual/moe_manual.html

motti		node	${GS}/motti/manual/

mpc		node	http://www.multiprecision.org/index.php?prog=mpc&page=html

mpfr		mono	http://www.mpfr.org/mpfr-current/mpfr.html

mtools		mono	${GS}/mtools/manual/mtools.html

myserver	mono	http://www.myserverproject.net/doc.php

nano		mono	https://www.nano-editor.org/dist/latest/nano.html

nettle		chapter	http://www.lysator.liu.se/~nisse/nettle/nettle.html

ocrad		mono	${GS}/ocrad/manual/ocrad_manual.html

parted		mono	${GS}/parted/manual/parted.html
parted		node	${GS}/parted/manual/html_node/

pascal		mono	http://www.gnu-pascal.de/gpc/

# can't use pcb since url's contain dates --30nov10

perl		mono	${GS}/perl/manual/perldoc-all.html

PIES = http://www.gnu.org.ua/software/pies/manual
pies		mono	${PIES}/pies.html
pies 		chapter	${PIES}/html_chapter/
pies 		section	${PIES}/html_section/
pies		node	${PIES}/html_node/

plotutils	mono	${GS}/plotutils/manual/en/plotutils.html
plotutils	node	${GS}/plotutils/manual/en/html_node/

proxyknife	mono	${GS}/proxyknife/manual/proxyknife.html
proxyknife	node	${GS}/proxyknife/manual/html_node/

pspp		mono	${GS}/pspp/manual/pspp.html
pspp		node	${GS}/pspp/manual/html_node/

pyconfigure	mono	${GS}/pyconfigure/manual/pyconfigure.html
pyconfigure	node	${GS}/pyconfigure/manual/html_node/

R = https://cran.r-project.org/doc/manuals
 R-intro	mono	${R}/R-intro.html
 R-lang		mono	${R}/R-lang.html
 R-exts		mono	${R}/R-exts.html
 R-data		mono	${R}/R-data.html
 R-admin	mono	${R}/R-admin.html
 R-ints		mono	${R}/R-ints.html

rcs		mono	${GS}/rcs/manual/rcs.html
rcs		node	${GS}/rcs/manual/html_node/

READLINE = http://cnswww.cns.cwru.edu/php/chet/readline
readline        mono    ${READLINE}/readline.html
 rluserman      mono    ${READLINE}/rluserman.html
 history        mono    ${READLINE}/history.html

recode		mono	http://recode.progiciels-bpi.ca/manual/index.html

recutils	mono	${GS}/recutils/manual/recutils.html
recutils	node	${GS}/recutils/manual/html_node/

reftex		mono	${GS}/auctex/manual/reftex.html
reftex		node	${GS}/auctex/manual/reftex/

remotecontrol	mono	${GS}/remotecontrol/manual/remotecontrol.html
remotecontrol	node	${GS}/remotecontrol/manual/html_node/

rottlog		mono	${GS}/rottlog/manual/rottlog.html
rottlog		node	${GS}/rottlog/manual/html_node/

RUSH = http://www.gnu.org.ua/software/rush/manual
rush		mono	${RUSH}/rush.html
rush 		chapter	${RUSH}/html_chapter/
rush 		section	${RUSH}/html_section/
rush		node	${RUSH}/html_node/

screen		mono	${GS}/screen/manual/screen.html
screen		node	${GS}/screen/manual/html_node/

sed		mono	${GS}/sed/manual/sed.html
sed		node	${GS}/sed/manual/html_node/

sharutils	mono	${GS}/sharutils/manual/html_mono/sharutils.html
sharutils	chapter	${GS}/sharutils/manual/html_chapter/
sharutils	node	${GS}/sharutils/manual/html_node/

shepherd	mono	${GS}/shepherd/manual/shepherd.html
shepherd	node	${GS}/shepherd/manual/html_node/

# can't use mono files since they have generic names
SMALLTALK = ${GS}/smalltalk
smalltalk	node	${SMALLTALK}/manual/html_node/
 smalltalk-base	node	${SMALLTALK}/manual-base/html_node/
 smalltalk-libs	node	${SMALLTALK}/manual-libs/html_node/

sourceinstall	mono	${GS}/sourceinstall/manual/sourceinstall.html
sourceinstall	node	${GS}/sourceinstall/manual/html_node/

sqltutor	mono	${GS}/sqltutor/manual/sqltutor.html
sqltutor	node	${GS}/sqltutor/manual/html_node/

src-highlite	mono	${GS}/src-highlite/source-highlight.html

swbis		mono	${GS}/swbis/manual.html

tar		mono	${GS}/tar/manual/tar.html
tar		chapter	${GS}/tar/manual/html_chapter/
tar		section	${GS}/tar/manual/html_section/
tar		node	${GS}/autoconf/manual/html_node/

teseq		mono	${GS}/teseq/teseq.html
teseq		node	${GS}/teseq/html_node/

TEXINFO = ${GS}/texinfo/manual
texinfo		mono	${TEXINFO}/texinfo/texinfo.html
texinfo		node	${TEXINFO}/texinfo/html_node/
 #
 info		mono	${TEXINFO}/info/info.html
 info		node	${TEXINFO}/info/html_node/
 #
 info-stnd	mono	${TEXINFO}/info-stnd/info-stnd.html
 info-stnd	node	${TEXINFO}/info-stnd/html_node/

thales		node	${GS}/thales/manual/

units		mono	${GS}/units/manual/units.html
units		node	${GS}/units/manual/html_node/

vc-dwim		mono	${GS}/vc-dwim/manual/vc-dwim.html
vc-dwim		node	${GS}/vc-dwim/manual/html_node/

wdiff		mono	${GS}/wdiff/manual/wdiff.html
wdiff		node	${GS}/wdiff/manual/html_node/

websocket4j	mono	${GS}/websocket4j/manual/websocket4j.html
websocket4j	node	${GS}/websocket4j/manual/html_node/

wget		mono	${GS}/wget/manual/wget.html
wget		node	${GS}/wget/manual/html_node/

xboard		mono	${GS}/xboard/manual/xboard.html
xboard		node	${GS}/xboard/manual/html_node/

# emacs-page
# Free TeX-related Texinfo manuals on tug.org.

T = https://tug.org/texinfohtml

dvipng		mono	${T}/dvipng.html
dvips		mono	${T}/dvips.html
eplain		mono	${T}/eplain.html
kpathsea	mono	${T}/kpathsea.html
latex2e		mono	${T}/latex2e.html
tlbuild		mono	${T}/tlbuild.html
web2c		mono	${T}/web2c.html


# Local Variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "htmlxrefversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End: