Skip to content

Commit fa09e8e

Browse files
committed
trying a new way to do the dependencies for append_to_form
1 parent 5ddfdd9 commit fa09e8e

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

scripts/do.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#! /usr/bin/env bash
22

3+
# hand-paginated index file for LaTeX => PDF
4+
HAND_PAGINATED="hand-paginated.ind"
5+
36
# DOCS is the local target folder, before deployment
47
DOCS="docs_out"
58

@@ -54,7 +57,9 @@ epub() {
5457

5558
clean() {
5659
rm -rf ${DOCS}/*
60+
mv ${LATEX_PDF}/${HAND_PAGINATED} .
5761
rm -rf ${LATEX_PDF}/*
62+
mv ${HAND_PAGINATED} ${LATEX_PDF}
5863
rm -rf ${LATEX_EPUB}/*
5964
rm -rf ${GENERATED_HTML}/*
6065
rm -rf ${GENERATED_JS}/*

xml/chapter4/section4/subsection1.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1978,6 +1978,16 @@ rule(append_to_form(pair($u, $v), $y, pair($u, $z)),
19781978
append_to_form($v, $y, $z)))`);
19791979
</JAVASCRIPT_RUN>
19801980
</SNIPPET>
1981+
<SNIPPET HIDE="yes">
1982+
<NAME>append_to_form_just_the_rules</NAME>
1983+
<JAVASCRIPT>
1984+
process_query(`assert(
1985+
rule(append_to_form(null, $y, $y)))`);
1986+
process_query(`assert(
1987+
rule(append_to_form(pair($u, $v), $y, pair($u, $z)),
1988+
append_to_form($v, $y, $z)))`);
1989+
</JAVASCRIPT>
1990+
</SNIPPET>
19811991
<SNIPPET HIDE="yes">
19821992
<NAME>append_to_form_example_1</NAME>
19831993
<JAVASCRIPT_TEST>
@@ -2027,7 +2037,8 @@ process_query('append_to_form(list(1, 2), list(3, 4), $xs)');
20272037
<SCHEMEINLINE>append</SCHEMEINLINE> of two lists:
20282038
<SNIPPET>
20292039
<NAME>append_to_form_example_2</NAME>
2030-
<REQUIRES>append_to_form</REQUIRES>
2040+
<REQUIRES>process_query</REQUIRES>
2041+
<REQUIRES>append_to_form_just_the_rules</REQUIRES>
20312042
<EXPECTED>'append_to_form(list("a", "b"), list("c", "d"), list("a", "b", "c", "d"))'</EXPECTED>
20322043
<SCHEMEPROMPT>
20332044
;;; Query input:
@@ -2061,7 +2072,6 @@ Query results:
20612072
append_to_form(list("a", "b"), list("c", "d"), list("a", "b", "c", "d"))
20622073
</JAVASCRIPT_OUTPUT>
20632074
</SNIPPET>
2064-
20652075
What is more striking, we can use the same rules to ask the question
20662076
<SPLITINLINE>
20672077
<SCHEME>
@@ -2080,7 +2090,8 @@ append_to_form(list("a", "b"), list("c", "d"), list("a", "b", "c", "d"))
20802090
This is done as follows:
20812091
<SNIPPET>
20822092
<NAME>append_to_form_example_3</NAME>
2083-
<REQUIRES>append_to_form</REQUIRES>
2093+
<REQUIRES>process_query</REQUIRES>
2094+
<REQUIRES>append_to_form_just_the_rules</REQUIRES>
20842095
<EXPECTED>'append_to_form(list("a", "b"), list("c", "d"), list("a", "b", "c", "d"))'</EXPECTED>
20852096
<JAVASCRIPT_TEST>
20862097
first_answer('append_to_form(list("a", "b"), y, list("a", "b", "c", "d"))');
@@ -2129,7 +2140,8 @@ append_to_form(list("a", "b"), list("c", "d"), list("a", "b", "c", "d"))
21292140
</SPLITINLINE>
21302141
<SNIPPET>
21312142
<NAME>append_to_form_example_4</NAME>
2132-
<REQUIRES>append_to_form</REQUIRES>
2143+
<REQUIRES>process_query</REQUIRES>
2144+
<REQUIRES>append_to_form_just_the_rules</REQUIRES>
21332145
<EXPECTED>'append_to_form(list("a", "b", "c", "d"), null, list("a", "b", "c", "d"))'</EXPECTED>
21342146
<JAVASCRIPT_TEST>
21352147
first_answer('append_to_form($x, $y, list("a", "b", "c", "d"))');

0 commit comments

Comments
 (0)