Compare commits
1243 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4bcb657f08 | ||
![]() |
a0a44d8d5f | ||
![]() |
596c571ab1 | ||
![]() |
50ddbee87f | ||
![]() |
6a5cecee0a | ||
![]() |
782f5798a2 | ||
![]() |
e4c0b75cae | ||
![]() |
cf70c4a241 | ||
![]() |
ee623160a4 | ||
![]() |
ffbdc4b61c | ||
![]() |
09313a0942 | ||
![]() |
193178028d | ||
![]() |
794061ba1d | ||
![]() |
161a9edb57 | ||
![]() |
236b17f625 | ||
![]() |
ce15a558c7 | ||
![]() |
4e57e160fb | ||
![]() |
5c10eb13eb | ||
![]() |
7c458d10d7 | ||
![]() |
05292b7e69 | ||
![]() |
209f2db611 | ||
![]() |
0aec872710 | ||
![]() |
077e6da2cb | ||
![]() |
62aa2b75bf | ||
![]() |
427fe9340c | ||
![]() |
585ca37c5b | ||
![]() |
3c074249a0 | ||
![]() |
a4d569ae31 | ||
![]() |
153e19edc5 | ||
![]() |
91eaf40b1f | ||
![]() |
bfd2404328 | ||
![]() |
bcacb34110 | ||
![]() |
fafa83a8a0 | ||
![]() |
a86931d5f9 | ||
![]() |
25b2ec2e03 | ||
![]() |
cf595678f6 | ||
![]() |
ab546d662e | ||
![]() |
20e2e839cb | ||
![]() |
9a3e16edff | ||
![]() |
f7182e7a5c | ||
![]() |
92f4f8ad10 | ||
![]() |
b1ba506b52 | ||
![]() |
b9b71b20cc | ||
![]() |
cff10bc5a8 | ||
![]() |
df157cdfd0 | ||
![]() |
668e2ffbe2 | ||
![]() |
790096529c | ||
![]() |
04b86b1d2f | ||
![]() |
8b3ea4c842 | ||
![]() |
0b7c8e0b2e | ||
![]() |
894873c2ff | ||
![]() |
b94e77a062 | ||
![]() |
b1ff73155f | ||
![]() |
e412a2d5a9 | ||
![]() |
040078ab01 | ||
![]() |
d27bf66f1a | ||
![]() |
182d648af6 | ||
![]() |
2556733359 | ||
![]() |
8bcb035693 | ||
![]() |
33acbaeaf1 | ||
![]() |
cbba4e75f9 | ||
![]() |
de0fbf2648 | ||
![]() |
d22df41001 | ||
![]() |
2213b61536 | ||
![]() |
041cebc9c0 | ||
![]() |
11927aea37 | ||
![]() |
6a250fb089 | ||
![]() |
4d358d9914 | ||
![]() |
1e72b96f9a | ||
![]() |
0f73870a1b | ||
![]() |
26d28a28fe | ||
![]() |
747185184b | ||
![]() |
9fdffc446a | ||
![]() |
b5503151ac | ||
![]() |
d80a8244a2 | ||
![]() |
686bc68b0a | ||
![]() |
509da64135 | ||
![]() |
89f30c3c0d | ||
![]() |
ffbae2c090 | ||
![]() |
e90e587a91 | ||
![]() |
c1d44cedba | ||
![]() |
7e2195fdba | ||
![]() |
3d484cf560 | ||
![]() |
bfb14637a6 | ||
![]() |
6c7a9ae03a | ||
![]() |
79ad86d891 | ||
![]() |
2bfb851ccc | ||
![]() |
8ec35de0b2 | ||
![]() |
1c8881dbef | ||
![]() |
254dac4625 | ||
![]() |
7e4d7dfdee | ||
![]() |
8039a759f4 | ||
![]() |
b52a4b3318 | ||
![]() |
8eadc197a9 | ||
![]() |
9b4f830268 | ||
![]() |
97d951af54 | ||
![]() |
3617e1f81e | ||
![]() |
f2e34fedea | ||
![]() |
753def919b | ||
![]() |
f8a4982bae | ||
![]() |
e94081c5aa | ||
![]() |
59f3f82460 | ||
![]() |
3b25e22dd6 | ||
![]() |
8a59534669 | ||
![]() |
3ac2c69f6c | ||
![]() |
428d02c78c | ||
![]() |
828335a879 | ||
![]() |
5ef3a53002 | ||
![]() |
7d90b27524 | ||
![]() |
e4f0b69b72 | ||
![]() |
032b1871d1 | ||
![]() |
d70616ec65 | ||
![]() |
bc99eb0eef | ||
![]() |
f83cec1b04 | ||
![]() |
301b47df2c | ||
![]() |
5aff9925ad | ||
![]() |
c1664610e1 | ||
![]() |
2cc4b66184 | ||
![]() |
f2bef56a2e | ||
![]() |
81b5d74ed6 | ||
![]() |
7151d6d034 | ||
![]() |
990555cd8d | ||
![]() |
d9971292a6 | ||
![]() |
f0500c64d3 | ||
![]() |
15f47ef62e | ||
![]() |
f71474baca | ||
![]() |
a45330815d | ||
![]() |
5a378ca883 | ||
![]() |
6cd225e073 | ||
![]() |
3e29101e48 | ||
![]() |
c15a357417 | ||
![]() |
98ba277948 | ||
![]() |
9494216a9b | ||
![]() |
619ef41f7d | ||
![]() |
c0bb539af7 | ||
![]() |
d050bd79d9 | ||
![]() |
537292ef45 | ||
![]() |
01458e22fa | ||
![]() |
0619af508b | ||
![]() |
be628e21a6 | ||
![]() |
c4ebd771bb | ||
![]() |
e32e1383fe | ||
![]() |
0606228959 | ||
![]() |
5f7d0317e8 | ||
![]() |
37a8031803 | ||
![]() |
a52a08146a | ||
![]() |
2b4bfcf854 | ||
![]() |
f7c55a8bc6 | ||
![]() |
a0f7b618f7 | ||
![]() |
1005701b8e | ||
![]() |
6a78beecdf | ||
![]() |
0133954c84 | ||
![]() |
79fcdf4201 | ||
![]() |
b92ef72c8c | ||
![]() |
db04b47cdb | ||
![]() |
0c38da0ee2 | ||
![]() |
bfc2611ff2 | ||
![]() |
f93e0df781 | ||
![]() |
068af526de | ||
![]() |
0961cf9412 | ||
![]() |
6ee45a156d | ||
![]() |
0e1f17b520 | ||
![]() |
71f338430b | ||
![]() |
640895645f | ||
![]() |
e6a0caa147 | ||
![]() |
5ffe007f5c | ||
![]() |
5b37bac183 | ||
![]() |
f21aa8661b | ||
![]() |
1cffde1df8 | ||
![]() |
50db01bf2c | ||
![]() |
c1b9cd6828 | ||
![]() |
18990701a6 | ||
![]() |
9a8fd2912f | ||
![]() |
06c15dbf89 | ||
![]() |
91d85a1fb5 | ||
![]() |
463c32c61d | ||
![]() |
35acfab903 | ||
![]() |
7982a59a1d | ||
![]() |
048c4b4a73 | ||
![]() |
89e00da75e | ||
![]() |
9cb0637f95 | ||
![]() |
65838bd3c8 | ||
![]() |
3f246dd857 | ||
![]() |
5031897c51 | ||
![]() |
1b54b1c040 | ||
![]() |
bbbe99db43 | ||
![]() |
ced25315ac | ||
![]() |
2ee721f351 | ||
![]() |
19c00dc91c | ||
![]() |
4c4874c26d | ||
![]() |
65eaff3a03 | ||
![]() |
2fb1d4f45d | ||
![]() |
7ea277e420 | ||
![]() |
4e7bb3071a | ||
![]() |
7a11d09134 | ||
![]() |
ec4bd288bf | ||
![]() |
856e60fe51 | ||
![]() |
5214b06a86 | ||
![]() |
70cefc60bc | ||
![]() |
30f045c677 | ||
![]() |
fe900e0d7a | ||
![]() |
870b8d4137 | ||
![]() |
5dc368585f | ||
![]() |
9419778b1e | ||
![]() |
c34d37d265 | ||
![]() |
86a9c2e493 | ||
![]() |
e8d34dd156 | ||
![]() |
7563f5a812 | ||
![]() |
6723c64487 | ||
![]() |
39a1b81b6a | ||
![]() |
5644b901d0 | ||
![]() |
f669eb4af5 | ||
![]() |
b0d9653cbe | ||
![]() |
9e69f341b3 | ||
![]() |
767fd3fa3a | ||
![]() |
9d990b65dc | ||
![]() |
95c0dfce38 | ||
![]() |
3620bae6da | ||
![]() |
f52d43e600 | ||
![]() |
34cfe48355 | ||
![]() |
10c934aec0 | ||
![]() |
f7298cdb29 | ||
![]() |
bea67c0a39 | ||
![]() |
126c090579 | ||
![]() |
f130a5ea48 | ||
![]() |
4949eb3374 | ||
![]() |
7c4aaa20a8 | ||
![]() |
fa96375742 | ||
![]() |
0f39ee9b72 | ||
![]() |
60845b2098 | ||
![]() |
8331e28c49 | ||
![]() |
86f0d75a96 | ||
![]() |
ad0f94c054 | ||
![]() |
4fd60fed11 | ||
![]() |
d5ae7125e5 | ||
![]() |
451ef1d37e | ||
![]() |
b8af007d94 | ||
![]() |
74c423bb24 | ||
![]() |
a48b559324 | ||
![]() |
c726cf6ffc | ||
![]() |
2f6f403ce8 | ||
![]() |
d0c48de685 | ||
![]() |
1661eeda18 | ||
![]() |
b00d7782ca | ||
![]() |
143267f1e9 | ||
![]() |
1277f0347a | ||
![]() |
e5738b8ee6 | ||
![]() |
72418fba03 | ||
![]() |
d34cd06b90 | ||
![]() |
f3f5d9212a | ||
![]() |
ecce6e1b85 | ||
![]() |
9b7724167a | ||
![]() |
379a3dd110 | ||
![]() |
66d6de6394 | ||
![]() |
0104e753e7 | ||
![]() |
edd117d414 | ||
![]() |
1204aacd70 | ||
![]() |
e0cc61d5af | ||
![]() |
e133d87765 | ||
![]() |
ea172ae459 | ||
![]() |
738529c7de | ||
![]() |
f317f906d8 | ||
![]() |
0a266780fe | ||
![]() |
48de4101c2 | ||
![]() |
cc4fd16ed5 | ||
![]() |
35ce47d97c | ||
![]() |
e3abc6f5c7 | ||
![]() |
579d50b2d8 | ||
![]() |
308c918a42 | ||
![]() |
41c8d5bc27 | ||
![]() |
df29c4e7e2 | ||
![]() |
3cb100ba17 | ||
![]() |
187d220ecc | ||
![]() |
9498bdd80f | ||
![]() |
be82c27db3 | ||
![]() |
0fb11e61e6 | ||
![]() |
052c7e4c06 | ||
![]() |
6ea9e963c4 | ||
![]() |
34f52deeb1 | ||
![]() |
417d9b0e73 | ||
![]() |
0d3066d8db | ||
![]() |
c2e99efefc | ||
![]() |
01e889570a | ||
![]() |
034d2e9531 | ||
![]() |
3e5c889b7d | ||
![]() |
dafb6d722e | ||
![]() |
7b4c91ea21 | ||
![]() |
8e162082e1 | ||
![]() |
30005d41ac | ||
![]() |
d4f3dfb3d0 | ||
![]() |
7bae604711 | ||
![]() |
b078cbc0ef | ||
![]() |
3c496777ef | ||
![]() |
32a79a22ec | ||
![]() |
393d72f153 | ||
![]() |
666c5f1557 | ||
![]() |
3e53a3ea42 | ||
![]() |
c24ddb4a7c | ||
![]() |
578b42fc2b | ||
![]() |
8b4f8541c3 | ||
![]() |
d04dfb67df | ||
![]() |
7db904e984 | ||
![]() |
9a6726b10d | ||
![]() |
bfe9b4aefd | ||
![]() |
c9348f7cd7 | ||
![]() |
7eee46c4d3 | ||
![]() |
961ab31776 | ||
![]() |
d3c09ead19 | ||
![]() |
ccc50ca68f | ||
![]() |
18208f76f5 | ||
![]() |
69b01c637f | ||
![]() |
fe1ffbe36f | ||
![]() |
711ab4d984 | ||
![]() |
8dfce37977 | ||
![]() |
c706ee2c05 | ||
![]() |
273bc4ea49 | ||
![]() |
d160cb81a8 | ||
![]() |
92f1bfa4d2 | ||
![]() |
1e5da68b88 | ||
![]() |
8068c1e2a5 | ||
![]() |
25f8a5d0d9 | ||
![]() |
4b266f1ff2 | ||
![]() |
1ce6a49f94 | ||
![]() |
533c0d16ec | ||
![]() |
656044b8fc | ||
![]() |
31a9414983 | ||
![]() |
c7726e23ec | ||
![]() |
3f4dcb8e87 | ||
![]() |
3df12dca58 | ||
![]() |
94ac77d30e | ||
![]() |
3ed7dfd62b | ||
![]() |
14b951cf44 | ||
![]() |
d37ee8c5b1 | ||
![]() |
5cf748d734 | ||
![]() |
1c431e6f4d | ||
![]() |
77a76a7953 | ||
![]() |
5ae4e45340 | ||
![]() |
cc79e2241c | ||
![]() |
4509430063 | ||
![]() |
1e18a7e2b4 | ||
![]() |
a2c9b47552 | ||
![]() |
2aa9d8cca3 | ||
![]() |
c47c0ebfca | ||
![]() |
47f06f11e1 | ||
![]() |
740b6dc198 | ||
![]() |
acb7d999ba | ||
![]() |
707f9bffa6 | ||
![]() |
6af2f711b7 | ||
![]() |
0796350a88 | ||
![]() |
36b3493e45 | ||
![]() |
fdf56dfebf | ||
![]() |
190925ee32 | ||
![]() |
2529e63b74 | ||
![]() |
b24882fd18 | ||
![]() |
fd7b8b29ea | ||
![]() |
c0915b02b0 | ||
![]() |
c9a1dc781e | ||
![]() |
d3bb9d0412 | ||
![]() |
8b7f5bc046 | ||
![]() |
923b5864a5 | ||
![]() |
8c8a76979b | ||
![]() |
4c04d4afce | ||
![]() |
110f1bd9b0 | ||
![]() |
357b692d33 | ||
![]() |
567679bf0a | ||
![]() |
d5f61238c2 | ||
![]() |
e92b8610f2 | ||
![]() |
85c781452d | ||
![]() |
0f7a946dba | ||
![]() |
61e21dba22 | ||
![]() |
df382ca939 | ||
![]() |
cb2af327e6 | ||
![]() |
9ee264a0ea | ||
![]() |
a97aa8389b | ||
![]() |
1c3422d420 | ||
![]() |
f2f38cdf4a | ||
![]() |
a5b3d6b3d0 | ||
![]() |
46ace3172f | ||
![]() |
757adac568 | ||
![]() |
4bdde405f6 | ||
![]() |
893bb56762 | ||
![]() |
e2bd1b51bc | ||
![]() |
404c5b2699 | ||
![]() |
56ea9f8b9a | ||
![]() |
22adc0253b | ||
![]() |
2c5aa96031 | ||
![]() |
7056cd5f2a | ||
![]() |
a516304f6b | ||
![]() |
26560240f1 | ||
![]() |
d4ca825640 | ||
![]() |
a44ce40b56 | ||
![]() |
f7465f81f1 | ||
![]() |
ff31b01505 | ||
![]() |
50405a2ca9 | ||
![]() |
e08188aeda | ||
![]() |
cefcbdf802 | ||
![]() |
afa01fa763 | ||
![]() |
b3d05de304 | ||
![]() |
bc12019af4 | ||
![]() |
8f2874e4b5 | ||
![]() |
daf19869de | ||
![]() |
1b6705f3d9 | ||
![]() |
d927d04efd | ||
![]() |
f0f85549ce | ||
![]() |
c9d192f09b | ||
![]() |
badf2bd19e | ||
![]() |
7708b2056a | ||
![]() |
0840fcd6c8 | ||
![]() |
f0d09dbef1 | ||
![]() |
843992d0c7 | ||
![]() |
144da5abd4 | ||
![]() |
c1950f1ae3 | ||
![]() |
ba2eb6487c | ||
![]() |
44e1262648 | ||
![]() |
db0a6de1d2 | ||
![]() |
592ae853e3 | ||
![]() |
b794404333 | ||
![]() |
e8073e699e | ||
![]() |
c73bcceafe | ||
![]() |
d2233f95e2 | ||
![]() |
8a9408306b | ||
![]() |
31cf0bdbc3 | ||
![]() |
d2bf335212 | ||
![]() |
2b10262258 | ||
![]() |
9bdbd14b96 | ||
![]() |
c01ced6e1d | ||
![]() |
b221e00937 | ||
![]() |
aeb0509f3a | ||
![]() |
99d7ad56d9 | ||
![]() |
3a4ba9a1ca | ||
![]() |
261a5cb1f4 | ||
![]() |
e4ffa6c97c | ||
![]() |
8776ab7686 | ||
![]() |
7d02f4c7b1 | ||
![]() |
35b2320730 | ||
![]() |
efc8bcc2fd | ||
![]() |
0553f191d7 | ||
![]() |
3a99a19c56 | ||
![]() |
513849c1e3 | ||
![]() |
9711000b70 | ||
![]() |
6957780cd5 | ||
![]() |
ddaffc8248 | ||
![]() |
15e24fce78 | ||
![]() |
53fa16fc9c | ||
![]() |
783443f9d7 | ||
![]() |
bd4b243963 | ||
![]() |
3b1e535049 | ||
![]() |
a712117030 | ||
![]() |
00c0ddb7f6 | ||
![]() |
efcbd12116 | ||
![]() |
3ed5eef44d | ||
![]() |
260bfe9fec | ||
![]() |
2e34599ce3 | ||
![]() |
93d286914e | ||
![]() |
8e2179a6eb | ||
![]() |
557b039f3c | ||
![]() |
4a29792934 | ||
![]() |
7d2b538293 | ||
![]() |
2fad028fd5 | ||
![]() |
506c9be0cd | ||
![]() |
962a72dfda | ||
![]() |
e5c5feca6d | ||
![]() |
074202bdd2 | ||
![]() |
ad1fe0c529 | ||
![]() |
d7184227e1 | ||
![]() |
0d633fefd3 | ||
![]() |
33ba7683b2 | ||
![]() |
ca237910b3 | ||
![]() |
11f76cbebf | ||
![]() |
3dc49139cf | ||
![]() |
d0d6d719af | ||
![]() |
b4afecab97 | ||
![]() |
6985150e0b | ||
![]() |
b84233bca7 | ||
![]() |
b8df0a38a2 | ||
![]() |
bf1ba809ae | ||
![]() |
bd77a0102c | ||
![]() |
8bd47f3f8a | ||
![]() |
f7c67f5c45 | ||
![]() |
d01aec1b32 | ||
![]() |
c6b8ba7c4a | ||
![]() |
d66af86a58 | ||
![]() |
39c2a08d31 | ||
![]() |
4354ce45d8 | ||
![]() |
e45e5712de | ||
![]() |
acbcff1bf4 | ||
![]() |
6593594ebf | ||
![]() |
4aabe505be | ||
![]() |
a952f11bc5 | ||
![]() |
f5d5277ae7 | ||
![]() |
b7dd829a6f | ||
![]() |
835d098eb2 | ||
![]() |
1d7429f1d7 | ||
![]() |
2743ea06bb | ||
![]() |
70ee04d257 | ||
![]() |
3d7d906cc1 | ||
![]() |
5a01b97400 | ||
![]() |
c0f4eb8287 | ||
![]() |
6f106d9adc | ||
![]() |
5cd2220366 | ||
![]() |
4d7e90286e | ||
![]() |
5353dd1076 | ||
![]() |
22caaad944 | ||
![]() |
715bdbb49e | ||
![]() |
e44926fcee | ||
![]() |
b5131321d7 | ||
![]() |
a0c09c19ac | ||
![]() |
21316e3ebf | ||
![]() |
b8d4248053 | ||
![]() |
e814d742a7 | ||
![]() |
8b3369f81c | ||
![]() |
d87e3ead7f | ||
![]() |
f88ba77a5c | ||
![]() |
fef695f066 | ||
![]() |
724dc2fdbf | ||
![]() |
a6eb00a41c | ||
![]() |
345b1a8187 | ||
![]() |
d56e7309ad | ||
![]() |
67bf4349ca | ||
![]() |
b175241961 | ||
![]() |
7e949d5513 | ||
![]() |
bef34606cb | ||
![]() |
03302c3f30 | ||
![]() |
8363144818 | ||
![]() |
f30d8bd562 | ||
![]() |
d306ecdf3a | ||
![]() |
e9c722cf22 | ||
![]() |
7901962647 | ||
![]() |
fa3cabd681 | ||
![]() |
734563a7f4 | ||
![]() |
fc34292486 | ||
![]() |
817fdad2d5 | ||
![]() |
e7e75c2292 | ||
![]() |
a389678556 | ||
![]() |
71d80bace5 | ||
![]() |
8cc2e27ca7 | ||
![]() |
86934d4a4f | ||
![]() |
c9e9b4e400 | ||
![]() |
9407afa0a2 | ||
![]() |
89807d178e | ||
![]() |
c3ac1c6bf4 | ||
![]() |
e968cfbde4 | ||
![]() |
81e0636843 | ||
![]() |
ca0e9b8b2f | ||
![]() |
d37bfd45ae | ||
![]() |
46fe53fadb | ||
![]() |
ad2dd24fb8 | ||
![]() |
493eb1de7f | ||
![]() |
ba8103bbde | ||
![]() |
a0576e0378 | ||
![]() |
2486c7f4bc | ||
![]() |
e24b73fbfd | ||
![]() |
37c2558475 | ||
![]() |
e9282d4f6e | ||
![]() |
8839f7b848 | ||
![]() |
35fffb09d0 | ||
![]() |
050f708879 | ||
![]() |
b443f3fe68 | ||
![]() |
fcfa969b4a | ||
![]() |
ad53983276 | ||
![]() |
5cb02282f5 | ||
![]() |
ce7487182a | ||
![]() |
2a88662d01 | ||
![]() |
5691b5a344 | ||
![]() |
901ffdcbac | ||
![]() |
f5dbd99e43 | ||
![]() |
92fc1f41c8 | ||
![]() |
c40229f756 | ||
![]() |
9d2dd01689 | ||
![]() |
aff167b13d | ||
![]() |
8e46e46d40 | ||
![]() |
69b8b2be35 | ||
![]() |
8c08d22197 | ||
![]() |
fff7bcfb03 | ||
![]() |
ec713a22c3 | ||
![]() |
bbf03997bb | ||
![]() |
551e4d5a0d | ||
![]() |
ce0aed77ea | ||
![]() |
4451f44dda | ||
![]() |
35aa2c2398 | ||
![]() |
23beaa4793 | ||
![]() |
c257d6dc64 | ||
![]() |
877264c63b | ||
![]() |
0b1d0610f2 | ||
![]() |
76e27da8ba | ||
![]() |
6099a70c52 | ||
![]() |
912f1fe603 | ||
![]() |
d3f2bd6dac | ||
![]() |
0e16ce4bea | ||
![]() |
e3d78e44cc | ||
![]() |
8ec17deed1 | ||
![]() |
ebd84546ca | ||
![]() |
6343ca0826 | ||
![]() |
fb1432e70e | ||
![]() |
825902f8e6 | ||
![]() |
a053c78c30 | ||
![]() |
b5e2ae030b | ||
![]() |
04c0c59d27 | ||
![]() |
596b05146c | ||
![]() |
4c6750286a | ||
![]() |
3d31d86bf5 | ||
![]() |
54be64ad31 | ||
![]() |
023e2de5be | ||
![]() |
a8f748abeb | ||
![]() |
611899764f | ||
![]() |
2ed6c01e56 | ||
![]() |
db464d5ed2 | ||
![]() |
dd5029947c | ||
![]() |
71690384a4 | ||
![]() |
12d063ad87 | ||
![]() |
657cda6e12 | ||
![]() |
0beee9cd6a | ||
![]() |
6655352789 | ||
![]() |
83c4a2a19c | ||
![]() |
b5224743b8 | ||
![]() |
348cd7976f | ||
![]() |
66f89cb6f6 | ||
![]() |
e94b07b3aa | ||
![]() |
4d9c5d8dd2 | ||
![]() |
b6939b0b2e | ||
![]() |
171e4fba41 | ||
![]() |
f126fd2356 | ||
![]() |
5e2421b1a0 | ||
![]() |
7e497db831 | ||
![]() |
58c919c04e | ||
![]() |
5cc3059de2 | ||
![]() |
585f14744e | ||
![]() |
b54c03bb04 | ||
![]() |
c5f4740b31 | ||
![]() |
42e5d9f5cf | ||
![]() |
5a8d2e4204 | ||
![]() |
86f19474ca | ||
![]() |
827fc45598 | ||
![]() |
37dc3ffa01 | ||
![]() |
14d25abd76 | ||
![]() |
101fac5c1e | ||
![]() |
352a5dd2d5 | ||
![]() |
2f25a1e2bd | ||
![]() |
d719c06e00 | ||
![]() |
bfb245553c | ||
![]() |
fddd85fa18 | ||
![]() |
342198625e | ||
![]() |
31b035cc94 | ||
![]() |
6e21376473 | ||
![]() |
685e74a1c6 | ||
![]() |
60fb3e06b2 | ||
![]() |
ef6a5c2e75 | ||
![]() |
1d3fe10d3d | ||
![]() |
9d909d6834 | ||
![]() |
d00401ccc1 | ||
![]() |
c3aa266bee | ||
![]() |
aa46d1bc10 | ||
![]() |
3f20803679 | ||
![]() |
d17cc6039b | ||
![]() |
0edd781928 | ||
![]() |
2396542cda | ||
![]() |
8f681cec7a | ||
![]() |
c868c7b68d | ||
![]() |
d589f6a8ed | ||
![]() |
7338f45bd2 | ||
![]() |
95c80cf21f | ||
![]() |
bf69920570 | ||
![]() |
dd97e7b72e | ||
![]() |
67e3899272 | ||
![]() |
c0209b1d80 | ||
![]() |
3eb2c20ad0 | ||
![]() |
a41c63be09 | ||
![]() |
2e3ff0332d | ||
![]() |
b98731ed00 | ||
![]() |
91d825ba61 | ||
![]() |
876708c100 | ||
![]() |
62f089756c | ||
![]() |
7b7a315777 | ||
![]() |
5a768de132 | ||
![]() |
a38ba440fa | ||
![]() |
ea6cef5246 | ||
![]() |
8620f95763 | ||
![]() |
0e924525ee | ||
![]() |
5056e5fd1b | ||
![]() |
b8ba78d1d3 | ||
![]() |
5d74897aa4 | ||
![]() |
10b3e8040a | ||
![]() |
dfab18fe47 | ||
![]() |
dad2804412 | ||
![]() |
7cffdca067 | ||
![]() |
079183eb6a | ||
![]() |
836316f5ed | ||
![]() |
d8733b4c52 | ||
![]() |
8598d203fa | ||
![]() |
04e546716e | ||
![]() |
056ec806d5 | ||
![]() |
e957a7d655 | ||
![]() |
e803a3c15e | ||
![]() |
c50c23c134 | ||
![]() |
7db0c3b1d4 | ||
![]() |
6b93b18a1a | ||
![]() |
2acb10a5da | ||
![]() |
4d703fa2e2 | ||
![]() |
d47b96970c | ||
![]() |
6199f9a596 | ||
![]() |
03bf7d3def | ||
![]() |
a4d292b21a | ||
![]() |
297fb75009 | ||
![]() |
a3142ac257 | ||
![]() |
f400dab912 | ||
![]() |
f63188b4ea | ||
![]() |
e53492a68f | ||
![]() |
20f31fb742 | ||
![]() |
42eb8ae332 | ||
![]() |
511fa20825 | ||
![]() |
9fe486b9e0 | ||
![]() |
270bbccf6b | ||
![]() |
5afdae8af9 | ||
![]() |
6c0ffe1ba2 | ||
![]() |
a6835422bf | ||
![]() |
a2b213ad1b | ||
![]() |
aa7c3ac38b | ||
![]() |
6b0e3f2aeb | ||
![]() |
de27223635 | ||
![]() |
7555d022db | ||
![]() |
85c1ba55f3 | ||
![]() |
a5f6bf34dc | ||
![]() |
4d3852ae69 | ||
![]() |
f86c5dfe0a | ||
![]() |
3bcd153fb6 | ||
![]() |
c9c03dd40b | ||
![]() |
d988055a49 | ||
![]() |
a729c028a6 | ||
![]() |
09a2b630bc | ||
![]() |
b0800dab16 | ||
![]() |
b92eac82ab | ||
![]() |
2516374744 | ||
![]() |
2c7663eb5e | ||
![]() |
93d9826936 | ||
![]() |
d1a942be63 | ||
![]() |
42cf80815d | ||
![]() |
4caaf3e8b3 | ||
![]() |
ed07a5e176 | ||
![]() |
8c51d50cd2 | ||
![]() |
acac7092c5 | ||
![]() |
7671c15b17 | ||
![]() |
7abe38e763 | ||
![]() |
6e80609998 | ||
![]() |
31549082e6 | ||
![]() |
dfef5b43fc | ||
![]() |
57b4920234 | ||
![]() |
d6ad89764b | ||
![]() |
083029fa6f | ||
![]() |
aaf098f203 | ||
![]() |
5a33856802 | ||
![]() |
45b635f707 | ||
![]() |
35a0f0c71c | ||
![]() |
003bca503f | ||
![]() |
93efe503ad | ||
![]() |
1d5b34f48b | ||
![]() |
b37c07a280 | ||
![]() |
15797a7951 | ||
![]() |
8d43c73a0c | ||
![]() |
6dfc20d3ec | ||
![]() |
7ee29b0239 | ||
![]() |
47f36952d6 | ||
![]() |
47776f343d | ||
![]() |
bcc65ac92e | ||
![]() |
7ff1cf3619 | ||
![]() |
584920b3a6 | ||
![]() |
658bac7f52 | ||
![]() |
1ddaad8d58 | ||
![]() |
9768f632a2 | ||
![]() |
a75bdbf0a1 | ||
![]() |
ee9d797906 | ||
![]() |
fccd86d67d | ||
![]() |
a88d52bd34 | ||
![]() |
1a48418844 | ||
![]() |
a9015e5484 | ||
![]() |
40f9467c07 | ||
![]() |
4abedf63e8 | ||
![]() |
0b9cda5018 | ||
![]() |
b7bcd4f687 | ||
![]() |
38661481ed | ||
![]() |
d305ceffe1 | ||
![]() |
c05db1ecf4 | ||
![]() |
9c123172fa | ||
![]() |
17b96cc5a1 | ||
![]() |
4522d2167a | ||
![]() |
2b1202a6a6 | ||
![]() |
ae5b980e07 | ||
![]() |
3fc4a64759 | ||
![]() |
85e5db38fb | ||
![]() |
22cda63200 | ||
![]() |
bcfd19c902 | ||
![]() |
21cc46e915 | ||
![]() |
0e35b5cfad | ||
![]() |
166d6fd8a3 | ||
![]() |
2616b06570 | ||
![]() |
68f8d63222 | ||
![]() |
0781d0fa46 | ||
![]() |
3d69846046 | ||
![]() |
28047789a9 | ||
![]() |
bcd3d814fd | ||
![]() |
7afdca2c55 | ||
![]() |
1e1b6ec32e | ||
![]() |
d1ad70b7a0 | ||
![]() |
dedde2cd60 | ||
![]() |
aa0823daf6 | ||
![]() |
689c294e91 | ||
![]() |
ca64ab5e23 | ||
![]() |
ab2aaff6be | ||
![]() |
5ae7e54dac | ||
![]() |
5401c5d179 | ||
![]() |
58895067c8 | ||
![]() |
a47800686c | ||
![]() |
4f5d8da278 | ||
![]() |
390e69fac5 | ||
![]() |
181edfeec6 | ||
![]() |
78fc476e61 | ||
![]() |
17d69338a9 | ||
![]() |
0d3b5b61f0 | ||
![]() |
c7fac6e98e | ||
![]() |
c15d2f71d4 | ||
![]() |
696c9d972f | ||
![]() |
dcfb9cb972 | ||
![]() |
29223aaed7 | ||
![]() |
2923a3adcf | ||
![]() |
4f5c54db54 | ||
![]() |
808a6ca266 | ||
![]() |
52aa11c407 | ||
![]() |
81ee1b39c7 | ||
![]() |
c416db91c1 | ||
![]() |
50df879e79 | ||
![]() |
15271b673d | ||
![]() |
8d9eb05347 | ||
![]() |
4c2a32d293 | ||
![]() |
bc929d4876 | ||
![]() |
24eb509d15 | ||
![]() |
58cc3e91c3 | ||
![]() |
5aebb1c539 | ||
![]() |
9bf68db7f7 | ||
![]() |
e318257a7f | ||
![]() |
c492f763c7 | ||
![]() |
c160302be7 | ||
![]() |
e0506038ba | ||
![]() |
707f888c83 | ||
![]() |
965fa8e34c | ||
![]() |
e358c49573 | ||
![]() |
147baa63f7 | ||
![]() |
dc11eede98 | ||
![]() |
5f43b3a913 | ||
![]() |
261b7bde28 | ||
![]() |
33bb5e9060 | ||
![]() |
a07ed4647e | ||
![]() |
98a861507f | ||
![]() |
28d5ae19f9 | ||
![]() |
98b819edd4 | ||
![]() |
8394936ee0 | ||
![]() |
37c4ea4720 | ||
![]() |
9372862ee2 | ||
![]() |
7eee429705 | ||
![]() |
c401d86bb3 | ||
![]() |
0ab94dd3e4 | ||
![]() |
27791ebab7 | ||
![]() |
d705e928ac | ||
![]() |
3963f30070 | ||
![]() |
e0f2d9c0d6 | ||
![]() |
e1333d0616 | ||
![]() |
5ca752c92b | ||
![]() |
c1ef6b999d | ||
![]() |
4cb74da76c | ||
![]() |
8566c67b35 | ||
![]() |
3018417249 | ||
![]() |
079f46fbc1 | ||
![]() |
9c51370e51 | ||
![]() |
06841bbaff | ||
![]() |
c3f876d2f7 | ||
![]() |
16c198805b | ||
![]() |
24592f78fc | ||
![]() |
053aae7b59 | ||
![]() |
6e5d443d7d | ||
![]() |
dc19e9c9b2 | ||
![]() |
7b513e1103 | ||
![]() |
b3fe6bb778 | ||
![]() |
9b7e1767dd | ||
![]() |
ddb683e1f2 | ||
![]() |
8ee717520f | ||
![]() |
322714f123 | ||
![]() |
efe056f18d | ||
![]() |
fb8e08a2ac | ||
![]() |
a934bdf444 | ||
![]() |
53821a4997 | ||
![]() |
929db29b67 | ||
![]() |
c290de0f88 | ||
![]() |
4fefec6386 | ||
![]() |
450ea8236d | ||
![]() |
13964c4141 | ||
![]() |
f09c78b5f4 | ||
![]() |
38317b87c2 | ||
![]() |
9c0b6593b6 | ||
![]() |
73e5313e1c | ||
![]() |
9aba66b608 | ||
![]() |
1b778bf34b | ||
![]() |
ad4dcdeac0 | ||
![]() |
0e4d9a68af | ||
![]() |
6beff43439 | ||
![]() |
94e5b1723b | ||
![]() |
ab6b58a476 | ||
![]() |
152787cb0e | ||
![]() |
79738d3bf6 | ||
![]() |
bfb4d34715 | ||
![]() |
b016246096 | ||
![]() |
a9078196b7 | ||
![]() |
2773737c9c | ||
![]() |
460743021d | ||
![]() |
a6e42858f4 | ||
![]() |
d71832f20e | ||
![]() |
4eeb164d31 | ||
![]() |
29784bda8e | ||
![]() |
a98947e81e | ||
![]() |
d4fb5ecec5 | ||
![]() |
a3972487fb | ||
![]() |
2a9022945d | ||
![]() |
828aff1476 | ||
![]() |
ba7e2f11ec | ||
![]() |
fadcb78ffa | ||
![]() |
d86ccb1330 | ||
![]() |
a1e6c94fda | ||
![]() |
3d452fdba6 | ||
![]() |
d16c5c08b6 | ||
![]() |
96292cdf27 | ||
![]() |
e2b27be099 | ||
![]() |
b9a5e92c37 | ||
![]() |
cbb4ffee4d | ||
![]() |
620ccbfa03 | ||
![]() |
c0dac75b7d | ||
![]() |
b7f500fc26 | ||
![]() |
49c4d9272f | ||
![]() |
0c31a0c0b8 | ||
![]() |
70ab4cfb12 | ||
![]() |
66df8a2b9f | ||
![]() |
a135c78baf | ||
![]() |
f63220682b | ||
![]() |
787500f339 | ||
![]() |
725536b8b4 | ||
![]() |
0ba2d30fed | ||
![]() |
d63d3e603e | ||
![]() |
ac462be47c | ||
![]() |
e5a024b02e | ||
![]() |
ed70381d70 | ||
![]() |
5ce75816c5 | ||
![]() |
13b6a98de6 | ||
![]() |
5c9995ee9a | ||
![]() |
674ab66d7b | ||
![]() |
7371ab0cc2 | ||
![]() |
1079b2b790 | ||
![]() |
629697d14a | ||
![]() |
1b493f2146 | ||
![]() |
641c56b6e9 | ||
![]() |
693cdc673d | ||
![]() |
fea2b1ce5e | ||
![]() |
a3e359d9e1 | ||
![]() |
5d9f63d800 | ||
![]() |
dfd2c6dc68 | ||
![]() |
faa1028ef6 | ||
![]() |
be66fde64c | ||
![]() |
1753335d34 | ||
![]() |
80aac79507 | ||
![]() |
0caf079637 | ||
![]() |
dbd5470805 | ||
![]() |
111a7e085d | ||
![]() |
e82e61e84c | ||
![]() |
c57fb2d1ce | ||
![]() |
cfa1d39166 | ||
![]() |
07816f2ca4 | ||
![]() |
15eadbb868 | ||
![]() |
12315ec964 | ||
![]() |
f3098a946a | ||
![]() |
33cf716835 | ||
![]() |
3c5ed5d8e1 | ||
![]() |
c50eeeecc9 | ||
![]() |
033d5afb19 | ||
![]() |
52425fbb27 | ||
![]() |
1b0350ec0a | ||
![]() |
8b1859b77d | ||
![]() |
63b1f0f4aa | ||
![]() |
f4f75f2740 | ||
![]() |
9508c251ee | ||
![]() |
36bb0e568c | ||
![]() |
1a7b71fb20 | ||
![]() |
2d23ca1414 | ||
![]() |
bd82646d81 | ||
![]() |
7d6bec2b17 | ||
![]() |
7741b4b361 | ||
![]() |
86ee9c5071 | ||
![]() |
aee93fb200 | ||
![]() |
0f6e2f8029 | ||
![]() |
59300afbef | ||
![]() |
02574d2501 | ||
![]() |
3f53d214c6 | ||
![]() |
9473f394b7 | ||
![]() |
a970f9bf6e | ||
![]() |
3e2b916f5b | ||
![]() |
6bbcbfb3d4 | ||
![]() |
49dc0625d4 | ||
![]() |
956d538164 | ||
![]() |
d39801c937 | ||
![]() |
13bd013528 | ||
![]() |
820ab7126c | ||
![]() |
b16f0b24b7 | ||
![]() |
1d99ced2ea | ||
![]() |
6fe8f635e4 | ||
![]() |
666da0b215 | ||
![]() |
22bf10e564 | ||
![]() |
1757348b23 | ||
![]() |
335db1d1fb | ||
![]() |
fbe8537f18 | ||
![]() |
d66da8ff3b | ||
![]() |
e9e7e42b64 | ||
![]() |
9f682a3f11 | ||
![]() |
fe2e480ef1 | ||
![]() |
2661d46929 | ||
![]() |
a55eed9718 | ||
![]() |
0efd052218 | ||
![]() |
6bcb449b55 | ||
![]() |
27fed2b1ed | ||
![]() |
0480f55f67 | ||
![]() |
c308915047 | ||
![]() |
d34416ea02 | ||
![]() |
7b70a42361 | ||
![]() |
5ee37920f5 | ||
![]() |
d836a427cc | ||
![]() |
fd82eed31c | ||
![]() |
b4b0837a77 | ||
![]() |
6e111fe2e4 | ||
![]() |
2c21d61870 | ||
![]() |
a1c5285cc2 | ||
![]() |
7e93b7d426 | ||
![]() |
442db8d523 | ||
![]() |
d4f25d8c72 | ||
![]() |
21c44635f6 | ||
![]() |
c541f6b4ba | ||
![]() |
102fbff5d2 | ||
![]() |
265b777b93 | ||
![]() |
bf76ced8ba | ||
![]() |
bfef7f54a3 | ||
![]() |
086d02003a | ||
![]() |
1f2e0dacb3 | ||
![]() |
a1f04604df | ||
![]() |
cdea0da566 | ||
![]() |
7259a2c76c | ||
![]() |
545c14a9cf | ||
![]() |
7b4d25c657 | ||
![]() |
51747e86c5 | ||
![]() |
3dc1dc80e3 | ||
![]() |
9a7d046062 | ||
![]() |
2602ff530d | ||
![]() |
2f22f86c0a | ||
![]() |
26158a51d2 | ||
![]() |
99f29ce8ee | ||
![]() |
0c3b524de8 | ||
![]() |
3a3d17dbb5 | ||
![]() |
496cd97351 | ||
![]() |
e3ed57633e | ||
![]() |
cc1c989942 | ||
![]() |
840f11d884 | ||
![]() |
7864436594 | ||
![]() |
8819df4add | ||
![]() |
5d9c0cf1c7 | ||
![]() |
11ccb7c530 | ||
![]() |
a75b2292af | ||
![]() |
75e19c9435 | ||
![]() |
595925e436 | ||
![]() |
3c98fc54aa | ||
![]() |
84996ff2ac | ||
![]() |
6dd1aa0cd8 | ||
![]() |
98bd78e7f0 | ||
![]() |
5e2b6c2b74 | ||
![]() |
6fd8f4bf08 | ||
![]() |
8430daa628 | ||
![]() |
20728278bf | ||
![]() |
9593b4c806 | ||
![]() |
0f2d02cdd2 | ||
![]() |
46a8506f99 | ||
![]() |
0864d5848b | ||
![]() |
4ee1864941 | ||
![]() |
91c422bb66 | ||
![]() |
ef716ed15d | ||
![]() |
1d380864e9 | ||
![]() |
f4d05aaba8 | ||
![]() |
120f1329c6 | ||
![]() |
960fc831fc | ||
![]() |
594bdd6e61 | ||
![]() |
2cf01f0257 | ||
![]() |
176777b05f | ||
![]() |
4899200177 | ||
![]() |
a2b3cea72e | ||
![]() |
087eeb60ec | ||
![]() |
1465ff25fc | ||
![]() |
444518b344 | ||
![]() |
76a0eef121 | ||
![]() |
ea612d255f | ||
![]() |
1083a31965 | ||
![]() |
7700b3d736 | ||
![]() |
952df81877 | ||
![]() |
c0408de912 | ||
![]() |
067ed4ccac | ||
![]() |
5e23ad6ccf | ||
![]() |
6b9fc4551d | ||
![]() |
4d9751e98c | ||
![]() |
60e7f1b7c7 | ||
![]() |
0e6baea9f6 | ||
![]() |
57ea02616c | ||
![]() |
3d87d61039 | ||
![]() |
a6fe7b3f40 | ||
![]() |
e7e184a0ba | ||
![]() |
54cf4c7f16 | ||
![]() |
0bc5a1b06a | ||
![]() |
9fe6c138cf | ||
![]() |
597eb161f5 | ||
![]() |
1eba8ac2a7 | ||
![]() |
801a8950bb | ||
![]() |
053cfc0ddb | ||
![]() |
e8ca83ad78 | ||
![]() |
9a5d2d8b2d | ||
![]() |
be29992908 | ||
![]() |
9f8a0d4731 | ||
![]() |
ab07280e71 | ||
![]() |
123f724c47 | ||
![]() |
dd0ced3c02 | ||
![]() |
e954ce0ffa | ||
![]() |
aaee824f68 | ||
![]() |
e65beb2636 | ||
![]() |
b72dceb865 | ||
![]() |
fc5e32e526 | ||
![]() |
bfc2b27d65 | ||
![]() |
ec6c88442d | ||
![]() |
bfc9eb8d62 | ||
![]() |
dfc64053b7 | ||
![]() |
bc2cf531e3 | ||
![]() |
58300857db | ||
![]() |
b7ae673ee0 | ||
![]() |
d0c9a894fb | ||
![]() |
2ffa03c626 | ||
![]() |
231e9b3f81 | ||
![]() |
d6fa581a4c | ||
![]() |
ff492f9bb6 | ||
![]() |
331b104345 | ||
![]() |
b782b9a4db | ||
![]() |
0cda0c98b0 | ||
![]() |
8a817e577c | ||
![]() |
40f79dd72e | ||
![]() |
72132ea3aa | ||
![]() |
5cd910f9f2 | ||
![]() |
e4eeaa79cb | ||
![]() |
138e16e80f | ||
![]() |
6f6a792d06 | ||
![]() |
290020c597 | ||
![]() |
9931d5ef1c | ||
![]() |
f7e1fcd557 | ||
![]() |
95bac91268 | ||
![]() |
1a091f535e | ||
![]() |
ea016bec96 | ||
![]() |
fae92a19f5 | ||
![]() |
cb3f296678 | ||
![]() |
ca57adcf2d | ||
![]() |
82218f33bd | ||
![]() |
4b2c9cfbcc | ||
![]() |
502575b641 | ||
![]() |
c79f646545 | ||
![]() |
33717eebaa | ||
![]() |
97827acba6 | ||
![]() |
bf12a2bdd7 | ||
![]() |
d95200f19a | ||
![]() |
ed4bbcd4ad | ||
![]() |
26e1dd050d | ||
![]() |
4deacddde8 | ||
![]() |
cf8c3c9cfe | ||
![]() |
fc6ead4ac2 | ||
![]() |
e1e89adf62 | ||
![]() |
35c3554343 | ||
![]() |
4ba3adf11b | ||
![]() |
495784ed49 | ||
![]() |
391a672bf6 | ||
![]() |
0bed8e8928 | ||
![]() |
b4c52698c0 | ||
![]() |
c8ff0c8b18 | ||
![]() |
53f03d73f4 | ||
![]() |
2b0ba444c0 | ||
![]() |
78ecccc2b1 | ||
![]() |
d30b90cba3 | ||
![]() |
a9ac3be43c | ||
![]() |
235bd4de8f | ||
![]() |
7067559ac7 | ||
![]() |
542b960d12 | ||
![]() |
aaa289c7b6 | ||
![]() |
5aa7ba6f30 | ||
![]() |
07b8007edb | ||
![]() |
9272781d6d | ||
![]() |
c4401313d4 | ||
![]() |
aaef69f40a | ||
![]() |
12308e3f17 | ||
![]() |
32a2ca6eff | ||
![]() |
298feb1bb6 | ||
![]() |
6c2888937a | ||
![]() |
2be6eb9570 | ||
![]() |
39fda5ec9e | ||
![]() |
c2cd44c928 | ||
![]() |
e4a48723b3 | ||
![]() |
b450aa8af6 | ||
![]() |
9049737270 | ||
![]() |
e6113d1c3c | ||
![]() |
46030642fa | ||
![]() |
ec6060b9da | ||
![]() |
7ef9bd618d | ||
![]() |
64c9d8382f | ||
![]() |
24b91852da | ||
![]() |
8d1e16f09c | ||
![]() |
6f984d868c | ||
![]() |
7fb67ad644 | ||
![]() |
bd5723c51c | ||
![]() |
aa4c57bf9a | ||
![]() |
7d434d266e | ||
![]() |
0304fedf92 | ||
![]() |
ec0350e6d9 | ||
![]() |
78e473f017 | ||
![]() |
4c10a9efac | ||
![]() |
c44cffe5a8 | ||
![]() |
ed0e98b305 | ||
![]() |
ab145d4c7d | ||
![]() |
a691372419 | ||
![]() |
6e8fb5776b | ||
![]() |
9e8971ba95 | ||
![]() |
a2d06c2cd5 | ||
![]() |
2c76954108 | ||
![]() |
4e3a7c420a | ||
![]() |
06634b74d5 | ||
![]() |
aef101fd84 | ||
![]() |
606a946212 | ||
![]() |
e8ad90a14d | ||
![]() |
dcf73f6bca | ||
![]() |
56cf724d12 | ||
![]() |
d6b587288a | ||
![]() |
5affb68478 | ||
![]() |
423aa06426 | ||
![]() |
f43d38914b | ||
![]() |
d48840f23b |
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -24,3 +24,10 @@ compiled/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.bak
|
*.bak
|
||||||
TAGS
|
TAGS
|
||||||
|
|
||||||
|
# generated by patch
|
||||||
|
*.orig
|
||||||
|
*.rej
|
||||||
|
|
||||||
|
# coredumps
|
||||||
|
*.core
|
||||||
|
|
98
.travis.yml
98
.travis.yml
|
@ -1,56 +1,58 @@
|
||||||
|
sudo: false
|
||||||
language: c
|
language: c
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# osx, defaults, gcc and clang
|
- os: osx
|
||||||
- os: osx
|
compiler: gcc
|
||||||
compiler: gcc
|
env: PATH=./racket/bin:$PATH
|
||||||
env: PATH=./racket/bin:$PATH
|
- os: osx
|
||||||
- os: osx
|
compiler: clang
|
||||||
compiler: clang
|
env: PATH=./racket/bin:$PATH
|
||||||
env: PATH=./racket/bin:$PATH
|
- os: linux
|
||||||
# linux, defaults, gcc and clang
|
compiler: gcc
|
||||||
- os: linux
|
env: PATH=./racket/bin:$PATH
|
||||||
compiler: gcc
|
- os: linux
|
||||||
env: PATH=./racket/bin:$PATH
|
compiler: clang
|
||||||
- os: linux
|
env: PATH=./racket/bin:$PATH
|
||||||
compiler: clang
|
- os: linux
|
||||||
env: PATH=./racket/bin:$PATH
|
compiler: gcc
|
||||||
# linux, no places, no futures, no extflonum, gcc
|
env: PATH=./racket/bin:$PATH RACKET_CONFIGURE_ARGS="--disable-places --disable-futures
|
||||||
- os: linux
|
--disable-extflonum"
|
||||||
compiler: gcc
|
- os: linux
|
||||||
env: PATH=./racket/bin:$PATH RACKET_CONFIGURE_ARGS="--disable-places --disable-futures --disable-extflonum"
|
compiler: gcc
|
||||||
# linux, no jit, gcc
|
env: PATH=./racket/bin:$PATH RACKET_CONFIGURE_ARGS="--disable-jit"
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: PATH=./racket/bin:$PATH RACKET_CONFIGURE_ARGS="--disable-jit"
|
env: PATH=./racket/bin:$PATH RACKET_CONFIGURE_ARGS="--disable-jit --disable-places
|
||||||
# linux, no jit, no places, no futures, no extflonum, gcc
|
--disable-futures --disable-extflonum"
|
||||||
- os: linux
|
before_script:
|
||||||
compiler: gcc
|
- git config --global user.email "travis-test@racket-lang.org"
|
||||||
env: PATH=./racket/bin:$PATH RACKET_CONFIGURE_ARGS="--disable-jit --disable-places --disable-futures --disable-extflonum"
|
- git config --global user.name "Travis Tester"
|
||||||
# Just run tests for the core
|
|
||||||
script:
|
script:
|
||||||
- make CPUS="2" PKGS="racket-test db-test unstable-flonum-lib net-test" CONFIGURE_ARGS_qq="$RACKET_CONFIGURE_ARGS"
|
- make CPUS="2" PKGS="racket-test db-test unstable-flonum-lib net-test" CONFIGURE_ARGS_qq="$RACKET_CONFIGURE_ARGS"
|
||||||
- raco test -l tests/racket/test
|
- raco test -l tests/racket/test
|
||||||
- racket -l tests/racket/contract/all
|
- racket -l tests/pkg/test -- -q
|
||||||
- raco test -l tests/json/json
|
- racket -l tests/racket/contract/all
|
||||||
- raco test -l tests/file/main
|
- raco test -l tests/json/json
|
||||||
- raco test -l tests/net/head
|
- raco test -l tests/file/main
|
||||||
- raco test -l tests/net/uri-codec
|
- raco test -l tests/net/head
|
||||||
- raco test -l tests/net/url
|
- raco test -l tests/net/uri-codec
|
||||||
- raco test -l tests/net/url-port
|
- raco test -l tests/net/url
|
||||||
- raco test -l tests/net/encoders
|
- raco test -l tests/net/url-port
|
||||||
- raco test -l tests/openssl/basic
|
- raco test -l tests/net/encoders
|
||||||
- raco test -l tests/openssl/https
|
- raco test -l tests/openssl/basic
|
||||||
- raco test -l tests/match/plt-match-tests
|
- raco test -l tests/openssl/https
|
||||||
- raco test -l tests/zo-path
|
- raco test -l tests/match/main
|
||||||
- raco test -l tests/xml/test
|
- raco test -l tests/zo-path
|
||||||
- raco test -l tests/db/all-tests
|
- raco test -l tests/xml/test
|
||||||
|
- raco test -l tests/db/all-tests
|
||||||
notifications:
|
notifications:
|
||||||
irc: "chat.freenode.net#racket-dev"
|
irc: chat.freenode.net#racket-dev
|
||||||
email:
|
email:
|
||||||
recipients:
|
recipients:
|
||||||
- samth@racket-lang.org
|
- samth@racket-lang.org
|
||||||
- robby@racket-lang.org
|
- robby@racket-lang.org
|
||||||
- mflatt@racket-lang.org
|
- mflatt@racket-lang.org
|
||||||
on_success: change
|
on_success: change
|
||||||
|
slack:
|
||||||
|
secure: A19kphrabQHO8TU6qZcBaLQxdSNpm1ypEtbQsh8Ucg6HYPP7y1q7O7JZEndoMRHE9CNKZ9oXQzqR8H1IFVTlnjFFIJfkZzZ1YSNk4abSomhpWCq9daKMfwlcuTtY6PeI1nDVpka4/hiJGn9qzmaKYXle9Sl4CX2VEYp8o8PgMEs=
|
||||||
|
|
63
INSTALL.txt
63
INSTALL.txt
|
@ -1,8 +1,8 @@
|
||||||
Build Options
|
Build Options
|
||||||
=============
|
=============
|
||||||
|
|
||||||
For Unix platforms, instead of using this source repository, consider
|
Instead of using this source repository, consider getting source for
|
||||||
getting source for the current Racket release from
|
the current Racket release from
|
||||||
|
|
||||||
http://download.racket-lang.org/
|
http://download.racket-lang.org/
|
||||||
|
|
||||||
|
@ -16,7 +16,9 @@ documentation are pre-built.
|
||||||
|
|
||||||
In contrast to this repository, release and snapshot source
|
In contrast to this repository, release and snapshot source
|
||||||
distributions will work in the
|
distributions will work in the
|
||||||
|
|
||||||
configure --prefix=... && make && make install
|
configure --prefix=... && make && make install
|
||||||
|
|
||||||
way that you probably expect.
|
way that you probably expect.
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,7 +33,7 @@ If you stick with this repository, then you have several options:
|
||||||
Instructions: In-place Build" below.
|
Instructions: In-place Build" below.
|
||||||
|
|
||||||
* Unix-style install --- installs to a given destination directory
|
* Unix-style install --- installs to a given destination directory
|
||||||
(Unix and Mac OS X, only), leaving no reference to the source
|
(on platforms other Windows), leaving no reference to the source
|
||||||
directory. This is the most natural mode for installing once from
|
directory. This is the most natural mode for installing once from
|
||||||
the source repository. See "Quick Instructions: Unix-style Install"
|
the source repository. See "Quick Instructions: Unix-style Install"
|
||||||
below.
|
below.
|
||||||
|
@ -51,11 +53,11 @@ If you stick with this repository, then you have several options:
|
||||||
Quick Instructions: In-place Build
|
Quick Instructions: In-place Build
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
On Unix, `make' (or `make in-place') creates a build in the "racket"
|
On Unix (including Linux) and Mac OS X, `make' (or `make in-place')
|
||||||
directory.
|
creates a build in the "racket" directory.
|
||||||
|
|
||||||
On Windows with Microsoft Visual Studio (any version between 2008/9.0
|
On Windows with Microsoft Visual Studio (any version between 2008/9.0
|
||||||
and 2013/12.0), `nmake win32-in-place' creates a build in the "racket"
|
and 2015/14.0), `nmake win32-in-place' creates a build in the "racket"
|
||||||
directory. For information on configuring your command-line
|
directory. For information on configuring your command-line
|
||||||
environment for Visual Studio, see "racket/src/worksp/README".
|
environment for Visual Studio, see "racket/src/worksp/README".
|
||||||
|
|
||||||
|
@ -74,10 +76,10 @@ See "More Instructions: Building Racket" below for more information.
|
||||||
Quick Instructions: Unix-style Install
|
Quick Instructions: Unix-style Install
|
||||||
======================================
|
======================================
|
||||||
|
|
||||||
On Unix, `make unix-style PREFIX=<dir>' builds and installs into
|
On Unix (including Linux), `make unix-style PREFIX=<dir>' builds and
|
||||||
"<dir>" (which must be an absolute path) with binaries in "<dir>/bin",
|
installs into "<dir>" (which must be an absolute path) with binaries
|
||||||
packages in "<dir>/share/racket/pkgs", documentation in
|
in "<dir>/bin", packages in "<dir>/share/racket/pkgs", documentation
|
||||||
"<dir>/share/racket/doc", etc.
|
in "<dir>/share/racket/doc", etc.
|
||||||
|
|
||||||
On Mac OS X, `make unix-style PREFIX=<dir>' builds and installs into
|
On Mac OS X, `make unix-style PREFIX=<dir>' builds and installs into
|
||||||
"<dir>" (whichmust be an absolute path) with binaries in "<dir>/bin",
|
"<dir>" (whichmust be an absolute path) with binaries in "<dir>/bin",
|
||||||
|
@ -128,6 +130,12 @@ previously installed packages remain installed and are updated, while
|
||||||
new packages are added. To uninstall previously selected package, use
|
new packages are added. To uninstall previously selected package, use
|
||||||
`raco pkg remove'.
|
`raco pkg remove'.
|
||||||
|
|
||||||
|
To build anything other than the latest sources in the repository
|
||||||
|
(e.g., when building from the "v6.2.1" tag), you need a catalog
|
||||||
|
that's compatible with those sources. Note that a release distribution
|
||||||
|
is configured to use a catalog specific to that release, so you can
|
||||||
|
extract the catalog's URL from there.
|
||||||
|
|
||||||
Using `make' (or `make in-place') sets the installation's name to
|
Using `make' (or `make in-place') sets the installation's name to
|
||||||
"development", unless the installation has been previously configured
|
"development", unless the installation has been previously configured
|
||||||
(i.e., unless the "racket/etc/config.rktd" file exists). The
|
(i.e., unless the "racket/etc/config.rktd" file exists). The
|
||||||
|
@ -181,10 +189,17 @@ but under Windows, encoding-conversion, extflonum, and SSL
|
||||||
functionality is hobbled until native libraries from the
|
functionality is hobbled until native libraries from the
|
||||||
`racket-win32-i386' or `racket-win32-x86_64' package are installed.
|
`racket-win32-i386' or `racket-win32-x86_64' package are installed.
|
||||||
|
|
||||||
On all platforms, `JOB_OPTIONS' as a makefile variable and
|
On all platforms, fom the top-level makefile, `JOB_OPTIONS' as a
|
||||||
`PLT_SETUP_OPTIONS' as an environment variable are passed on to the
|
makefile variable and `PLT_SETUP_OPTIONS' as an environment variable
|
||||||
`raco setup' that is used to build minimal-Racket libraries. See the
|
are passed on to the `raco setup' that is used to build minimal-Racket
|
||||||
documentation for `raco setup' for information on the options.
|
libraries. See the documentation for `raco setup' for information on
|
||||||
|
the options.
|
||||||
|
|
||||||
|
For cross compilation, add configuration options to
|
||||||
|
`CONFIGURE_ARGS_qq="..."' as descibed in the "README" of "racket/src",
|
||||||
|
but also add a `PLAIN_RACKET=...' argument for the top-level makefile
|
||||||
|
to specify the same executable as in an `--enable-racket=...' for
|
||||||
|
`configure'.
|
||||||
|
|
||||||
Installing Packages
|
Installing Packages
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -305,8 +320,8 @@ where <dist-base> defaults to "racket" (but can be set via
|
||||||
normalizing the Windows results to "i386-win32" and "x86_63-win32",
|
normalizing the Windows results to "i386-win32" and "x86_63-win32",
|
||||||
-<dist-suffix> is omitted unless a `#:dist-suffix' string is specified
|
-<dist-suffix> is omitted unless a `#:dist-suffix' string is specified
|
||||||
for the client in the site configuration, and <ext> is
|
for the client in the site configuration, and <ext> is
|
||||||
platform-specific: ".sh" for Unix, ".dmg" or ".pkg" for Mac OS X, and
|
platform-specific: ".sh" for Unix (including Linux), ".dmg" or ".pkg"
|
||||||
".exe" for Windows.
|
for Mac OS X, and ".exe" for Windows.
|
||||||
|
|
||||||
Generating Installer Web Sites
|
Generating Installer Web Sites
|
||||||
------------------------------
|
------------------------------
|
||||||
|
@ -475,8 +490,8 @@ In more detail:
|
||||||
To change the base name of the installer file, provide `DIST_BASE'
|
To change the base name of the installer file, provide `DIST_BASE'
|
||||||
to `make'. The default is "racket".
|
to `make'. The default is "racket".
|
||||||
|
|
||||||
To change the directory name for Unix installation, provide
|
To change the directory name for installation on Unix (including
|
||||||
`DIST_DIR' to `make'. The default is "racket".
|
Linux), provide `DIST_DIR' to `make'. The default is "racket".
|
||||||
|
|
||||||
To add an extra piece to the installer's name, such as an
|
To add an extra piece to the installer's name, such as an
|
||||||
identifier for a variant of Linux, provide `DIST_SUFFIX' to
|
identifier for a variant of Linux, provide `DIST_SUFFIX' to
|
||||||
|
@ -499,12 +514,20 @@ In more detail:
|
||||||
`make'. The `README' value is used as a file name to download
|
`make'. The `README' value is used as a file name to download
|
||||||
from the server.
|
from the server.
|
||||||
|
|
||||||
For a Mac OS X installer, set `SIGN_IDENTITY' to sign the
|
To create a ".tgz" archive instead of an installer (or any
|
||||||
installer, where the value of `SIGN_IDENTITY' is the name to
|
platform), set `TGZ_MODE' to "--tgz".
|
||||||
|
|
||||||
|
For a Mac OS X installer, set `SIGN_IDENTITY' as the name to
|
||||||
which the signing certificate is associated. Set `MAC_PKG_MODE'
|
which the signing certificate is associated. Set `MAC_PKG_MODE'
|
||||||
to "--mac-pkg" to create a ".pkg" installer instead of a ".dmg"
|
to "--mac-pkg" to create a ".pkg" installer instead of a ".dmg"
|
||||||
image.
|
image.
|
||||||
|
|
||||||
|
For a Windows installer, set `OSSLSIGNCODE_ARGS_BASE64` as a
|
||||||
|
Base64 encoding of an S-expression for a list of argument strings
|
||||||
|
for `osslsigncode`. The `-n', `-t', `-in', and `-out' arguments
|
||||||
|
are provided to `osslsigncode` automatically, so supply the
|
||||||
|
others.
|
||||||
|
|
||||||
The `SERVER_CATALOG_PATH' and `SERVER_COLLECTS_PATH' makefile
|
The `SERVER_CATALOG_PATH' and `SERVER_COLLECTS_PATH' makefile
|
||||||
variables specify paths at `SERVER' plus `SERVER_PORT' to access
|
variables specify paths at `SERVER' plus `SERVER_PORT' to access
|
||||||
the package catalog and pre-built "collects" tree needed for a
|
the package catalog and pre-built "collects" tree needed for a
|
||||||
|
|
103
Makefile
103
Makefile
|
@ -29,13 +29,18 @@ PKGS = main-distribution main-distribution-test
|
||||||
PLAIN_RACKET = racket/bin/racket
|
PLAIN_RACKET = racket/bin/racket
|
||||||
WIN32_PLAIN_RACKET = racket\racket
|
WIN32_PLAIN_RACKET = racket\racket
|
||||||
|
|
||||||
PLAIN_RACO = racket/bin/racket -N raco -l- raco
|
# In case of cross-installation, point explicitly to local content:
|
||||||
WIN32_PLAIN_RACO = racket\racket -N raco -l- raco
|
RUN_RACKET = $(PLAIN_RACKET) -G racket/etc -X racket/collects
|
||||||
|
WIN32_RUN_RACKET = $(WIN32_PLAIN_RACKET) -G racket/etc -X racket/collects
|
||||||
|
|
||||||
DEFAULT_SRC_CATALOG = http://pkgs.racket-lang.org
|
RUN_RACO = $(RUN_RACKET) -N raco -l- raco
|
||||||
|
WIN32_RUN_RACO = $(WIN32_RUN_RACKET) -N raco -l- raco
|
||||||
|
|
||||||
MACOSX_CHECK_ARGS = -I racket/base -e '(case (system-type) [(macosx) (exit 0)] [else (exit 1)])'
|
DEFAULT_SRC_CATALOG = https://pkgs.racket-lang.org
|
||||||
MACOSX_CHECK = $(PLAIN_RACKET) -G build/config $(MACOSX_CHECK_ARGS)
|
|
||||||
|
# Belongs in the "Configuration options" section, but here
|
||||||
|
# to accomodate nmake:
|
||||||
|
SRC_CATALOG = $(DEFAULT_SRC_CATALOG)
|
||||||
|
|
||||||
CPUS =
|
CPUS =
|
||||||
|
|
||||||
|
@ -61,18 +66,18 @@ ALL_PLT_SETUP_OPTIONS = $(JOB_OPTIONS) $(PLT_SETUP_OPTIONS)
|
||||||
plain-in-place:
|
plain-in-place:
|
||||||
$(MAKE) base
|
$(MAKE) base
|
||||||
$(MAKE) pkgs-catalog
|
$(MAKE) pkgs-catalog
|
||||||
$(PLAIN_RACO) pkg update $(UPDATE_PKGS_ARGS)
|
$(RUN_RACO) pkg update $(UPDATE_PKGS_ARGS)
|
||||||
$(PLAIN_RACO) pkg install $(INSTALL_PKGS_ARGS)
|
$(RUN_RACO) pkg install $(INSTALL_PKGS_ARGS)
|
||||||
$(PLAIN_RACO) setup --only-foreign-libs $(ALL_PLT_SETUP_OPTIONS)
|
$(RUN_RACO) setup --only-foreign-libs $(ALL_PLT_SETUP_OPTIONS)
|
||||||
$(PLAIN_RACO) setup $(ALL_PLT_SETUP_OPTIONS)
|
$(RUN_RACO) setup $(ALL_PLT_SETUP_OPTIONS)
|
||||||
|
|
||||||
win32-in-place:
|
win32-in-place:
|
||||||
$(MAKE) win32-base
|
$(MAKE) win32-base
|
||||||
$(MAKE) win32-pkgs-catalog
|
$(MAKE) win32-pkgs-catalog SRC_CATALOG="$(SRC_CATALOG)"
|
||||||
$(WIN32_PLAIN_RACO) pkg update $(UPDATE_PKGS_ARGS)
|
$(WIN32_RUN_RACO) pkg update $(UPDATE_PKGS_ARGS)
|
||||||
$(WIN32_PLAIN_RACO) pkg install $(INSTALL_PKGS_ARGS)
|
$(WIN32_RUN_RACO) pkg install $(INSTALL_PKGS_ARGS)
|
||||||
$(WIN32_PLAIN_RACO) setup --only-foreign-libs $(ALL_PLT_SETUP_OPTIONS)
|
$(WIN32_RUN_RACO) setup --only-foreign-libs $(ALL_PLT_SETUP_OPTIONS)
|
||||||
$(WIN32_PLAIN_RACO) setup $(ALL_PLT_SETUP_OPTIONS)
|
$(WIN32_RUN_RACO) setup $(ALL_PLT_SETUP_OPTIONS)
|
||||||
|
|
||||||
# Rebuild without consulting catalogs or package sources:
|
# Rebuild without consulting catalogs or package sources:
|
||||||
|
|
||||||
|
@ -86,11 +91,11 @@ cpus-as-is:
|
||||||
|
|
||||||
plain-as-is:
|
plain-as-is:
|
||||||
$(MAKE) base
|
$(MAKE) base
|
||||||
$(PLAIN_RACO) setup $(ALL_PLT_SETUP_OPTIONS)
|
$(RUN_RACO) setup $(ALL_PLT_SETUP_OPTIONS)
|
||||||
|
|
||||||
win32-as-is:
|
win32-as-is:
|
||||||
$(MAKE) win32-base
|
$(MAKE) win32-base
|
||||||
$(WIN32_PLAIN_RACO) setup $(ALL_PLT_SETUP_OPTIONS)
|
$(WIN32_RUN_RACO) setup $(ALL_PLT_SETUP_OPTIONS)
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Unix-style build (Unix and Mac OS X, only)
|
# Unix-style build (Unix and Mac OS X, only)
|
||||||
|
@ -171,6 +176,17 @@ win32-remove-setup-dlls:
|
||||||
racket/src/build/Makefile: racket/src/configure racket/src/Makefile.in
|
racket/src/build/Makefile: racket/src/configure racket/src/Makefile.in
|
||||||
cd racket/src/build; ../configure $(CONFIGURE_ARGS_qq)
|
cd racket/src/build; ../configure $(CONFIGURE_ARGS_qq)
|
||||||
|
|
||||||
|
|
||||||
|
# For cross-compilation, build a native executable with no configure options:
|
||||||
|
native-for-cross:
|
||||||
|
mkdir -p racket/src/build/cross
|
||||||
|
$(MAKE) racket/src/build/cross/Makefile
|
||||||
|
cd racket/src/build/cross; $(MAKE) reconfigure
|
||||||
|
cd racket/src/build/cross/racket; $(MAKE)
|
||||||
|
|
||||||
|
racket/src/build/cross/Makefile: racket/src/configure racket/src/Makefile.in
|
||||||
|
cd racket/src/build/cross; ../../configure
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Configuration options for building installers
|
# Configuration options for building installers
|
||||||
|
|
||||||
|
@ -182,8 +198,8 @@ racket/src/build/Makefile: racket/src/configure racket/src/Makefile.in
|
||||||
# end in "_q" or "_qq", don't use any quote marks on the right-hand
|
# end in "_q" or "_qq", don't use any quote marks on the right-hand
|
||||||
# side of its definition.
|
# side of its definition.
|
||||||
|
|
||||||
# Catalog for package sources:
|
# Catalog for package sources (defined above):
|
||||||
SRC_CATALOG = $(DEFAULT_SRC_CATALOG)
|
# SRC_CATALOG = $(DEFAULT_SRC_CATALOG)
|
||||||
|
|
||||||
# A URL embedded in documentation for remote searches, where a Racket
|
# A URL embedded in documentation for remote searches, where a Racket
|
||||||
# version and search key are added as query fields to the URL, and ""
|
# version and search key are added as query fields to the URL, and ""
|
||||||
|
@ -222,6 +238,9 @@ VERSIONLESS_MODE =
|
||||||
# instead of a ".dmg" for drag-and-drop installation:
|
# instead of a ".dmg" for drag-and-drop installation:
|
||||||
MAC_PKG_MODE =
|
MAC_PKG_MODE =
|
||||||
|
|
||||||
|
# Set to "--tgz" to create a ".tgz" archive instead of an installer:
|
||||||
|
TGZ_MODE =
|
||||||
|
|
||||||
# Set to "--source --no-setup" to include packages in an installer
|
# Set to "--source --no-setup" to include packages in an installer
|
||||||
# (or archive) only in source form:
|
# (or archive) only in source form:
|
||||||
PKG_SOURCE_MODE =
|
PKG_SOURCE_MODE =
|
||||||
|
@ -252,10 +271,14 @@ BUILD_STAMP =
|
||||||
# the default as the version number:
|
# the default as the version number:
|
||||||
INSTALL_NAME =
|
INSTALL_NAME =
|
||||||
|
|
||||||
# A signing identity (spaces allowed) for Mac OS X binaries in an
|
# For Mac OS X, a signing identity (spaces allowed) for binaries in an
|
||||||
# installer:
|
# installer:
|
||||||
SIGN_IDENTITY =
|
SIGN_IDENTITY =
|
||||||
|
|
||||||
|
# For Windows, `osslsigncode' arguments other than `-n', `-t', `-in',
|
||||||
|
# and `-out' as a Base64-encoded, S-expression, list of strings:
|
||||||
|
OSSLSIGNCODE_ARGS_BASE64 =
|
||||||
|
|
||||||
# URL for a README file to include in an installer (empty for none,
|
# URL for a README file to include in an installer (empty for none,
|
||||||
# spaces allowed):
|
# spaces allowed):
|
||||||
README = http://$(SVR_PRT)/README.txt
|
README = http://$(SVR_PRT)/README.txt
|
||||||
|
@ -299,11 +322,11 @@ SVR_PRT = $(SERVER):$(SERVER_PORT)
|
||||||
SVR_CAT = http://$(SVR_PRT)/$(SERVER_CATALOG_PATH)
|
SVR_CAT = http://$(SVR_PRT)/$(SERVER_CATALOG_PATH)
|
||||||
|
|
||||||
# Helper macros:
|
# Helper macros:
|
||||||
USER_CONFIG = -G build/user/config -A build/user
|
USER_CONFIG = -G build/user/config -X racket/collects -A build/user
|
||||||
RACKET = racket/bin/racket $(USER_CONFIG)
|
RACKET = $(PLAIN_RACKET) $(USER_CONFIG)
|
||||||
RACO = racket/bin/racket $(USER_CONFIG) -N raco -l- raco
|
RACO = $(PLAIN_RACKET) $(USER_CONFIG) -N raco -l- raco
|
||||||
WIN32_RACKET = racket\racket $(USER_CONFIG)
|
WIN32_RACKET = $(WIN32_PLAIN_RACKET) $(USER_CONFIG)
|
||||||
WIN32_RACO = racket\racket $(USER_CONFIG) -N raco -l- raco
|
WIN32_RACO = $(WIN32_PLAIN_RACKET) $(USER_CONFIG) -N raco -l- raco
|
||||||
X_AUTO_OPTIONS = --skip-installed --deps search-auto --pkgs $(JOB_OPTIONS)
|
X_AUTO_OPTIONS = --skip-installed --deps search-auto --pkgs $(JOB_OPTIONS)
|
||||||
USER_AUTO_OPTIONS = --scope user $(X_AUTO_OPTIONS)
|
USER_AUTO_OPTIONS = --scope user $(X_AUTO_OPTIONS)
|
||||||
LOCAL_USER_AUTO = --catalog build/local/catalog $(USER_AUTO_OPTIONS)
|
LOCAL_USER_AUTO = --catalog build/local/catalog $(USER_AUTO_OPTIONS)
|
||||||
|
@ -312,9 +335,9 @@ REMOTE_USER_AUTO = --catalog $(SVR_CAT) $(USER_AUTO_OPTIONS)
|
||||||
REMOTE_INST_AUTO = --catalog $(SVR_CAT) --scope installation $(X_AUTO_OPTIONS)
|
REMOTE_INST_AUTO = --catalog $(SVR_CAT) --scope installation $(X_AUTO_OPTIONS)
|
||||||
CONFIG_MODE_q = "$(CONFIG)" "$(CONFIG_MODE)"
|
CONFIG_MODE_q = "$(CONFIG)" "$(CONFIG_MODE)"
|
||||||
BUNDLE_CONFIG = bundle/racket/etc/config.rktd
|
BUNDLE_CONFIG = bundle/racket/etc/config.rktd
|
||||||
BUNDLE_RACO_FLAGS = -A bundle/user -l raco
|
BUNDLE_RACO_FLAGS = -G bundle/racket/config -X bundle/racket/collects -A bundle/user -l raco
|
||||||
BUNDLE_RACO = bundle/racket/bin/racket $(BUNDLE_RACO_FLAGS)
|
BUNDLE_RACO = $(PLAIN_RACKET) $(BUNDLE_RACO_FLAGS)
|
||||||
WIN32_BUNDLE_RACO = bundle\racket\racket $(BUNDLE_RACO_FLAGS)
|
WIN32_BUNDLE_RACO = $(WIN32_PLAIN_RACKET) $(BUNDLE_RACO_FLAGS)
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Linking all packages (development mode; not an installer build)
|
# Linking all packages (development mode; not an installer build)
|
||||||
|
@ -323,12 +346,14 @@ PKGS_CATALOG = -U -G build/config -l- pkg/dirs-catalog --link --check-metadata
|
||||||
PKGS_CONFIG = -U -G build/config racket/src/pkgs-config.rkt
|
PKGS_CONFIG = -U -G build/config racket/src/pkgs-config.rkt
|
||||||
|
|
||||||
pkgs-catalog:
|
pkgs-catalog:
|
||||||
$(PLAIN_RACKET) $(PKGS_CATALOG) racket/share/pkgs-catalog pkgs
|
$(RUN_RACKET) $(PKGS_CATALOG) racket/share/pkgs-catalog pkgs
|
||||||
$(PLAIN_RACKET) $(PKGS_CONFIG) "$(DEFAULT_SRC_CATALOG)" "$(SRC_CATALOG)"
|
$(RUN_RACKET) $(PKGS_CONFIG) "$(DEFAULT_SRC_CATALOG)" "$(SRC_CATALOG)"
|
||||||
$(PLAIN_RACKET) racket/src/pkgs-check.rkt racket/share/pkgs-catalog
|
$(RUN_RACKET) racket/src/pkgs-check.rkt racket/share/pkgs-catalog
|
||||||
|
|
||||||
|
COPY_PKGS_ARGS = PLAIN_RACKET="$(WIN32_PLAIN_RACKET)" SRC_CATALOG="$(SRC_CATALOG)"
|
||||||
|
|
||||||
win32-pkgs-catalog:
|
win32-pkgs-catalog:
|
||||||
$(MAKE) pkgs-catalog PLAIN_RACKET="$(WIN32_PLAIN_RACKET)"
|
$(MAKE) pkgs-catalog $(COPY_PKGS_ARGS)
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# On a server platform (for an installer build):
|
# On a server platform (for an installer build):
|
||||||
|
@ -428,14 +453,15 @@ binary-catalog-server:
|
||||||
# client is the same as the server.
|
# client is the same as the server.
|
||||||
|
|
||||||
PROP_ARGS = SERVER=$(SERVER) SERVER_PORT=$(SERVER_PORT) SERVER_HOSTS="$(SERVER_HOSTS)" \
|
PROP_ARGS = SERVER=$(SERVER) SERVER_PORT=$(SERVER_PORT) SERVER_HOSTS="$(SERVER_HOSTS)" \
|
||||||
PKGS="$(PKGS)" BUILD_STAMP="$(BUILD_STAMP)" \
|
PKGS="$(PKGS)" PLAIN_RACKET="$(PLAIN_RACKET)" BUILD_STAMP="$(BUILD_STAMP)" \
|
||||||
RELEASE_MODE=$(RELEASE_MODE) SOURCE_MODE=$(SOURCE_MODE) \
|
RELEASE_MODE=$(RELEASE_MODE) SOURCE_MODE=$(SOURCE_MODE) \
|
||||||
VERSIONLESS_MODE=$(VERSIONLESS_MODE) MAC_PKG_MODE=$(MAC_PKG_MODE) \
|
VERSIONLESS_MODE=$(VERSIONLESS_MODE) MAC_PKG_MODE=$(MAC_PKG_MODE) \
|
||||||
PKG_SOURCE_MODE="$(PKG_SOURCE_MODE)" INSTALL_NAME="$(INSTALL_NAME)"\
|
PKG_SOURCE_MODE="$(PKG_SOURCE_MODE)" INSTALL_NAME="$(INSTALL_NAME)" \
|
||||||
DIST_NAME="$(DIST_NAME)" DIST_BASE=$(DIST_BASE) \
|
DIST_NAME="$(DIST_NAME)" DIST_BASE=$(DIST_BASE) \
|
||||||
DIST_DIR=$(DIST_DIR) DIST_SUFFIX=$(DIST_SUFFIX) UPLOAD="$(UPLOAD)" \
|
DIST_DIR=$(DIST_DIR) DIST_SUFFIX=$(DIST_SUFFIX) UPLOAD="$(UPLOAD)" \
|
||||||
DIST_DESC="$(DIST_DESC)" README="$(README)" SIGN_IDENTITY="$(SIGN_IDENTITY)"\
|
DIST_DESC="$(DIST_DESC)" README="$(README)" SIGN_IDENTITY="$(SIGN_IDENTITY)" \
|
||||||
JOB_OPTIONS="$(JOB_OPTIONS)"
|
OSSLSIGNCODE_ARGS_BASE64="$(OSSLSIGNCODE_ARGS_BASE64)" JOB_OPTIONS="$(JOB_OPTIONS)" \
|
||||||
|
TGZ_MODE=$(TGZ_MODE)
|
||||||
|
|
||||||
COPY_ARGS = $(PROP_ARGS) \
|
COPY_ARGS = $(PROP_ARGS) \
|
||||||
SERVER_CATALOG_PATH=$(SERVER_CATALOG_PATH) SERVER_COLLECTS_PATH=$(SERVER_COLLECTS_PATH)
|
SERVER_CATALOG_PATH=$(SERVER_CATALOG_PATH) SERVER_COLLECTS_PATH=$(SERVER_COLLECTS_PATH)
|
||||||
|
@ -476,15 +502,18 @@ bundle-from-server:
|
||||||
rm -rf bundle
|
rm -rf bundle
|
||||||
mkdir -p bundle/racket
|
mkdir -p bundle/racket
|
||||||
$(RACKET) -l setup/unixstyle-install bundle racket bundle/racket
|
$(RACKET) -l setup/unixstyle-install bundle racket bundle/racket
|
||||||
|
$(RACKET) -l setup/winstrip bundle/racket
|
||||||
|
$(RACKET) -l setup/winvers-change bundle/racket
|
||||||
$(RACKET) -l distro-build/unpack-collects http://$(SVR_PRT)/$(SERVER_COLLECTS_PATH)
|
$(RACKET) -l distro-build/unpack-collects http://$(SVR_PRT)/$(SERVER_COLLECTS_PATH)
|
||||||
$(BUNDLE_RACO) pkg install $(REMOTE_INST_AUTO) $(PKG_SOURCE_MODE) $(REQUIRED_PKGS)
|
$(BUNDLE_RACO) pkg install $(REMOTE_INST_AUTO) $(PKG_SOURCE_MODE) $(REQUIRED_PKGS)
|
||||||
$(BUNDLE_RACO) pkg install $(REMOTE_INST_AUTO) $(PKG_SOURCE_MODE) $(PKGS)
|
$(BUNDLE_RACO) pkg install $(REMOTE_INST_AUTO) $(PKG_SOURCE_MODE) $(PKGS)
|
||||||
$(RACKET) -l setup/unixstyle-install post-adjust "$(SOURCE_MODE)" "$(PKG_SOURCE_MODE)" racket bundle/racket
|
$(RACKET) -l setup/unixstyle-install post-adjust "$(SOURCE_MODE)" "$(PKG_SOURCE_MODE)" racket bundle/racket
|
||||||
|
|
||||||
UPLOAD_q = --readme "$(README)" --upload "$(UPLOAD)" --desc "$(DIST_DESC)"
|
UPLOAD_q = --readme "$(README)" --upload "$(UPLOAD)" --desc "$(DIST_DESC)"
|
||||||
DIST_ARGS_q = $(UPLOAD_q) $(RELEASE_MODE) $(SOURCE_MODE) $(VERSIONLESS_MODE) $(MAC_PKG_MODE) \
|
DIST_ARGS_q = $(UPLOAD_q) $(RELEASE_MODE) $(SOURCE_MODE) $(VERSIONLESS_MODE) \
|
||||||
|
$(MAC_PKG_MODE) $(TGZ_MODE) \
|
||||||
"$(DIST_NAME)" $(DIST_BASE) $(DIST_DIR) "$(DIST_SUFFIX)" \
|
"$(DIST_NAME)" $(DIST_BASE) $(DIST_DIR) "$(DIST_SUFFIX)" \
|
||||||
"$(SIGN_IDENTITY)"
|
"$(SIGN_IDENTITY)" "$(OSSLSIGNCODE_ARGS_BASE64)"
|
||||||
|
|
||||||
# Create an installer from the build (with installed packages) that's
|
# Create an installer from the build (with installed packages) that's
|
||||||
# in "bundle/racket":
|
# in "bundle/racket":
|
||||||
|
|
|
@ -5,7 +5,7 @@ License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Racket
|
Racket
|
||||||
Copyright (c) 2010-2014 PLT Design Inc.
|
Copyright (c) 2010-2016 PLT Design Inc.
|
||||||
|
|
||||||
Racket is distributed under the GNU Lesser General Public License
|
Racket is distributed under the GNU Lesser General Public License
|
||||||
(LGPL). This implies that you may link Racket into proprietary
|
(LGPL). This implies that you may link Racket into proprietary
|
||||||
|
|
22
appveyor.yml
22
appveyor.yml
|
@ -8,11 +8,26 @@ cache:
|
||||||
build_script:
|
build_script:
|
||||||
- '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\vc\vcvarsall.bat" x86'
|
- '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\vc\vcvarsall.bat" x86'
|
||||||
- echo %cd%
|
- echo %cd%
|
||||||
- nmake win32-in-place PKGS="racket-test-core"
|
- nmake win32-in-place PKGS="racket-test unstable-flonum-lib net-test"
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- echo %cd%
|
- echo %cd%
|
||||||
|
- racket\raco.exe pkg show -l
|
||||||
- racket\racket.exe -l tests/racket/test
|
- racket\racket.exe -l tests/racket/test
|
||||||
|
- racket\racket.exe -l tests/racket/contract/all
|
||||||
|
- racket\raco.exe test -l tests/json/json
|
||||||
|
- racket\raco.exe test -l tests/file/main
|
||||||
|
- racket\raco.exe test -l tests/net/head
|
||||||
|
- racket\raco.exe test -l tests/net/uri-codec
|
||||||
|
- racket\raco.exe test -l tests/net/url
|
||||||
|
- racket\raco.exe test -l tests/net/url-port
|
||||||
|
- racket\raco.exe test -l tests/net/encoders
|
||||||
|
- racket\raco.exe test -l tests/openssl/basic
|
||||||
|
- racket\raco.exe test -l tests/openssl/https
|
||||||
|
- racket\raco.exe test -l tests/match/main
|
||||||
|
- racket\raco.exe test -l tests/zo-path
|
||||||
|
- racket\raco.exe test -l tests/xml/test
|
||||||
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
- provider: Email
|
- provider: Email
|
||||||
|
@ -20,3 +35,8 @@ notifications:
|
||||||
- samth@racket-lang.org
|
- samth@racket-lang.org
|
||||||
on_build_success: true
|
on_build_success: true
|
||||||
on_build_failure: true
|
on_build_failure: true
|
||||||
|
|
||||||
|
- provider: Slack
|
||||||
|
auth_token:
|
||||||
|
secure: WCMkqS/3iB39INmhzQoZDNJ3zcOXLaRueWvaayOD9MW15DcWrGOAxz7dGrhh/EcQ
|
||||||
|
channel: notifications
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
at-exp-lib
|
at-exp-lib
|
||||||
Copyright (c) 2010-2014 PLT Design Inc.
|
Copyright (c) 2010-2016 PLT Design Inc.
|
||||||
|
|
||||||
This package is distributed under the GNU Lesser General Public
|
This package is distributed under the GNU Lesser General Public
|
||||||
License (LGPL). This means that you can link this package into proprietary
|
License (LGPL). This means that you can link this package into proprietary
|
||||||
|
|
|
@ -2,9 +2,19 @@
|
||||||
|
|
||||||
(provide get-language-info)
|
(provide get-language-info)
|
||||||
|
|
||||||
|
(require racket/match)
|
||||||
|
|
||||||
(define (get-language-info data)
|
(define (get-language-info data)
|
||||||
|
(define other-get-info
|
||||||
|
(match data
|
||||||
|
[(vector mod sym data2)
|
||||||
|
((dynamic-require mod sym) data2)]
|
||||||
|
[_ (lambda (key default) default)]))
|
||||||
(lambda (key default)
|
(lambda (key default)
|
||||||
(case key
|
(case key
|
||||||
[(configure-runtime)
|
[(configure-runtime)
|
||||||
'(#[at-exp/lang/runtime-config configure #f])]
|
(define config-vec '#[at-exp/lang/runtime-config configure #f])
|
||||||
[else default])))
|
(define other-config (other-get-info key default))
|
||||||
|
(cond [(list? other-config) (cons config-vec other-config)]
|
||||||
|
[else (list config-vec)])]
|
||||||
|
[else (other-get-info key default)])))
|
||||||
|
|
|
@ -29,9 +29,10 @@
|
||||||
(lambda (orig-read-syntax)
|
(lambda (orig-read-syntax)
|
||||||
(define read-syntax (wrap-reader orig-read-syntax))
|
(define read-syntax (wrap-reader orig-read-syntax))
|
||||||
(lambda args
|
(lambda args
|
||||||
(syntax-property (apply read-syntax args)
|
(define stx (apply read-syntax args))
|
||||||
'module-language
|
(define old-prop (syntax-property stx 'module-language))
|
||||||
'#(at-exp/lang/language-info get-language-info #f))))
|
(define new-prop `#(at-exp/lang/language-info get-language-info ,old-prop))
|
||||||
|
(syntax-property stx 'module-language new-prop)))
|
||||||
(lambda (proc)
|
(lambda (proc)
|
||||||
(lambda (key defval)
|
(lambda (key defval)
|
||||||
(define (fallback) (if proc (proc key defval) defval))
|
(define (fallback) (if proc (proc key defval) defval))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
base
|
base
|
||||||
Copyright (c) 2010-2014 PLT Design Inc.
|
Copyright (c) 2010-2016 PLT Design Inc.
|
||||||
|
|
||||||
This package is distributed under the GNU Lesser General Public
|
This package is distributed under the GNU Lesser General Public
|
||||||
License (LGPL). This means that you can link this package into proprietary
|
License (LGPL). This means that you can link this package into proprietary
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
(define collection 'multi)
|
(define collection 'multi)
|
||||||
|
|
||||||
(define version "6.2")
|
(define version "6.4.0.15")
|
||||||
|
|
||||||
(define deps `("racket-lib"
|
(define deps `("racket-lib"
|
||||||
["racket" #:version ,version]))
|
["racket" #:version ,version]))
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
"compatibility-lib"
|
"compatibility-lib"
|
||||||
"r5rs-lib"
|
"r5rs-lib"
|
||||||
"scheme-lib"
|
"scheme-lib"
|
||||||
"srfi-lite-lib"
|
|
||||||
"racket-test"
|
"racket-test"
|
||||||
"typed-racket-lib"))
|
"typed-racket-lib"
|
||||||
|
"gui-lib"))
|
||||||
|
|
||||||
(define pkg-desc "Racket benchmarks")
|
(define pkg-desc "Racket benchmarks")
|
||||||
(define pkg-authors '(eli jay mflatt robby samth stamourv))
|
(define pkg-authors '(eli jay mflatt robby samth stamourv))
|
||||||
|
|
|
@ -48,6 +48,19 @@ exec racket -qu "$0" ${1+"$@"}
|
||||||
(compile-file name
|
(compile-file name
|
||||||
"compiled/current-bm_rkt.zo"))))
|
"compiled/current-bm_rkt.zo"))))
|
||||||
|
|
||||||
|
(define (mk-errortrace bm)
|
||||||
|
(unless (directory-exists? "compiled")
|
||||||
|
(make-directory "compiled"))
|
||||||
|
(parameterize ([current-namespace (make-base-namespace)]
|
||||||
|
[read-accept-reader #t]
|
||||||
|
[current-compile (current-compile)]
|
||||||
|
[error-display-handler (error-display-handler)]
|
||||||
|
[use-compiled-file-paths (use-compiled-file-paths)])
|
||||||
|
(dynamic-require 'errortrace #f)
|
||||||
|
(let ([name (format "~a.rkt" bm)])
|
||||||
|
(compile-file name
|
||||||
|
"compiled/current-bm_rkt.zo"))))
|
||||||
|
|
||||||
(define (compiled-path bm)
|
(define (compiled-path bm)
|
||||||
"current-bm.rkt")
|
"current-bm.rkt")
|
||||||
|
|
||||||
|
@ -395,6 +408,14 @@ exec racket -qu "$0" ${1+"$@"}
|
||||||
extract-racket-times
|
extract-racket-times
|
||||||
clean-up-zo
|
clean-up-zo
|
||||||
racket-skip-progs)
|
racket-skip-progs)
|
||||||
|
(make-impl 'errortrace
|
||||||
|
void
|
||||||
|
mk-errortrace
|
||||||
|
(lambda (bm)
|
||||||
|
(system (format "racket -l errortrace -u ~a" (compiled-path bm))))
|
||||||
|
extract-racket-times
|
||||||
|
clean-up-zo
|
||||||
|
racket-skip-progs)
|
||||||
(make-impl 'plt-r5rs
|
(make-impl 'plt-r5rs
|
||||||
void
|
void
|
||||||
mk-plt-r5rs
|
mk-plt-r5rs
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
racket/serialize
|
racket/serialize
|
||||||
(for-syntax syntax/parse
|
(for-syntax syntax/parse
|
||||||
racket/base
|
racket/base
|
||||||
racket/file))
|
racket/file
|
||||||
|
syntax/strip-context))
|
||||||
|
|
||||||
(provide
|
(provide
|
||||||
dynamic-place
|
dynamic-place
|
||||||
|
@ -117,7 +118,7 @@
|
||||||
new-result)))]))
|
new-result)))]))
|
||||||
|
|
||||||
(define-syntax (place/base stx)
|
(define-syntax (place/base stx)
|
||||||
(syntax-case stx ()
|
(syntax-case (replace-context #'here stx) ()
|
||||||
[(_ module-name (name ch) body ...)
|
[(_ module-name (name ch) body ...)
|
||||||
#'(module module-name racket/base
|
#'(module module-name racket/base
|
||||||
(require "place-processes.rkt")
|
(require "place-processes.rkt")
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
(module pct1 racket/base
|
(module pct1 racket/base
|
||||||
(require racket/place
|
(require racket/place
|
||||||
racket/match
|
racket/match
|
||||||
"place-utils.rkt")
|
tests/racket/place-utils)
|
||||||
(provide place-main)
|
(provide place-main)
|
||||||
|
|
||||||
(define (place-main ch)
|
(define (place-main ch)
|
||||||
|
@ -48,7 +48,7 @@ END
|
||||||
#<<END
|
#<<END
|
||||||
(module pct1 racket/base
|
(module pct1 racket/base
|
||||||
(require racket/place
|
(require racket/place
|
||||||
"place-utils.rkt")
|
tests/racket/place-utils)
|
||||||
(provide place-main)
|
(provide place-main)
|
||||||
(require algol60/parse
|
(require algol60/parse
|
||||||
(for-syntax racket/base
|
(for-syntax racket/base
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
#lang racket/gui
|
||||||
|
#|
|
||||||
|
|
||||||
|
This is an attempt to simulate what happens when
|
||||||
|
DrRacket redraws a full window's worth of text
|
||||||
|
|
||||||
|
|#
|
||||||
|
|
||||||
|
(require framework)
|
||||||
|
|
||||||
|
(define t%
|
||||||
|
(text:column-guide-mixin
|
||||||
|
(text:line-numbers-mixin
|
||||||
|
racket:text%)))
|
||||||
|
|
||||||
|
(define (time-print-mixin t%)
|
||||||
|
(class t%
|
||||||
|
(super-new)
|
||||||
|
(define/override (on-paint before? dc left top right bottom dx dy draw-caret)
|
||||||
|
(cond
|
||||||
|
[before?
|
||||||
|
(set! start-time (current-process-milliseconds (current-thread)))
|
||||||
|
(super on-paint before? dc left top right bottom dx dy draw-caret)]
|
||||||
|
[else
|
||||||
|
(super on-paint before? dc left top right bottom dx dy draw-caret)
|
||||||
|
(define now (current-process-milliseconds (current-thread)))
|
||||||
|
(set! times (cons (- now start-time) times))
|
||||||
|
(semaphore-post s)]))))
|
||||||
|
(define start-time #f)
|
||||||
|
|
||||||
|
(define times '())
|
||||||
|
(define s (make-semaphore))
|
||||||
|
(define t (new (time-print-mixin t%)))
|
||||||
|
(send t show-line-numbers! #t)
|
||||||
|
(send t insert "#lang racket/base\n")
|
||||||
|
(for ([x (in-range 1000)])
|
||||||
|
(send t insert (format "~s\n" '(let loop ([x ""])
|
||||||
|
(when (< (string-length x) 100)
|
||||||
|
(loop (string-append x "y")))))))
|
||||||
|
(define f (new frame% [label ""] [width 1000] [height 1400]))
|
||||||
|
(define ec (new editor-canvas% [parent f] [editor t]))
|
||||||
|
(define height
|
||||||
|
(let ([yb (box 0)])
|
||||||
|
(send t position-location (send t last-position) #f yb)
|
||||||
|
(unbox yb)))
|
||||||
|
(define width
|
||||||
|
(let ([xb (box 0)])
|
||||||
|
(for/fold ([width 0]) ([para (in-range (+ (send t last-paragraph) 1))])
|
||||||
|
(send t position-location (send t paragraph-end-position para) xb #f #t #t)
|
||||||
|
(max width (unbox xb)))))
|
||||||
|
(void (send ec scroll-to 0 (/ height 2) 1 1 #t))
|
||||||
|
(send f show #t)
|
||||||
|
|
||||||
|
;; wait for syntax coloring to finish
|
||||||
|
(send t freeze-colorer)
|
||||||
|
|
||||||
|
(define number-of-experiments 10)
|
||||||
|
|
||||||
|
(queue-callback
|
||||||
|
(λ ()
|
||||||
|
(set! times '())
|
||||||
|
(set! s (make-semaphore)) ;; because earlier paints happend before we were ready
|
||||||
|
(for ([i (in-range number-of-experiments)])
|
||||||
|
(collect-garbage) (collect-garbage) (collect-garbage)
|
||||||
|
(send ec refresh)
|
||||||
|
(yield s))
|
||||||
|
(semaphore-post done))
|
||||||
|
#f)
|
||||||
|
|
||||||
|
(define done (make-semaphore 0))
|
||||||
|
(void (yield done))
|
||||||
|
|
||||||
|
;; show the actual times.
|
||||||
|
times
|
||||||
|
|
||||||
|
;; print in drdr friendly way
|
||||||
|
(let ([t (apply + times)])
|
||||||
|
(printf "cpu time: ~a real time: ~a gc time: ~a\n" t t t))
|
||||||
|
|
||||||
|
(send f show #f) (exit)
|
|
@ -7,9 +7,6 @@
|
||||||
|
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
(require (only-in srfi/13 string-index string-pad-right)
|
|
||||||
(only-in mzlib/string real->decimal-string))
|
|
||||||
|
|
||||||
(define IM 139968)
|
(define IM 139968)
|
||||||
(define IA 3877)
|
(define IA 3877)
|
||||||
(define IC 29573)
|
(define IC 29573)
|
||||||
|
|
|
@ -5,9 +5,6 @@
|
||||||
;;
|
;;
|
||||||
;; Updated by Brent Fulgham to provide proper output formatting
|
;; Updated by Brent Fulgham to provide proper output formatting
|
||||||
|
|
||||||
(require (only-in srfi/13 string-index string-pad-right)
|
|
||||||
(only-in mzlib/string real->decimal-string))
|
|
||||||
|
|
||||||
(define IM 139968)
|
(define IM 139968)
|
||||||
(define IA 3877)
|
(define IA 3877)
|
||||||
(define IC 29573)
|
(define IC 29573)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
racket-doc
|
racket-doc
|
||||||
Copyright (c) 2010-2014 PLT Design Inc.
|
Copyright (c) 2010-2016 PLT Design Inc.
|
||||||
|
|
||||||
This package is distributed under the GNU Lesser General Public
|
This package is distributed under the GNU Lesser General Public
|
||||||
License (LGPL). This means that you can link this package into proprietary
|
License (LGPL). This means that you can link this package into proprietary
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
@(require scribblings/reference/mz (for-label compatibility/package))
|
@(require scribblings/reference/mz (for-label compatibility/package))
|
||||||
|
|
||||||
@(define pack-eval (make-base-eval))
|
@(define pack-eval (make-base-eval))
|
||||||
@interaction-eval[#:eval pack-eval (require compatibility/package)]
|
@examples[#:hidden #:eval pack-eval (require compatibility/package)]
|
||||||
|
|
||||||
@title[#:tag "compatibility-package"]{Limiting Scope: @racket[define-package], @racket[open-package], ...}
|
@title[#:tag "compatibility-package"]{Limiting Scope: @racket[define-package], @racket[open-package], ...}
|
||||||
|
|
||||||
|
@ -61,11 +61,11 @@ is the exported one.
|
||||||
(define-package presents (doll)
|
(define-package presents (doll)
|
||||||
(define doll "Molly Coddle")
|
(define doll "Molly Coddle")
|
||||||
(define robot "Destructo"))
|
(define robot "Destructo"))
|
||||||
doll
|
(eval:error doll)
|
||||||
robot
|
(eval:error robot)
|
||||||
(open-package presents)
|
(open-package presents)
|
||||||
doll
|
doll
|
||||||
robot
|
(eval:error robot)
|
||||||
(define-package big-russian-doll (middle-russian-doll)
|
(define-package big-russian-doll (middle-russian-doll)
|
||||||
(define-package middle-russian-doll (little-russian-doll)
|
(define-package middle-russian-doll (little-russian-doll)
|
||||||
(define little-russian-doll "Anastasia")))
|
(define little-russian-doll "Anastasia")))
|
||||||
|
@ -95,7 +95,7 @@ the defined bindings remain hidden outside the
|
||||||
(package-begin
|
(package-begin
|
||||||
(define secret "mimi")
|
(define secret "mimi")
|
||||||
(list secret))
|
(list secret))
|
||||||
secret
|
(eval:error secret)
|
||||||
]}
|
]}
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
dynext/link-unit
|
dynext/link-unit
|
||||||
dynext/link-sig
|
dynext/link-sig
|
||||||
dynext/file-unit
|
dynext/file-unit
|
||||||
dynext/file-sig))
|
dynext/file-sig
|
||||||
|
compiler/module-suffix))
|
||||||
|
|
||||||
@title{Dynext: Running a C Compiler/Linker}
|
@title{Dynext: Running a C Compiler/Linker}
|
||||||
|
|
||||||
|
@ -359,7 +360,11 @@ Appends the platform-standard dynamic-extension file suffix to
|
||||||
(or/c path? false/c)]{
|
(or/c path? false/c)]{
|
||||||
|
|
||||||
Strips the Racket file suffix from @racket[s] and returns a stripped
|
Strips the Racket file suffix from @racket[s] and returns a stripped
|
||||||
path. Unlike the other functions below, when @racket[program] is not
|
path. The recognized suffixes are the ones reported by
|
||||||
|
@racket[(get-module-suffixes #:group 'libs)] when
|
||||||
|
@racket[extract-base-filename/ss] is first called.
|
||||||
|
|
||||||
|
Unlike the other functions below, when @racket[program] is not
|
||||||
@racket[#f], then any suffix (including no suffix) is allowed. If
|
@racket[#f], then any suffix (including no suffix) is allowed. If
|
||||||
@racket[s] is not a Racket file and @racket[program] is @racket[#f],
|
@racket[s] is not a Racket file and @racket[program] is @racket[#f],
|
||||||
@racket[#f] is returned.}
|
@racket[#f] is returned.}
|
||||||
|
|
|
@ -31,7 +31,7 @@ should be considered standard:
|
||||||
and eight numbers; like @racket['png-bytes+bounds], but where
|
and eight numbers; like @racket['png-bytes+bounds], but where
|
||||||
the image encoded that is in the byte string can be padded in
|
the image encoded that is in the byte string can be padded in
|
||||||
each direction (to allow the drawn region to extend beyond
|
each direction (to allow the drawn region to extend beyond
|
||||||
it's ``bounding box''), where the extra four numbers in the
|
its ``bounding box''), where the extra four numbers in the
|
||||||
list specify the amount of padding that was added to the
|
list specify the amount of padding that was added to the
|
||||||
image: left, right, top, and bottom}
|
image: left, right, top, and bottom}
|
||||||
@item{@racket['png@2x-bytes] --- like @racket['png-bytes], but for an
|
@item{@racket['png@2x-bytes] --- like @racket['png-bytes], but for an
|
||||||
|
|
|
@ -10,7 +10,8 @@ and writing @filepath{.ico} files, which contain one or more icons.
|
||||||
Each icon is up to 256 by 256 pixels, has a particular depth (i.e.,
|
Each icon is up to 256 by 256 pixels, has a particular depth (i.e.,
|
||||||
bits per pixel used to represent a color), and mask (i.e., whether a
|
bits per pixel used to represent a color), and mask (i.e., whether a
|
||||||
pixel is shown, except that the mask may be ignored for 32-bit icons
|
pixel is shown, except that the mask may be ignored for 32-bit icons
|
||||||
that have an alpha value per pixel).
|
that have an alpha value per pixel). The library also provides support
|
||||||
|
for reading and writing icons in Windows executables.
|
||||||
|
|
||||||
@defproc[(ico? [v any/c]) boolean?]{
|
@defproc[(ico? [v any/c]) boolean?]{
|
||||||
|
|
||||||
|
@ -18,25 +19,40 @@ Returns @racket[#t] if @racket[v] represents an icon, @racket[#f]
|
||||||
otherwise.}
|
otherwise.}
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
@defproc[(ico-width [ico ico?]) (integer-in 1 256)]
|
@defproc[(ico-width [ico ico?]) exact-positive-integer?]
|
||||||
@defproc[(ico-height [ico ico?]) (integer-in 1 256)]
|
@defproc[(ico-height [ico ico?]) exact-positive-integer?]
|
||||||
@defproc[(ico-depth [ico ico?]) (one-of/c 1 2 4 8 16 24 32)]
|
@defproc[(ico-depth [ico ico?]) (one-of/c 1 2 4 8 16 24 32)]
|
||||||
)]{
|
)]{
|
||||||
|
|
||||||
Returns the width or height of an icon in pixels, or the depth in bits per
|
Returns the width or height of an icon in pixels, or the depth in bits per
|
||||||
pixel.}
|
pixel.
|
||||||
|
|
||||||
|
@history[#:changed "6.3" @elem{A PNG-format icon can have a
|
||||||
|
width or height greater than 256.}]}
|
||||||
|
|
||||||
|
|
||||||
|
@deftogether[(
|
||||||
|
@defproc[(ico-format [ico ico?]) (or/c 'bmp 'png)]
|
||||||
|
)]{
|
||||||
|
|
||||||
|
Reports the format of the icon.
|
||||||
|
|
||||||
|
@history[#:added "6.3"]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(read-icos [src (or/c path-string? input-port?)])
|
@defproc[(read-icos [src (or/c path-string? input-port?)])
|
||||||
(listof ico?)]{
|
(listof ico?)]{
|
||||||
|
|
||||||
Parses @racket[src] as an @filepath{.ico} to extract a list of icons.}
|
Parses @racket[src] as an @filepath{.ico} to extract a list of icons.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(read-icos-from-exe [src (or/c path-string? input-port?)])
|
@defproc[(read-icos-from-exe [src (or/c path-string? input-port?)])
|
||||||
(listof ico?)]{
|
(listof ico?)]{
|
||||||
|
|
||||||
Parses @racket[src] as an @filepath{.exe} to extract the list of
|
Parses @racket[src] as an @filepath{.exe} to extract the list of
|
||||||
icons that represent the Windows executable.}
|
icons that represent the Windows executable.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(write-icos [icos (listof ico?)]
|
@defproc[(write-icos [icos (listof ico?)]
|
||||||
[dest (or/c path-string? output-port?)]
|
[dest (or/c path-string? output-port?)]
|
||||||
[#:exists exists (or/c 'error 'append 'update 'can-update
|
[#:exists exists (or/c 'error 'append 'update 'can-update
|
||||||
|
@ -50,22 +66,46 @@ Writes each icon in @racket[icos] to @racket[dest] as an
|
||||||
@racket[exists] is passed on to @racket[open-output-file] to open
|
@racket[exists] is passed on to @racket[open-output-file] to open
|
||||||
@racket[dest] for writing.}
|
@racket[dest] for writing.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(replace-icos [icos (listof ico?)]
|
@defproc[(replace-icos [icos (listof ico?)]
|
||||||
[dest (or/c path-string? output-port?)])
|
[dest path-string?])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Writes icons in @racket[icos] to replace icons in @racket[dest] as an
|
Writes icons in @racket[icos] to replace icons in @racket[dest] as an
|
||||||
Windows executable. Only existing icon sizes and depths in the
|
Windows executable. Only existing icon sizes and depths in the
|
||||||
executable are replaced, and best matches for the existing sizes and
|
executable are replaced, and only when the encoding sizes match.
|
||||||
depth are drawn from @racket[icos] (adjusting the scale and depth f a
|
Best matches for the existing sizes and
|
||||||
best match as necessary).}
|
depth are drawn from @racket[icos] (adjusting the scale and depth of a
|
||||||
|
best match as necessary).
|
||||||
|
|
||||||
|
Use @racket[replace-all-icos], instead, to replace a set of icons
|
||||||
|
wholesale, especially when the set include PNG-format icons.}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(replace-all-icos [icos (listof ico?)]
|
||||||
|
[dest (or/c path-string? output-port?)])
|
||||||
|
void?]{
|
||||||
|
|
||||||
|
Replaces the icon set in the executable @racket[dest] with the given
|
||||||
|
set of icons.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(ico->argb [ico ico?]) bytes?]{
|
@defproc[(ico->argb [ico ico?]) bytes?]{
|
||||||
|
|
||||||
Converts an icon to an ARGB byte string, which has the icon's pixels
|
Converts an icon in BMP format (see @racket[ico-format])
|
||||||
|
to an ARGB byte string, which has the icon's pixels
|
||||||
in left-to-right, top-to-bottom order, with four bytes (alpha, red,
|
in left-to-right, top-to-bottom order, with four bytes (alpha, red,
|
||||||
green, and blue channels) for each pixel.}
|
green, and blue channels) for each pixel.}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(ico->png-bytes [ico ico?]) bytes?]{
|
||||||
|
|
||||||
|
Returns the bytes of a PNG encoding for an icon in PNG format (see
|
||||||
|
@racket[ico-format]).
|
||||||
|
|
||||||
|
@history[#:added "6.3"]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(argb->ico [width (integer-in 1 256)]
|
@defproc[(argb->ico [width (integer-in 1 256)]
|
||||||
[height (integer-in 1 256)]
|
[height (integer-in 1 256)]
|
||||||
[bstr bytes?]
|
[bstr bytes?]
|
||||||
|
@ -73,7 +113,16 @@ green, and blue channels) for each pixel.}
|
||||||
ico?]{
|
ico?]{
|
||||||
|
|
||||||
Converts an ARGB byte string (in the same format as from
|
Converts an ARGB byte string (in the same format as from
|
||||||
@racket[ico->argb]) to an icon of the given width, height, and depth.
|
@racket[ico->argb]) to an icon of the given width, height, and depth
|
||||||
|
in BMP format.
|
||||||
|
|
||||||
The @racket[bstr] argument must have a length @racket[(* 4 width height)],
|
The @racket[bstr] argument must have a length @racket[(* 4 width height)],
|
||||||
and @racket[(* width depth)] must be a multiple of 8.}
|
and @racket[(* width depth)] must be a multiple of 8.}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(png-bytes->ico [bstr bytes?])
|
||||||
|
ico?]{
|
||||||
|
|
||||||
|
Wraps the given PNG encoding as a PNG-encoded icon.
|
||||||
|
|
||||||
|
@history[#:added "6.3"]}
|
||||||
|
|
|
@ -11,14 +11,16 @@ directories, files, and symbolic links, and owner
|
||||||
information is not preserved; the owner that is stored in the archive
|
information is not preserved; the owner that is stored in the archive
|
||||||
is always ``root.''
|
is always ``root.''
|
||||||
|
|
||||||
Symbolic links (on Unix and Mac OS X) are not followed, and the path
|
Symbolic links (on Unix and Mac OS X) are not followed by default, and the path
|
||||||
in a link must be less than 100 bytes.}
|
in a link must be less than 100 bytes.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(tar [tar-file path-string?]
|
@defproc[(tar [tar-file path-string?]
|
||||||
[path path-string?] ...
|
[path path-string?] ...
|
||||||
|
[#:follow-links? follow-links? any/c #f]
|
||||||
[#:exists-ok? exists-ok? any/c #f]
|
[#:exists-ok? exists-ok? any/c #f]
|
||||||
[#:path-prefix path-prefix (or/c #f path-string?) #f]
|
[#:path-prefix path-prefix (or/c #f path-string?) #f]
|
||||||
|
[#:path-filter path-filter (or/c #f (path? . -> . any/c)) #f]
|
||||||
[#:get-timestamp get-timestamp
|
[#:get-timestamp get-timestamp
|
||||||
(path? . -> . exact-integer?)
|
(path? . -> . exact-integer?)
|
||||||
(if timestamp
|
(if timestamp
|
||||||
|
@ -32,7 +34,8 @@ relative paths for existing directories and files (i.e., relative
|
||||||
to the current directory). If a nested path is provided as a
|
to the current directory). If a nested path is provided as a
|
||||||
@racket[path], its ancestor directories are also added to the
|
@racket[path], its ancestor directories are also added to the
|
||||||
resulting tar file, up to the current directory (using
|
resulting tar file, up to the current directory (using
|
||||||
@racket[pathlist-closure]).
|
@racket[pathlist-closure]). If @racket[follow-links?] is false, then
|
||||||
|
symbolic links are included in the resulting tar file as links.
|
||||||
|
|
||||||
If @racket[exists-ok?] is @racket[#f], then an exception is raised if
|
If @racket[exists-ok?] is @racket[#f], then an exception is raised if
|
||||||
@racket[tar-file] exists already. If @racket[exists-ok?] is true, then
|
@racket[tar-file] exists already. If @racket[exists-ok?] is true, then
|
||||||
|
@ -45,12 +48,16 @@ The @racket[get-timestamp] function is used to obtain the modification
|
||||||
date to record in the archive for each file or directory.
|
date to record in the archive for each file or directory.
|
||||||
|
|
||||||
@history[#:changed "6.0.0.3" @elem{Added the @racket[#:get-timestamp] argument.}
|
@history[#:changed "6.0.0.3" @elem{Added the @racket[#:get-timestamp] argument.}
|
||||||
#:changed "6.1.1.1" @elem{Added the @racket[#:exists-ok?] argument.}]}
|
#:changed "6.1.1.1" @elem{Added the @racket[#:exists-ok?] argument.}
|
||||||
|
#:changed "6.3.0.3" @elem{Added the @racket[#:follow-links?] argument.}
|
||||||
|
#:changed "6.3.0.11" @elem{Added the @racket[#:path-filter] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(tar->output [paths (listof path?)]
|
@defproc[(tar->output [paths (listof path?)]
|
||||||
[out output-port? (current-output-port)]
|
[out output-port? (current-output-port)]
|
||||||
|
[#:follow-links? follow-links? any/c #f]
|
||||||
[#:path-prefix path-prefix (or/c #f path-string?) #f]
|
[#:path-prefix path-prefix (or/c #f path-string?) #f]
|
||||||
|
[#:path-filter path-filter (or/c #f (path? . -> . any/c)) #f]
|
||||||
[#:get-timestamp get-timestamp
|
[#:get-timestamp get-timestamp
|
||||||
(path? . -> . exact-integer?)
|
(path? . -> . exact-integer?)
|
||||||
(if timestamp
|
(if timestamp
|
||||||
|
@ -64,11 +71,14 @@ archive that is written directly to the @racket[out]. The specified
|
||||||
content is not automatically added, and nested directories are added
|
content is not automatically added, and nested directories are added
|
||||||
without parent directories.
|
without parent directories.
|
||||||
|
|
||||||
@history[#:changed "6.0.0.3" @elem{Added the @racket[#:get-timestamp] argument.}]}
|
@history[#:changed "6.0.0.3" @elem{Added the @racket[#:get-timestamp] argument.}
|
||||||
|
#:changed "6.3.0.3" @elem{Added the @racket[#:follow-links?] argument.}
|
||||||
|
#:changed "6.3.0.11" @elem{Added the @racket[#:path-filter] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(tar-gzip [tar-file path-string?]
|
@defproc[(tar-gzip [tar-file path-string?]
|
||||||
[paths path-string?] ...
|
[paths path-string?] ...
|
||||||
|
[#:follow-links? follow-links? any/c #f]
|
||||||
[#:exists-ok? exists-ok? any/c #f]
|
[#:exists-ok? exists-ok? any/c #f]
|
||||||
[#:path-prefix path-prefix (or/c #f path-string?) #f]
|
[#:path-prefix path-prefix (or/c #f path-string?) #f]
|
||||||
[#:get-timestamp get-timestamp
|
[#:get-timestamp get-timestamp
|
||||||
|
@ -81,4 +91,5 @@ without parent directories.
|
||||||
Like @racket[tar], but compresses the resulting file with @racket[gzip].
|
Like @racket[tar], but compresses the resulting file with @racket[gzip].
|
||||||
|
|
||||||
@history[#:changed "6.0.0.3" @elem{Added the @racket[#:get-timestamp] argument.}
|
@history[#:changed "6.0.0.3" @elem{Added the @racket[#:get-timestamp] argument.}
|
||||||
#:changed "6.1.1.1" @elem{Added the @racket[#:exists-ok?] argument.}]}
|
#:changed "6.1.1.1" @elem{Added the @racket[#:exists-ok?] argument.}
|
||||||
|
#:changed "6.3.0.3" @elem{Added the @racket[#:follow-links?] argument.}]}
|
||||||
|
|
|
@ -9,6 +9,7 @@ a function to extract items from a TAR/USTAR archive.}
|
||||||
@defproc[(untar [in (or/c path-string? input-port?)]
|
@defproc[(untar [in (or/c path-string? input-port?)]
|
||||||
[#:dest dest-path (or/c path-string? #f) #f]
|
[#:dest dest-path (or/c path-string? #f) #f]
|
||||||
[#:strip-count strip-count exact-nonnegative-integer? 0]
|
[#:strip-count strip-count exact-nonnegative-integer? 0]
|
||||||
|
[#:permissive? permissive? any/c #f]
|
||||||
[#:filter filter-proc
|
[#:filter filter-proc
|
||||||
(path? (or/c path? #f)
|
(path? (or/c path? #f)
|
||||||
symbol? exact-integer? (or/c path? #f)
|
symbol? exact-integer? (or/c path? #f)
|
||||||
|
@ -28,6 +29,12 @@ elements are removed from the item path from the archive (before
|
||||||
prefixing the path with @racket[dest-path]); if the item's path
|
prefixing the path with @racket[dest-path]); if the item's path
|
||||||
contains @racket[strip-count] elements, then it is not extracted.
|
contains @racket[strip-count] elements, then it is not extracted.
|
||||||
|
|
||||||
|
Unless @racket[permissive?] is true, then archive items with paths containing
|
||||||
|
an up-directory indicator are disallowed, and a link item whose target
|
||||||
|
is an absolute path or contains an up-directory indicator is also
|
||||||
|
disallowed. Absolute paths are always disallowed. A disallowed
|
||||||
|
path triggers an exception.
|
||||||
|
|
||||||
For each item in the archive, @racket[filter-proc] is applied to
|
For each item in the archive, @racket[filter-proc] is applied to
|
||||||
|
|
||||||
@itemlist[
|
@itemlist[
|
||||||
|
@ -60,4 +67,6 @@ For each item in the archive, @racket[filter-proc] is applied to
|
||||||
]
|
]
|
||||||
|
|
||||||
If the result of @racket[filter-proc] is @racket[#f], then the item is
|
If the result of @racket[filter-proc] is @racket[#f], then the item is
|
||||||
not unpacked.}
|
not unpacked.
|
||||||
|
|
||||||
|
@history[#:changed "6.3" @elem{Added the @racket[#:permissive?] argument.}]}
|
||||||
|
|
|
@ -11,6 +11,7 @@ a function to extract items from a possible @exec{gzip}ped TAR/USTAR archive.}
|
||||||
@defproc[(untgz [in (or/c path-string? input-port?)]
|
@defproc[(untgz [in (or/c path-string? input-port?)]
|
||||||
[#:dest dest-path (or/c path-string? #f) #f]
|
[#:dest dest-path (or/c path-string? #f) #f]
|
||||||
[#:strip-count strip-count exact-nonnegative-integer? 0]
|
[#:strip-count strip-count exact-nonnegative-integer? 0]
|
||||||
|
[#:permissive? permissive? any/c #f]
|
||||||
[#:filter filter-proc
|
[#:filter filter-proc
|
||||||
(path? (or/c path? #f)
|
(path? (or/c path? #f)
|
||||||
symbol? exact-integer? (or/c path? #f)
|
symbol? exact-integer? (or/c path? #f)
|
||||||
|
@ -21,4 +22,6 @@ a function to extract items from a possible @exec{gzip}ped TAR/USTAR archive.}
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
The same as @racket[untar], but if @racket[in] is in @exec{gzip} form,
|
The same as @racket[untar], but if @racket[in] is in @exec{gzip} form,
|
||||||
it is @racket[gunzip]ped as it is unpacked.}
|
it is @racket[gunzip]ped as it is unpacked.
|
||||||
|
|
||||||
|
@history[#:changed "6.3" @elem{Added the @racket[#:permissive?] argument.}]}
|
||||||
|
|
|
@ -50,6 +50,7 @@ directory while returning the result of @racket[proc].
|
||||||
@defproc[(make-filesystem-entry-reader
|
@defproc[(make-filesystem-entry-reader
|
||||||
[#:dest dest-path (or/c path-string? #f) #f]
|
[#:dest dest-path (or/c path-string? #f) #f]
|
||||||
[#:strip-count strip-count exact-nonnegative-integer? 0]
|
[#:strip-count strip-count exact-nonnegative-integer? 0]
|
||||||
|
[#:permissive? permissive? any/c #f]
|
||||||
[#:exists exists (or/c 'skip 'error 'replace 'truncate
|
[#:exists exists (or/c 'skip 'error 'replace 'truncate
|
||||||
'truncate/replace 'append 'update
|
'truncate/replace 'append 'update
|
||||||
'can-update 'must-truncate)
|
'can-update 'must-truncate)
|
||||||
|
@ -72,13 +73,21 @@ elements are removed from the entry path from the archive (before
|
||||||
prefixing the path with @racket[dest-path]); if the item's path
|
prefixing the path with @racket[dest-path]); if the item's path
|
||||||
contains @racket[strip-count] elements, then it is not extracted.
|
contains @racket[strip-count] elements, then it is not extracted.
|
||||||
|
|
||||||
|
Unless @racket[permissive?] is true, then entries with paths containing
|
||||||
|
an up-directory indicator are disallowed, and a link entry whose target
|
||||||
|
is an absolute path or contains an up-directory indicator is also
|
||||||
|
disallowed. Absolute paths are always disallowed. A disallowed
|
||||||
|
path triggers an exception.
|
||||||
|
|
||||||
If @racket[exists] is @racket['skip] and the file for an entry already
|
If @racket[exists] is @racket['skip] and the file for an entry already
|
||||||
exists, then the entry is skipped. Otherwise, @racket[exists] is
|
exists, then the entry is skipped. Otherwise, @racket[exists] is
|
||||||
passed on to @racket[open-output-file] for writing the entry's
|
passed on to @racket[open-output-file] for writing the entry's
|
||||||
inflated content.
|
inflated content.
|
||||||
|
|
||||||
@history[#:changed "6.0.0.3"
|
@history[#:changed "6.0.0.3"
|
||||||
@elem{Added support for the optional timestamp argument in the result function.}]}
|
@elem{Added support for the optional timestamp argument in the result function.}
|
||||||
|
#:changed "6.3"
|
||||||
|
@elem{Added the @racket[#:permissive?] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(read-zip-directory [in (or/c path-string? input-port?)]) zip-directory?]{
|
@defproc[(read-zip-directory [in (or/c path-string? input-port?)]) zip-directory?]{
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"base"
|
"base"
|
||||||
"net-lib"
|
"net-lib"
|
||||||
"sandbox-lib"
|
"sandbox-lib"
|
||||||
"scribble-lib"
|
["scribble-lib" #:version "1.14"]
|
||||||
"racket-index"))
|
"racket-index"))
|
||||||
(define build-deps '("rackunit-doc"
|
(define build-deps '("rackunit-doc"
|
||||||
"compatibility"
|
"compatibility"
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
(for-label openssl
|
(for-label openssl
|
||||||
racket
|
racket
|
||||||
openssl/sha1
|
openssl/sha1
|
||||||
openssl/md5))
|
openssl/md5
|
||||||
|
openssl/libcrypto
|
||||||
|
openssl/libssl
|
||||||
|
(only-in ffi/unsafe ffi-lib ffi-lib?)))
|
||||||
|
|
||||||
@title{OpenSSL: Secure Communication}
|
@title{OpenSSL: Secure Communication}
|
||||||
|
|
||||||
|
@ -26,8 +29,10 @@ or with the Racket distribution. In particular:
|
||||||
included in the Racket distribution for Windows.}
|
included in the Racket distribution for Windows.}
|
||||||
|
|
||||||
@item{For Mac OS X, @racketmodname[openssl] depends on
|
@item{For Mac OS X, @racketmodname[openssl] depends on
|
||||||
@filepath{libssl.dylib} and @filepath{libcrypto.dylib}, which are
|
@filepath{libssl.dylib} and @filepath{libcrypto.dylib}. Although those
|
||||||
provided by Mac OS X 10.2 and later.}
|
libraries are provided by Mac OS X 10.2 and later, their use is
|
||||||
|
deprecated, so the Racket distribution for Mac OS X includes newer
|
||||||
|
versions.}
|
||||||
|
|
||||||
@item{For Unix, @racketmodname[openssl] depends on
|
@item{For Unix, @racketmodname[openssl] depends on
|
||||||
@filepath{libssl.so} and @filepath{libcrypto.so}, which must be
|
@filepath{libssl.so} and @filepath{libcrypto.so}, which must be
|
||||||
|
@ -63,7 +68,9 @@ using the functions described in @secref["cert-procs"].
|
||||||
[port-no (integer-in 1 65535)]
|
[port-no (integer-in 1 65535)]
|
||||||
[client-protocol
|
[client-protocol
|
||||||
(or/c ssl-client-context?
|
(or/c ssl-client-context?
|
||||||
'auto 'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
'secure
|
||||||
|
'auto
|
||||||
|
'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
||||||
'auto])
|
'auto])
|
||||||
(values input-port? output-port?)]{
|
(values input-port? output-port?)]{
|
||||||
|
|
||||||
|
@ -72,6 +79,10 @@ Connect to the host given by @racket[hostname], on the port given by
|
||||||
return values are as for @racket[tcp-connect]: an input port and an
|
return values are as for @racket[tcp-connect]: an input port and an
|
||||||
output port.
|
output port.
|
||||||
|
|
||||||
|
The default @racket['auto] protocol is @bold{insecure}. Use
|
||||||
|
@racket['secure] for a secure connection. See
|
||||||
|
@racket[ssl-secure-client-context] for details.
|
||||||
|
|
||||||
The optional @racket[client-protocol] argument determines which
|
The optional @racket[client-protocol] argument determines which
|
||||||
encryption protocol is used, whether the server's certificate is
|
encryption protocol is used, whether the server's certificate is
|
||||||
checked, etc. The argument can be either a client context created by
|
checked, etc. The argument can be either a client context created by
|
||||||
|
@ -101,14 +112,16 @@ well-defined communication pattern, where theres no question of
|
||||||
whether the other end is supposed to be sending or reading data.
|
whether the other end is supposed to be sending or reading data.
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
@history[#:changed "6.3.0.12" @elem{Added @racket['secure] for
|
||||||
|
@racket[client-protocol].}]}
|
||||||
|
|
||||||
@defproc[(ssl-connect/enable-break
|
@defproc[(ssl-connect/enable-break
|
||||||
[hostname string?]
|
[hostname string?]
|
||||||
[port-no (integer-in 1 65535)]
|
[port-no (integer-in 1 65535)]
|
||||||
[client-protocol
|
[client-protocol
|
||||||
(or/c ssl-client-context?
|
(or/c ssl-client-context?
|
||||||
'auto 'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
'secure 'auto
|
||||||
|
'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
||||||
'auto])
|
'auto])
|
||||||
(values input-port? output-port?)]{
|
(values input-port? output-port?)]{
|
||||||
|
|
||||||
|
@ -146,11 +159,13 @@ The context is cached, so different calls to
|
||||||
|
|
||||||
|
|
||||||
@defproc[(ssl-make-client-context
|
@defproc[(ssl-make-client-context
|
||||||
[protocol (or/c 'auto 'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12) 'auto])
|
[protocol (or/c 'secure 'auto
|
||||||
|
'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
||||||
|
'auto])
|
||||||
ssl-client-context?]{
|
ssl-client-context?]{
|
||||||
|
|
||||||
Creates a context to be supplied to @racket[ssl-connect]. The context
|
Creates a context to be supplied to @racket[ssl-connect]. The context
|
||||||
is @bold{insecure} unless additional steps are taken; see
|
is @bold{insecure} unless @racket['secure] is supplied or additional steps are taken; see
|
||||||
@racket[ssl-secure-client-context] for details.
|
@racket[ssl-secure-client-context] for details.
|
||||||
|
|
||||||
The client context identifies a communication protocol (as selected by
|
The client context identifies a communication protocol (as selected by
|
||||||
|
@ -161,6 +176,7 @@ certificates.
|
||||||
|
|
||||||
The @racket[protocol] should be one of the following:
|
The @racket[protocol] should be one of the following:
|
||||||
@itemize[
|
@itemize[
|
||||||
|
@item{@racket['secure] : Equivalent to @racket[(ssl-secure-client-context)].}
|
||||||
@item{@racket['auto] : Automatically negotiates the protocol version
|
@item{@racket['auto] : Automatically negotiates the protocol version
|
||||||
from those that this library considers sufficiently secure---currently
|
from those that this library considers sufficiently secure---currently
|
||||||
TLS versions 1.0 and higher, but subject to change.}
|
TLS versions 1.0 and higher, but subject to change.}
|
||||||
|
@ -179,27 +195,29 @@ Note that SSL 2.0 support has been removed from many platforms.}
|
||||||
]
|
]
|
||||||
|
|
||||||
Not all protocol versions are supported by all servers. The
|
Not all protocol versions are supported by all servers. The
|
||||||
@racket['auto] option offers broad compatibility at a reasonable level
|
@racket['secure] and @racket['auto] options offer broad compatibility at a reasonable level
|
||||||
of security. Note that the security of connections depends on more
|
of security. Note that the security of connections depends on more
|
||||||
than the protocol version; see @racket[ssl-secure-client-context] for
|
than the protocol version; see @racket[ssl-secure-client-context] for
|
||||||
details.
|
details. See also
|
||||||
|
|
||||||
Not all protocol versions are available on all platforms. See also
|
|
||||||
@racket[supported-client-protocols] and
|
@racket[supported-client-protocols] and
|
||||||
@racket[supported-server-protocols].
|
@racket[supported-server-protocols].
|
||||||
|
|
||||||
@history[
|
@history[
|
||||||
#:changed "6.1" @elem{Added @racket['tls11] and @racket['tls12].}
|
#:changed "6.1" @elem{Added @racket['tls11] and @racket['tls12].}
|
||||||
#:changed "6.1.1.3" @elem{Default to new @racket['auto] and disabled SSL
|
#:changed "6.1.1.3" @elem{Default to new @racket['auto] and disabled SSL
|
||||||
2.0 and 3.0 by default.}
|
2.0 and 3.0 by default.}
|
||||||
|
#:changed "6.3.0.12" @elem{Added @racket['secure].}
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(supported-client-protocols)
|
@defproc[(supported-client-protocols)
|
||||||
(listof (or/c 'auto 'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12))]{
|
(listof (or/c 'secure 'auto
|
||||||
|
'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12))]{
|
||||||
|
|
||||||
Returns a list of symbols representing protocols that are supported
|
Returns a list of symbols representing protocols that are supported
|
||||||
for clients on the current platform.}
|
for clients on the current platform.
|
||||||
|
|
||||||
|
@history[#:changed "6.3.0.12" @elem{Added @racket['secure].}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(ssl-client-context? [v any/c]) boolean?]{
|
@defproc[(ssl-client-context? [v any/c]) boolean?]{
|
||||||
|
@ -209,7 +227,7 @@ Returns @racket[#t] if @racket[v] is a value produced by
|
||||||
|
|
||||||
@history[#:added "6.0.1.3"]}
|
@history[#:added "6.0.1.3"]}
|
||||||
|
|
||||||
@defproc[(ssl-max-client-protocol) (or/c 'sslv2 sslv3 'tls 'tls11 'tls12 #f)]{
|
@defproc[(ssl-max-client-protocol) (or/c 'sslv2 'sslv3 'tls 'tls11 'tls12 #f)]{
|
||||||
|
|
||||||
Returns the most recent SSL/TLS protocol version supported by the
|
Returns the most recent SSL/TLS protocol version supported by the
|
||||||
current platform for client connections.
|
current platform for client connections.
|
||||||
|
@ -228,13 +246,15 @@ current platform for client connections.
|
||||||
[hostname-or-#f (or/c string? #f) #f]
|
[hostname-or-#f (or/c string? #f) #f]
|
||||||
[server-protocol
|
[server-protocol
|
||||||
(or/c ssl-server-context?
|
(or/c ssl-server-context?
|
||||||
'auto 'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
'secure 'auto
|
||||||
|
'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
||||||
'auto])
|
'auto])
|
||||||
ssl-listener?]{
|
ssl-listener?]{
|
||||||
|
|
||||||
Like @racket[tcp-listen], but the result is an SSL listener. The extra optional
|
Like @racket[tcp-listen], but the result is an SSL listener. The extra optional
|
||||||
@racket[server-protocol] is as for @racket[ssl-connect], except that a
|
@racket[server-protocol] is as for @racket[ssl-connect], except that a
|
||||||
context must be a server context instead of a client context.
|
context must be a server context instead of a client context, and
|
||||||
|
@racket['secure] is simply an alias for @racket['auto].
|
||||||
|
|
||||||
Call @racket[ssl-load-certificate-chain!] and
|
Call @racket[ssl-load-certificate-chain!] and
|
||||||
@racket[ssl-load-private-key!] to avoid a @emph{no shared cipher}
|
@racket[ssl-load-private-key!] to avoid a @emph{no shared cipher}
|
||||||
|
@ -247,7 +267,9 @@ An SSL listener is a synchronizable value (see @racket[sync]). It is
|
||||||
ready---with itself as its value---when the underlying TCP listener is
|
ready---with itself as its value---when the underlying TCP listener is
|
||||||
ready. At that point, however, accepting a connection with
|
ready. At that point, however, accepting a connection with
|
||||||
@racket[ssl-accept] may not complete immediately, because
|
@racket[ssl-accept] may not complete immediately, because
|
||||||
further communication is needed to establish the connection.}
|
further communication is needed to establish the connection.
|
||||||
|
|
||||||
|
@history[#:changed "6.3.0.12" @elem{Added @racket['secure].}]}
|
||||||
|
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
|
@ -295,11 +317,16 @@ Returns @racket[#t] of @racket[v] is an SSL port produced by
|
||||||
|
|
||||||
|
|
||||||
@defproc[(ssl-make-server-context
|
@defproc[(ssl-make-server-context
|
||||||
[protocol (or/c 'auto 'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
[protocol (or/c 'secure 'auto
|
||||||
|
'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
||||||
'auto])
|
'auto])
|
||||||
ssl-server-context?]{
|
ssl-server-context?]{
|
||||||
|
|
||||||
Like @racket[ssl-make-client-context], but creates a server context.}
|
Like @racket[ssl-make-client-context], but creates a server context.
|
||||||
|
For a server context, the @racket['secure] protocol is the same as
|
||||||
|
@racket['auto].
|
||||||
|
|
||||||
|
@history[#:changed "6.3.0.12" @elem{Added @racket['secure].}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(ssl-server-context? [v any/c]) boolean?]{
|
@defproc[(ssl-server-context? [v any/c]) boolean?]{
|
||||||
|
@ -308,14 +335,16 @@ Returns @racket[#t] if @racket[v] is a value produced by
|
||||||
@racket[ssl-make-server-context], @racket[#f] otherwise.}
|
@racket[ssl-make-server-context], @racket[#f] otherwise.}
|
||||||
|
|
||||||
@defproc[(supported-server-protocols)
|
@defproc[(supported-server-protocols)
|
||||||
(listof (or/c 'auto 'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12))]{
|
(listof (or/c 'secure 'auto
|
||||||
|
'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12))]{
|
||||||
|
|
||||||
Returns a list of symbols representing protocols that are supported
|
Returns a list of symbols representing protocols that are supported
|
||||||
for servers on the current platform.
|
for servers on the current platform.
|
||||||
|
|
||||||
@history[#:added "6.0.1.3"]}
|
@history[#:added "6.0.1.3"
|
||||||
|
#:changed "6.3.0.12" @elem{Added @racket['secure].}]}
|
||||||
|
|
||||||
@defproc[(ssl-max-server-protocol) (or/c 'sslv2 sslv3 'tls 'tls11 'tls12 #f)]{
|
@defproc[(ssl-max-server-protocol) (or/c 'sslv2 'sslv3 'tls 'tls11 'tls12 #f)]{
|
||||||
|
|
||||||
Returns the most recent SSL/TLS protocol version supported by the
|
Returns the most recent SSL/TLS protocol version supported by the
|
||||||
current platform for server connections.
|
current platform for server connections.
|
||||||
|
@ -337,7 +366,8 @@ current platform for server connections.
|
||||||
ssl-make-server-context
|
ssl-make-server-context
|
||||||
ssl-make-client-context)
|
ssl-make-client-context)
|
||||||
protocol)]
|
protocol)]
|
||||||
[#:encrypt protocol (or/c 'auto 'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
[#:encrypt protocol (or/c 'secure 'auto
|
||||||
|
'sslv2-or-v3 'sslv2 'sslv3 'tls 'tls11 'tls12)
|
||||||
'auto]
|
'auto]
|
||||||
[#:close-original? close-original? boolean? #f]
|
[#:close-original? close-original? boolean? #f]
|
||||||
[#:shutdown-on-close? shutdown-on-close? boolean? #f]
|
[#:shutdown-on-close? shutdown-on-close? boolean? #f]
|
||||||
|
@ -820,3 +850,58 @@ The @racket[md5] function composes @racket[bytes->hex-string] with
|
||||||
Returns a 16-byte byte string that represents the MD5 hash of the
|
Returns a 16-byte byte string that represents the MD5 hash of the
|
||||||
content from @racket[in], consuming all of the input from @racket[in]
|
content from @racket[in], consuming all of the input from @racket[in]
|
||||||
until an end-of-file.}
|
until an end-of-file.}
|
||||||
|
|
||||||
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@(define foreign-doc '(lib "scribblings/foreign/foreign.scrbl"))
|
||||||
|
|
||||||
|
@section[#:tag "libcrypto"]{The @filepath{libcrypto} Shared Library}
|
||||||
|
|
||||||
|
@defmodule[openssl/libcrypto]{The @racketmodname[openssl/libcrypto]
|
||||||
|
library provides a @tech[#:doc foreign-doc]{foreign-library value} for
|
||||||
|
the @filepath{libcrypto} shared library.}
|
||||||
|
|
||||||
|
|
||||||
|
@defthing[libcrypto (or/c #f ffi-lib?)]{
|
||||||
|
|
||||||
|
Returns a @tech[#:doc foreign-doc]{foreign-library value} for
|
||||||
|
@filepath{libcrypto}, or @racket[#f] if the library could not be found
|
||||||
|
or loaded. The load attempt uses the versions specified by
|
||||||
|
@racket[openssl-lib-versions].}
|
||||||
|
|
||||||
|
@defthing[libcrypto-load-fail-reason (or/c #f string?)]{
|
||||||
|
|
||||||
|
Either @racket[#f] when @racket[libcrypto] is non-@racket[#f], or a
|
||||||
|
string when @racket[libcrypto] is @racket[#f]. In the latter case, the
|
||||||
|
string provides an error message for the attempt to load
|
||||||
|
@filepath{libcrypto}.}
|
||||||
|
|
||||||
|
|
||||||
|
@defthing[openssl-lib-versions (listof string?)]{
|
||||||
|
|
||||||
|
A list of versions that are tried for loading @filepath{libcrypto}.
|
||||||
|
The list of version strings is suitable as a second argument to
|
||||||
|
@racket[ffi-lib].}
|
||||||
|
|
||||||
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@section[#:tag "libssl"]{The @filepath{libssl} Shared Library}
|
||||||
|
|
||||||
|
@defmodule[openssl/libssl]{The @racketmodname[openssl/libssl]
|
||||||
|
library provides a @tech[#:doc foreign-doc]{foreign-library value} for
|
||||||
|
the @filepath{libssl} shared library.}
|
||||||
|
|
||||||
|
|
||||||
|
@defthing[libssl (or/c #f ffi-lib?)]{
|
||||||
|
|
||||||
|
Returns a @tech[#:doc foreign-doc]{foreign-library value} for
|
||||||
|
@filepath{libssl}, or @racket[#f] if the library could not be found
|
||||||
|
or loaded. The load attempt uses the versions specified by
|
||||||
|
@racket[openssl-lib-versions].}
|
||||||
|
|
||||||
|
@defthing[libssl-load-fail-reason (or/c #f string?)]{
|
||||||
|
|
||||||
|
Either @racket[#f] when @racket[libssl] is non-@racket[#f], or a
|
||||||
|
string when @racket[libssl] is @racket[#f]. In the latter case, the
|
||||||
|
string provides an error message for the attempt to load
|
||||||
|
@filepath{libssl}.}
|
||||||
|
|
|
@ -53,3 +53,4 @@ to the @exec{raco pkg} sub-subcommands.
|
||||||
@include-section["name.scrbl"]
|
@include-section["name.scrbl"]
|
||||||
@include-section["db.scrbl"]
|
@include-section["db.scrbl"]
|
||||||
@include-section["dirs-catalog.scrbl"]
|
@include-section["dirs-catalog.scrbl"]
|
||||||
|
@include-section["envvars.scrbl"]
|
||||||
|
|
|
@ -33,7 +33,7 @@ information about packages:
|
||||||
@exec{version=}@nonterm{version} query (where @nonterm{version}
|
@exec{version=}@nonterm{version} query (where @nonterm{version}
|
||||||
is a Racket version number) in the case of a remote URL.
|
is a Racket version number) in the case of a remote URL.
|
||||||
|
|
||||||
This URL/path form is use to obtain information about
|
This URL/path form is used to obtain information about
|
||||||
@nonterm{package}. An HTTP request for a remote URL should
|
@nonterm{package}. An HTTP request for a remote URL should
|
||||||
respond with a @racket[read]-able hash table, as described
|
respond with a @racket[read]-able hash table, as described
|
||||||
below. A path in a local directory formed by adding
|
below. A path in a local directory formed by adding
|
||||||
|
@ -130,7 +130,8 @@ information about packages:
|
||||||
|
|
||||||
Note that a local directory served as files through an HTTP server
|
Note that a local directory served as files through an HTTP server
|
||||||
works as a remote URL, as long as the @filepath{pkgs} and
|
works as a remote URL, as long as the @filepath{pkgs} and
|
||||||
@filepath{pkgs-all} files are present.
|
@filepath{pkgs-all} files are present (since those are optional for
|
||||||
|
local but required for HTTP).
|
||||||
|
|
||||||
The source for the PLT-hosted @tech{package catalog} is in the
|
The source for the PLT-hosted @tech{package catalog} is in the
|
||||||
@racket[(collection-file-path "pkg-catalog" "meta")]
|
@racket[(collection-file-path "pkg-catalog" "meta")]
|
||||||
|
|
14
pkgs/racket-doc/pkg/scribblings/envvars.scrbl
Normal file
14
pkgs/racket-doc/pkg/scribblings/envvars.scrbl
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#lang scribble/manual
|
||||||
|
@(require "common.rkt")
|
||||||
|
|
||||||
|
@title[#:tag "envvars"]{Package Management Environment Variables}
|
||||||
|
|
||||||
|
If the @indexed-envvar{PLT_PKG_SSL_NO_VERIFY} environment variable is
|
||||||
|
set, server certificates are not validated for HTTPS connections. When
|
||||||
|
accessing Git servers over HTTPS, @envvar{GIT_SSL_NO_VERIFY} must be
|
||||||
|
set, too, to disable certificate validation.
|
||||||
|
|
||||||
|
As noted in the specification of GitHub-repository package sources, if
|
||||||
|
the @envvar{PLT_USE_GITHUB_API} environment variable is set, GitHub
|
||||||
|
packages are obtained using the GitHub API protocol instead of using
|
||||||
|
the Git protocol.
|
|
@ -131,7 +131,7 @@ treated as a explicitly installed package.
|
||||||
|
|
||||||
The PLT @tech{package catalog} at
|
The PLT @tech{package catalog} at
|
||||||
|
|
||||||
@centerline{@url{http://pkgs.racket-lang.org}}
|
@centerline{@url{https://pkgs.racket-lang.org}}
|
||||||
|
|
||||||
provides a centralized listing of available Racket packages. The PLT
|
provides a centralized listing of available Racket packages. The PLT
|
||||||
@tech{package catalog} normally will be the first place you check when
|
@tech{package catalog} normally will be the first place you check when
|
||||||
|
@ -385,7 +385,9 @@ is:
|
||||||
|
|
||||||
If you want the package to be @nonterm{branch} or @nonterm{tag}
|
If you want the package to be @nonterm{branch} or @nonterm{tag}
|
||||||
instead of @exec{master}, then add @filepath{#@nonterm{branch}} or
|
instead of @exec{master}, then add @filepath{#@nonterm{branch}} or
|
||||||
@filepath{#@nonterm{tag}} to the end of the package source.
|
@filepath{#@nonterm{tag}} to the end of the package source. If your
|
||||||
|
package is a subdirectory @nonterm{path} within the repository, add
|
||||||
|
@filepath{?path=@nonterm{path}} to the end of the package source.
|
||||||
|
|
||||||
Whenever you
|
Whenever you
|
||||||
|
|
||||||
|
@ -395,9 +397,10 @@ your changes will automatically be discovered by those who use
|
||||||
@command-ref{update} after installing from your
|
@command-ref{update} after installing from your
|
||||||
GitHub-based @tech{package source}.
|
GitHub-based @tech{package source}.
|
||||||
|
|
||||||
As of Racket version 6.1.1.1, other Git repository services can work
|
Other Git repository services@margin-note*{Support for services other
|
||||||
|
than GitHub requires Racket version 6.1.1.1 or later.} can work
|
||||||
just as well as GitHub---including Gitorious or BitBucket---as long as
|
just as well as GitHub---including Gitorious or BitBucket---as long as
|
||||||
the server supports either the ``smart'' HTTP(S) protocol or the
|
the server supports either the HTTP(S) protocol or the
|
||||||
native Git protocol (but use a @exec{git://} path for the latter).
|
native Git protocol (but use a @exec{git://} path for the latter).
|
||||||
|
|
||||||
The Racket package manager provides more support for Git-based
|
The Racket package manager provides more support for Git-based
|
||||||
|
@ -445,7 +448,7 @@ by a simple name until it is listed on a @tech{package catalog}.
|
||||||
|
|
||||||
If you'd like to use the PLT @tech{package catalog}, browse
|
If you'd like to use the PLT @tech{package catalog}, browse
|
||||||
to
|
to
|
||||||
@link["http://pkgs.racket-lang.org/"]{http://pkgs.racket-lang.org/}
|
@link["https://pkgs.racket-lang.org/"]{https://pkgs.racket-lang.org/}
|
||||||
and upload a new package. You will need to create an account and log
|
and upload a new package. You will need to create an account and log
|
||||||
in first.
|
in first.
|
||||||
|
|
||||||
|
@ -558,7 +561,7 @@ In your @racket[info.rkt], you should:
|
||||||
]
|
]
|
||||||
|
|
||||||
Finally, when listing your package on
|
Finally, when listing your package on
|
||||||
@url{http://pkgs.racket-lang-org}, you should supply a GitHub source
|
@url{https://pkgs.racket-lang-org}, you should supply a GitHub source
|
||||||
using the URL format
|
using the URL format
|
||||||
@tt{github://github.com/@nonterm{user}/@nonterm{repo}/@nonterm{rev}@optional{/@nonterm{path}}} (not
|
@tt{github://github.com/@nonterm{user}/@nonterm{repo}/@nonterm{rev}@optional{/@nonterm{path}}} (not
|
||||||
the @tt{git://} or @exec{http://} format).
|
the @tt{git://} or @exec{http://} format).
|
||||||
|
|
|
@ -102,7 +102,7 @@ develops only a few of them. The intended workflow is as follows:
|
||||||
|
|
||||||
@commandline{@command{update} --lookup --catalog @nonterm{catalog} --clone @nonterm{path-to}/@nonterm{pkg-name}}
|
@commandline{@command{update} --lookup --catalog @nonterm{catalog} --clone @nonterm{path-to}/@nonterm{pkg-name}}
|
||||||
|
|
||||||
A suitable @nonterm{catalog} might be @url{http://pkgs.racket-lang.org}.}
|
A suitable @nonterm{catalog} might be @url{https://pkgs.racket-lang.org}.}
|
||||||
|
|
||||||
@item{A newly cloned package will have the specified (or existing
|
@item{A newly cloned package will have the specified (or existing
|
||||||
installation's) repository as its Git @exec{origin}. If you want to
|
installation's) repository as its Git @exec{origin}. If you want to
|
||||||
|
|
|
@ -103,6 +103,18 @@ used.
|
||||||
@history[#:added "6.1.1.6"]}
|
@history[#:added "6.1.1.6"]}
|
||||||
|
|
||||||
|
|
||||||
|
@deftogether[(
|
||||||
|
@defparam[current-pkg-network-retries max-retries (or/c #f real?)]
|
||||||
|
)]{
|
||||||
|
|
||||||
|
A parameter that determines the number of times to retry a network communication
|
||||||
|
that fails due to a connection error. If
|
||||||
|
a parameter's value is @racket[#f], then the user's configuration is
|
||||||
|
used.
|
||||||
|
|
||||||
|
@history[#:added "6.3"]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(pkg-directory [name string?]
|
@defproc[(pkg-directory [name string?]
|
||||||
[#:cache cache (or/c #f (and/c hash? (not/c immutable?))) #f])
|
[#:cache cache (or/c #f (and/c hash? (not/c immutable?))) #f])
|
||||||
(or/c path-string? #f)]{
|
(or/c path-string? #f)]{
|
||||||
|
@ -161,7 +173,7 @@ the package is should be treated as installed automatically for a
|
||||||
dependency.
|
dependency.
|
||||||
|
|
||||||
The optional @racket[path] argument is intended for use when
|
The optional @racket[path] argument is intended for use when
|
||||||
@racket[type] is @racket['clone], in which case it specifies< a
|
@racket[type] is @racket['clone], in which case it specifies a
|
||||||
directory containing the repository clone (where the repository itself
|
directory containing the repository clone (where the repository itself
|
||||||
is a directory within @racket[path]).
|
is a directory within @racket[path]).
|
||||||
|
|
||||||
|
@ -253,7 +265,8 @@ is true, error messages may suggest specific command-line flags for
|
||||||
[#:force-strip? force-string? boolean? #f]
|
[#:force-strip? force-string? boolean? #f]
|
||||||
[#:multi-clone-mode multi-clone-mode (or/c 'fail 'force 'convert 'ask) 'fail]
|
[#:multi-clone-mode multi-clone-mode (or/c 'fail 'force 'convert 'ask) 'fail]
|
||||||
[#:pull-mode pull-mode (or/c 'ff-only 'try 'rebase) 'ff-only]
|
[#:pull-mode pull-mode (or/c 'ff-only 'try 'rebase) 'ff-only]
|
||||||
[#:link-dirs? link-dirs? boolean? #f])
|
[#:link-dirs? link-dirs? boolean? #f]
|
||||||
|
[#:dry-run? dry-run? boolean? #f])
|
||||||
(or/c 'skip
|
(or/c 'skip
|
||||||
#f
|
#f
|
||||||
(listof (or/c path-string?
|
(listof (or/c path-string?
|
||||||
|
@ -287,7 +300,8 @@ The package lock must be held; see @racket[with-pkg-lock].
|
||||||
@history[#:changed "6.1.1.5" @elem{Added the @racket[#:multi-clone-mode]
|
@history[#:changed "6.1.1.5" @elem{Added the @racket[#:multi-clone-mode]
|
||||||
and @racket[#:infer-clone-from-dir?] arguments.}
|
and @racket[#:infer-clone-from-dir?] arguments.}
|
||||||
#:changed "6.1.1.6" @elem{Added the @racket[#:use-trash?] argument.}
|
#:changed "6.1.1.6" @elem{Added the @racket[#:use-trash?] argument.}
|
||||||
#:changed "6.1.1.8" @elem{Added the @racket[#:pull-mode] argument.}]}
|
#:changed "6.1.1.8" @elem{Added the @racket[#:pull-mode] argument.}
|
||||||
|
#:changed "6.4.0.14" @elem{Added the @racket[#:dry-run] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(pkg-update [sources (listof (or/c string? pkg-desc?))]
|
@defproc[(pkg-update [sources (listof (or/c string? pkg-desc?))]
|
||||||
|
@ -302,7 +316,7 @@ The package lock must be held; see @racket[with-pkg-lock].
|
||||||
[#:use-cache? use-cache? boolean? #t]
|
[#:use-cache? use-cache? boolean? #t]
|
||||||
[#:skip-uninstalled? skip-uninstalled? boolean? #t]
|
[#:skip-uninstalled? skip-uninstalled? boolean? #t]
|
||||||
[#:quiet? quiet? boolean? #f]
|
[#:quiet? quiet? boolean? #f]
|
||||||
[#:use-trash? boolean? use-trash? #f]
|
[#:use-trash? use-trash? boolean? #f]
|
||||||
[#:from-command-line? from-command-line? boolean? #f]
|
[#:from-command-line? from-command-line? boolean? #f]
|
||||||
[#:strip strip (or/c #f 'source 'binary 'binary-lib) #f]
|
[#:strip strip (or/c #f 'source 'binary 'binary-lib) #f]
|
||||||
[#:force-strip? force-string? boolean? #f]
|
[#:force-strip? force-string? boolean? #f]
|
||||||
|
@ -310,7 +324,8 @@ The package lock must be held; see @racket[with-pkg-lock].
|
||||||
[#:multi-clone-mode multi-clone-mode (or/c 'fail 'force 'convert 'ask) 'fail]
|
[#:multi-clone-mode multi-clone-mode (or/c 'fail 'force 'convert 'ask) 'fail]
|
||||||
[#:pull-mode pull-mode (or/c 'ff-only 'try 'rebase) 'ff-only]
|
[#:pull-mode pull-mode (or/c 'ff-only 'try 'rebase) 'ff-only]
|
||||||
[#:link-dirs? link-dirs? boolean? #f]
|
[#:link-dirs? link-dirs? boolean? #f]
|
||||||
[#:infer-clone-from-dir? infer-clone-from-dir? boolean? #f])
|
[#:infer-clone-from-dir? infer-clone-from-dir? boolean? #f]
|
||||||
|
[#:dry-run? dry-run? boolean? #f])
|
||||||
(or/c 'skip
|
(or/c 'skip
|
||||||
#f
|
#f
|
||||||
(listof (or/c path-string?
|
(listof (or/c path-string?
|
||||||
|
@ -345,7 +360,8 @@ The package lock must be held; see @racket[with-pkg-lock].
|
||||||
@history[#:changed "6.1.1.5" @elem{Added the @racket[#:multi-clone-mode]
|
@history[#:changed "6.1.1.5" @elem{Added the @racket[#:multi-clone-mode]
|
||||||
and @racket[#:infer-clone-from-dir?] arguments.}
|
and @racket[#:infer-clone-from-dir?] arguments.}
|
||||||
#:changed "6.1.1.6" @elem{Added the @racket[#:use-trash?] argument.}
|
#:changed "6.1.1.6" @elem{Added the @racket[#:use-trash?] argument.}
|
||||||
#:changed "6.1.1.8" @elem{Added the @racket[#:skip-uninstalled?] and @racket[#:pull-mode] arguments.}]}
|
#:changed "6.1.1.8" @elem{Added the @racket[#:skip-uninstalled?] and @racket[#:pull-mode] arguments.}
|
||||||
|
#:changed "6.4.0.14" @elem{Added the @racket[#:dry-run] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(pkg-remove [names (listof string?)]
|
@defproc[(pkg-remove [names (listof string?)]
|
||||||
|
@ -354,7 +370,8 @@ The package lock must be held; see @racket[with-pkg-lock].
|
||||||
[#:force? force? boolean? #f]
|
[#:force? force? boolean? #f]
|
||||||
[#:quiet? quiet? boolean? #f]
|
[#:quiet? quiet? boolean? #f]
|
||||||
[#:use-trash? boolean? use-trash? #f]
|
[#:use-trash? boolean? use-trash? #f]
|
||||||
[#:from-command-line? from-command-line? boolean? #f])
|
[#:from-command-line? from-command-line? boolean? #f]
|
||||||
|
[#:dry-run? dry-run? boolean? #f])
|
||||||
(or/c 'skip
|
(or/c 'skip
|
||||||
#f
|
#f
|
||||||
(listof (or/c path-string?
|
(listof (or/c path-string?
|
||||||
|
@ -369,7 +386,8 @@ specific command-line flags for @command-ref{remove}.
|
||||||
|
|
||||||
The package lock must be held; see @racket[with-pkg-lock].
|
The package lock must be held; see @racket[with-pkg-lock].
|
||||||
|
|
||||||
@history[#:changed "6.1.1.6" @elem{Added the @racket[#:use-trash?] argument.}]}
|
@history[#:changed "6.1.1.6" @elem{Added the @racket[#:use-trash?] argument.}
|
||||||
|
#:changed "6.4.0.14" @elem{Added the @racket[#:dry-run] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(pkg-new [name path-string?])
|
@defproc[(pkg-new [name path-string?])
|
||||||
|
@ -407,7 +425,8 @@ The package lock must be held to allow reads; see
|
||||||
[#:quiet? quiet? boolean? #f]
|
[#:quiet? quiet? boolean? #f]
|
||||||
[#:from-command-line? from-command-line? boolean? #f]
|
[#:from-command-line? from-command-line? boolean? #f]
|
||||||
[#:strip strip (or/c #f 'source 'binary 'binary-lib) #f]
|
[#:strip strip (or/c #f 'source 'binary 'binary-lib) #f]
|
||||||
[#:force-strip? force-string? boolean? #f])
|
[#:force-strip? force-string? boolean? #f]
|
||||||
|
[#:dry-run? dry-run? boolean? #f])
|
||||||
(or/c 'skip
|
(or/c 'skip
|
||||||
#f
|
#f
|
||||||
(listof (or/c path-string?
|
(listof (or/c path-string?
|
||||||
|
@ -419,7 +438,9 @@ Implements @racket[pkg-migrate-command]. The result is the same as for
|
||||||
If @racket[from-command-line?] is true, error messages may suggest
|
If @racket[from-command-line?] is true, error messages may suggest
|
||||||
specific command-line flags for @command-ref{migrate}.
|
specific command-line flags for @command-ref{migrate}.
|
||||||
|
|
||||||
The package lock must be held; see @racket[with-pkg-lock].}
|
The package lock must be held; see @racket[with-pkg-lock].
|
||||||
|
|
||||||
|
@history[#:changed "6.4.0.14" @elem{Added the @racket[#:dry-run] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(pkg-catalog-show [names (listof string?)]
|
@defproc[(pkg-catalog-show [names (listof string?)]
|
||||||
|
@ -678,7 +699,7 @@ represented by @racket[dir] and named @racket[pkg-name].}
|
||||||
[pkg-name string]
|
[pkg-name string]
|
||||||
[#:namespace namespace namespace? (make-base-namespace)]
|
[#:namespace namespace namespace? (make-base-namespace)]
|
||||||
[#:system-type sys-type (or/c #f symbol?) (system-type)]
|
[#:system-type sys-type (or/c #f symbol?) (system-type)]
|
||||||
[#:system-library-subpath sys-lib-subpath (or/c #f path?)
|
[#:system-library-subpath sys-lib-subpath (or/c #f path-for-some-system?)
|
||||||
(system-library-subpath #f)])
|
(system-library-subpath #f)])
|
||||||
(listof (cons/c symbol? string?))]{
|
(listof (cons/c symbol? string?))]{
|
||||||
|
|
||||||
|
|
|
@ -173,8 +173,8 @@ For example,
|
||||||
|
|
||||||
A package source is inferred to refer
|
A package source is inferred to refer
|
||||||
to a directory only when it does not have a file-archive suffix, does
|
to a directory only when it does not have a file-archive suffix, does
|
||||||
not match the grammar of a package name, and either starts with starts
|
not match the grammar of a package name, and either starts with
|
||||||
with @litchar{file://} or does not start
|
@litchar{file://} or does not start
|
||||||
with alphabetic characters followed by @litchar{://}. In the
|
with alphabetic characters followed by @litchar{://}. In the
|
||||||
case that the package source starts with @litchar{file://},
|
case that the package source starts with @litchar{file://},
|
||||||
it must be a URL without a @litchar{type} query or
|
it must be a URL without a @litchar{type} query or
|
||||||
|
@ -285,8 +285,8 @@ is a GitHub package source.
|
||||||
@margin-note{A Github repository source that starts with
|
@margin-note{A Github repository source that starts with
|
||||||
@litchar{git://} obtains the same content that would be accessed if
|
@litchar{git://} obtains the same content that would be accessed if
|
||||||
@litchar{github.com} were not treated specially. The special treatment
|
@litchar{github.com} were not treated specially. The special treatment
|
||||||
is preserved for historical reasons and because GitHub provides an
|
is preserved for historical reasons, especially in combination
|
||||||
interface that is always efficient.}
|
with @envvar{PLT_USE_GITHUB_API}.}
|
||||||
|
|
||||||
For backward compatibility, an older format is also supported:
|
For backward compatibility, an older format is also supported:
|
||||||
|
|
||||||
|
@ -304,7 +304,15 @@ with @litchar{git://github.com/} or @litchar{github://}; a package
|
||||||
source that is otherwise specified as a GitHub reference is
|
source that is otherwise specified as a GitHub reference is
|
||||||
automatically prefixed with @litchar{git://github.com/}. The inferred
|
automatically prefixed with @litchar{git://github.com/}. The inferred
|
||||||
package name is the last element of @nonterm{path} if it is non-empty,
|
package name is the last element of @nonterm{path} if it is non-empty,
|
||||||
otherwise the inferred name is @nonterm{repo}.}
|
otherwise the inferred name is @nonterm{repo}.
|
||||||
|
|
||||||
|
If the @indexed-envvar{PLT_USE_GITHUB_API} environment variable is
|
||||||
|
set, GitHub packages are obtained using the GitHub API protocol
|
||||||
|
instead of using the Git protocol.
|
||||||
|
|
||||||
|
@history[#:changed "6.3" @elem{Changed handling of
|
||||||
|
GitHub sources to use the Git
|
||||||
|
protocol by default.}]}
|
||||||
|
|
||||||
@; ----------------------------------------
|
@; ----------------------------------------
|
||||||
@item{a @tech{package name} --- A @tech{package catalog} is
|
@item{a @tech{package name} --- A @tech{package catalog} is
|
||||||
|
@ -329,7 +337,7 @@ URL indicates a remote server, and a @litchar{file://} URL indicates a
|
||||||
local catalog in the form of an SQLite database or a directory tree.
|
local catalog in the form of an SQLite database or a directory tree.
|
||||||
|
|
||||||
PLT supports two @tech{package catalog} servers that are enabled by
|
PLT supports two @tech{package catalog} servers that are enabled by
|
||||||
default: @url{http://pkgs.racket-lang.org} for new packages and
|
default: @url{https://pkgs.racket-lang.org} for new packages and
|
||||||
@url{http://planet-compats.racket-lang.org} for automatically
|
@url{http://planet-compats.racket-lang.org} for automatically
|
||||||
generated packages for old @|PLaneT| packages. Anyone may host a
|
generated packages for old @|PLaneT| packages. Anyone may host a
|
||||||
@tech{package catalog}, and any file-serving HTTP host can act
|
@tech{package catalog}, and any file-serving HTTP host can act
|
||||||
|
@ -588,6 +596,9 @@ sub-commands.
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
|
||||||
|
@item{@DFlag{dry-run} --- Prevents changes to the current installation. All installation and update work is
|
||||||
|
staged and checked, but the final installation step is skipped.}
|
||||||
|
|
||||||
@item{@DFlag{no-setup} --- Does not run @exec{raco setup} after installation. This behavior is also the case if the
|
@item{@DFlag{no-setup} --- Does not run @exec{raco setup} after installation. This behavior is also the case if the
|
||||||
environment variable @envvar{PLT_PKG_NOSETUP} is set to any non-empty value.}
|
environment variable @envvar{PLT_PKG_NOSETUP} is set to any non-empty value.}
|
||||||
|
|
||||||
|
@ -605,7 +616,8 @@ sub-commands.
|
||||||
@DFlag{multi-clone} flags.}
|
@DFlag{multi-clone} flags.}
|
||||||
#:changed "6.1.1.6" @elem{Added the @DFlag{no-trash} flag, and changed
|
#:changed "6.1.1.6" @elem{Added the @DFlag{no-trash} flag, and changed
|
||||||
the @DFlag{deps} default to depend only on interactive mode.}
|
the @DFlag{deps} default to depend only on interactive mode.}
|
||||||
#:changed "6.1.1.8" @elem{Added the @DFlag{pull} flag.}]}
|
#:changed "6.1.1.8" @elem{Added the @DFlag{pull} flag.}
|
||||||
|
#:changed "6.4.0.14" @elem{Added the @DFlag{dry-run} flag.}]}
|
||||||
|
|
||||||
|
|
||||||
@subcommand{@command/toc{update} @nonterm{option} ... @nonterm{pkg-source} ...
|
@subcommand{@command/toc{update} @nonterm{option} ... @nonterm{pkg-source} ...
|
||||||
|
@ -715,6 +727,7 @@ the given @nonterm{pkg-source}s.
|
||||||
|
|
||||||
@item{@DFlag{pull} @nonterm{mode} --- Same as for @command-ref{install}}
|
@item{@DFlag{pull} @nonterm{mode} --- Same as for @command-ref{install}}
|
||||||
|
|
||||||
|
@item{@DFlag{dry-run} --- Same as for @command-ref{install}.}
|
||||||
@item{@DFlag{no-setup} --- Same as for @command-ref{install}.}
|
@item{@DFlag{no-setup} --- Same as for @command-ref{install}.}
|
||||||
@item{@DFlag{jobs} @nonterm{n} or @Flag{j} @nonterm{n} --- Same as for @command-ref{install}.}
|
@item{@DFlag{jobs} @nonterm{n} or @Flag{j} @nonterm{n} --- Same as for @command-ref{install}.}
|
||||||
@item{@DFlag{batch} --- Same as for @command-ref{install}.}
|
@item{@DFlag{batch} --- Same as for @command-ref{install}.}
|
||||||
|
@ -727,7 +740,8 @@ the given @nonterm{pkg-source}s.
|
||||||
when no arguments are provided.}
|
when no arguments are provided.}
|
||||||
#:changed "6.1.1.6" @elem{Added the @DFlag{no-trash} flag, and changed
|
#:changed "6.1.1.6" @elem{Added the @DFlag{no-trash} flag, and changed
|
||||||
the @DFlag{deps} default to depend only on interactive mode.}
|
the @DFlag{deps} default to depend only on interactive mode.}
|
||||||
#:changed "6.1.1.8" @elem{Added the @DFlag{skip-uninstalled} and @DFlag{pull} flags.}]}
|
#:changed "6.1.1.8" @elem{Added the @DFlag{skip-uninstalled} and @DFlag{pull} flags.}]
|
||||||
|
#:changed "6.4.0.14" @elem{Added the @DFlag{dry-run} flag.}}
|
||||||
|
|
||||||
@subcommand{@command/toc{remove} @nonterm{option} ... @nonterm{pkg} ...
|
@subcommand{@command/toc{remove} @nonterm{option} ... @nonterm{pkg} ...
|
||||||
--- Attempts to remove the given packages. By default, if a package is the dependency
|
--- Attempts to remove the given packages. By default, if a package is the dependency
|
||||||
|
@ -753,6 +767,7 @@ the given @nonterm{pkg}s.
|
||||||
@item{@Flag{i} or @DFlag{installation} --- Shorthand for @exec{--scope installation}.}
|
@item{@Flag{i} or @DFlag{installation} --- Shorthand for @exec{--scope installation}.}
|
||||||
@item{@Flag{u} or @DFlag{user} --- Shorthand for @exec{--scope user}.}
|
@item{@Flag{u} or @DFlag{user} --- Shorthand for @exec{--scope user}.}
|
||||||
@item{@DFlag{scope-dir} @nonterm{dir} --- Selects @nonterm{dir} as the @tech{package scope}, the same as for @command-ref{install}.}
|
@item{@DFlag{scope-dir} @nonterm{dir} --- Selects @nonterm{dir} as the @tech{package scope}, the same as for @command-ref{install}.}
|
||||||
|
@item{@DFlag{dry-run} --- Same as for @command-ref{install}.}
|
||||||
@item{@DFlag{no-setup} --- Same as for @command-ref{install}.}
|
@item{@DFlag{no-setup} --- Same as for @command-ref{install}.}
|
||||||
@item{@DFlag{jobs} @nonterm{n} or @Flag{j} @nonterm{n} --- Same as for @command-ref{install}.}
|
@item{@DFlag{jobs} @nonterm{n} or @Flag{j} @nonterm{n} --- Same as for @command-ref{install}.}
|
||||||
@item{@DFlag{batch} --- Same as for @command-ref{install}.}
|
@item{@DFlag{batch} --- Same as for @command-ref{install}.}
|
||||||
|
@ -760,7 +775,8 @@ the given @nonterm{pkg}s.
|
||||||
]
|
]
|
||||||
|
|
||||||
@history[#:changed "6.1.1.5" @elem{Added the @DFlag{batch} flag.}
|
@history[#:changed "6.1.1.5" @elem{Added the @DFlag{batch} flag.}
|
||||||
#:changed "6.1.1.6" @elem{Added the @DFlag{no-trash} flag.}]}
|
#:changed "6.1.1.6" @elem{Added the @DFlag{no-trash} flag.}
|
||||||
|
#:changed "6.4.0.14" @elem{Added the @DFlag{dry-run} flag.}]}
|
||||||
|
|
||||||
|
|
||||||
@subcommand{@command/toc{new} @nonterm{pkg} ---
|
@subcommand{@command/toc{new} @nonterm{pkg} ---
|
||||||
|
@ -840,10 +856,12 @@ package is created.
|
||||||
@item{@DFlag{ignore-checksums} --- Same as for @command-ref{install}.}
|
@item{@DFlag{ignore-checksums} --- Same as for @command-ref{install}.}
|
||||||
@item{@DFlag{strict-doc-conflicts} --- Same as for @command-ref{install}.}
|
@item{@DFlag{strict-doc-conflicts} --- Same as for @command-ref{install}.}
|
||||||
@item{@DFlag{no-cache} --- Same as for @command-ref{install}.}
|
@item{@DFlag{no-cache} --- Same as for @command-ref{install}.}
|
||||||
|
@item{@DFlag{dry-run} --- Same as for @command-ref{install}.}
|
||||||
@item{@DFlag{no-setup} --- Same as for @command-ref{install}.}
|
@item{@DFlag{no-setup} --- Same as for @command-ref{install}.}
|
||||||
@item{@DFlag{jobs} @nonterm{n} or @Flag{j} @nonterm{n} --- Same as for @command-ref{install}.}
|
@item{@DFlag{jobs} @nonterm{n} or @Flag{j} @nonterm{n} --- Same as for @command-ref{install}.}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
|
@history[#:changed "6.4.0.14" @elem{Added the @DFlag{dry-run} flag.}]}
|
||||||
|
|
||||||
@subcommand{@command/toc{create} @nonterm{option} ... @nonterm{directory-or-package}
|
@subcommand{@command/toc{create} @nonterm{option} ... @nonterm{directory-or-package}
|
||||||
--- Bundles a package into an archive. Bundling
|
--- Bundles a package into an archive. Bundling
|
||||||
|
@ -932,9 +950,12 @@ for @nonterm{key}.
|
||||||
updated that its implementation is kept in the trash folder. Package implementations are
|
updated that its implementation is kept in the trash folder. Package implementations are
|
||||||
removed from a trash folder only when another package is potentially added
|
removed from a trash folder only when another package is potentially added
|
||||||
to the trash folder or @command-ref{empty-trash} is used.}
|
to the trash folder or @command-ref{empty-trash} is used.}
|
||||||
|
@item{@exec{network-retries} --- The number of times to retry a network communication that
|
||||||
|
fails due to a connection error.}
|
||||||
]
|
]
|
||||||
|
|
||||||
@history[#:changed "6.1.1.6" @elem{Added @exec{trash-max-packages} and @exec{trash-max-seconds}.}]}
|
@history[#:changed "6.1.1.6" @elem{Added @exec{trash-max-packages} and @exec{trash-max-seconds}.}
|
||||||
|
#:changed "6.3" @elem{Added @exec{network-retries}.}]}
|
||||||
|
|
||||||
|
|
||||||
@subcommand{@command/toc{catalog-show} @nonterm{option} ... @nonterm{package-name} ...
|
@subcommand{@command/toc{catalog-show} @nonterm{option} ... @nonterm{package-name} ...
|
||||||
|
@ -1015,6 +1036,15 @@ for @nonterm{key}.
|
||||||
@item{@DFlag{version} @nonterm{version} or @Flag{v} @nonterm{version} --- Copies catalog
|
@item{@DFlag{version} @nonterm{version} or @Flag{v} @nonterm{version} --- Copies catalog
|
||||||
results specific to @nonterm{version}
|
results specific to @nonterm{version}
|
||||||
(for catalogs that make a distinction), instead of the installation's Racket version.}
|
(for catalogs that make a distinction), instead of the installation's Racket version.}
|
||||||
|
@item{@DFlag{pkg-fail} @nonterm{mode} --- Determines handling of failure for an individual
|
||||||
|
package, such as when a @nonterm{src-catalog} contains a bad package source. The
|
||||||
|
following @nonterm{mode}s are available:
|
||||||
|
@itemlist[
|
||||||
|
@item{@exec{fail} (the default) --- archiving stops and fails;}
|
||||||
|
@item{@exec{skip} --- the package is skipped and omitted from the archive catalog; or}
|
||||||
|
@item{@exec{continue} --- like @exec{skip}, but @exec{raco pkg catalog-archive}
|
||||||
|
exits with a status code of @exec{5} if any package was skipped.}
|
||||||
|
]}
|
||||||
]
|
]
|
||||||
|
|
||||||
@history[#:added "6.0.17"]
|
@history[#:added "6.0.17"]
|
||||||
|
@ -1406,10 +1436,10 @@ tests, and documentation from a package before installing it.
|
||||||
site (where a Racket distribution downloaded from the site is
|
site (where a Racket distribution downloaded from the site is
|
||||||
configured to consult the site for packages), at least for packages
|
configured to consult the site for packages), at least for packages
|
||||||
associated with the distribution. Beware that
|
associated with the distribution. Beware that
|
||||||
@url{http://pkgs.racket-lang.org/} generally refers to @tech{source
|
@url{https://pkgs.racket-lang.org/} generally refers to @tech{source
|
||||||
packages}, not @tech{built packages}. In the near future, built
|
packages}, not @tech{built packages}. In the near future, built
|
||||||
variants of the @url{http://pkgs.racket-lang.org/} packages will be
|
variants of the @url{https://pkgs.racket-lang.org/} packages will be
|
||||||
provided at @url{http://pkg-build.racket-lang.org/catalog/}.
|
provided at @url{https://pkg-build.racket-lang.org/catalog/}.
|
||||||
|
|
||||||
Some packages have been split at the source level into separate
|
Some packages have been split at the source level into separate
|
||||||
library, test, and documentation packages. For example,
|
library, test, and documentation packages. For example,
|
||||||
|
|
|
@ -74,7 +74,7 @@ the following files and directories:
|
||||||
Any of the above can be suppressed, however, by a
|
Any of the above can be suppressed, however, by a
|
||||||
@racket[source-keep-files] (for @tech{source package} and @tech{built
|
@racket[source-keep-files] (for @tech{source package} and @tech{built
|
||||||
package} bundling), @racket[binary-keep-files] (for @tech{binary
|
package} bundling), @racket[binary-keep-files] (for @tech{binary
|
||||||
package}, @tech{binary library package} @tech{built package} bundling),
|
package}, @tech{binary library package} and @tech{built package} bundling),
|
||||||
or @racket[binary-lib-keep-files] (for @tech{binary library package} bundling) definition in an
|
or @racket[binary-lib-keep-files] (for @tech{binary library package} bundling) definition in an
|
||||||
@filepath{info.rkt} in the package or any subdirectory. A
|
@filepath{info.rkt} in the package or any subdirectory. A
|
||||||
@racket[source-keep-files], @racket[binary-keep-files], or @racket[binary-lib-keep-files] definition
|
@racket[source-keep-files], @racket[binary-keep-files], or @racket[binary-lib-keep-files] definition
|
||||||
|
|
|
@ -36,9 +36,11 @@ the ``Sysmon'' ActiveX control that is included with Windows.
|
||||||
(lambda (doc url) (semaphore-post ready))
|
(lambda (doc url) (semaphore-post ready))
|
||||||
ex)
|
ex)
|
||||||
|
|
||||||
;; Navigate to an empty URL to get an initial document:
|
;; Navigate to get an initial document:
|
||||||
(com-invoke ie "Navigate" "")
|
(com-invoke ie "Navigate" "about:blank")
|
||||||
(semaphore-wait ready)
|
(define READYSTATE_COMPLETE 4)
|
||||||
|
(unless (= (com-get-property ie "READYSTATE") READYSTATE_COMPLETE)
|
||||||
|
(semaphore-wait ready))
|
||||||
(define doc (com-get-property ie "Document"))
|
(define doc (com-get-property ie "Document"))
|
||||||
|
|
||||||
;; Install HTML to show the ActiveX control:
|
;; Install HTML to show the ActiveX control:
|
||||||
|
|
|
@ -11,11 +11,17 @@ computation in this sense is @emph{not} atomic with respect to other
|
||||||
@tech[#:doc reference.scrbl]{places}, but only to other @tech[#:doc
|
@tech[#:doc reference.scrbl]{places}, but only to other @tech[#:doc
|
||||||
reference.scrbl]{threads} within a place.
|
reference.scrbl]{threads} within a place.
|
||||||
|
|
||||||
Atomic mode is unsafe, because the Racket scheduler is not able to
|
@elemtag["atomic-unsafe"]{Atomic mode is @bold{unsafe}}, because the
|
||||||
operate while execution is in atomic mode; the scheduler cannot switch
|
Racket scheduler is not able to operate while execution is in atomic
|
||||||
threads or poll certain kinds of events, which can lead to deadlock or
|
mode; the scheduler cannot switch threads or poll certain kinds of
|
||||||
starvation of other threads. Beware that many operations can involve
|
events, which can lead to deadlock or starvation of other threads.
|
||||||
such synchronization, such as writing to an output port.
|
Beware that many operations can involve such synchronization, such as
|
||||||
|
writing to an output port. Even if an output target is known to be
|
||||||
|
free of synchronization, beware that values can have arbitrary
|
||||||
|
printing procedures attached through @racket[prop:custom-write].
|
||||||
|
Successful use of atomic mode requires a detailed knowledge of any
|
||||||
|
implementation that might be reached during atomic mode to ensure that
|
||||||
|
it terminates and does not involve synchronization.
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
@defproc[(start-atomic) void?]
|
@defproc[(start-atomic) void?]
|
||||||
|
@ -51,7 +57,9 @@ Using @racket[call-as-atomic] is somewhat safer than using
|
||||||
exiting atomic mode, and it wraps any call to the error value
|
exiting atomic mode, and it wraps any call to the error value
|
||||||
conversion handler with @racket[call-as-nonatomic]. The latter is safe
|
conversion handler with @racket[call-as-nonatomic]. The latter is safe
|
||||||
for a particular atomic region, however, only if the region can be
|
for a particular atomic region, however, only if the region can be
|
||||||
safely interrupted by a non-atomic exception construction.}
|
safely interrupted by a non-atomic exception construction.
|
||||||
|
|
||||||
|
See also the caveat that @elemref["atomic-unsafe"]{atomic mode is unsafe}.}
|
||||||
|
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
|
@ -82,11 +90,7 @@ re-raised after exiting atomic mode. Any call to the current
|
||||||
@tech[#:doc reference.scrbl]{error value conversion handler} is
|
@tech[#:doc reference.scrbl]{error value conversion handler} is
|
||||||
effectively wrapped with @racket[call-as-nonatomic].
|
effectively wrapped with @racket[call-as-nonatomic].
|
||||||
|
|
||||||
Besides obvious paths to unknown expressions that may not be safe for
|
See also the caveat that @elemref["atomic-unsafe"]{atomic mode is unsafe}.}
|
||||||
atomic mode, beware of printing an arbitrary value in any way other
|
|
||||||
than the error value conversion handler, because values can have
|
|
||||||
arbitrary printing procedures attached through
|
|
||||||
@racket[prop:custom-write].}
|
|
||||||
|
|
||||||
|
|
||||||
@defproc[(call-as-nonatomic [thunk (-> any)]) any]{
|
@defproc[(call-as-nonatomic [thunk (-> any)]) any]{
|
||||||
|
|
|
@ -209,6 +209,14 @@ A constant for use with @racket[com-invoke] in place of an optional
|
||||||
argument.}
|
argument.}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(com-omit? [v any/c]) boolean?]{
|
||||||
|
|
||||||
|
Returns @racket[#t] if @racket[v] is @racket[com-omit], @racket[#f]
|
||||||
|
otherwise.
|
||||||
|
|
||||||
|
@history[#:added "6.3.0.3"]}
|
||||||
|
|
||||||
|
|
||||||
@; ----------------------------------------
|
@; ----------------------------------------
|
||||||
|
|
||||||
@section{COM Properties}
|
@section{COM Properties}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
The @racketmodname[ffi/com] and @racketmodname[ffi/unsafe/com]
|
The @racketmodname[ffi/com] and @racketmodname[ffi/unsafe/com]
|
||||||
libraries support COM interaction in two layers. The safe upper layer
|
libraries support COM interaction in two layers. The safe upper layer
|
||||||
provides functions for creating COM objects and dynamically
|
provides functions for creating COM objects and dynamically
|
||||||
constructing method calls based on COM automatiion (i.e., reflective
|
constructing method calls based on COM automation (i.e., reflective
|
||||||
information provided by the object). The unsafe lower layer provides a
|
information provided by the object). The unsafe lower layer provides a
|
||||||
syntactic form and functions for working more directly with COM
|
syntactic form and functions for working more directly with COM
|
||||||
objects and interfaces.
|
objects and interfaces.
|
||||||
|
|
|
@ -23,8 +23,8 @@ the library produced by @racket[ffi-lib-expr]. The syntax of
|
||||||
(code:line #:fail fail-expr)])]
|
(code:line #:fail fail-expr)])]
|
||||||
|
|
||||||
A @racket[define-id] form binds @racket[id] by extracting a binding
|
A @racket[define-id] form binds @racket[id] by extracting a binding
|
||||||
with the name @racket[c-id] from the library produced by
|
with the name @racket[_c-id] from the library produced by
|
||||||
@racket[ffi-lib-expr], where @racket[c-id] defaults to @racket[id].
|
@racket[ffi-lib-expr], where @racket[_c-id] defaults to @racket[_id].
|
||||||
The other options support further wrapping and configuration:
|
The other options support further wrapping and configuration:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
|
@ -26,11 +26,16 @@ internal representation of @racket[vec].}
|
||||||
Returns a pointer to an array of @racket[_double] values, which is the
|
Returns a pointer to an array of @racket[_double] values, which is the
|
||||||
internal representation of @racket[flvec].}
|
internal representation of @racket[flvec].}
|
||||||
|
|
||||||
@defproc[(saved-errno) exact-integer?]{
|
@defproc*[([(saved-errno) exact-integer?]
|
||||||
|
[(saved-errno [new-value exact-integer?]) void?])]{
|
||||||
|
|
||||||
Returns the value most recently saved (in the current thread) after a
|
Returns or sets the error code saved for the current Racket
|
||||||
foreign call with a non-@racket[#f] @racket[#:save-errno] option (see
|
thread. The saved error code is set after a foreign call with a
|
||||||
@racket[_fun] and @racket[_cprocedure]).}
|
non-@racket[#f] @racket[#:save-errno] option (see @racket[_fun] and
|
||||||
|
@racket[_cprocedure]), but it can also be set explicitly (for example,
|
||||||
|
to create mock foreign functions for testing).
|
||||||
|
|
||||||
|
@history[#:changed "6.4.0.9"]{Added the one-argument variant.}}
|
||||||
|
|
||||||
@defproc[(lookup-errno [sym (or/c 'EINTR 'EEXIST 'EAGAIN)])
|
@defproc[(lookup-errno [sym (or/c 'EINTR 'EEXIST 'EAGAIN)])
|
||||||
exact-integer?]{
|
exact-integer?]{
|
||||||
|
|
|
@ -269,6 +269,56 @@ Check whether @racket[subcls] is @racket[cls] or a subclass.
|
||||||
|
|
||||||
@history[#:added "6.1.0.5"]}
|
@history[#:added "6.1.0.5"]}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(objc-get-class [obj _id]) _Class]{
|
||||||
|
|
||||||
|
Extract the class of @racket[obj].
|
||||||
|
|
||||||
|
@history[#:added "6.3"]}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(objc-set-class! [obj _id] [cls _Class]) void?]{
|
||||||
|
|
||||||
|
Changes the class of @racket[obj] to @racket[cls]. The object's
|
||||||
|
existing representation must be compatible with the new class.
|
||||||
|
|
||||||
|
@history[#:added "6.3"]}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(objc-get-superclass [cls _Class]) _Class]{
|
||||||
|
|
||||||
|
Returns the superclass of @racket[cls].
|
||||||
|
|
||||||
|
@history[#:added "6.3"]}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(objc-dispose-class [cls _Class]) void?]{
|
||||||
|
|
||||||
|
Destroys @racket[cls], which must have no existing instances or
|
||||||
|
subclasses.
|
||||||
|
|
||||||
|
@history[#:added "6.3"]}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(objc-block [function-type? ctype]
|
||||||
|
[proc procedure?]
|
||||||
|
[#:keep keep (box/c list?)])
|
||||||
|
cpointer?]{
|
||||||
|
|
||||||
|
Wraps a Racket function @racket[proc] as an Objective-C block. The
|
||||||
|
procedure must accept an initial pointer argument that is the ``self''
|
||||||
|
argument for the block, and that extra argument must be included in
|
||||||
|
the given @racket[function-type].
|
||||||
|
|
||||||
|
Extra records that are allocated to implement the block are added to
|
||||||
|
the list in @racket[keep], which might also be included in
|
||||||
|
@racket[function-type] through a @racket[#:keep] option to
|
||||||
|
@racket[_fun]. The pointers registered in @racket[keep] must be
|
||||||
|
retained as long as the block remains in use.
|
||||||
|
|
||||||
|
@history[#:added "6.3"]}
|
||||||
|
|
||||||
|
|
||||||
@; ----------------------------------------------------------------------
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
@section{Raw Runtime Functions}
|
@section{Raw Runtime Functions}
|
||||||
|
|
|
@ -233,7 +233,7 @@ see @|InsideRacket|.
|
||||||
ctype?)
|
ctype?)
|
||||||
@#,elem{absent}]
|
@#,elem{absent}]
|
||||||
[cptr cpointer? @#,elem{absent}]
|
[cptr cpointer? @#,elem{absent}]
|
||||||
[mode (one-of/c 'raw 'atomic 'nonatomic
|
[mode (one-of/c 'raw 'atomic 'nonatomic 'tagged
|
||||||
'atomic-interior 'interior
|
'atomic-interior 'interior
|
||||||
'stubborn 'uncollectable 'eternal)
|
'stubborn 'uncollectable 'eternal)
|
||||||
@#,elem{absent}]
|
@#,elem{absent}]
|
||||||
|
@ -266,6 +266,8 @@ specification is required at minimum:
|
||||||
what allocation function to use. It should be one of
|
what allocation function to use. It should be one of
|
||||||
@indexed-racket['nonatomic] (uses @cpp{scheme_malloc} from
|
@indexed-racket['nonatomic] (uses @cpp{scheme_malloc} from
|
||||||
Racket's C API), @indexed-racket['atomic]
|
Racket's C API), @indexed-racket['atomic]
|
||||||
|
(@cpp{scheme_malloc_atomic}), @indexed-racket['tagged]
|
||||||
|
(@cpp{scheme_malloc_tagged}), @indexed-racket['atomic]
|
||||||
(@cpp{scheme_malloc_atomic}), @indexed-racket['stubborn]
|
(@cpp{scheme_malloc_atomic}), @indexed-racket['stubborn]
|
||||||
(@cpp{scheme_malloc_stubborn}), @indexed-racket['uncollectable]
|
(@cpp{scheme_malloc_stubborn}), @indexed-racket['uncollectable]
|
||||||
(@cpp{scheme_malloc_uncollectable}), @indexed-racket['eternal]
|
(@cpp{scheme_malloc_uncollectable}), @indexed-racket['eternal]
|
||||||
|
@ -282,7 +284,9 @@ specification is required at minimum:
|
||||||
|
|
||||||
If no mode is specified, then @racket['nonatomic] allocation is used
|
If no mode is specified, then @racket['nonatomic] allocation is used
|
||||||
when the type is a @racket[_gcpointer]- or @racket[_scheme]-based
|
when the type is a @racket[_gcpointer]- or @racket[_scheme]-based
|
||||||
type, and @racket['atomic] allocation is used otherwise.}
|
type, and @racket['atomic] allocation is used otherwise.
|
||||||
|
|
||||||
|
@history[#:changed "6.4.0.10" @elem{Added the @racket['tagged] allocation mode.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(free [cptr cpointer?]) void]{
|
@defproc[(free [cptr cpointer?]) void]{
|
||||||
|
|
|
@ -474,6 +474,7 @@ the later case, the result is the @racket[ctype]).}
|
||||||
[#:abi abi (or/c #f 'default 'stdcall 'sysv) #f]
|
[#:abi abi (or/c #f 'default 'stdcall 'sysv) #f]
|
||||||
[#:atomic? atomic? any/c #f]
|
[#:atomic? atomic? any/c #f]
|
||||||
[#:async-apply async-apply (or/c #f ((-> any/c) . -> . any/c) box?) #f]
|
[#:async-apply async-apply (or/c #f ((-> any/c) . -> . any/c) box?) #f]
|
||||||
|
[#:lock-name lock-name (or/c string? #f) #f]
|
||||||
[#:in-original-place? in-original-place? any/c #f]
|
[#:in-original-place? in-original-place? any/c #f]
|
||||||
[#:save-errno save-errno (or/c #f 'posix 'windows) #f]
|
[#:save-errno save-errno (or/c #f 'posix 'windows) #f]
|
||||||
[#:wrapper wrapper (or/c #f (procedure? . -> . procedure?))
|
[#:wrapper wrapper (or/c #f (procedure? . -> . procedure?))
|
||||||
|
@ -536,6 +537,12 @@ For @tech{callouts} to foreign functions with the generated type:
|
||||||
(for example, grabbing a value stored in an ``output'' pointer
|
(for example, grabbing a value stored in an ``output'' pointer
|
||||||
and returning multiple values).}
|
and returning multiple values).}
|
||||||
|
|
||||||
|
@item{If @racket[lock-name] is not @racket[#f], then a process-wide
|
||||||
|
lock with the given name is held during the foreign call. In a
|
||||||
|
build that supports parallel places, @racket[lock-name] is
|
||||||
|
registered via @cpp{scheme_register_process_global}, so choose
|
||||||
|
names that are suitably distinct.}
|
||||||
|
|
||||||
@item{If @racket[in-original-place?] is true, then when a foreign
|
@item{If @racket[in-original-place?] is true, then when a foreign
|
||||||
@tech{callout} procedure with the generated type is called in
|
@tech{callout} procedure with the generated type is called in
|
||||||
any Racket @tech-place[], the procedure
|
any Racket @tech-place[], the procedure
|
||||||
|
@ -692,7 +699,8 @@ For @tech{callbacks} to Racket functions with the generated type:
|
||||||
is not used.}
|
is not used.}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
|
||||||
|
@history[#:changed "6.3" @elem{Added the @racket[#:lock-name] argument.}]}
|
||||||
|
|
||||||
@defform/subs[#:literals (->> :: :)
|
@defform/subs[#:literals (->> :: :)
|
||||||
(_fun fun-option ... maybe-args type-spec ... ->> type-spec
|
(_fun fun-option ... maybe-args type-spec ... ->> type-spec
|
||||||
|
@ -702,6 +710,7 @@ For @tech{callbacks} to Racket functions with the generated type:
|
||||||
(code:line #:keep keep-expr)
|
(code:line #:keep keep-expr)
|
||||||
(code:line #:atomic? atomic?-expr)
|
(code:line #:atomic? atomic?-expr)
|
||||||
(code:line #:async-apply async-apply-expr)
|
(code:line #:async-apply async-apply-expr)
|
||||||
|
(code:line #:lock-name lock-name-expr)
|
||||||
(code:line #:in-original-place? in-original-place?-expr)
|
(code:line #:in-original-place? in-original-place?-expr)
|
||||||
(code:line #:retry (retry-id [arg-id init-expr]))]
|
(code:line #:retry (retry-id [arg-id init-expr]))]
|
||||||
[maybe-args code:blank
|
[maybe-args code:blank
|
||||||
|
@ -821,7 +830,8 @@ specifications:
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
@history[#:changed "6.2" @elem{Added the @racket[#:retry] option.}]}
|
@history[#:changed "6.2" @elem{Added the @racket[#:retry] option.}
|
||||||
|
#:changed "6.3" @elem{Added the @racket[#:lock-name] option.}]}
|
||||||
|
|
||||||
@defproc[(function-ptr [ptr-or-proc (or cpointer? procedure?)]
|
@defproc[(function-ptr [ptr-or-proc (or cpointer? procedure?)]
|
||||||
[fun-type ctype?])
|
[fun-type ctype?])
|
||||||
|
@ -1013,13 +1023,11 @@ Racket vectors instead of lists.}
|
||||||
(_bytes o len-expr)]]{
|
(_bytes o len-expr)]]{
|
||||||
|
|
||||||
A @tech{custom function type} that can be used by itself as a simple
|
A @tech{custom function type} that can be used by itself as a simple
|
||||||
type for a byte string as a C pointer. Alternatively, the second form
|
type for a byte string as a C pointer. Coercion of a C pointer to
|
||||||
is for a pointer return value, where the size should be explicitly
|
simply @racket[_bytes] (without a specified length) requires that the pointer
|
||||||
specified.
|
refers to a nul-terminated byte string. When the length-specifying form is used
|
||||||
|
for a function argument, a byte string is allocated with the given
|
||||||
There is no need for other modes analogous to those of @racket[_ptr]:
|
length, including an extra byte for the nul terminator.}
|
||||||
input or input/output would be just like @racket[_bytes], since the
|
|
||||||
string carries its size information.}
|
|
||||||
|
|
||||||
|
|
||||||
@; ------------------------------------------------------------
|
@; ------------------------------------------------------------
|
||||||
|
@ -1047,7 +1055,7 @@ members.}
|
||||||
|
|
||||||
@defproc[(_list-struct [#:alignment alignment (or/c #f 1 2 4 8 16) #f]
|
@defproc[(_list-struct [#:alignment alignment (or/c #f 1 2 4 8 16) #f]
|
||||||
[#:malloc-mode malloc-mode
|
[#:malloc-mode malloc-mode
|
||||||
(one-of/c 'raw 'atomic 'nonatomic
|
(one-of/c 'raw 'atomic 'nonatomic 'tagged
|
||||||
'atomic-interior 'interior
|
'atomic-interior 'interior
|
||||||
'stubborn 'uncollectable 'eternal)
|
'stubborn 'uncollectable 'eternal)
|
||||||
'atomic]
|
'atomic]
|
||||||
|
@ -1073,10 +1081,11 @@ below for a more efficient approach.
|
||||||
(property (code:line #:alignment alignment-expr)
|
(property (code:line #:alignment alignment-expr)
|
||||||
(code:line #:malloc-mode malloc-mode-expr)
|
(code:line #:malloc-mode malloc-mode-expr)
|
||||||
(code:line #:property prop-expr val-expr)
|
(code:line #:property prop-expr val-expr)
|
||||||
#:no-equal)]
|
#:no-equal
|
||||||
|
#:define-unsafe)]
|
||||||
#:contracts ([offset-expr exact-integer?]
|
#:contracts ([offset-expr exact-integer?]
|
||||||
[alignment-expr (or/c #f 1 2 4 8 16)]
|
[alignment-expr (or/c #f 1 2 4 8 16)]
|
||||||
[malloc-mode-expr (one-of/c 'raw 'atomic 'nonatomic
|
[malloc-mode-expr (one-of/c 'raw 'atomic 'nonatomic 'tagged
|
||||||
'atomic-interior 'interior
|
'atomic-interior 'interior
|
||||||
'stubborn 'uncollectable 'eternal)]
|
'stubborn 'uncollectable 'eternal)]
|
||||||
[prop-expr struct-type-property?])]{
|
[prop-expr struct-type-property?])]{
|
||||||
|
@ -1122,7 +1131,16 @@ The resulting bindings are as follows:
|
||||||
@item{@racketidfont{set-}@racketvarfont{id}@racketidfont{-}@racket[field-id]@racketidfont{!}
|
@item{@racketidfont{set-}@racketvarfont{id}@racketidfont{-}@racket[field-id]@racketidfont{!}
|
||||||
: a mutator function for each @racket[field-id].}
|
: a mutator function for each @racket[field-id].}
|
||||||
|
|
||||||
@item{@racketvarfont{id}: structure-type information compatible with
|
@item{@racketvarfont{id}@racketidfont{-}@racket[field-id]@racketidfont{-offset}
|
||||||
|
: the absolute offset, in bytes, of each @racket[field-id], if @racket[#:define-unsafe] is present.}
|
||||||
|
|
||||||
|
@item{@racketidfont{unsafe-}@racketvarfont{id}@racketidfont{-}@racket[field-id]
|
||||||
|
: an unsafe accessor function for each @racket[field-id], if @racket[#:define-unsafe] is present.}
|
||||||
|
|
||||||
|
@item{@racketidfont{unsafe-set-}@racketvarfont{id}@racketidfont{-}@racket[field-id]@racketidfont{!}
|
||||||
|
: an unsafe mutator function for each @racket[field-id], if @racket[#:define-unsafe] is present.}
|
||||||
|
|
||||||
|
@item{@racketvarfont{id}: structure-type information compatible with
|
||||||
@racket[struct-out] or @racket[match] (but not @racket[struct] or
|
@racket[struct-out] or @racket[match] (but not @racket[struct] or
|
||||||
@racket[define-struct]);
|
@racket[define-struct]);
|
||||||
currently, this information is correct only when no @racket[super-id]
|
currently, this information is correct only when no @racket[super-id]
|
||||||
|
@ -1320,7 +1338,8 @@ expects arguments for both the super fields and the new ones:
|
||||||
]
|
]
|
||||||
|
|
||||||
@history[#:changed "6.0.0.6" @elem{Added @racket[#:malloc-mode].}
|
@history[#:changed "6.0.0.6" @elem{Added @racket[#:malloc-mode].}
|
||||||
#:changed "6.1.1.8" @elem{Added @racket[#:offset] for fields.}]}
|
#:changed "6.1.1.8" @elem{Added @racket[#:offset] for fields.}
|
||||||
|
#:changed "6.3.0.13" @elem{Added @racket[#:define-unsafe].}]}
|
||||||
|
|
||||||
@; ------------------------------------------------------------
|
@; ------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual scribble/eval "utils.rkt"
|
@(require scribble/manual scribble/eval "utils.rkt"
|
||||||
(for-label racket/contract))
|
(for-label racket/base
|
||||||
|
racket/contract))
|
||||||
|
|
||||||
@title[#:tag "contract-boundaries"]{Contracts and Boundaries}
|
@title[#:tag "contract-boundaries"]{Contracts and Boundaries}
|
||||||
|
|
||||||
|
|
|
@ -67,13 +67,13 @@ The new argument specifies who is to be blamed for
|
||||||
positive and negative contract violations.
|
positive and negative contract violations.
|
||||||
|
|
||||||
Contracts, in this system, are always
|
Contracts, in this system, are always
|
||||||
established between two parties. One party provides some
|
established between two parties. One party, called the server, provides some
|
||||||
value according to the contract, and the other consumes the
|
value according to the contract, and the other, the client, consumes the
|
||||||
value, also according to the contract. The first is called
|
value, also according to the contract. The server is called
|
||||||
the ``positive'' person and the second the ``negative''. So,
|
the positive position and the client the negative position. So,
|
||||||
in the case of just the integer contract, the only thing
|
in the case of just the integer contract, the only thing
|
||||||
that can go wrong is that the value provided is not an
|
that can go wrong is that the value provided is not an
|
||||||
integer. Thus, only the positive party can ever accrue
|
integer. Thus, only the positive party (the server) can ever accrue
|
||||||
blame. The @racket[raise-blame-error] function always blames
|
blame. The @racket[raise-blame-error] function always blames
|
||||||
the positive party.
|
the positive party.
|
||||||
|
|
||||||
|
@ -114,16 +114,19 @@ This technique is not merely a cheap trick to get the example to work,
|
||||||
however. The reversal of the positive and the negative is a
|
however. The reversal of the positive and the negative is a
|
||||||
natural consequence of the way functions behave. That is,
|
natural consequence of the way functions behave. That is,
|
||||||
imagine the flow of values in a program between two
|
imagine the flow of values in a program between two
|
||||||
modules. First, one module defines a function, and then that
|
modules. First, one module (the server) defines a function, and then that
|
||||||
module is required by another. So far, the function itself
|
module is required by another (the client). So far, the function itself
|
||||||
has to go from the original, providing module to the
|
has to go from the original, providing module to the
|
||||||
requiring module. Now, imagine that the providing module
|
requiring module. Now, imagine that the providing module
|
||||||
invokes the function, supplying it an argument. At this
|
invokes the function, supplying it an argument. At this
|
||||||
point, the flow of values reverses. The argument is
|
point, the flow of values reverses. The argument is
|
||||||
traveling back from the requiring module to the providing
|
traveling back from the requiring module to the providing
|
||||||
module! And finally, when the function produces a result,
|
module! The client is ``serving'' the argument to the server,
|
||||||
|
and the server is receiving that value as a client.
|
||||||
|
And finally, when the function produces a result,
|
||||||
that result flows back in the original
|
that result flows back in the original
|
||||||
direction. Accordingly, the contract on the domain reverses
|
direction from server to client.
|
||||||
|
Accordingly, the contract on the domain reverses
|
||||||
the positive and the negative blame parties, just like the flow
|
the positive and the negative blame parties, just like the flow
|
||||||
of values reverses.
|
of values reverses.
|
||||||
|
|
||||||
|
|
|
@ -404,11 +404,14 @@ the contract so that error messages become intelligible:
|
||||||
@interaction[#:eval
|
@interaction[#:eval
|
||||||
contract-eval
|
contract-eval
|
||||||
(module improved-bank-server racket
|
(module improved-bank-server racket
|
||||||
(define (amount? x) (and (number? x) (integer? x) (>= x 0)))
|
(provide
|
||||||
(define amount (flat-named-contract 'amount amount?))
|
(contract-out
|
||||||
|
[deposit (-> (flat-named-contract
|
||||||
(provide (contract-out [deposit (amount . -> . any)]))
|
'amount
|
||||||
|
(λ (x)
|
||||||
|
(and (number? x) (integer? x) (>= x 0))))
|
||||||
|
any)]))
|
||||||
|
|
||||||
(define total 0)
|
(define total 0)
|
||||||
(define (deposit a) (set! total (+ a total))))]
|
(define (deposit a) (set! total (+ a total))))]
|
||||||
|
|
||||||
|
@ -446,5 +449,5 @@ In general, each contract error message consists of six sections:
|
||||||
@item{a description of the precise aspect of the contract that was violated, @lines[1 2]}
|
@item{a description of the precise aspect of the contract that was violated, @lines[1 2]}
|
||||||
@item{the complete contract plus a path into it showing which aspect was violated, @lines[3 2]}
|
@item{the complete contract plus a path into it showing which aspect was violated, @lines[3 2]}
|
||||||
@item{the module where the contract was put (or, more generally, the boundary that the contract mediates), @lines[5 1]}
|
@item{the module where the contract was put (or, more generally, the boundary that the contract mediates), @lines[5 1]}
|
||||||
@item{who was blamed, @lines[6 1]}
|
@item{who was blamed, @lines[6 2]}
|
||||||
@item{and the source location where the contract appears. @lines[7 1]}]
|
@item{and the source location where the contract appears. @lines[8 1]}]
|
||||||
|
|
|
@ -136,8 +136,11 @@ supertype.
|
||||||
(define p (3d-posn 1 2 3))
|
(define p (3d-posn 1 2 3))
|
||||||
p
|
p
|
||||||
(posn? p)
|
(posn? p)
|
||||||
(posn-x p)
|
|
||||||
(3d-posn-z p)
|
(3d-posn-z p)
|
||||||
|
(code:comment "a 3d-posn has an x field, but there is no 3d-posn-x selector:")
|
||||||
|
(3d-posn-x p)
|
||||||
|
(code:comment "use the supertype's posn-x selector to access the x field:")
|
||||||
|
(posn-x p)
|
||||||
]
|
]
|
||||||
|
|
||||||
@; ------------------------------------------------------------
|
@; ------------------------------------------------------------
|
||||||
|
@ -450,7 +453,7 @@ A @racket[_struct-option] always starts with a keyword:
|
||||||
@racket[#:auto] field option. The constructor procedure does not
|
@racket[#:auto] field option. The constructor procedure does not
|
||||||
accept arguments for automatic fields. Automatic fields are
|
accept arguments for automatic fields. Automatic fields are
|
||||||
implicitly mutable (via reflective operations), but mutator
|
implicitly mutable (via reflective operations), but mutator
|
||||||
functions are bound only if @racket[#:mutator] is also specified.
|
functions are bound only if @racket[#:mutable] is also specified.
|
||||||
|
|
||||||
@defexamples[
|
@defexamples[
|
||||||
(struct posn (x y [z #:auto])
|
(struct posn (x y [z #:auto])
|
||||||
|
|
|
@ -16,7 +16,7 @@ into details---covering much of the Racket toolbox, but leaving
|
||||||
precise details to @|Racket| and other reference manuals.
|
precise details to @|Racket| and other reference manuals.
|
||||||
|
|
||||||
@margin-note{The source of this manual is available on
|
@margin-note{The source of this manual is available on
|
||||||
@hyperlink["https://github.com/plt/racket/tree/master/pkgs/racket-doc/scribblings/guide"]{GitHub}.}
|
@hyperlink["https://github.com/racket/racket/tree/master/pkgs/racket-doc/scribblings/guide"]{GitHub}.}
|
||||||
|
|
||||||
@table-of-contents[]
|
@table-of-contents[]
|
||||||
|
|
||||||
|
|
|
@ -69,10 +69,11 @@ file:
|
||||||
(close-output-port out)
|
(close-output-port out)
|
||||||
]
|
]
|
||||||
|
|
||||||
Instead of having to match @racket[open-input-file] and
|
Instead of having to match the open calls with close calls, most Racket
|
||||||
@racket[open-output-file] calls, most Racket programmers will instead
|
programmers will use the @racket[call-with-input-file] and
|
||||||
use @racket[call-with-output-file], which takes a function to call
|
@racket[call-with-output-file] functions which take a function to call to carry
|
||||||
with the output port; when the function returns, the port is closed.
|
out the desired operation. This function gets as its only argument the port,
|
||||||
|
which is automatically opened and closed for the operation.
|
||||||
|
|
||||||
@examples[
|
@examples[
|
||||||
#:eval io-eval
|
#:eval io-eval
|
||||||
|
@ -318,7 +319,7 @@ Other structure types created by @racket[struct], which offer
|
||||||
more abstraction than @tech{prefab} structure types, normally
|
more abstraction than @tech{prefab} structure types, normally
|
||||||
@racket[write] either using @racketresultfont{#<....>} notation (for
|
@racket[write] either using @racketresultfont{#<....>} notation (for
|
||||||
opaque structure types) or using @racketresultfont{#(....)} vector
|
opaque structure types) or using @racketresultfont{#(....)} vector
|
||||||
notation (for transparent structure types). In neither can the
|
notation (for transparent structure types). In neither case can the
|
||||||
result be read back in as an instance of the structure type:
|
result be read back in as an instance of the structure type:
|
||||||
|
|
||||||
@interaction[
|
@interaction[
|
||||||
|
|
|
@ -79,11 +79,11 @@ The difference is that each @racket[_id] is available for use in later
|
||||||
visible one.
|
visible one.
|
||||||
|
|
||||||
@examples[
|
@examples[
|
||||||
(let* ([x (list "Borroughs")]
|
(let* ([x (list "Burroughs")]
|
||||||
[y (cons "Rice" x)]
|
[y (cons "Rice" x)]
|
||||||
[z (cons "Edgar" y)])
|
[z (cons "Edgar" y)])
|
||||||
(list x y z))
|
(list x y z))
|
||||||
(let* ([name (list "Borroughs")]
|
(let* ([name (list "Burroughs")]
|
||||||
[name (cons "Rice" name)]
|
[name (cons "Rice" name)]
|
||||||
[name (cons "Edgar" name)])
|
[name (cons "Edgar" name)])
|
||||||
name)
|
name)
|
||||||
|
@ -93,7 +93,7 @@ In other words, a @racket[let*] form is equivalent to nested
|
||||||
@racket[let] forms, each with a single binding:
|
@racket[let] forms, each with a single binding:
|
||||||
|
|
||||||
@interaction[
|
@interaction[
|
||||||
(let ([name (list "Borroughs")])
|
(let ([name (list "Burroughs")])
|
||||||
(let ([name (cons "Rice" name)])
|
(let ([name (cons "Rice" name)])
|
||||||
(let ([name (cons "Edgar" name)])
|
(let ([name (cons "Edgar" name)])
|
||||||
name)))
|
name)))
|
||||||
|
|
|
@ -74,15 +74,7 @@ by @racket[and]ing or @racket[or]ing:
|
||||||
(ormap number? (list "a" "b" 6))
|
(ormap number? (list "a" "b" 6))
|
||||||
]
|
]
|
||||||
|
|
||||||
The @racket[filter] function keeps elements for which the body result
|
The @racket[map], @racket[andmap], and @racket[ormap]
|
||||||
is true, and discards elements for which it is @racket[#f]:
|
|
||||||
|
|
||||||
@interaction[
|
|
||||||
(filter string? (list "a" "b" 6))
|
|
||||||
(filter positive? (list 1 -2 6 7 0))
|
|
||||||
]
|
|
||||||
|
|
||||||
The @racket[map], @racket[andmap], @racket[ormap], and @racket[filter]
|
|
||||||
functions can all handle multiple lists, instead of just a single
|
functions can all handle multiple lists, instead of just a single
|
||||||
list. The lists must all have the same length, and the given function
|
list. The lists must all have the same length, and the given function
|
||||||
must accept one argument for each list:
|
must accept one argument for each list:
|
||||||
|
@ -93,6 +85,14 @@ must accept one argument for each list:
|
||||||
(list 6 3 7))
|
(list 6 3 7))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
The @racket[filter] function keeps elements for which the body result
|
||||||
|
is true, and discards elements for which it is @racket[#f]:
|
||||||
|
|
||||||
|
@interaction[
|
||||||
|
(filter string? (list "a" "b" 6))
|
||||||
|
(filter positive? (list 1 -2 6 7 0))
|
||||||
|
]
|
||||||
|
|
||||||
The @racket[foldl] function generalizes some iteration functions. It
|
The @racket[foldl] function generalizes some iteration functions. It
|
||||||
uses the per-element function to both process an element and combine
|
uses the per-element function to both process an element and combine
|
||||||
it with the ``current'' value, so the per-element function takes an
|
it with the ``current'' value, so the per-element function takes an
|
||||||
|
|
|
@ -15,6 +15,8 @@ make simple transformations easy to implement and reliable to
|
||||||
use. Racket also supports arbitrary macro transformers that are
|
use. Racket also supports arbitrary macro transformers that are
|
||||||
implemented in Racket---or in a macro-extended variant of Racket.
|
implemented in Racket---or in a macro-extended variant of Racket.
|
||||||
|
|
||||||
|
(For a bottom-up introduction of Racket macro, you may refer to: @(hyperlink "http://www.greghendershott.com/fear-of-macros/" "Fear of Macros"))
|
||||||
|
|
||||||
@local-table-of-contents[]
|
@local-table-of-contents[]
|
||||||
|
|
||||||
@;------------------------------------------------------------------------
|
@;------------------------------------------------------------------------
|
||||||
|
|
|
@ -113,7 +113,7 @@ Racket tools all work automatically with relative paths. For example,
|
||||||
|
|
||||||
@commandline{racket sort.rkt}
|
@commandline{racket sort.rkt}
|
||||||
|
|
||||||
on the comamnd line runs the @filepath{sort.rkt} program and
|
on the command line runs the @filepath{sort.rkt} program and
|
||||||
automatically loads and compiles required modules. With a large enough
|
automatically loads and compiles required modules. With a large enough
|
||||||
program, compilation from source can take too long, so use
|
program, compilation from source can take too long, so use
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ provided by the @filepath{gui} package, while
|
||||||
@filepath{parser-tools} library.@margin-note{More precisely,
|
@filepath{parser-tools} library.@margin-note{More precisely,
|
||||||
@racketmodname[racket/gui] is provided by @filepath{gui-lib},
|
@racketmodname[racket/gui] is provided by @filepath{gui-lib},
|
||||||
@racketmodname[parser-tools/lex] is provided by
|
@racketmodname[parser-tools/lex] is provided by
|
||||||
@filepath{parser-tools}, and the @filepath{gui} and
|
@filepath{parser-tools-lib}, and the @filepath{gui} and
|
||||||
@filepath{parser-tools} packages extend @filepath{gui-lib} and
|
@filepath{parser-tools} packages extend @filepath{gui-lib} and
|
||||||
@filepath{parser-tools-lib} with documentation.}
|
@filepath{parser-tools-lib} with documentation.}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ modular reasoning about programs. For example, in the module,
|
||||||
(provide rx:fish fishy-string?)
|
(provide rx:fish fishy-string?)
|
||||||
(define rx:fish #rx"fish")
|
(define rx:fish #rx"fish")
|
||||||
(define (fishy-string? s)
|
(define (fishy-string? s)
|
||||||
(regexp-match? s rx:fish)))
|
(regexp-match? rx:fish s)))
|
||||||
]
|
]
|
||||||
|
|
||||||
the function @racket[fishy-string?] will always match strings that
|
the function @racket[fishy-string?] will always match strings that
|
||||||
|
|
|
@ -28,5 +28,10 @@ many other installed libraries. Run @exec{raco docs} to find
|
||||||
documentation for libraries that are installed on your system and
|
documentation for libraries that are installed on your system and
|
||||||
specific to your user account.
|
specific to your user account.
|
||||||
|
|
||||||
@link["http://planet.plt-racket.org/"]{@|PLaneT|} offers even more
|
@link["https://pkgs.racket-lang.org/"]{The Racket package repository}
|
||||||
downloadable packages contributed by Racketeers.
|
offer even more downloadable packages that are contributed by
|
||||||
|
Racketeers.
|
||||||
|
|
||||||
|
The legacy @link["http://planet.racket-lang.org/"]{@|PLaneT|} site
|
||||||
|
offers additional packages, although maintained packages have
|
||||||
|
generally migrated to the newer package repository.
|
|
@ -387,7 +387,7 @@ definition
|
||||||
|
|
||||||
At the same time, @racket[define-cbr] needs to define @racket[do-f]
|
At the same time, @racket[define-cbr] needs to define @racket[do-f]
|
||||||
using the body of @racket[f], this second part is slightly more
|
using the body of @racket[f], this second part is slightly more
|
||||||
complex, so we defer most it to a @racket[define-for-cbr] helper
|
complex, so we defer most of it to a @racket[define-for-cbr] helper
|
||||||
module, which lets us write @racket[define-cbr] easily enough:
|
module, which lets us write @racket[define-cbr] easily enough:
|
||||||
|
|
||||||
|
|
||||||
|
@ -453,11 +453,11 @@ Step-by-step, expansion proceeds as follows:
|
||||||
@racketblock[
|
@racketblock[
|
||||||
(define-for-cbr do-f (a b)
|
(define-for-cbr do-f (a b)
|
||||||
() (swap a b))
|
() (swap a b))
|
||||||
=> (define-for-cbr do-f (b)
|
(unsyntax @tt{=>}) (define-for-cbr do-f (b)
|
||||||
([a get_1 put_1]) (swap a b))
|
([a get_1 put_1]) (swap a b))
|
||||||
=> (define-for-cbr do-f ()
|
(unsyntax @tt{=>}) (define-for-cbr do-f ()
|
||||||
([a get_1 put_1] [b get_2 put_2]) (swap a b))
|
([a get_1 put_1] [b get_2 put_2]) (swap a b))
|
||||||
=> (define (do-f get_1 get_2 put_1 put_2)
|
(unsyntax @tt{=>}) (define (do-f get_1 get_2 put_1 put_2)
|
||||||
(define-get/put-id a get_1 put_1)
|
(define-get/put-id a get_1 put_1)
|
||||||
(define-get/put-id b get_2 put_2)
|
(define-get/put-id b get_2 put_2)
|
||||||
(swap a b))
|
(swap a b))
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
@(require scribble/manual "guide-utils.rkt"
|
@(require scribble/manual "guide-utils.rkt"
|
||||||
(for-label racket/flonum
|
(for-label racket/flonum
|
||||||
racket/unsafe/ops
|
racket/unsafe/ops
|
||||||
racket/performance-hint))
|
racket/performance-hint
|
||||||
|
ffi/unsafe))
|
||||||
|
|
||||||
@title[#:tag "performance"]{Performance}
|
@title[#:tag "performance"]{Performance}
|
||||||
|
|
||||||
|
@ -358,6 +359,31 @@ crashes or memory corruption.
|
||||||
|
|
||||||
@; ----------------------------------------------------------------------
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@section[#:tag "ffi-pointer-access"]{Foreign Pointers}
|
||||||
|
|
||||||
|
The @racketmodname[ffi/unsafe] library provides functions for unsafely
|
||||||
|
reading and writing arbitrary pointer values. The JIT recognizes uses
|
||||||
|
of @racket[ptr-ref] and @racket[ptr-set!] where the second argument is
|
||||||
|
a direct reference to one of the following built-in C types:
|
||||||
|
@racket[_int8], @racket[_int16], @racket[_int32], @racket[_int64],
|
||||||
|
@racket[_double], @racket[_float], and @racket[_pointer]. Then, if the
|
||||||
|
first argument to @racket[ptr-ref] or @racket[ptr-set!] is a C pointer
|
||||||
|
(not a byte string), then the pointer read or write is performed
|
||||||
|
inline in the generated code.
|
||||||
|
|
||||||
|
The bytecode compiler will optimize references to integer
|
||||||
|
abbreviations like @racket[_int] to C types like
|
||||||
|
@racket[_int32]---where the representation sizes are constant across
|
||||||
|
platforms---so the JIT can specialize access with those C types. C
|
||||||
|
types such as @racket[_long] or @racket[_intptr] are not constant
|
||||||
|
across platforms, so their uses are currently not specialized by the
|
||||||
|
JIT.
|
||||||
|
|
||||||
|
Pointer reads and writes using @racket[_float] or @racket[_double] are
|
||||||
|
not currently subject to unboxing optimizations.
|
||||||
|
|
||||||
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
@section[#:tag "regexp-perf"]{Regular Expression Performance}
|
@section[#:tag "regexp-perf"]{Regular Expression Performance}
|
||||||
|
|
||||||
When a string or byte string is provided to a function like
|
When a string or byte string is provided to a function like
|
||||||
|
@ -445,7 +471,7 @@ then the expansion of the @racket[let] form to implement
|
||||||
automatically converts the closure to pass itself @racket[n] as an
|
automatically converts the closure to pass itself @racket[n] as an
|
||||||
argument instead.
|
argument instead.
|
||||||
|
|
||||||
@section{Reachability and Garbage Collection}
|
@section[#:tag "Reachability and Garbage Collection"]{Reachability and Garbage Collection}
|
||||||
|
|
||||||
In general, Racket re-uses the storage for a value when the
|
In general, Racket re-uses the storage for a value when the
|
||||||
garbage collector can prove that the object is unreachable from
|
garbage collector can prove that the object is unreachable from
|
||||||
|
@ -508,7 +534,7 @@ There are a number of exceptions, however:
|
||||||
@item{Interned symbols are allocated only once (per place). A table inside
|
@item{Interned symbols are allocated only once (per place). A table inside
|
||||||
Racket tracks this allocation so a symbol may not become garbage
|
Racket tracks this allocation so a symbol may not become garbage
|
||||||
because that table holds onto it.}
|
because that table holds onto it.}
|
||||||
@item{Reachability is only approximate with the CGC collector (i.e.,
|
@item{Reachability is only approximate with the @tech{CGC} collector (i.e.,
|
||||||
a value may appear reachable to that collector when there is,
|
a value may appear reachable to that collector when there is,
|
||||||
in fact, no way to reach it anymore.}]
|
in fact, no way to reach it anymore.}]
|
||||||
|
|
||||||
|
@ -551,3 +577,53 @@ occurrence of the variable @racket[_fishes]. That constitutes
|
||||||
a reference to the list, ensuring that the list is not itself
|
a reference to the list, ensuring that the list is not itself
|
||||||
garbage collected, and thus the red fish is not either.
|
garbage collected, and thus the red fish is not either.
|
||||||
|
|
||||||
|
|
||||||
|
@section{Reducing Garbage Collection Pauses}
|
||||||
|
|
||||||
|
By default, Racket's @tech{generational garbage collector} creates
|
||||||
|
brief pauses for frequent @deftech{minor collections}, which inspect
|
||||||
|
only the most recently allocated objects, and long pauses for infrequent
|
||||||
|
@deftech{major collections}, which re-inspect all memory.
|
||||||
|
|
||||||
|
For some applications, such as animations and games,
|
||||||
|
long pauses due to a major collection can interfere
|
||||||
|
unacceptably with a program's operation. To reduce major-collection
|
||||||
|
pauses, the Racket garbage collector supports @deftech{incremental
|
||||||
|
garbage-collection} mode. In incremental mode, minor collections
|
||||||
|
create longer (but still relatively short) pauses by performing extra
|
||||||
|
work toward the next major collection. If all goes well, most of a
|
||||||
|
major collection's work has been performed by minor collections the
|
||||||
|
time that a major collection is needed, so the major collection's
|
||||||
|
pause is as short as a minor collection's pause. Incremental mode
|
||||||
|
tends to run more slowly overall, but it can
|
||||||
|
provide much more consistent real-time behavior.
|
||||||
|
|
||||||
|
If the @envvar{PLT_INCREMENTAL_GC} environment variable is set
|
||||||
|
to a value that starts with @litchar{1}, @litchar{y}, or @litchar{Y}
|
||||||
|
when Racket starts, incremental mode is permanently enabled. Since
|
||||||
|
incremental mode is only useful for certain parts of some programs,
|
||||||
|
however, and since the need for incremental mode is a property of a
|
||||||
|
program rather than its environment, the preferred way to enable
|
||||||
|
incremental mode is with @racket[(collect-garbage 'incremental)].
|
||||||
|
|
||||||
|
Calling @racket[(collect-garbage 'incremental)] does not perform an
|
||||||
|
immediate garbage collection, but instead requests that each minor
|
||||||
|
collection perform incremental work up to the next major collection.
|
||||||
|
The request expires with the next major collection. Make a call to
|
||||||
|
@racket[(collect-garbage 'incremental)] in any repeating task within
|
||||||
|
an application that needs to be responsive in real time. Force a
|
||||||
|
full collection with @racket[(collect-garbage)] just before an initial
|
||||||
|
@racket[(collect-garbage 'incremental)] to initiate incremental mode
|
||||||
|
from an optimal state.
|
||||||
|
|
||||||
|
To check whether incremental mode is use and how it affects pause
|
||||||
|
times, enable @tt{debug}-level logging output for the
|
||||||
|
@racketidfont{GC} topic. For example,
|
||||||
|
|
||||||
|
@commandline{racket -W "debuG@"@"GC error" main.rkt}
|
||||||
|
|
||||||
|
runs @filepath{main.rkt} with garbage-collection logging to stderr
|
||||||
|
(while preserving @tt{error}-level logging for all topics). Minor
|
||||||
|
collections are reported by @litchar{min} lines, increment-mode minor
|
||||||
|
collection are reported with @litchar{mIn} lines, and major
|
||||||
|
collections are reported with @litchar{MAJ} lines.
|
||||||
|
|
|
@ -67,13 +67,8 @@ to the same binding:
|
||||||
(free-identifier=? #'car #'car)
|
(free-identifier=? #'car #'car)
|
||||||
(require (only-in racket/base [car also-car]))
|
(require (only-in racket/base [car also-car]))
|
||||||
(free-identifier=? #'car #'also-car)
|
(free-identifier=? #'car #'also-car)
|
||||||
(free-identifier=? #'car (let ([car 8])
|
|
||||||
#'car))
|
|
||||||
]
|
]
|
||||||
|
|
||||||
The last example above, in particular, illustrates how syntax objects
|
|
||||||
preserve lexical-context information.
|
|
||||||
|
|
||||||
To see the lists, symbols, numbers, @|etc| within a syntax object, use
|
To see the lists, symbols, numbers, @|etc| within a syntax object, use
|
||||||
@racket[syntax->datum]:
|
@racket[syntax->datum]:
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
@title[#:tag "hash-reader"]{Reader Extensions}
|
@title[#:tag "hash-reader"]{Reader Extensions}
|
||||||
|
|
||||||
|
@refdetails["parse-reader"]{reader extensions}
|
||||||
|
|
||||||
The @tech{reader} layer of the Racket language can be extended through
|
The @tech{reader} layer of the Racket language can be extended through
|
||||||
the @racketmetafont{#reader} form. A reader extension is implemented
|
the @racketmetafont{#reader} form. A reader extension is implemented
|
||||||
as a module that is named after @racketmetafont{#reader}. The module
|
as a module that is named after @racketmetafont{#reader}. The module
|
||||||
|
|
|
@ -603,7 +603,7 @@ As a form for modularity, @racket[unit] complements @racket[module]:
|
||||||
]
|
]
|
||||||
|
|
||||||
The @racket[lambda] and @racket[class] forms, among others, also allow
|
The @racket[lambda] and @racket[class] forms, among others, also allow
|
||||||
paremetrization of code with respect to values that are chosen
|
parameterization of code with respect to values that are chosen
|
||||||
later. In principle, any of those could be implemented in terms of any
|
later. In principle, any of those could be implemented in terms of any
|
||||||
of the others. In practice, each form offers certain
|
of the others. In practice, each form offers certain
|
||||||
conveniences---such as allowing overriding of methods or especially
|
conveniences---such as allowing overriding of methods or especially
|
||||||
|
|
|
@ -204,7 +204,7 @@ To package the program as an executable, you have a few options:
|
||||||
@; ----------------------------------------------------------------------
|
@; ----------------------------------------------------------------------
|
||||||
@section[#:tag "use-module"]{A Note to Readers with Lisp/Scheme Experience}
|
@section[#:tag "use-module"]{A Note to Readers with Lisp/Scheme Experience}
|
||||||
|
|
||||||
If you already know something about Racket or Lisp, you might be
|
If you already know something about Scheme or Lisp, you might be
|
||||||
tempted to put just
|
tempted to put just
|
||||||
|
|
||||||
@racketblock[
|
@racketblock[
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require "utils.rkt")
|
@(require "utils.rkt"
|
||||||
|
scribble/bnf)
|
||||||
|
|
||||||
@(define cgc-v-3m "CGC versus 3m")
|
@(define cgc-v-3m "CGC versus 3m")
|
||||||
|
|
||||||
|
@ -10,7 +11,8 @@
|
||||||
The Racket run-time system can be embedded into a larger program. The
|
The Racket run-time system can be embedded into a larger program. The
|
||||||
embedding process for Racket CGC or Racket 3m (see @secref[cgc-v-3m])
|
embedding process for Racket CGC or Racket 3m (see @secref[cgc-v-3m])
|
||||||
is essentially the same, but the process for Racket 3m is most easily
|
is essentially the same, but the process for Racket 3m is most easily
|
||||||
understood as a variant of the process for Racket CGC.
|
understood as a variant of the process for Racket CGC (even though
|
||||||
|
Racket 3m is the standard variant of Racket).
|
||||||
|
|
||||||
@section{CGC Embedding}
|
@section{CGC Embedding}
|
||||||
|
|
||||||
|
@ -87,7 +89,7 @@ To embed Racket CGC in a program, follow these steps:
|
||||||
@cpp{scheme_main_stack_setup} trampoline registers the C stack with
|
@cpp{scheme_main_stack_setup} trampoline registers the C stack with
|
||||||
the memory manager without creating a namespace.)
|
the memory manager without creating a namespace.)
|
||||||
|
|
||||||
On 32-bit Windows, when support for parallelism is enabled in the Racket
|
On Windows, when support for parallelism is enabled in the Racket
|
||||||
build (as is the default), then before calling
|
build (as is the default), then before calling
|
||||||
@cpp{scheme_main_setup}, your embedding application must first call
|
@cpp{scheme_main_setup}, your embedding application must first call
|
||||||
@cppi{scheme_register_tls_space}:
|
@cppi{scheme_register_tls_space}:
|
||||||
|
@ -101,7 +103,12 @@ To embed Racket CGC in a program, follow these steps:
|
||||||
|
|
||||||
@verbatim[#:indent 2]{
|
@verbatim[#:indent 2]{
|
||||||
static __declspec(thread) void *tls_space;
|
static __declspec(thread) void *tls_space;
|
||||||
}}
|
}
|
||||||
|
|
||||||
|
@history[#:changed "6.3" @elem{Calling @cpp{scheme_register_tls_space} is
|
||||||
|
required on all Windows variants, although the call
|
||||||
|
may be a no-op, depending on how Racket is
|
||||||
|
built.}]}
|
||||||
|
|
||||||
@item{Configure the namespace by adding module declarations. The
|
@item{Configure the namespace by adding module declarations. The
|
||||||
initial namespace contains declarations only for a few primitive
|
initial namespace contains declarations only for a few primitive
|
||||||
|
@ -109,16 +116,28 @@ To embed Racket CGC in a program, follow these steps:
|
||||||
into the top-level environment.
|
into the top-level environment.
|
||||||
|
|
||||||
To embed a module like @racketmodname[racket/base] (along with all
|
To embed a module like @racketmodname[racket/base] (along with all
|
||||||
its dependencies), use @exec{raco ctool --c-mods}, which generates a C file
|
its dependencies), use
|
||||||
|
@seclink["c-mods" #:doc raco-doc]{@exec{raco ctool --c-mods @nonterm{dest}}},
|
||||||
|
which generates a C file @nonterm{dest}
|
||||||
that contains modules in bytecode form as encapsulated in a static
|
that contains modules in bytecode form as encapsulated in a static
|
||||||
array. The generated C file defines a @cppi{declare_modules}
|
array. The generated C file defines a @cppi{declare_modules}
|
||||||
function that takes a @cpp{Scheme_Env*}, installs the modules into
|
function that takes a @cpp{Scheme_Env*}, installs the modules into
|
||||||
the environment, and adjusts the module name resolver to access the
|
the environment, and adjusts the module name resolver to access the
|
||||||
embedded declarations.
|
embedded declarations. If embedded modules refer to runtime files
|
||||||
|
that need to be carried along, supply @DFlag{runtime} to
|
||||||
|
@exec{raco ctool --c-mods} to collect the runtime files into a
|
||||||
|
directory; see @secref[#:doc raco-doc "c-mods"] for more information.
|
||||||
|
|
||||||
Alternately, use @cpp{scheme_set_collects_path} and
|
Alternatively, use @cpp{scheme_set_collects_path} and
|
||||||
@cpp{scheme_init_collection_paths} to configure and install a path
|
@cpp{scheme_init_collection_paths} to configure and install a path
|
||||||
for finding modules at run time.}
|
for finding modules at run time.
|
||||||
|
|
||||||
|
On Windows, @exec{raco ctool --c-mods @nonterm{dest} --runtime
|
||||||
|
@nonterm{dest-dir}} includes in @nonterm{dest-dir} optional DLLs
|
||||||
|
that are referenced by the Racket library to support @tech[#:doc
|
||||||
|
reference-doc]{extflonums} and @racket[bytes-open-converter]. Call
|
||||||
|
@cpp{scheme_set_dll_path} to register @nonterm{dest-dir} so that
|
||||||
|
those DLLs can be found at run time.}
|
||||||
|
|
||||||
@item{Access Racket through @cppi{scheme_dynamic_require},
|
@item{Access Racket through @cppi{scheme_dynamic_require},
|
||||||
@cppi{scheme_load}, @cppi{scheme_eval}, and/or other functions
|
@cppi{scheme_load}, @cppi{scheme_eval}, and/or other functions
|
||||||
|
@ -163,6 +182,7 @@ static int run(Scheme_Env *e, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Scheme_Object *curout;
|
Scheme_Object *curout;
|
||||||
int i;
|
int i;
|
||||||
|
Scheme_Thread *th;
|
||||||
mz_jmp_buf * volatile save, fresh;
|
mz_jmp_buf * volatile save, fresh;
|
||||||
|
|
||||||
/* Declare embedded modules in "base.c": */
|
/* Declare embedded modules in "base.c": */
|
||||||
|
@ -173,11 +193,13 @@ static int run(Scheme_Env *e, int argc, char *argv[])
|
||||||
curout = scheme_get_param(scheme_current_config(),
|
curout = scheme_get_param(scheme_current_config(),
|
||||||
MZCONFIG_OUTPUT_PORT);
|
MZCONFIG_OUTPUT_PORT);
|
||||||
|
|
||||||
|
th = scheme_get_current_thread();
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
save = scheme_current_thread->error_buf;
|
save = th->error_buf;
|
||||||
scheme_current_thread->error_buf = &fresh;
|
th->error_buf = &fresh;
|
||||||
if (scheme_setjmp(scheme_error_buf)) {
|
if (scheme_setjmp(*th->error_buf)) {
|
||||||
scheme_current_thread->error_buf = save;
|
th->error_buf = save;
|
||||||
return -1; /* There was an error */
|
return -1; /* There was an error */
|
||||||
} else {
|
} else {
|
||||||
Scheme_Object *v, *a[2];
|
Scheme_Object *v, *a[2];
|
||||||
|
@ -188,7 +210,7 @@ static int run(Scheme_Env *e, int argc, char *argv[])
|
||||||
a[0] = scheme_intern_symbol("racket/base");
|
a[0] = scheme_intern_symbol("racket/base");
|
||||||
a[1] = scheme_intern_symbol("read-eval-print-loop");
|
a[1] = scheme_intern_symbol("read-eval-print-loop");
|
||||||
scheme_apply(scheme_dynamic_require(2, a), 0, NULL);
|
scheme_apply(scheme_dynamic_require(2, a), 0, NULL);
|
||||||
scheme_current_thread->error_buf = save;
|
th->error_buf = save;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -200,6 +222,16 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
If modules embedded in the executable need to access runtime files
|
||||||
|
(via @racketmodname[racket/runtime-path] forms), supply the
|
||||||
|
@DFlag{runtime} flag to @exec{raco ctool}, specifying a directory
|
||||||
|
where the runtime files are to be gathered. The modules in the
|
||||||
|
generated @filepath{.c} file will then refer to the files in that
|
||||||
|
directory; the directory is normally specified relative to the
|
||||||
|
executable, but the embedding application must call
|
||||||
|
@cppi{scheme_set_exec_cmd} to set the executable path (typically
|
||||||
|
@cpp{argv[0]}) before declaring modules.
|
||||||
|
|
||||||
On Mac OS X, or on Windows when Racket is compiled to a DLL
|
On Mac OS X, or on Windows when Racket is compiled to a DLL
|
||||||
using Cygwin, the garbage collector cannot find static variables
|
using Cygwin, the garbage collector cannot find static variables
|
||||||
automatically. In that case, @cppi{scheme_main_setup} must be called with a
|
automatically. In that case, @cppi{scheme_main_setup} must be called with a
|
||||||
|
@ -279,15 +311,17 @@ static int run(Scheme_Env *e, int argc, char *argv[])
|
||||||
Scheme_Object *curout = NULL, *v = NULL, *a[2] = {NULL, NULL};
|
Scheme_Object *curout = NULL, *v = NULL, *a[2] = {NULL, NULL};
|
||||||
Scheme_Config *config = NULL;
|
Scheme_Config *config = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
Scheme_Thread *th = NULL;
|
||||||
mz_jmp_buf * volatile save = NULL, fresh;
|
mz_jmp_buf * volatile save = NULL, fresh;
|
||||||
|
|
||||||
MZ_GC_DECL_REG(8);
|
MZ_GC_DECL_REG(9);
|
||||||
MZ_GC_VAR_IN_REG(0, e);
|
MZ_GC_VAR_IN_REG(0, e);
|
||||||
MZ_GC_VAR_IN_REG(1, curout);
|
MZ_GC_VAR_IN_REG(1, curout);
|
||||||
MZ_GC_VAR_IN_REG(2, save);
|
MZ_GC_VAR_IN_REG(2, save);
|
||||||
MZ_GC_VAR_IN_REG(3, config);
|
MZ_GC_VAR_IN_REG(3, config);
|
||||||
MZ_GC_VAR_IN_REG(4, v);
|
MZ_GC_VAR_IN_REG(4, v);
|
||||||
MZ_GC_ARRAY_VAR_IN_REG(5, a, 2);
|
MZ_GC_VAR_IN_REG(5, th);
|
||||||
|
MZ_GC_ARRAY_VAR_IN_REG(6, a, 2);
|
||||||
|
|
||||||
MZ_GC_REG();
|
MZ_GC_REG();
|
||||||
|
|
||||||
|
@ -299,11 +333,13 @@ static int run(Scheme_Env *e, int argc, char *argv[])
|
||||||
config = scheme_current_config();
|
config = scheme_current_config();
|
||||||
curout = scheme_get_param(config, MZCONFIG_OUTPUT_PORT);
|
curout = scheme_get_param(config, MZCONFIG_OUTPUT_PORT);
|
||||||
|
|
||||||
|
th = scheme_get_current_thread();
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
save = scheme_current_thread->error_buf;
|
save = th->error_buf;
|
||||||
scheme_current_thread->error_buf = &fresh;
|
th->error_buf = &fresh;
|
||||||
if (scheme_setjmp(scheme_error_buf)) {
|
if (scheme_setjmp(*th->error_buf)) {
|
||||||
scheme_current_thread->error_buf = save;
|
th->error_buf = save;
|
||||||
return -1; /* There was an error */
|
return -1; /* There was an error */
|
||||||
} else {
|
} else {
|
||||||
v = scheme_eval_string(argv[i], e);
|
v = scheme_eval_string(argv[i], e);
|
||||||
|
@ -315,7 +351,7 @@ static int run(Scheme_Env *e, int argc, char *argv[])
|
||||||
a[1] = scheme_intern_symbol("read-eval-print-loop");
|
a[1] = scheme_intern_symbol("read-eval-print-loop");
|
||||||
v = scheme_dynamic_require(2, a);
|
v = scheme_dynamic_require(2, a);
|
||||||
scheme_apply(v, 0, NULL);
|
scheme_apply(v, 0, NULL);
|
||||||
scheme_current_thread->error_buf = save;
|
th->error_buf = save;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,7 @@ which case the @DFlag{xform} step should be skipped.
|
||||||
|
|
||||||
To create an extension that behaves as a module, return a symbol from
|
To create an extension that behaves as a module, return a symbol from
|
||||||
@cpp{scheme_module_name}, and have @cpp{scheme_initialize} and
|
@cpp{scheme_module_name}, and have @cpp{scheme_initialize} and
|
||||||
@cpp{scheme_rename} declare a module using @cpp{scheme_primitive_module}.
|
@cpp{scheme_reload} declare a module using @cpp{scheme_primitive_module}.
|
||||||
|
|
||||||
For example, the following extension implements a module named
|
For example, the following extension implements a module named
|
||||||
@racket[hello] that exports a binding @racket[greeting]:
|
@racket[hello] that exports a binding @racket[greeting]:
|
||||||
|
|
|
@ -64,6 +64,13 @@ Sets the path to be returned by @racket[(find-system-path
|
||||||
'addon-dir)].}
|
'addon-dir)].}
|
||||||
|
|
||||||
|
|
||||||
|
@function[(void scheme_set_exec_cmd
|
||||||
|
[const-char* path])]{
|
||||||
|
|
||||||
|
Sets the path to be returned by @racket[(find-system-path
|
||||||
|
'exec-file)].}
|
||||||
|
|
||||||
|
|
||||||
@function[(void scheme_init_collection_paths_post
|
@function[(void scheme_init_collection_paths_post
|
||||||
[Scheme_Env* env]
|
[Scheme_Env* env]
|
||||||
[Scheme_Object* pre_extra_paths]
|
[Scheme_Object* pre_extra_paths]
|
||||||
|
@ -84,6 +91,15 @@ Like @cpp{scheme_init_collection_paths_post}, but with @racket[null]
|
||||||
as the last argument.}
|
as the last argument.}
|
||||||
|
|
||||||
|
|
||||||
|
@function[(void scheme_set_dll_path
|
||||||
|
[wchar_t* path])]{
|
||||||
|
|
||||||
|
On Windows only, sets the path used to find optional DLLs that are used
|
||||||
|
by the runtime system: @filepath{longdouble.dll} and one of @filepath{iconv.dll},
|
||||||
|
@filepath{libiconv.dll}, or @filepath{libiconv-2.dll}. The given @var{path}
|
||||||
|
should be an absolute path.}
|
||||||
|
|
||||||
|
|
||||||
@function[(void scheme_seal_parameters)]{
|
@function[(void scheme_seal_parameters)]{
|
||||||
|
|
||||||
Takes a snapshot of the current values of built-in parameters. These
|
Takes a snapshot of the current values of built-in parameters. These
|
||||||
|
|
|
@ -196,28 +196,28 @@ A size procedure simply takes a pointer to an object with the tag and
|
||||||
returns its size in words (not bytes). The @cppi{gcBYTES_TO_WORDS}
|
returns its size in words (not bytes). The @cppi{gcBYTES_TO_WORDS}
|
||||||
macro converts a byte count to a word count.
|
macro converts a byte count to a word count.
|
||||||
|
|
||||||
A mark procedure is used to trace references among objects without
|
A mark procedure is used to trace references among objects. The
|
||||||
moving any objects. The procedure takes a pointer to an object, and it
|
procedure takes a pointer to an object, and it should apply the
|
||||||
should apply the @cppi{gcMARK} macro to every pointer within the
|
@cppi{gcMARK} macro to every pointer within the object. The mark
|
||||||
object. The mark procedure should return the same result as the size
|
procedure should return the same result as the size procedure.
|
||||||
procedure.
|
|
||||||
|
|
||||||
A fixup procedure is used to update references to objects after or
|
A fixup procedure is potentially used to update references to objects
|
||||||
while they are moved. The procedure takes a pointer to an object, and
|
that have moved, although the mark procedure may have moved objects
|
||||||
it should apply the @cppi{gcFIXUP} macro to every pointer within the
|
and updated references already. The fixup procedure takes a pointer to
|
||||||
object; the expansion of this macro takes the address of its
|
an object, and it should apply the @cppi{gcFIXUP} macro to every
|
||||||
argument. The fixup procedure should return the same result as the
|
pointer within the object. The fixup procedure should return the same
|
||||||
size procedure.
|
result as the size procedure.
|
||||||
|
|
||||||
Depending on the collector's implementation, the mark or fixup
|
Depending on the collector's implementation, the @cpp{gcMARK} and/or
|
||||||
procedure might not be used. For example, the collector may only use
|
@cpp{gcFIXUP} macros may take take the address of their arguments, and
|
||||||
the mark procedure and not actually move the object. Or it may use the
|
the fixup procedure might not be used. For example, the collector may
|
||||||
fixup procedure to mark and move objects at the same time. To
|
only use the mark procedure and not actually move the object. Or it
|
||||||
dereference an object pointer during a fixup procedure, use
|
may use mark to move objects at the same time. To dereference an
|
||||||
|
object pointer during a mark or fixup procedure, use @cppi{GC_resolve}
|
||||||
|
to convert a potentially old address to the location where the object
|
||||||
|
has been moved. To dereference an object pointer during a fixup procedure, use
|
||||||
@cppi{GC_fixup_self} to convert the address passed to the procedure to
|
@cppi{GC_fixup_self} to convert the address passed to the procedure to
|
||||||
refer to the potentially moved object, and use @cppi{GC_resolve} to
|
refer to the potentially moved object.
|
||||||
convert an address that is not yet fixed up to determine the object's
|
|
||||||
current location.
|
|
||||||
|
|
||||||
When allocating a tagged object in 3m, the tag must be installed
|
When allocating a tagged object in 3m, the tag must be installed
|
||||||
immediately after the object is allocated---or, at least, before the
|
immediately after the object is allocated---or, at least, before the
|
||||||
|
@ -899,7 +899,7 @@ overflow.}
|
||||||
[void* ptr]
|
[void* ptr]
|
||||||
[int tls_index])]{
|
[int tls_index])]{
|
||||||
|
|
||||||
Only available on 32-bit Windows; registers @var{ptr} as the address of a
|
For Windows, registers @var{ptr} as the address of a
|
||||||
thread-local pointer variable that is declared in the main
|
thread-local pointer variable that is declared in the main
|
||||||
executable. The variable's storage will be used to implement
|
executable. The variable's storage will be used to implement
|
||||||
thread-local storage within the Racket run-time. See
|
thread-local storage within the Racket run-time. See
|
||||||
|
@ -908,7 +908,10 @@ Only available on 32-bit Windows; registers @var{ptr} as the address of a
|
||||||
The @var{tls_index} argument must be @cpp{0}. It is currently
|
The @var{tls_index} argument must be @cpp{0}. It is currently
|
||||||
ignored, but a future version may use the argument to allow
|
ignored, but a future version may use the argument to allow
|
||||||
declaration of the thread-local variable in a dynamically linked
|
declaration of the thread-local variable in a dynamically linked
|
||||||
DLL.}
|
DLL.
|
||||||
|
|
||||||
|
@history[#:changed "6.3" @elem{Changed from available only on 32-bit Windows
|
||||||
|
to available on all Windows variants.}]}
|
||||||
|
|
||||||
@function[(void scheme_register_static
|
@function[(void scheme_register_static
|
||||||
[void* ptr]
|
[void* ptr]
|
||||||
|
@ -1106,9 +1109,7 @@ If the result of the size procedure is a constant, then pass a
|
||||||
|
|
||||||
3m only. Can be called by a size, mark, or fixup procedure that is registered
|
3m only. Can be called by a size, mark, or fixup procedure that is registered
|
||||||
with @cpp{GC_register_traversers}. It returns the current address of
|
with @cpp{GC_register_traversers}. It returns the current address of
|
||||||
an object @var{p} that might have been moved already, where @var{p}
|
an object @var{p} that might have been moved already. This translation is necessary, for
|
||||||
corresponds to an object that is referenced directly by the object
|
|
||||||
being sized, marked, or fixed. This translation is necessary, for
|
|
||||||
example, if the size or structure of an object depends on the content
|
example, if the size or structure of an object depends on the content
|
||||||
of an object it references. For example, the size of a class instance
|
of an object it references. For example, the size of a class instance
|
||||||
usually depends on a field count that is stored in the class. A fixup
|
usually depends on a field count that is stored in the class. A fixup
|
||||||
|
@ -1120,13 +1121,58 @@ fixing it.}
|
||||||
|
|
||||||
3m only. Can be called by a fixup procedure that is registered with
|
3m only. Can be called by a fixup procedure that is registered with
|
||||||
@cpp{GC_register_traversers}. It returns the final address of @var{p},
|
@cpp{GC_register_traversers}. It returns the final address of @var{p},
|
||||||
which must be the pointer passed to the fixup procedure. For some
|
which must be the pointer passed to the fixup procedure. The
|
||||||
|
@cpp{GC_resolve} function would produce the same result, but
|
||||||
|
@cpp{GC_fixup_self} may be more efficient. For some
|
||||||
implementations of the memory manager, the result is the same as
|
implementations of the memory manager, the result is the same as
|
||||||
@var{p}, either because objects are not moved or because the object is
|
@var{p}, either because objects are not moved or because the object is
|
||||||
moved before it is fixed. With other implementations, an object might
|
moved before it is fixed. With other implementations, an object might
|
||||||
be moved after the fixup process, and the result is the location that
|
be moved after the fixup process, and the result is the location that
|
||||||
the object will have after garbage collection finished.}
|
the object will have after garbage collection finished.}
|
||||||
|
|
||||||
|
|
||||||
|
@function[(void scheme_register_type_gc_shape [short type]
|
||||||
|
[intptr_t* shape])]{
|
||||||
|
|
||||||
|
Like @cpp{GC_register_traversers}, but using a set of predefined
|
||||||
|
functions that interpret @var{shape} to traverse a value. The
|
||||||
|
@var{shape} array is a sequence of commands terminated with
|
||||||
|
@cpp{SCHEME_GC_SHAPE_TERM}, where each command has a single argument.
|
||||||
|
|
||||||
|
Commands:
|
||||||
|
|
||||||
|
@itemlist[
|
||||||
|
|
||||||
|
@item{@tt{#define @cppdef{SCHEME_GC_SHAPE_TERM} 0} --- the terminator
|
||||||
|
command, which has no argument.}
|
||||||
|
|
||||||
|
@item{@tt{#define @cppdef{SCHEME_GC_SHAPE_PTR_OFFSET} 1} ---
|
||||||
|
specifies that a object tagged with @var{type} has a pointer
|
||||||
|
to be made visible to the garbage collector, where the command
|
||||||
|
argument is the offset from the beginning of the object.}
|
||||||
|
|
||||||
|
@item{@tt{#define @cppdef{SCHEME_GC_SHAPE_ADD_SIZE} 2} --- specifies
|
||||||
|
the allocated size of an object tagged with @var{type},
|
||||||
|
where the command argument is an amount to add to an
|
||||||
|
accumulated size; currently, size information is not used, but
|
||||||
|
it may be needed with future implementations of the garbage
|
||||||
|
collector.}
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
To improve forward compatibility, any other command is assumed to take
|
||||||
|
a single argument and is ignored.
|
||||||
|
|
||||||
|
A GC-shape registration is place-specific, even though
|
||||||
|
@cpp{scheme_make_type} creates a type tag that spans places. If a
|
||||||
|
traversal is already installed for @cpp{type} in the current place,
|
||||||
|
the old traversal specification is replaced. The
|
||||||
|
@cpp{scheme_register_type_gc_shape} function keeps its own copy of the
|
||||||
|
array @var{shape}, so the array need not be retained.
|
||||||
|
|
||||||
|
@history[#:added "6.4.0.10"]}
|
||||||
|
|
||||||
|
|
||||||
@function[(Scheme_Object* scheme_add_gc_callback [Scheme_Object* pre_desc]
|
@function[(Scheme_Object* scheme_add_gc_callback [Scheme_Object* pre_desc]
|
||||||
[Scheme_Object* post_desc])]{
|
[Scheme_Object* post_desc])]{
|
||||||
|
|
||||||
|
|
|
@ -364,10 +364,12 @@ any place.}
|
||||||
[void* val])]{
|
[void* val])]{
|
||||||
|
|
||||||
Gets or sets a value in a process-global table (i.e., shared across
|
Gets or sets a value in a process-global table (i.e., shared across
|
||||||
multiple places, if any). If @var{val} is NULL, the current mapping
|
multiple places, if any). If @var{val} is @cpp{NULL}, the current mapping
|
||||||
for @var{key} is given, otherwise @var{val} is installed as the value
|
for @var{key} is given. If @var{val} is not @cpp{NULL}, and no value has been
|
||||||
for @var{key} and @cpp{NULL} is returned. The given @var{val} must not
|
installed for that @var{key}, then the value is installed and @cpp{NULL} is returned. If a
|
||||||
refer to garbage-collected memory.
|
value has already been installed, then no new value is installed and the old
|
||||||
|
value is returned. The given @var{val} must not refer to garbage-collected
|
||||||
|
memory.
|
||||||
|
|
||||||
This function is intended for infrequent use with a small number of
|
This function is intended for infrequent use with a small number of
|
||||||
keys.}
|
keys.}
|
||||||
|
|
|
@ -41,7 +41,7 @@ source distribution from @url{http://download.racket-lang.org};
|
||||||
detailed build instructions are in the @filepath{README} file in the
|
detailed build instructions are in the @filepath{README} file in the
|
||||||
top-level @filepath{src} directory. You can also get the latest
|
top-level @filepath{src} directory. You can also get the latest
|
||||||
sources from the @tt{git} repository at
|
sources from the @tt{git} repository at
|
||||||
@url{https://github.com/plt/racket}, but beware that the repository is
|
@url{https://github.com/racket/racket}, but beware that the repository is
|
||||||
one step away from a normal source distribution, and it provides build
|
one step away from a normal source distribution, and it provides build
|
||||||
modes that are more suitable for developing Racket itself; see
|
modes that are more suitable for developing Racket itself; see
|
||||||
@filepath{INSTALL.txt} in the @tt{git} repository for more
|
@filepath{INSTALL.txt} in the @tt{git} repository for more
|
||||||
|
|
|
@ -45,6 +45,13 @@ through the following indices:
|
||||||
@item{@cppdef{MZCONFIG_CAN_READ_COMPILED} --- @racket[read-accept-compiled]}
|
@item{@cppdef{MZCONFIG_CAN_READ_COMPILED} --- @racket[read-accept-compiled]}
|
||||||
@item{@cppdef{MZCONFIG_CAN_READ_BOX} --- @racket[read-accept-box]}
|
@item{@cppdef{MZCONFIG_CAN_READ_BOX} --- @racket[read-accept-box]}
|
||||||
@item{@cppdef{MZCONFIG_CAN_READ_PIPE_QUOTE} --- @racket[read-accept-bar-quote]}
|
@item{@cppdef{MZCONFIG_CAN_READ_PIPE_QUOTE} --- @racket[read-accept-bar-quote]}
|
||||||
|
@item{@cppdef{MZCONFIG_CAN_READ_DOT} --- @racket[read-accept-dot]}
|
||||||
|
@item{@cppdef{MZCONFIG_CAN_READ_INFIX_DOT} --- @racket[read-accept-infix-dot]}
|
||||||
|
@item{@cppdef{MZCONFIG_CAN_READ_QUASI} --- @racket[read-accept-quasiquote]}
|
||||||
|
@item{@cppdef{MZCONFIG_CAN_READ_READER} --- @racket[read-accept-reader]}
|
||||||
|
@item{@cppdef{MZCONFIG_CAN_READ_LANG} --- @racket[read-accept-lang]}
|
||||||
|
@item{@cppdef{MZCONFIG_READ_DECIMAL_INEXACT} --- @racket[read-decimal-as-inexact]}
|
||||||
|
@item{@cppdef{MZCONFIG_READ_CDOT} --- @racket[read-cdot]}
|
||||||
|
|
||||||
@item{@cppdef{MZCONFIG_PRINT_GRAPH} --- @racket[print-graph]}
|
@item{@cppdef{MZCONFIG_PRINT_GRAPH} --- @racket[print-graph]}
|
||||||
@item{@cppdef{MZCONFIG_PRINT_STRUCT} --- @racket[print-struct]}
|
@item{@cppdef{MZCONFIG_PRINT_STRUCT} --- @racket[print-struct]}
|
||||||
|
@ -53,6 +60,8 @@ through the following indices:
|
||||||
@item{@cppdef{MZCONFIG_CASE_SENS} --- @racket[read-case-sensitive]}
|
@item{@cppdef{MZCONFIG_CASE_SENS} --- @racket[read-case-sensitive]}
|
||||||
@item{@cppdef{MZCONFIG_SQUARE_BRACKETS_ARE_PARENS} --- @racket[read-square-brackets-as-parens]}
|
@item{@cppdef{MZCONFIG_SQUARE_BRACKETS_ARE_PARENS} --- @racket[read-square-brackets-as-parens]}
|
||||||
@item{@cppdef{MZCONFIG_CURLY_BRACES_ARE_PARENS} --- @racket[read-curly-braces-as-parens]}
|
@item{@cppdef{MZCONFIG_CURLY_BRACES_ARE_PARENS} --- @racket[read-curly-braces-as-parens]}
|
||||||
|
@item{@cppdef{MZCONFIG_SQUARE_BRACKETS_ARE_TAGGED} --- @racket[read-square-brackets-with-tag]}
|
||||||
|
@item{@cppdef{MZCONFIG_CURLY_BRACES_ARE_TAGGED} --- @racket[read-curly-braces-with-tag]}
|
||||||
|
|
||||||
@item{@cppdef{MZCONFIG_ERROR_PRINT_WIDTH} --- @racket[error-print-width]}
|
@item{@cppdef{MZCONFIG_ERROR_PRINT_WIDTH} --- @racket[error-print-width]}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@ Racket thread; all other threads are created through calls to
|
||||||
|
|
||||||
Information about each internal Racket thread is kept in a
|
Information about each internal Racket thread is kept in a
|
||||||
@cppi{Scheme_Thread} structure. A pointer to the current thread's
|
@cppi{Scheme_Thread} structure. A pointer to the current thread's
|
||||||
structure is available as @cppi{scheme_current_thread}. A
|
structure is available as @cppdef{scheme_current_thread} or
|
||||||
|
from @cppi{scheme_get_current_thread}. A
|
||||||
@cpp{Scheme_Thread} structure includes the following fields:
|
@cpp{Scheme_Thread} structure includes the following fields:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
@ -378,6 +379,12 @@ The following function @cpp{mzsleep} is an appropriate
|
||||||
|
|
||||||
@section{Thread Functions}
|
@section{Thread Functions}
|
||||||
|
|
||||||
|
@function[(Scheme_Thread* scheme_get_current_thread)]{
|
||||||
|
|
||||||
|
Returns the currently executing thread. The result is equivalent to
|
||||||
|
@cppi{scheme_current_thread}, but the function form must be used in
|
||||||
|
some embedding contexts.}
|
||||||
|
|
||||||
@function[(Scheme_Object* scheme_thread
|
@function[(Scheme_Object* scheme_thread
|
||||||
[Scheme_Object* thunk])]{
|
[Scheme_Object* thunk])]{
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
function subfunction
|
function subfunction
|
||||||
FormatD
|
FormatD
|
||||||
tech-place
|
tech-place
|
||||||
|
reference-doc raco-doc
|
||||||
(except-out (all-from-out scribble/manual) var)
|
(except-out (all-from-out scribble/manual) var)
|
||||||
(for-label (all-from-out scheme/base)))
|
(for-label (all-from-out scheme/base)))
|
||||||
|
|
||||||
|
@ -157,8 +158,11 @@
|
||||||
|
|
||||||
(define mzc (exec "raco ctool"))
|
(define mzc (exec "raco ctool"))
|
||||||
|
|
||||||
|
(define reference-doc '(lib "scribblings/reference/reference.scrbl"))
|
||||||
|
(define raco-doc '(lib "scribblings/raco/raco.scrbl"))
|
||||||
|
|
||||||
(define (refsecref s)
|
(define (refsecref s)
|
||||||
(secref #:doc '(lib "scribblings/reference/reference.scrbl") s))
|
(secref #:doc reference-doc s))
|
||||||
|
|
||||||
(define Racket
|
(define Racket
|
||||||
(other-manual '(lib "scribblings/reference/reference.scrbl")))
|
(other-manual '(lib "scribblings/reference/reference.scrbl")))
|
||||||
|
|
|
@ -296,6 +296,9 @@ There are six global constants:
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
In some embedding contexts, the function forms
|
||||||
|
@cppi{scheme_make_null}, etc., must be used, instead.
|
||||||
|
|
||||||
@; ----------------------------------------------------------------------
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
@section[#:tag "im:strings"]{Strings}
|
@section[#:tag "im:strings"]{Strings}
|
||||||
|
@ -325,6 +328,31 @@ For more fine-grained control over UTF-8 encoding, use the
|
||||||
|
|
||||||
@section{Value Functions}
|
@section{Value Functions}
|
||||||
|
|
||||||
|
@function[(Scheme_Object* scheme_make_null)]{
|
||||||
|
|
||||||
|
Returns @cppi{scheme_null}.
|
||||||
|
}
|
||||||
|
|
||||||
|
@function[(Scheme_Object* scheme_make_eof)]{
|
||||||
|
|
||||||
|
Returns @cppi{scheme_eof}.
|
||||||
|
}
|
||||||
|
|
||||||
|
@function[(Scheme_Object* scheme_make_true)]{
|
||||||
|
|
||||||
|
Returns @cppi{scheme_true}.
|
||||||
|
}
|
||||||
|
|
||||||
|
@function[(Scheme_Object* scheme_make_false)]{
|
||||||
|
|
||||||
|
Returns @cppi{scheme_false}.
|
||||||
|
}
|
||||||
|
|
||||||
|
@function[(Scheme_Object* scheme_make_void)]{
|
||||||
|
|
||||||
|
Returns @cppi{scheme_void}.
|
||||||
|
}
|
||||||
|
|
||||||
@function[(Scheme_Object* scheme_make_char
|
@function[(Scheme_Object* scheme_make_char
|
||||||
[mzchar ch])]{
|
[mzchar ch])]{
|
||||||
|
|
||||||
|
|
|
@ -747,7 +747,7 @@ import a library of control operators:
|
||||||
Specifically, we need @racket[prompt] and @racket[abort] from
|
Specifically, we need @racket[prompt] and @racket[abort] from
|
||||||
@racketmodname[racket/control]. We use @racket[prompt] to mark the
|
@racketmodname[racket/control]. We use @racket[prompt] to mark the
|
||||||
place where a servlet is started, so that we can abort a computation
|
place where a servlet is started, so that we can abort a computation
|
||||||
to that point. Change @racket[handle] by wrapping an @racket[prompt]
|
to that point. Change @racket[handle] by wrapping a @racket[prompt]
|
||||||
around the call to @racket[dispatch]:
|
around the call to @racket[dispatch]:
|
||||||
|
|
||||||
@racketblock[
|
@racketblock[
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
@(require scribble/manual
|
@(require scribble/manual
|
||||||
scribble/bnf
|
scribble/bnf
|
||||||
|
"common.rkt"
|
||||||
(for-label scheme/gui
|
(for-label scheme/gui
|
||||||
compiler/compiler
|
compiler/compiler
|
||||||
compiler/sig
|
compiler/sig
|
||||||
|
@ -12,7 +13,9 @@
|
||||||
dynext/compile-sig
|
dynext/compile-sig
|
||||||
dynext/link-sig
|
dynext/link-sig
|
||||||
dynext/file-sig
|
dynext/file-sig
|
||||||
launcher/launcher))
|
launcher/launcher
|
||||||
|
compiler/module-suffix
|
||||||
|
setup/getinfo))
|
||||||
|
|
||||||
@title{API for Raw Compilation}
|
@title{API for Raw Compilation}
|
||||||
|
|
||||||
|
@ -70,6 +73,7 @@ file is reported through the current output port.}
|
||||||
|
|
||||||
@defproc[(compile-collection-zos [collection string?] ...+
|
@defproc[(compile-collection-zos [collection string?] ...+
|
||||||
[#:skip-path skip-path (or/c path-string? #f) #f]
|
[#:skip-path skip-path (or/c path-string? #f) #f]
|
||||||
|
[#:skip-paths skip-paths (listof path-string?) null]
|
||||||
[#:skip-doc-sources? skip-docs? any/c #f]
|
[#:skip-doc-sources? skip-docs? any/c #f]
|
||||||
[#:managed-compile-zo managed-compile-zo
|
[#:managed-compile-zo managed-compile-zo
|
||||||
(path-string? . -> . void?)
|
(path-string? . -> . void?)
|
||||||
|
@ -83,8 +87,10 @@ The @filepath{.zo} files are placed into the collection's
|
||||||
|
|
||||||
By default, all files with the
|
By default, all files with the
|
||||||
extension @filepath{.rkt}, @filepath{.ss}, or @filepath{.scm} in a collection are
|
extension @filepath{.rkt}, @filepath{.ss}, or @filepath{.scm} in a collection are
|
||||||
compiled, as are all such files within subdirectories, execept that
|
compiled, as are all such files within subdirectories; the set of such suffixes
|
||||||
any file or directory whose path starts with @racket[skip-path] is
|
is extensible globally as described in @racket[get-module-suffixes], and
|
||||||
|
@racket[compile-collection-zos] recognizes suffixes from the @racket['libs] group. However,
|
||||||
|
any file or directory whose path starts with @racket[skip-path] or an element of @racket[skip-paths] is
|
||||||
skipped. (``Starts with'' means that the simplified path @racket[_p]'s
|
skipped. (``Starts with'' means that the simplified path @racket[_p]'s
|
||||||
byte-string form after @racket[(simplify-path _p #f)]starts with the
|
byte-string form after @racket[(simplify-path _p #f)]starts with the
|
||||||
byte-string form of @racket[(simplify-path skip-path #f)].)
|
byte-string form of @racket[(simplify-path skip-path #f)].)
|
||||||
|
@ -113,24 +119,33 @@ collection. The following fields are used:
|
||||||
field's value is @racket['all].}
|
field's value is @racket['all].}
|
||||||
|
|
||||||
@item{@indexed-racket[compile-omit-files] : A list of filenames (without
|
@item{@indexed-racket[compile-omit-files] : A list of filenames (without
|
||||||
directory paths); that are not compiled, in addition to the
|
directory paths) that are not compiled, in addition to the
|
||||||
contents of @racket[compile-omit-paths]. Do not use this
|
contents of @racket[compile-omit-paths]. Do not use this
|
||||||
field; it is for backward compatibility.}
|
field; it is for backward compatibility.}
|
||||||
|
|
||||||
@item{@indexed-racket[scribblings] : A list of pairs, each of which
|
@item{@indexed-racket[scribblings] : A list of pairs, each of which
|
||||||
starts with a path for documentation source. The sources (and
|
starts with a path for documentation source. The sources (and
|
||||||
the files that they require) are compiled in the same way as
|
the files that they require) are compiled in the same way as
|
||||||
@filepath{.rkt}, @filepath{.ss}, and @filepath{.scm} files,
|
other module files, unless @racket[skip-docs?] is a true value.}
|
||||||
unless the provided @racket[skip-docs?] argument is a true
|
|
||||||
value.}
|
|
||||||
|
|
||||||
]}
|
@item{@indexed-racket[compile-include-files] : A list of filenames (without
|
||||||
|
directory paths) to be compiled, in addition to files that
|
||||||
|
are compiled based on the file's extension, being in @racket[scribblings],
|
||||||
|
or being @racket[require]d by other compiled files.}
|
||||||
|
|
||||||
|
@item{@racket[module-suffixes] and @racket[doc-module-suffixes] ---
|
||||||
|
Used indirectly via @racket[get-module-suffixes].}
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
@history[#:changed "6.3" @elem{Added support for @racket[compile-include-files].}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(compile-directory-zos [path path-string?]
|
@defproc[(compile-directory-zos [path path-string?]
|
||||||
[info ()]
|
[info ()]
|
||||||
[#:verbose verbose? any/c #f]
|
[#:verbose verbose? any/c #f]
|
||||||
[#:skip-path skip-path (or/c path-string? #f) #f]
|
[#:skip-path skip-path (or/c path-string? #f) #f]
|
||||||
|
[#:skip-paths skip-paths (listof path-string?) null]
|
||||||
[#:skip-doc-sources? skip-docs? any/c #f]
|
[#:skip-doc-sources? skip-docs? any/c #f]
|
||||||
[#:managed-compile-zo managed-compile-zo
|
[#:managed-compile-zo managed-compile-zo
|
||||||
(path-string? . -> . void?)
|
(path-string? . -> . void?)
|
||||||
|
@ -142,6 +157,69 @@ rather than a collection. The @racket[info] function behaves like the
|
||||||
result of @racket[get-info] to supply @filepath{info.rkt} fields,
|
result of @racket[get-info] to supply @filepath{info.rkt} fields,
|
||||||
instead of using an @filepath{info.rkt} file (if any) in the directory.}
|
instead of using an @filepath{info.rkt} file (if any) in the directory.}
|
||||||
|
|
||||||
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@section[#:tag "module-suffix"]{Recognizing Module Suffixes}
|
||||||
|
|
||||||
|
@defmodule[compiler/module-suffix]{The
|
||||||
|
@racketmodname[compiler/module-suffix] library provides functions for
|
||||||
|
recognizing file suffixes that correspond to Racket modules for the
|
||||||
|
purposes of compiling files in a directory, running tests for files in
|
||||||
|
a directory, and so on. The set of suffixes always includes
|
||||||
|
@filepath{.rkt}, @filepath{.ss}, and @filepath{.scm}, but it can be
|
||||||
|
extended globally by @filepath{info.rkt} configuration in collections.}
|
||||||
|
|
||||||
|
@history[#:added "6.3"]
|
||||||
|
|
||||||
|
@defproc[(get-module-suffixes [#:group group (or/c 'all 'libs 'docs) 'all]
|
||||||
|
[#:mode mode (or/c 'preferred 'all-available 'no-planet 'no-user) 'preferred]
|
||||||
|
[#:namespace namespace (or/c #f namespace?) #f])
|
||||||
|
(listof bytes?)]{
|
||||||
|
|
||||||
|
Inspects @filepath{info.rkt} files (see @secref["info.rkt"]) of
|
||||||
|
installed collections to produce a list of file suffixes that should
|
||||||
|
be recognized as Racket modules. Each suffix is reported as a byte
|
||||||
|
string that does not include the @litchar{.} that precedes a suffix.
|
||||||
|
|
||||||
|
The @racket[mode] and @racket[namespace] arguments are propagated to
|
||||||
|
@racket[find-relevant-directories] to determine which collection
|
||||||
|
directories might configure the set of suffixes. Consequently, suffix
|
||||||
|
registrations are found reliably only if @exec{raco setup} (or package
|
||||||
|
installations or updates that trigger @exec{raco setup}) is run.
|
||||||
|
|
||||||
|
The @racket[group] argument determines whether the result includes all
|
||||||
|
registered suffixes, only those that are registered as general library
|
||||||
|
suffixes, or only those that are registered as documentation suffixes.
|
||||||
|
The set of general-library suffixes always includes @filepath{.rkt},
|
||||||
|
@filepath{.ss}, and @filepath{.scm}. The set of documentation suffixes
|
||||||
|
always includes @filepath{.scrbl}.
|
||||||
|
|
||||||
|
The following fields in an @filepath{info.rkt} file extend the set of
|
||||||
|
suffixes:
|
||||||
|
|
||||||
|
@itemize[
|
||||||
|
|
||||||
|
@item{@indexed-racket[module-suffixes] : A list of byte strings that
|
||||||
|
correspond to general-library module suffixes (without the
|
||||||
|
@litchar{.} that must appear before the suffix). Non-lists or
|
||||||
|
non-byte-string elements of the list are ignored.}
|
||||||
|
|
||||||
|
@item{@indexed-racket[doc-module-suffixes] : A list of byte strings
|
||||||
|
as for @racket[module-suffixes], but for documentation
|
||||||
|
modules.}
|
||||||
|
|
||||||
|
]}
|
||||||
|
|
||||||
|
@defproc[(get-module-suffix-regexp [#:group group (or/c 'all 'libs 'docs) 'all]
|
||||||
|
[#:mode mode (or/c 'preferred 'all-available 'no-planet 'no-user) 'preferred]
|
||||||
|
[#:namespace namespace (or/c #f namespace?) #f])
|
||||||
|
byte-regexp?]{
|
||||||
|
|
||||||
|
Returns a @tech[#:doc reference-doc]{regexp value} that matches paths ending
|
||||||
|
with a suffix as reported by @racket[get-module-suffixes]. The pattern
|
||||||
|
includes a subpatterns for the suffix without its leading @litchar{.}}
|
||||||
|
|
||||||
|
|
||||||
@; ----------------------------------------------------------------------
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
@section[#:tag "api:loading"]{Loading Compiler Support}
|
@section[#:tag "api:loading"]{Loading Compiler Support}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual "common.rkt")
|
@(require scribble/manual
|
||||||
|
"common.rkt"
|
||||||
|
scribble/bnf)
|
||||||
|
|
||||||
@title[#:tag "c-mods"]{Embedding Modules via C}
|
@title[#:tag "c-mods"]{Embedding Modules via C}
|
||||||
|
|
||||||
|
@ -14,3 +16,39 @@ a @tt{declare_modules} function that puts the module declarations into
|
||||||
a namespace. Thus, using the output of @exec{raco ctool --c-mods}, a
|
a namespace. Thus, using the output of @exec{raco ctool --c-mods}, a
|
||||||
program can embed Racket with a set of modules so that it does not
|
program can embed Racket with a set of modules so that it does not
|
||||||
need a @filepath{collects} directory to load modules at run time.
|
need a @filepath{collects} directory to load modules at run time.
|
||||||
|
|
||||||
|
If the embedded modules refer to runtime files, the files can be
|
||||||
|
gathers by supplying the @DFlag{runtime} argument to @exec{raco ctool
|
||||||
|
--cmods}, specifying a directory @nonterm{dir} to hold the files.
|
||||||
|
Normally, @nonterm{dir} is a relative path, and files are found at run
|
||||||
|
time in @nonterm{dir} relative to the executable, but a separate path
|
||||||
|
(usually relative) for run time can be specified with
|
||||||
|
@DFlag{runtime-access}.
|
||||||
|
|
||||||
|
|
||||||
|
Typically, @exec{raco ctool --c-mods} is used with @DPFlag{lib} to
|
||||||
|
specify a collection-based module path. For example,
|
||||||
|
|
||||||
|
@commandline{raco ctool --c-mods base.c ++lib racket/base}
|
||||||
|
|
||||||
|
generates a @filepath{base.c} whose @tt{declare_modules} function
|
||||||
|
makes @racketmodname[racket/base] available for use via the
|
||||||
|
@tt{scheme_namespace_require} or @tt{scheme_dynamic_require} functions
|
||||||
|
within the embedding application.
|
||||||
|
|
||||||
|
When a module file is provided to @exec{raco ctool --c-mods}, then
|
||||||
|
@tt{declare_modules} declares a module with the symbolic name of the
|
||||||
|
module file. For example,
|
||||||
|
|
||||||
|
@commandline{raco ctool --c-mods base.c hello.rkt}
|
||||||
|
|
||||||
|
creates a @tt{declare_modules} that defines the module
|
||||||
|
@racket['hello], which could be required into the current namespace
|
||||||
|
with @racket[(namespace-require ''hello)] or similarly at the C level:
|
||||||
|
|
||||||
|
@verbatim[#:indent 2]{
|
||||||
|
p = scheme_make_pair(scheme_intern_symbol("quote"),
|
||||||
|
scheme_make_pair(scheme_intern_symbol("hello"),
|
||||||
|
scheme_make_null()));
|
||||||
|
scheme_namespace_require(p);
|
||||||
|
}
|
||||||
|
|
|
@ -7,5 +7,8 @@
|
||||||
(define inside-doc
|
(define inside-doc
|
||||||
'(lib "scribblings/inside/inside.scrbl"))
|
'(lib "scribblings/inside/inside.scrbl"))
|
||||||
|
|
||||||
|
(define guide-doc
|
||||||
|
'(lib "scribblings/guide/guide.scrbl"))
|
||||||
|
|
||||||
(define reference-doc
|
(define reference-doc
|
||||||
'(lib "scribblings/reference/reference.scrbl"))
|
'(lib "scribblings/reference/reference.scrbl"))
|
||||||
|
|
|
@ -104,7 +104,10 @@ Many forms in the decompiled code, such as @racket[module],
|
||||||
|
|
||||||
@item{A form @racket[(#%apply-values _proc _expr)] is equivalent to
|
@item{A form @racket[(#%apply-values _proc _expr)] is equivalent to
|
||||||
@racket[(call-with-values (lambda () _expr) _proc)], but the run-time
|
@racket[(call-with-values (lambda () _expr) _proc)], but the run-time
|
||||||
system avoids allocating a closure for @racket[_expr].}
|
system avoids allocating a closure for @racket[_expr]. Similarly,
|
||||||
|
a @racket[#%call-with-immediate-continuation-mark] call is equivalent to
|
||||||
|
a @racket[call-with-immediate-continuation-mark] call, but avoiding
|
||||||
|
a closure allocation.}
|
||||||
|
|
||||||
@item{A @racket[define-values] form may have @racket[(begin
|
@item{A @racket[define-values] form may have @racket[(begin
|
||||||
'%%inline-variant%% _expr1 _expr2)] for its expression, in which case
|
'%%inline-variant%% _expr1 _expr2)] for its expression, in which case
|
||||||
|
|
|
@ -16,17 +16,26 @@ perform the same work as @exec{raco distribute}.}
|
||||||
|
|
||||||
@defproc[(assemble-distribution [dest-dir path-string?]
|
@defproc[(assemble-distribution [dest-dir path-string?]
|
||||||
[exec-files (listof path-string?)]
|
[exec-files (listof path-string?)]
|
||||||
|
[#:executables? executables? any/c #t]
|
||||||
|
[#:relative-base relative-base (or/c path-string? #f) #f]
|
||||||
[#:collects-path path (or/c false/c (and/c path-string? relative-path?)) #f]
|
[#:collects-path path (or/c false/c (and/c path-string? relative-path?)) #f]
|
||||||
[#:copy-collects dirs (listof path-string?) null])
|
[#:copy-collects dirs (listof path-string?) null])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Copies the executables in @racket[exec-files] to the directory
|
Copies the executables in @racket[exec-files] to the directory
|
||||||
@racket[dest-dir], along with DLLs, frameworks, and/or shared
|
@racket[dest-dir], along with DLLs, frameworks, shared libraries,
|
||||||
libraries that the executables need to run a different machine.
|
and/or runtime files that the executables need to run a different
|
||||||
|
machine. If @racket[executables?] is @racket[#f], then the
|
||||||
|
@racket[exec-files] are treated as plain data files, instead of
|
||||||
|
executables, and they are modified in-place.
|
||||||
|
|
||||||
The arrangement of the executables and support files in
|
The arrangement of the executables and support files in
|
||||||
@racket[dest-dir] depends on the platform. In general
|
@racket[dest-dir] depends on the platform. In general,
|
||||||
@racket[assemble-distribution] tries to do the Right Thing.
|
@racket[assemble-distribution] tries to do the Right Thing, but a
|
||||||
|
non-@racket[#f] value for @racket[relative-base] specifies a
|
||||||
|
path for reaching the assembled content relative to the executable at
|
||||||
|
run time. When @racket[executables?] is @racket[#f], then the default
|
||||||
|
access path is @racket[dest-dir], with its relativeness preserved.
|
||||||
|
|
||||||
If a @racket[#:collects-path] argument is given, it overrides the
|
If a @racket[#:collects-path] argument is given, it overrides the
|
||||||
default location of the main @filepath{collects} directory for the
|
default location of the main @filepath{collects} directory for the
|
||||||
|
@ -35,4 +44,7 @@ directory (typically inside it).
|
||||||
|
|
||||||
The content of each directory in the @racket[#:copy-collects] argument
|
The content of each directory in the @racket[#:copy-collects] argument
|
||||||
is copied into the main @filepath{collects} directory for the packaged
|
is copied into the main @filepath{collects} directory for the packaged
|
||||||
executables.}
|
executables.
|
||||||
|
|
||||||
|
@history[#:changed "6.3" @elem{Added the @racket[#:executables?]
|
||||||
|
and @racket[#:relative-base] arguments.}]}
|
||||||
|
|
|
@ -187,11 +187,11 @@ currently supported keys are as follows:
|
||||||
@filepath{.icns}) to use for the executable's desktop icon.}
|
@filepath{.icns}) to use for the executable's desktop icon.}
|
||||||
|
|
||||||
@item{@racket['ico] (Windows) : An icon file path (suffix
|
@item{@racket['ico] (Windows) : An icon file path (suffix
|
||||||
@filepath{.ico}) to use for the executable's desktop icon;
|
@filepath{.ico}) to use for the executable's desktop icon.
|
||||||
the executable will have 16x16, 32x32, and 48x48 icons at
|
|
||||||
4-bit, 8-bit, and 32-bit (RGBA) depths; the icons are copied
|
@history[#:changed "6.3" @elem{All icons in the
|
||||||
and generated from any 16x16, 32x32, and 48x48 icons in the
|
executable are replaced with icons from the file,
|
||||||
@filepath{.ico} file.}
|
instead of setting only certain sizes and depths.}]}
|
||||||
|
|
||||||
@item{@racket['creator] (Mac OS X) : Provides a 4-character string
|
@item{@racket['creator] (Mac OS X) : Provides a 4-character string
|
||||||
to use as the application signature.}
|
to use as the application signature.}
|
||||||
|
@ -473,9 +473,17 @@ A unit that imports nothing and exports @racket[compiler:embed^].}
|
||||||
|
|
||||||
@defmodule[compiler/find-exe]
|
@defmodule[compiler/find-exe]
|
||||||
|
|
||||||
@defproc[(find-exe [gracket? any/c #f]
|
@defproc[(find-exe [#:cross? cross? any/c #f]
|
||||||
[variant (or/c 'cgc '3m) (system-type 'gc)])
|
[gracket? any/c #f]
|
||||||
|
[variant (or/c 'cgc '3m) (if cross?
|
||||||
|
(cross-system-type 'gc)
|
||||||
|
(system-type 'gc))])
|
||||||
path?]{
|
path?]{
|
||||||
|
|
||||||
Finds the path to the @exec{racket} or @exec{gracket} (when
|
Finds the path to the @exec{racket} or @exec{gracket} (when
|
||||||
@racket[gracket?] is true) executable.}
|
@racket[gracket?] is true) executable.
|
||||||
|
|
||||||
|
If @racket[cross?] is true, the executable is found for the target
|
||||||
|
platform in @seclink["cross-system"]{cross-installation mode}.
|
||||||
|
|
||||||
|
@history[#:changed "6.3" @elem{Added the @racket[#:cross?] argument.}]}
|
||||||
|
|
36
pkgs/racket-doc/scribblings/raco/exe-dylib-path.scrbl
Normal file
36
pkgs/racket-doc/scribblings/raco/exe-dylib-path.scrbl
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
#lang scribble/manual
|
||||||
|
@(require "common.rkt"
|
||||||
|
(for-label racket/base
|
||||||
|
racket/contract
|
||||||
|
compiler/exe-dylib-path))
|
||||||
|
|
||||||
|
@title[#:tag "exe-dylib-path"]{Mac OS X Dynamic Library Paths}
|
||||||
|
|
||||||
|
@defmodule[compiler/exe-dylib-path]{The
|
||||||
|
@racketmodname[compiler/exe-dylib-path] library provides functions for
|
||||||
|
reading and adjusting dynamic-library references in a Mac OS X
|
||||||
|
executable.}
|
||||||
|
|
||||||
|
@history[#:added "6.3"]
|
||||||
|
|
||||||
|
@defproc[(find-matching-library-path [exe-path path-string?]
|
||||||
|
[library-str string?])
|
||||||
|
(or/c #f string?)]{
|
||||||
|
|
||||||
|
Searches dynamic-linking information in @racket[exe-path] for a
|
||||||
|
library reference whose name includes @racket[library-str] and returns
|
||||||
|
the executable's path to the library for the first match. If no match is
|
||||||
|
found, the result is @racket[#f].}
|
||||||
|
|
||||||
|
@defproc[(update-matching-library-path [exe-path path-string?]
|
||||||
|
[library-str string?]
|
||||||
|
[library-path-str string?])
|
||||||
|
void?]{
|
||||||
|
|
||||||
|
Searches dynamic-linking information in @racket[exe-path] for each
|
||||||
|
library reference whose name includes @racket[library-str] and replaces
|
||||||
|
the executable's path to that library with @racket[library-path-str].
|
||||||
|
|
||||||
|
A single match is expected, and the update assumes enough space for
|
||||||
|
the new path, perhaps because the executable is linked with
|
||||||
|
@Flag{headerpad_max_install_names}.}
|
|
@ -11,10 +11,11 @@
|
||||||
|
|
||||||
@title[#:tag "exe"]{@exec{raco exe}: Creating Stand-Alone Executables}
|
@title[#:tag "exe"]{@exec{raco exe}: Creating Stand-Alone Executables}
|
||||||
|
|
||||||
@margin-note{Use a smaller base language to achieve a faster startup time such
|
@margin-note{To achieve a faster startup time, instead of trying
|
||||||
as @racketmodfont{#lang} @racketmodname[racket/base] instead of
|
@exec{raco exe}, use a smaller base language---such as
|
||||||
@racketmodfont{#lang} @racketmodname[racket] rather than relying on @exec{raco
|
@racketmodfont{#lang} @racketmodname[racket/base] instead of
|
||||||
exe}.}
|
@racketmodfont{#lang} @racketmodname[racket]. Also, ensure that
|
||||||
|
bytecode files are compiled by using @seclink["make"]{@exec{raco make}}.}
|
||||||
|
|
||||||
Compiled code produced by @exec{raco make} relies on Racket
|
Compiled code produced by @exec{raco make} relies on Racket
|
||||||
executables to provide run-time support to the compiled code. However,
|
executables to provide run-time support to the compiled code. However,
|
||||||
|
@ -49,7 +50,10 @@ created executable. Such modules can be explicitly included using the
|
||||||
@racket[define-runtime-path] to embed references to the run-time files
|
@racket[define-runtime-path] to embed references to the run-time files
|
||||||
in the executable; the files are then copied and packaged together
|
in the executable; the files are then copied and packaged together
|
||||||
with the executable when creating a distribution (as described in
|
with the executable when creating a distribution (as described in
|
||||||
@secref["exe-dist"]).
|
@secref["exe-dist"]). Finally, a submodule is included if its
|
||||||
|
enclosing module is included and the submodule contains a
|
||||||
|
sub-submodule named @racketidfont{declare-preserve-for-embedding}
|
||||||
|
(where the implementation of the sub-submodule is ignored).
|
||||||
|
|
||||||
Modules that are implemented directly by extensions---i.e., extensions
|
Modules that are implemented directly by extensions---i.e., extensions
|
||||||
that are automatically loaded from @racket[(build-path "compiled"
|
that are automatically loaded from @racket[(build-path "compiled"
|
||||||
|
@ -85,8 +89,11 @@ The @exec{raco exe} command accepts the following command-line flags:
|
||||||
|
|
||||||
@item{@Flag{l} or @DFlag{launcher} --- create a @tech{launcher} (see
|
@item{@Flag{l} or @DFlag{launcher} --- create a @tech{launcher} (see
|
||||||
@secref["launcher"]), instead of a stand-alone executable. Flags
|
@secref["launcher"]), instead of a stand-alone executable. Flags
|
||||||
such as @DFlag{config-path}, @DFlag{collects-path}, and
|
such as @DFlag{config-path}, @DFlag{collects-path}, and @DFlag{lib}
|
||||||
@DFlag{lib} have no effect on launchers.}
|
have no effect on launchers. Beware that the default command-line
|
||||||
|
flags to build into the launcher prevent access to packages that
|
||||||
|
are installed in user scope; use @exec{--exf -U} to enable access
|
||||||
|
to user-scope packages from the launcher.}
|
||||||
|
|
||||||
@item{@DFlag{config-path} @nonterm{path} --- set @nonterm{path}
|
@item{@DFlag{config-path} @nonterm{path} --- set @nonterm{path}
|
||||||
within the executable as the path to the @tech{configuration
|
within the executable as the path to the @tech{configuration
|
||||||
|
@ -110,7 +117,9 @@ The @exec{raco exe} command accepts the following command-line flags:
|
||||||
included with the executable into @nonterm{path}
|
included with the executable into @nonterm{path}
|
||||||
(relative to the current directory), instead of embedded within the
|
(relative to the current directory), instead of embedded within the
|
||||||
executable. The @DFlag{collects-dest} flag normally makes sense
|
executable. The @DFlag{collects-dest} flag normally makes sense
|
||||||
only in combination with @DFlag{collects-path}.}
|
only in combination with @DFlag{collects-path}. This mode currently
|
||||||
|
does not prune unreferenced submodules (and it pulls along any
|
||||||
|
dependencies of submodules).}
|
||||||
|
|
||||||
@item{@DFlag{ico} @nonterm{.ico-path} --- on Windows, set the icons
|
@item{@DFlag{ico} @nonterm{.ico-path} --- on Windows, set the icons
|
||||||
for the generated executable to ones extracted from
|
for the generated executable to ones extracted from
|
||||||
|
@ -148,19 +157,19 @@ The @exec{raco exe} command accepts the following command-line flags:
|
||||||
in the executable, even if it is not referenced by the main program,
|
in the executable, even if it is not referenced by the main program,
|
||||||
so that it is available via @racket[dynamic-require].}
|
so that it is available via @racket[dynamic-require].}
|
||||||
|
|
||||||
@item{@DPFlag{exfl} @nonterm{flag} --- provide the @nonterm{flag}
|
@item{@DPFlag{exf} @nonterm{flag} --- provide the @nonterm{flag}
|
||||||
command-line argument on startup to the embedded @exec{racket} or
|
command-line argument on startup to the embedded @exec{racket} or
|
||||||
@exec{gracket}.}
|
@exec{gracket}.}
|
||||||
|
|
||||||
@item{@DFlag{exfl} @nonterm{flag} --- remove @nonterm{flag} from the
|
@item{@DFlag{exf} @nonterm{flag} --- remove @nonterm{flag} from the
|
||||||
command-line arguments to be provided on startup to the embedded
|
command-line arguments to be provided on startup to the embedded
|
||||||
@exec{racket} or @exec{gracket}.}
|
@exec{racket} or @exec{gracket}.}
|
||||||
|
|
||||||
@item{@DFlag{exfl-clear} --- remove all command-line arguments to be
|
@item{@DFlag{exf-clear} --- remove all command-line arguments to be
|
||||||
provided on startup to the embedded @exec{racket} or
|
provided on startup to the embedded @exec{racket} or
|
||||||
@exec{gracket}.}
|
@exec{gracket}.}
|
||||||
|
|
||||||
@item{@DFlag{exfl-show} --- show (without changing) the command-line
|
@item{@DFlag{exf-show} --- show (without changing) the command-line
|
||||||
arguments to be provided on startup to the embedded
|
arguments to be provided on startup to the embedded
|
||||||
@exec{racket} or @exec{gracket}.}
|
@exec{racket} or @exec{gracket}.}
|
||||||
|
|
||||||
|
@ -170,7 +179,12 @@ The @exec{raco exe} command accepts the following command-line flags:
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@history[#:changed "6.3.0.11" @elem{Added support for
|
||||||
|
@racketidfont{declare-preserve-for-embedding}.}]
|
||||||
|
|
||||||
@; ----------------------------------------------------------------------
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
@include-section["exe-api.scrbl"]
|
@include-section["exe-api.scrbl"]
|
||||||
@include-section["launcher.scrbl"]
|
@include-section["launcher.scrbl"]
|
||||||
|
@include-section["exe-dylib-path.scrbl"]
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
@title[#:tag "expand"]{@exec{raco expand}: Macro Expansion}
|
@title[#:tag "expand"]{@exec{raco expand}: Macro Expansion}
|
||||||
|
|
||||||
The @exec{raco expand} command macro expands the contents of
|
The @exec{raco expand} command macro-expands and pretty-prints the
|
||||||
the given source files. Also see @racket[expand].
|
contents of the given source files. See also @racket[expand].
|
||||||
|
|
||||||
Command-line flags:
|
Command-line flags:
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
racket/file
|
racket/file
|
||||||
compiler/cm
|
compiler/cm
|
||||||
compiler/cm-accomplice
|
compiler/cm-accomplice
|
||||||
setup/parallel-build))
|
setup/parallel-build
|
||||||
|
compiler/compilation-path))
|
||||||
|
|
||||||
|
|
||||||
@(define cm-eval (make-base-eval))
|
@(define cm-eval (make-base-eval))
|
||||||
|
@ -390,6 +391,29 @@ A parameter whose value is called for each file that is loaded and
|
||||||
@racket[#f], then the file is compiled as usual. The default is
|
@racket[#f], then the file is compiled as usual. The default is
|
||||||
@racket[(lambda (x) #f)].}
|
@racket[(lambda (x) #f)].}
|
||||||
|
|
||||||
|
|
||||||
|
@defparam[current-path->mode path->mode
|
||||||
|
(or/c #f (-> path? (and/c path? relative-path?)))
|
||||||
|
#:value #f]{
|
||||||
|
Used by @racket[make-compilation-manager-load/use-compiled-handler] and
|
||||||
|
@racket[make-caching-managed-compile-zo] to override @racket[use-compiled-file-paths]
|
||||||
|
for deciding where to write compiled @filepath{.zo} files. If it is @racket[#f],
|
||||||
|
then the first element of @racket[use-compiled-file-paths] is used. If it isn't
|
||||||
|
@racket[#f], then it is called with the original source file's location and its
|
||||||
|
result is treated the same as if it had been the first element of
|
||||||
|
@racket[use-compiled-file-paths].
|
||||||
|
|
||||||
|
Note that this parameter is not used by @racket[current-load/use-compiled]. So if
|
||||||
|
the parameter causes @filepath{.zo} files to be placed in different directories, then
|
||||||
|
the correct @filepath{.zo} file must still be communicated via @racket[use-compiled-file-paths],
|
||||||
|
and one way to do that is to override @racket[current-load/use-compiled] to delete
|
||||||
|
@filepath{.zo} files that would cause the wrong one to be chosen right before they are
|
||||||
|
loaded.
|
||||||
|
|
||||||
|
@history[#:added "6.4.0.14"]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(file-stamp-in-collection [p path?]) (or/c (cons/c number? promise?) #f)]{
|
@defproc[(file-stamp-in-collection [p path?]) (or/c (cons/c number? promise?) #f)]{
|
||||||
Calls @racket[file-stamp-in-paths] with @racket[p] and
|
Calls @racket[file-stamp-in-paths] with @racket[p] and
|
||||||
@racket[(current-library-collection-paths)].}
|
@racket[(current-library-collection-paths)].}
|
||||||
|
@ -497,6 +521,18 @@ result will not call @racket[proc] with @racket['unlock].)
|
||||||
compilations of the same racket source files in multiple places.
|
compilations of the same racket source files in multiple places.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@defproc[(install-module-hashes! [bstr btyes?]
|
||||||
|
[start exact-nonnegatve-integer? 0]
|
||||||
|
[end exact-nonnegatve-integer? (bytes-length bstr)])
|
||||||
|
void?]{
|
||||||
|
|
||||||
|
Adjusts the bytecode representation in @racket[bstr] (from bytes
|
||||||
|
@racket[start] to @racket[end]) to install a hash code, including any
|
||||||
|
submodules within the region. The existing representation should have
|
||||||
|
zero bytes in place of each hash string, which is what @racket[write]
|
||||||
|
produces for a compiled form.
|
||||||
|
|
||||||
|
@history[#:added "6.3"]}
|
||||||
|
|
||||||
@; ----------------------------------------------------------------------
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -696,14 +732,14 @@ of @racket[modes] and @racket[roots].}
|
||||||
[#:roots roots (non-empty-listof (or/c path-string? 'same)) (current-compiled-file-roots)])
|
[#:roots roots (non-empty-listof (or/c path-string? 'same)) (current-compiled-file-roots)])
|
||||||
path?]{
|
path?]{
|
||||||
|
|
||||||
The same as @racket[get-compilation-dir+home], but returning only the first result.}
|
The same as @racket[get-compilation-dir+name], but returning only the first result.}
|
||||||
|
|
||||||
@defproc[(get-compilation-bytecode-file [path path-string?]
|
@defproc[(get-compilation-bytecode-file [path path-string?]
|
||||||
[#:modes modes (non-empty-listof (and/c path-string? relative-path?)) (use-compiled-file-paths)]
|
[#:modes modes (non-empty-listof (and/c path-string? relative-path?)) (use-compiled-file-paths)]
|
||||||
[#:roots roots (non-empty-listof (or/c path-string? 'same)) (current-compiled-file-roots)])
|
[#:roots roots (non-empty-listof (or/c path-string? 'same)) (current-compiled-file-roots)])
|
||||||
path?]{
|
path?]{
|
||||||
|
|
||||||
The same as @racket[get-compilation-dir+home], but combines the
|
The same as @racket[get-compilation-dir+name], but combines the
|
||||||
results and adds a @filepath{.zo} suffix to arrive at a bytecode file
|
results and adds a @filepath{.zo} suffix to arrive at a bytecode file
|
||||||
path.}
|
path.}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ a typical Racket installation.
|
||||||
@include-section["test.scrbl"]
|
@include-section["test.scrbl"]
|
||||||
@include-section["docs.scrbl"]
|
@include-section["docs.scrbl"]
|
||||||
@include-section["expand.scrbl"]
|
@include-section["expand.scrbl"]
|
||||||
|
@include-section["read.scrbl"]
|
||||||
@include-section["scribble.scrbl"]
|
@include-section["scribble.scrbl"]
|
||||||
@include-section["command.scrbl"]
|
@include-section["command.scrbl"]
|
||||||
@include-section["config.scrbl"]
|
@include-section["config.scrbl"]
|
||||||
|
|
26
pkgs/racket-doc/scribblings/raco/read.scrbl
Normal file
26
pkgs/racket-doc/scribblings/raco/read.scrbl
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#lang scribble/doc
|
||||||
|
@(require scribble/manual
|
||||||
|
scribble/bnf
|
||||||
|
"common.rkt"
|
||||||
|
(for-label racket/base))
|
||||||
|
|
||||||
|
@title[#:tag "read"]{@exec{raco read}: Reading and Pretty-Printing}
|
||||||
|
|
||||||
|
@; to associate `history` to the right package:
|
||||||
|
@(declare-exporting compiler/commands/read)
|
||||||
|
|
||||||
|
The @exec{raco read} command @racket[read]s and pretty-prints the
|
||||||
|
contents of the given files. This command is useful for showing
|
||||||
|
how a @tt{#reader} or @hash-lang[]-based reader extension converts
|
||||||
|
input to an S-expression. It is also useful for pretty-printing a term
|
||||||
|
that is already in S-expression form.
|
||||||
|
|
||||||
|
Command-line flags:
|
||||||
|
|
||||||
|
@itemlist[
|
||||||
|
@item{@Flag{n} @nonterm{n} or @DFlag{columns} @nonterm{n} --- format output for a display with @nonterm{n} columns}
|
||||||
|
@item{@Flag{h} or @DFlag{help} --- show help information for this command}
|
||||||
|
@item{@DFlag{} --- do not treat remaining arguments as switches}
|
||||||
|
]
|
||||||
|
|
||||||
|
@history[#:added "1.3"]
|
|
@ -12,7 +12,9 @@
|
||||||
setup/getinfo
|
setup/getinfo
|
||||||
setup/main-collects
|
setup/main-collects
|
||||||
setup/collection-name
|
setup/collection-name
|
||||||
|
setup/collection-search
|
||||||
setup/matching-platform
|
setup/matching-platform
|
||||||
|
setup/cross-system
|
||||||
setup/path-to-relative
|
setup/path-to-relative
|
||||||
setup/xref scribble/xref
|
setup/xref scribble/xref
|
||||||
;; info -- no bindings from this are used
|
;; info -- no bindings from this are used
|
||||||
|
@ -21,6 +23,7 @@
|
||||||
setup/unpack
|
setup/unpack
|
||||||
setup/link
|
setup/link
|
||||||
compiler/compiler
|
compiler/compiler
|
||||||
|
compiler/module-suffix
|
||||||
launcher/launcher
|
launcher/launcher
|
||||||
compiler/sig
|
compiler/sig
|
||||||
launcher/launcher-sig
|
launcher/launcher-sig
|
||||||
|
@ -142,6 +145,11 @@ flags:
|
||||||
set of deleted files can be controlled by @filepath{info.rkt}; see
|
set of deleted files can be controlled by @filepath{info.rkt}; see
|
||||||
@elemref["clean"]{@racket[clean]} for more information.}
|
@elemref["clean"]{@racket[clean]} for more information.}
|
||||||
|
|
||||||
|
@item{@DFlag{fast-clean} or @Flag{c} --- like @DFlag{clean}, but
|
||||||
|
without forcing a bootstrap of @exec{raco setup} from source (which
|
||||||
|
means that @DFlag{fast-clean} cannot clean corruption that affects
|
||||||
|
@exec{raco setup} itself).}
|
||||||
|
|
||||||
@item{@DFlag{no-zo} or @Flag{n} --- refrain from compiling source
|
@item{@DFlag{no-zo} or @Flag{n} --- refrain from compiling source
|
||||||
files to @filepath{.zo} files.}
|
files to @filepath{.zo} files.}
|
||||||
|
|
||||||
|
@ -358,8 +366,8 @@ Optional @filepath{info.rkt} fields trigger additional actions by
|
||||||
(list src-string flags category name out-k)
|
(list src-string flags category name out-k)
|
||||||
(list src-string flags category name out-k order-n)]
|
(list src-string flags category name out-k order-n)]
|
||||||
[flags (list mode-symbol ...)]
|
[flags (list mode-symbol ...)]
|
||||||
[category (list category-symbol)
|
[category (list category-string-or-symbol)
|
||||||
(list category-symbol sort-number)]
|
(list category-string-or-symbol sort-number)]
|
||||||
[name string
|
[name string
|
||||||
#f]
|
#f]
|
||||||
]
|
]
|
||||||
|
@ -374,7 +382,7 @@ Optional @filepath{info.rkt} fields trigger additional actions by
|
||||||
documentation, instead of defaulting to the source file's name
|
documentation, instead of defaulting to the source file's name
|
||||||
(sans extension), where @racket[#f] means to use the default; a
|
(sans extension), where @racket[#f] means to use the default; a
|
||||||
non-@racket[#f] value for @racket[_name] must fit the grammar
|
non-@racket[#f] value for @racket[_name] must fit the grammar
|
||||||
of a colelction-name element as checked by
|
of a collection-name element as checked by
|
||||||
@racket[collection-name-element?]. If a
|
@racket[collection-name-element?]. If a
|
||||||
document's list contains a fifth item, @racket[_out-k], it is used
|
document's list contains a fifth item, @racket[_out-k], it is used
|
||||||
a hint for the number of files to use for the document's
|
a hint for the number of files to use for the document's
|
||||||
|
@ -444,9 +452,13 @@ Optional @filepath{info.rkt} fields trigger additional actions by
|
||||||
]
|
]
|
||||||
|
|
||||||
The @racket[_category] list specifies how to show the document in
|
The @racket[_category] list specifies how to show the document in
|
||||||
the root table of contents. The list must start with a symbol,
|
the root table of contents. The list must start with a category,
|
||||||
usually one of the following categories, which are ordered as
|
which determines where the manual appears in the root
|
||||||
below in the root documentation page:
|
documentation page. A category is either a string or a symbol. If
|
||||||
|
it is a string, then the string is the category label on the root
|
||||||
|
page. If it is a symbol, then a default category label is
|
||||||
|
used. The available symbols and the order of categories on the
|
||||||
|
root documentation page is as below:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
|
@ -475,6 +487,8 @@ Optional @filepath{info.rkt} fields trigger additional actions by
|
||||||
@item{@racket['interop] : Documentation for interoperability
|
@item{@racket['interop] : Documentation for interoperability
|
||||||
tools and libraries.}
|
tools and libraries.}
|
||||||
|
|
||||||
|
@item{All string categories as ordered by @racket[string<=?].}
|
||||||
|
|
||||||
@item{@racket['library] : Documentation for libraries; this
|
@item{@racket['library] : Documentation for libraries; this
|
||||||
category is the default and used for unrecognized category
|
category is the default and used for unrecognized category
|
||||||
symbols.}
|
symbols.}
|
||||||
|
@ -528,7 +542,10 @@ Optional @filepath{info.rkt} fields trigger additional actions by
|
||||||
source file need not be present. Moving documentation into place
|
source file need not be present. Moving documentation into place
|
||||||
may require no movement at all, depending on the way that the
|
may require no movement at all, depending on the way that the
|
||||||
enclosing collection is installed, but movement includes adding a
|
enclosing collection is installed, but movement includes adding a
|
||||||
@filepath{synced.rktd} file to represent the installation.}
|
@filepath{synced.rktd} file to represent the installation.
|
||||||
|
|
||||||
|
@history[#:changed "6.4" @elem{Allow a category to be a string
|
||||||
|
instead of a symbol.}]}
|
||||||
|
|
||||||
@item{@as-index{@racketidfont{release-note-files}} : @racket[(listof (cons/c string? (cons/c string? list?)))] ---
|
@item{@as-index{@racketidfont{release-note-files}} : @racket[(listof (cons/c string? (cons/c string? list?)))] ---
|
||||||
A list of release-notes text files to link from the main documentation pages.
|
A list of release-notes text files to link from the main documentation pages.
|
||||||
|
@ -639,7 +656,7 @@ Optional @filepath{info.rkt} fields trigger additional actions by
|
||||||
|
|
||||||
On Windows, deleting a previously installed foreign library may be
|
On Windows, deleting a previously installed foreign library may be
|
||||||
complicated by a lock on the file, if it is in use. To compensate,
|
complicated by a lock on the file, if it is in use. To compensate,
|
||||||
@exec{raco setup} deletes a foriegn-library file by first renaming
|
@exec{raco setup} deletes a foreign-library file by first renaming
|
||||||
the file to have the prefix @filepath{raco-setup-delete-}; it then
|
the file to have the prefix @filepath{raco-setup-delete-}; it then
|
||||||
attempts to delete the renamed file and merely issues a warning on
|
attempts to delete the renamed file and merely issues a warning on
|
||||||
a failure to delete the renamed file. Meanwhile, in modes where
|
a failure to delete the renamed file. Meanwhile, in modes where
|
||||||
|
@ -753,6 +770,13 @@ Optional @filepath{info.rkt} fields trigger additional actions by
|
||||||
file, etc. Supplying a specific list of collections to @exec{raco
|
file, etc. Supplying a specific list of collections to @exec{raco
|
||||||
setup} disables this dependency-based deletion of compiled files.}
|
setup} disables this dependency-based deletion of compiled files.}
|
||||||
|
|
||||||
|
@item{@racket[compile-omit-paths], @racket[compile-omit-files], and
|
||||||
|
@racket[compile-include-files] --- Used indirectly via
|
||||||
|
@racket[compile-collection-zos].}
|
||||||
|
|
||||||
|
@item{@racket[module-suffixes] and @racket[doc-module-suffixes] ---
|
||||||
|
Used indirectly via @racket[get-module-suffixes].}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
@; ------------------------------------------------------------------------
|
@; ------------------------------------------------------------------------
|
||||||
|
@ -1207,7 +1231,7 @@ function for installing a single @filepath{.plt} file.
|
||||||
@envvar{PLTCOLLECTS} setting or change to the parameter may cause
|
@envvar{PLTCOLLECTS} setting or change to the parameter may cause
|
||||||
them to be omitted. Any other path in
|
them to be omitted. Any other path in
|
||||||
@racket[(current-library-collection-paths)] is treated as
|
@racket[(current-library-collection-paths)] is treated as
|
||||||
user-specific. The dierctories indicated by the returned paths may
|
user-specific. The directories indicated by the returned paths may
|
||||||
or may not exist.}
|
or may not exist.}
|
||||||
|
|
||||||
@defproc[(find-config-dir) (or/c path? #f)]{
|
@defproc[(find-config-dir) (or/c path? #f)]{
|
||||||
|
@ -1280,7 +1304,7 @@ function for installing a single @filepath{.plt} file.
|
||||||
@defproc[(get-lib-search-dirs) (listof path?)]{
|
@defproc[(get-lib-search-dirs) (listof path?)]{
|
||||||
Returns a list of paths to search for foreign libraries. Unless it is
|
Returns a list of paths to search for foreign libraries. Unless it is
|
||||||
configured otherwise, the result includes any non-@racket[#f] result of
|
configured otherwise, the result includes any non-@racket[#f] result of
|
||||||
@racket[(find-lib-dir)] and
|
@racket[(find-lib-dir)]
|
||||||
and @racket[(find-user-lib-dir)]---but the latter is included only if the
|
and @racket[(find-user-lib-dir)]---but the latter is included only if the
|
||||||
value of the @racket[use-user-specific-search-paths] parameter
|
value of the @racket[use-user-specific-search-paths] parameter
|
||||||
is @racket[#t].
|
is @racket[#t].
|
||||||
|
@ -1526,7 +1550,7 @@ function for installing a single @filepath{.plt} file.
|
||||||
The Racket installation tree can usually be moved around the filesystem.
|
The Racket installation tree can usually be moved around the filesystem.
|
||||||
To support this, care must be taken to avoid absolute paths. The
|
To support this, care must be taken to avoid absolute paths. The
|
||||||
following two APIs cover two aspects of this: a way to convert a path to
|
following two APIs cover two aspects of this: a way to convert a path to
|
||||||
a value that is relative to the @filepath{collets} tree, and a way to
|
a value that is relative to the @filepath{collects} tree, and a way to
|
||||||
display such paths (e.g., in error messages).
|
display such paths (e.g., in error messages).
|
||||||
|
|
||||||
@subsection{Representing Collection-Based Paths}
|
@subsection{Representing Collection-Based Paths}
|
||||||
|
@ -1559,7 +1583,7 @@ is a pair that starts with @racket['collects], then it is converted
|
||||||
back to a path using @racket[collection-file-path].}
|
back to a path using @racket[collection-file-path].}
|
||||||
|
|
||||||
@defproc[(path->module-path [path path-string?]
|
@defproc[(path->module-path [path path-string?]
|
||||||
[#:cache cache (or/c #f (and/c hash? (not/c imutable?)))])
|
[#:cache cache (or/c #f (and/c hash? (not/c immutable?)))])
|
||||||
(or/c path-string? module-path?)]{
|
(or/c path-string? module-path?)]{
|
||||||
|
|
||||||
Like @racket[path->collects-relative], but the result is either
|
Like @racket[path->collects-relative], but the result is either
|
||||||
|
@ -1709,6 +1733,50 @@ is not the ASCII value of a letter, digit, @litchar{-}, @litchar{+},
|
||||||
or @litchar{_}.}
|
or @litchar{_}.}
|
||||||
|
|
||||||
|
|
||||||
|
@; ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@section[#:tag "collection-search"]{API for Collection Searches}
|
||||||
|
|
||||||
|
@defmodule[setup/collection-search]
|
||||||
|
|
||||||
|
@history[#:added "6.3"]
|
||||||
|
|
||||||
|
@defproc[(collection-search [mod-path normalized-lib-module-path?]
|
||||||
|
[#:init result any/c #f]
|
||||||
|
[#:combine combine (any/c (and/c path? complete-path?) . -> . any/c) (lambda (r v) v)]
|
||||||
|
[#:break? break? (any/c . -> . any/c) (lambda (r) #f)]
|
||||||
|
[#:all-possible-roots? all-possible-roots? any/c #f])
|
||||||
|
any/c]{
|
||||||
|
|
||||||
|
Generalizes @racket[collection-file-path] to support folding over all
|
||||||
|
possible locations of a collection-based file in the current
|
||||||
|
configuration. Unlike @racket[collection-file-path],
|
||||||
|
@racket[collection-search] takes the file to location in module-path
|
||||||
|
form, but always as a @racket['lib] path.
|
||||||
|
|
||||||
|
Each possible path for the file (not counting a @filepath{.ss} to/from
|
||||||
|
@filepath{.rkt} conversion) is provided as a second argument to the
|
||||||
|
@racket[combine] function, where the first argument is the current
|
||||||
|
result, and the value produced by @racket[combine] becomes the new
|
||||||
|
result. The @racket[#:init] argument provides the initial result.
|
||||||
|
|
||||||
|
The @racket[break?] function short-circuits a search based on the
|
||||||
|
current value. For example, it could be used to short-circuit a search
|
||||||
|
after a suitable path is found.
|
||||||
|
|
||||||
|
If @racket[all-possible-roots?] is @racket[#f], then @racket[combine]
|
||||||
|
is called only on paths within @filepath{collects}-like directories
|
||||||
|
(for the current configuration) where at least a matching collection
|
||||||
|
directory exists.}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(normalized-lib-module-path? [v any/c]) boolean?]{
|
||||||
|
|
||||||
|
Returns @racket[#t] if @racket[v] is a module path (in the sense of
|
||||||
|
@racket[module-path?]) of the form @racket['(lib _str)] where
|
||||||
|
@racket[_str] contains at least one slash. The
|
||||||
|
@racket[collapse-module-path] function produces such module paths for
|
||||||
|
collection-based module references.}
|
||||||
|
|
||||||
@; ------------------------------------------------------------------------
|
@; ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -1724,9 +1792,14 @@ Returns @racket[#t] if @racket[v] is a symbol, string, or regexp value
|
||||||
(in the sense of @racket[regexp?]), @racket[#f] otherwise.}
|
(in the sense of @racket[regexp?]), @racket[#f] otherwise.}
|
||||||
|
|
||||||
@defproc[(matching-platform? [spec platform-spec?]
|
@defproc[(matching-platform? [spec platform-spec?]
|
||||||
[#:system-type sys-type (or/c #f symbol?) (system-type)]
|
[#:cross? cross? any/c #f]
|
||||||
[#:system-library-subpath sys-lib-subpath (or/c #f path?)
|
[#:system-type sys-type (or/c #f symbol?) (if cross?
|
||||||
(system-library-subpath #f)])
|
(cross-system-type)
|
||||||
|
(system-type))]
|
||||||
|
[#:system-library-subpath sys-lib-subpath (or/c #f path-for-some-system?)
|
||||||
|
(if cross?
|
||||||
|
(cross-system-library-subpath #f)
|
||||||
|
(system-library-subpath #f))])
|
||||||
boolean?]{
|
boolean?]{
|
||||||
|
|
||||||
Reports whether @racket[spec] matches @racket[sys-type] or
|
Reports whether @racket[spec] matches @racket[sys-type] or
|
||||||
|
@ -1742,8 +1815,74 @@ If @racket[spec] is a string, then the result is @racket[#t] if
|
||||||
|
|
||||||
If @racket[spec] is a regexp value, then the result is @racket[#t] if
|
If @racket[spec] is a regexp value, then the result is @racket[#t] if
|
||||||
the regexp matches @racket[(path->string sys-lib-subpath)],
|
the regexp matches @racket[(path->string sys-lib-subpath)],
|
||||||
|
@racket[#f] otherwise.
|
||||||
|
|
||||||
|
@history[#:changed "6.3" @elem{Added @racket[#:cross?] argument and
|
||||||
|
changed the contract on @racket[sys-lib-subpath]
|
||||||
|
to accept @racket[path-for-some-system?]
|
||||||
|
instead of just @racket[path?].}]}
|
||||||
|
|
||||||
|
@; ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@section[#:tag "cross-system"]{API for Cross-Platform Configuration}
|
||||||
|
|
||||||
|
@defmodule[setup/cross-system]{The @racketmodname[setup/cross-system]
|
||||||
|
library provides functions for querying the system properties of a
|
||||||
|
destination platform, which can be different than the current platform
|
||||||
|
in cross-installation modes.}
|
||||||
|
|
||||||
|
A Racket installation includes a @filepath{system.rktd} file in the
|
||||||
|
directory reported by @racket[(find-lib-dir)]. When the information in that file
|
||||||
|
does not match the running Racket's information, then the
|
||||||
|
@racketmodname[setup/cross-system] module infers that Racket is being
|
||||||
|
run in cross-installation mode.
|
||||||
|
|
||||||
|
For example, if an in-place Racket installation for a different
|
||||||
|
platform resides at @nonterm{cross-dir}, then
|
||||||
|
|
||||||
|
@commandline{racket -G @nonterm{cross-dir}/etc -X @nonterm{cross-dir}/collects -l- raco pkg}
|
||||||
|
|
||||||
|
runs @exec{raco pkg} using the current platform's @exec{racket}
|
||||||
|
executable, but using the collections and other configuration
|
||||||
|
information of @nonterm{cross-dir}, as well as modifying the packages
|
||||||
|
of @nonterm{cross-dir}. That can work as long as no platform-specific
|
||||||
|
libraries need to run to perform the requested @exec{raco pkg} action
|
||||||
|
(e.g., when installing built packages).
|
||||||
|
|
||||||
|
|
||||||
|
@history[#:added "6.3"]
|
||||||
|
|
||||||
|
@defproc[(cross-system-type [mode (or/c 'os 'word 'gc 'link 'machine
|
||||||
|
'so-suffix 'so-mode 'fs-change)
|
||||||
|
'os])
|
||||||
|
(or/c symbol? string? bytes? exact-positive-integer? vector?)]{
|
||||||
|
|
||||||
|
Like @racket[system-type], but for the target platform instead of the
|
||||||
|
current platform in cross-installation mode. When not in
|
||||||
|
cross-installation mode, the results are the same as for
|
||||||
|
@racket[system-type].}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(cross-system-library-subpath [mode (or/c 'cgc '3m #f)
|
||||||
|
(system-type 'gc)])
|
||||||
|
path-for-some-system?]{
|
||||||
|
|
||||||
|
Like @racket[system-library-subpath], but for the target platform
|
||||||
|
instead of the current platform in cross-installation mode. When not
|
||||||
|
in cross-installation mode, the results are the same as for
|
||||||
|
@racket[system-library-subpath].
|
||||||
|
|
||||||
|
In cross-installation mode, the target platform may have a different
|
||||||
|
path convention than the current platform, so the result is
|
||||||
|
@racket[path-for-some-system?] instead of @racket[path?].}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(cross-installation?) boolean?]{
|
||||||
|
|
||||||
|
Returns @racket[#t] if cross-installation mode has been detected,
|
||||||
@racket[#f] otherwise.}
|
@racket[#f] otherwise.}
|
||||||
|
|
||||||
|
|
||||||
@; ------------------------------------------------------------------------
|
@; ------------------------------------------------------------------------
|
||||||
|
|
||||||
@section[#:tag "xref"]{API for Cross-References for Installed Manuals}
|
@section[#:tag "xref"]{API for Cross-References for Installed Manuals}
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
(for-label racket/runtime-path
|
(for-label racket/runtime-path
|
||||||
racket/base
|
racket/base
|
||||||
launcher/launcher
|
launcher/launcher
|
||||||
rackunit/log))
|
rackunit/log
|
||||||
|
compiler/module-suffix))
|
||||||
|
|
||||||
@title[#:tag "test"]{@exec{raco test}: Run tests}
|
@title[#:tag "test"]{@exec{raco test}: Run tests}
|
||||||
|
|
||||||
|
@ -19,12 +20,14 @@ the file.
|
||||||
|
|
||||||
When an argument path refers to a directory, @exec{raco test}
|
When an argument path refers to a directory, @exec{raco test}
|
||||||
recursively discovers and runs all files within the directory that end
|
recursively discovers and runs all files within the directory that end
|
||||||
in @filepath{.rkt}, end in @filepath{.scrbl}, or have a (possibly
|
in a module suffix (see @racket[get-module-suffixes], but the suffixes
|
||||||
empty) list of command-line arguments provided by
|
always include @filepath{.rkt}, @filepath{.scrbl}, @filepath{.ss}, and
|
||||||
@racket[test-command-line-arguments] in an @filepath{info.rkt} file.
|
@filepath{.scm}) or have a (possibly empty) list of command-line arguments provided by
|
||||||
At the same time, @exec{raco test} omits files and directories within
|
@racket[test-command-line-arguments] in an @filepath{info.rkt} file,
|
||||||
a directory as directed by @racket[test-omit-paths] in an
|
or as directed by @racket[test-include-paths] in an
|
||||||
@filepath{info.rkt} file.
|
@filepath{info.rkt} file. At the same time, @exec{raco test} omits
|
||||||
|
files and directories within a directory as directed by
|
||||||
|
@racket[test-omit-paths] in an @filepath{info.rkt} file.
|
||||||
|
|
||||||
A test is counted as failing if it logs a failing test code via
|
A test is counted as failing if it logs a failing test code via
|
||||||
@racket[test-log!], causes Racket to exit with a non-zero exit code, or
|
@racket[test-log!], causes Racket to exit with a non-zero exit code, or
|
||||||
|
@ -52,11 +55,11 @@ The @exec{raco test} command accepts several flags:
|
||||||
--- Not only interprets the arguments as paths (which is the
|
--- Not only interprets the arguments as paths (which is the
|
||||||
default mode), but treats them the same as paths found in a
|
default mode), but treats them the same as paths found in a
|
||||||
directory, which means ignoring a file argument that does not
|
directory, which means ignoring a file argument that does not
|
||||||
have the extension @filepath{.rkt}, does not have the extension
|
have a module extension or is not enabled explicitly via
|
||||||
@filepath{.scrbl}, or is not enabled explicitly via
|
@racket[test-command-line-arguments] or @racket[test-include-paths]
|
||||||
@racket[test-command-line-arguments] in an @filepath{info.rkt}
|
in an @filepath{info.rkt} file; meanwhile, paths that are otherwise
|
||||||
file; meanwhile, paths that are otherwise enabled can be disabled
|
enabled can be disabled via @racket[test-omit-paths] in an
|
||||||
via @racket[test-omit-paths] in an @filepath{info.rkt} file.}
|
@filepath{info.rkt} file.}
|
||||||
|
|
||||||
@item{@DFlag{drdr}
|
@item{@DFlag{drdr}
|
||||||
--- Configures defaults to imitate the DrDr continuous testing
|
--- Configures defaults to imitate the DrDr continuous testing
|
||||||
|
@ -86,6 +89,14 @@ The @exec{raco test} command accepts several flags:
|
||||||
--- When multiple submodule names are provided with @Flag{s} or
|
--- When multiple submodule names are provided with @Flag{s} or
|
||||||
@DFlag{submodule}, runs only the first available submodule.}
|
@DFlag{submodule}, runs only the first available submodule.}
|
||||||
|
|
||||||
|
@item{@DFlag{configure-runtime}
|
||||||
|
--- Run a @racketidfont{configure-runtime} submodule (if any) of
|
||||||
|
each specified module before the module or a
|
||||||
|
submodule is run. This mode is the default when only a single
|
||||||
|
module is provided or when @DFlag{process} or @DFlag{place}
|
||||||
|
mode is specified, unless a submodule name is provided
|
||||||
|
via @Flag{s} or @DFlag{submodule}.}
|
||||||
|
|
||||||
@item{@DFlag{direct}
|
@item{@DFlag{direct}
|
||||||
--- Runs each test in a thread. This mode is the default if
|
--- Runs each test in a thread. This mode is the default if
|
||||||
a single file is specified. Multiple tests can interfere with
|
a single file is specified. Multiple tests can interfere with
|
||||||
|
@ -151,7 +162,9 @@ The @exec{raco test} command accepts several flags:
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
@history[#:changed "1.1" @elem{Added @DFlag{heartbeat}.}]
|
@history[#:changed "1.1" @elem{Added @DFlag{heartbeat}.}
|
||||||
|
#:changed "1.4" @elem{Changed recognition of module suffixes to use @racket[get-module-suffixes],
|
||||||
|
which implies recognizing @filepath{.ss} and @filepath{.rkt}.}]
|
||||||
|
|
||||||
@section[#:tag "test-config"]{Test Configuration by Submodule}
|
@section[#:tag "test-config"]{Test Configuration by Submodule}
|
||||||
|
|
||||||
|
@ -212,21 +225,30 @@ impossible (e.g., because the file will not always compile). Thus,
|
||||||
@exec{raco test} also consults any @filepath{info.rkt} file in the
|
@exec{raco test} also consults any @filepath{info.rkt} file in the
|
||||||
candidate test file's directory. In the case of a file within a
|
candidate test file's directory. In the case of a file within a
|
||||||
collection, @filepath{info.rkt} files from any enclosing collection
|
collection, @filepath{info.rkt} files from any enclosing collection
|
||||||
directories are also consulted for @racket[test-omit-paths]. Finally,
|
directories are also consulted for @racket[test-omit-paths] and
|
||||||
for a file within a package, the package's @filepath{info.rkt} is
|
@racket[test-include-paths]. Finally, for a file within a package, the
|
||||||
consulted for @racket[pkg-authors] to set the default responsible
|
package's @filepath{info.rkt} is consulted for @racket[pkg-authors] to
|
||||||
parties (see @secref["test-responsible"]) for all files in the
|
set the default responsible parties (see @secref["test-responsible"])
|
||||||
package.
|
for all files in the package.
|
||||||
|
|
||||||
The following @filepath{info.rkt} fields are recognized:
|
The following @filepath{info.rkt} fields are recognized:
|
||||||
|
|
||||||
@itemlist[
|
@itemlist[
|
||||||
|
|
||||||
@item{@racket[test-omit-paths] --- a list of path strings (relative
|
@item{@racket[test-omit-paths] --- a list of path strings (relative
|
||||||
to the enclosing directory) or @racket['all] to omit all files
|
to the enclosing directory) and regexp values (to omit all
|
||||||
within the enclosing directory. When a path string refers to a
|
files within the enclosing directory matching the expression),
|
||||||
directory, all files within the directory are omitted.}
|
or @racket['all] to omit all files within the enclosing directory.
|
||||||
|
When a path string refers to a directory, all files within the
|
||||||
|
directory are omitted.}
|
||||||
|
|
||||||
|
@item{@racket[test-include-paths] --- a list of path strings (relative
|
||||||
|
to the enclosing directory) and regexp values (to include all
|
||||||
|
files within the enclosing directory matching the expression),
|
||||||
|
or @racket['all] to include all files within the enclosing directory.
|
||||||
|
When a path string refers to a directory, all files within the
|
||||||
|
directory are included.}
|
||||||
|
|
||||||
@item{@racket[test-command-line-arguments] --- a list of
|
@item{@racket[test-command-line-arguments] --- a list of
|
||||||
@racket[(list _module-path-string (list _argument-path-string
|
@racket[(list _module-path-string (list _argument-path-string
|
||||||
...))], where @racket[current-command-line-arguments] is set to
|
...))], where @racket[current-command-line-arguments] is set to
|
||||||
|
@ -254,6 +276,9 @@ The following @filepath{info.rkt} fields are recognized:
|
||||||
the enclosing directory) for modules whose output varies.
|
the enclosing directory) for modules whose output varies.
|
||||||
See @secref["test-responsible"].}
|
See @secref["test-responsible"].}
|
||||||
|
|
||||||
|
@item{@racket[module-suffixes] and @racket[doc-module-suffixes] ---
|
||||||
|
Used indirectly via @racket[get-module-suffixes].}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
@section[#:tag "test-responsible"]{Responsible-Party and Varying-Output Logging}
|
@section[#:tag "test-responsible"]{Responsible-Party and Varying-Output Logging}
|
||||||
|
|
|
@ -75,3 +75,12 @@ The @racketmodname[compiler/zo-parse] module re-exports
|
||||||
or @racket[mod] structure indicates the list of global variables and
|
or @racket[mod] structure indicates the list of global variables and
|
||||||
quoted syntax that need to be instantiated (and put into an array on
|
quoted syntax that need to be instantiated (and put into an array on
|
||||||
the stack) before evaluating expressions that might use them.}
|
the stack) before evaluating expressions that might use them.}
|
||||||
|
|
||||||
|
|
||||||
|
@defproc[(decode-module-binding [binding module-binding?]
|
||||||
|
[name symbol?])
|
||||||
|
decoded-module-binding?]{
|
||||||
|
|
||||||
|
Given a compact-form representation of a module binding and the name
|
||||||
|
from which the binding is mapped, returns a normalized form of the
|
||||||
|
binding.}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual
|
@(require scribble/manual
|
||||||
|
scribble/core
|
||||||
(for-label racket/base
|
(for-label racket/base
|
||||||
racket/contract
|
racket/contract
|
||||||
compiler/zo-structs
|
compiler/zo-structs
|
||||||
|
@ -19,6 +20,14 @@ The @racketmodname[compiler/zo-structs] library defines the bytecode
|
||||||
structures that are produced by @racket[zo-parse] and consumed by
|
structures that are produced by @racket[zo-parse] and consumed by
|
||||||
@racket[decompile] and @racket[zo-marshal].
|
@racket[decompile] and @racket[zo-marshal].
|
||||||
|
|
||||||
|
@nested[#:style 'inset]{
|
||||||
|
@elem[#:style (style #f (list (background-color-property "yellow")))]{@bold{Warning:}}
|
||||||
|
The @racketmodname[compiler/zo-structs] library exposes internals
|
||||||
|
of the Racket bytecode abstraction. Unlike other Racket
|
||||||
|
libraries, @racketmodname[compiler/zo-structs] is subject to
|
||||||
|
incompatible changes across Racket versions.}
|
||||||
|
|
||||||
|
|
||||||
@defstruct+[zo ()]{
|
@defstruct+[zo ()]{
|
||||||
A supertype for all forms that can appear in compiled code.}
|
A supertype for all forms that can appear in compiled code.}
|
||||||
|
|
||||||
|
@ -27,21 +36,35 @@ structures that are produced by @racket[zo-parse] and consumed by
|
||||||
|
|
||||||
@defstruct+[(compilation-top zo)
|
@defstruct+[(compilation-top zo)
|
||||||
([max-let-depth exact-nonnegative-integer?]
|
([max-let-depth exact-nonnegative-integer?]
|
||||||
|
[binding-namess (hash/c exact-nonnegative-integer?
|
||||||
|
(hash/c symbol? stx?))]
|
||||||
[prefix prefix?]
|
[prefix prefix?]
|
||||||
[code (or/c form? any/c)])]{
|
[code (or/c form? any/c)])]{
|
||||||
Wraps compiled code. The @racket[max-let-depth] field indicates the
|
Wraps compiled code.
|
||||||
|
|
||||||
|
The @racket[max-let-depth] field indicates the
|
||||||
maximum stack depth that @racket[code] creates (not counting the
|
maximum stack depth that @racket[code] creates (not counting the
|
||||||
@racket[prefix] array). The @racket[prefix] field describes top-level
|
@racket[prefix] array).
|
||||||
variables, module-level variables, and quoted syntax-objects accessed
|
|
||||||
by @racket[code]. The @racket[code] field contains executable code;
|
The @racket[binding-namess] field provides a per-phase mapping from
|
||||||
it is normally a @racket[form], but a literal value is represented as
|
symbols that appear in @racket[prefix] for top-level
|
||||||
itself.}
|
@racket[def-values] forms and in top-level @racket[def-syntaxes]
|
||||||
|
forms. Each symbol is mapped to an identifier that will be bound
|
||||||
|
(after introduction into the namespace) by the definition.
|
||||||
|
|
||||||
|
The @racket[prefix] field describes top-level variables,
|
||||||
|
module-level variables, and quoted syntax-objects accessed by
|
||||||
|
@racket[code].
|
||||||
|
|
||||||
|
The @racket[code] field contains executable code; it is normally a
|
||||||
|
@racket[form], but a literal value is represented as itself.}
|
||||||
|
|
||||||
@defstruct+[(prefix zo)
|
@defstruct+[(prefix zo)
|
||||||
([num-lifts exact-nonnegative-integer?]
|
([num-lifts exact-nonnegative-integer?]
|
||||||
[toplevels (listof (or/c #f symbol? global-bucket?
|
[toplevels (listof (or/c #f symbol? global-bucket?
|
||||||
module-variable?))]
|
module-variable?))]
|
||||||
[stxs (listof stx?)])]{
|
[stxs (listof (or stx? #f))]
|
||||||
|
[src-inspector-desc symbol?])]{
|
||||||
Represents a ``prefix'' that is pushed onto the stack to initiate
|
Represents a ``prefix'' that is pushed onto the stack to initiate
|
||||||
evaluation. The prefix is an array, where buckets holding the
|
evaluation. The prefix is an array, where buckets holding the
|
||||||
values for @racket[toplevels] are first, then the buckets for the
|
values for @racket[toplevels] are first, then the buckets for the
|
||||||
|
@ -63,7 +86,16 @@ structures that are produced by @racket[zo-parse] and consumed by
|
||||||
|
|
||||||
The variable buckets and syntax objects that are recorded in a prefix
|
The variable buckets and syntax objects that are recorded in a prefix
|
||||||
are accessed by @racket[toplevel] and @racket[topsyntax] expression
|
are accessed by @racket[toplevel] and @racket[topsyntax] expression
|
||||||
forms.}
|
forms.
|
||||||
|
|
||||||
|
When an element of @racket[stxs] is @racket[#f], it coresponds to a
|
||||||
|
syntax object that was optimized away at the last minute. The slot
|
||||||
|
must not be referenced vt a @racket[topsyntax] form.
|
||||||
|
|
||||||
|
The @racket[src-inspector-desc] field provides an inspector name that
|
||||||
|
is used within syntax-object bindings. At run time, the prefix gets
|
||||||
|
an inspector, and bindings that reference the same inspector name are
|
||||||
|
granted access capabilities through that inspector.}
|
||||||
|
|
||||||
@defstruct+[(global-bucket zo) ([name symbol?])]{
|
@defstruct+[(global-bucket zo) ([name symbol?])]{
|
||||||
Represents a top-level variable, and used only in a @racket[prefix].}
|
Represents a top-level variable, and used only in a @racket[prefix].}
|
||||||
|
@ -111,8 +143,8 @@ returns.}
|
||||||
Represents the shape of an expected import as a structure-type
|
Represents the shape of an expected import as a structure-type
|
||||||
binding, constructor, etc.}
|
binding, constructor, etc.}
|
||||||
|
|
||||||
@defstruct+[(stx zo) ([encoded wrapped?])]{
|
@defstruct+[(stx zo) ([content stx-obj?])]{
|
||||||
Wraps a syntax object in a @racket[prefix].}
|
Wraps a syntax object as it appears in a @racket[prefix].}
|
||||||
|
|
||||||
|
|
||||||
@; --------------------------------------------------
|
@; --------------------------------------------------
|
||||||
|
@ -205,6 +237,8 @@ binding, constructor, etc.}
|
||||||
[dummy toplevel?]
|
[dummy toplevel?]
|
||||||
[lang-info (or/c #f (vector/c module-path? symbol? any/c))]
|
[lang-info (or/c #f (vector/c module-path? symbol? any/c))]
|
||||||
[internal-context (or/c #f #t stx? (vectorof stx?))]
|
[internal-context (or/c #f #t stx? (vectorof stx?))]
|
||||||
|
[binding-names (hash/c exact-integer?
|
||||||
|
(hash/c symbol? (or/c #t stx?)))]
|
||||||
[flags (listof (or/c 'cross-phase))]
|
[flags (listof (or/c 'cross-phase))]
|
||||||
[pre-submodules (listof mod?)]
|
[pre-submodules (listof mod?)]
|
||||||
[post-submodules (listof mod?)])]{
|
[post-submodules (listof mod?)])]{
|
||||||
|
@ -240,12 +274,24 @@ binding, constructor, etc.}
|
||||||
The @racket[lang-info] value specifies an optional module path that
|
The @racket[lang-info] value specifies an optional module path that
|
||||||
provides information about the module's implementation language.
|
provides information about the module's implementation language.
|
||||||
|
|
||||||
The @racket[internal-module-context] value describes the lexical
|
The @racket[internal-context] value describes the lexical context of
|
||||||
context of the body of the module. This value is used by
|
the body of the module. This value is used by
|
||||||
@racket[module->namespace]. A @racket[#f] value means that the
|
@racket[module->namespace]. A @racket[#f] value means that the
|
||||||
context is unavailable or empty. A @racket[#t] value means that the
|
context is unavailable or empty. A @racket[#t] value means that the
|
||||||
context is computed by re-importing all required modules. A
|
context is computed by re-importing all required modules. A
|
||||||
syntax-object value embeds an arbitrary lexical context.
|
syntax-object value embeds lexical information; the syntax object
|
||||||
|
should contain a vector of two elements, where the first element of
|
||||||
|
the vector is a syntax object for the module's body, which includes
|
||||||
|
the outside-edge and inside-edge scopes, and the second element of
|
||||||
|
the vector is a syntax object that has just the module's inside-edge
|
||||||
|
scope.
|
||||||
|
|
||||||
|
The @racket[binding-names] value provides additional information to
|
||||||
|
@racket[module->namespace] to correlate symbol names for variables
|
||||||
|
and syntax definitions to identifiers that map to those variables. A
|
||||||
|
separate table of names exists for each phase, and a @racket[#t]
|
||||||
|
mapping for a name indicates that it is mapped but inaccessible
|
||||||
|
(because the relevant scopes are inaccessible).
|
||||||
|
|
||||||
The @racket[flags] field records certain properties of the module.
|
The @racket[flags] field records certain properties of the module.
|
||||||
The @racket['cross-phase] flag indicates that the module body is
|
The @racket['cross-phase] flag indicates that the module body is
|
||||||
|
@ -257,7 +303,7 @@ binding, constructor, etc.}
|
||||||
submodules, while the @racket[post-submodules] field records
|
submodules, while the @racket[post-submodules] field records
|
||||||
@racket[module*]-declared submodules.}
|
@racket[module*]-declared submodules.}
|
||||||
|
|
||||||
@defstruct+[provided
|
@defstruct+[(provided zo)
|
||||||
([name symbol?]
|
([name symbol?]
|
||||||
[src (or/c module-path-index? #f)]
|
[src (or/c module-path-index? #f)]
|
||||||
[src-name symbol?]
|
[src-name symbol?]
|
||||||
|
@ -307,7 +353,7 @@ binding, constructor, etc.}
|
||||||
values; also, this information is redundant, since it can be inferred
|
values; also, this information is redundant, since it can be inferred
|
||||||
by the bindings referenced though @racket[closure-map].
|
by the bindings referenced though @racket[closure-map].
|
||||||
|
|
||||||
Which a closure captures top-level or module-level variables or
|
When a closure captures top-level or module-level variables or
|
||||||
refers to a syntax-object constant, the variables and constants are
|
refers to a syntax-object constant, the variables and constants are
|
||||||
represented in the closure by capturing a prefix (in the sense
|
represented in the closure by capturing a prefix (in the sense
|
||||||
of @racket[prefix]). The @racket[toplevel-map] field indicates
|
of @racket[prefix]). The @racket[toplevel-map] field indicates
|
||||||
|
@ -539,6 +585,22 @@ binding, constructor, etc.}
|
||||||
which is handled specially by the run-time system.}
|
which is handled specially by the run-time system.}
|
||||||
|
|
||||||
|
|
||||||
|
@defstruct+[(with-immed-mark expr)
|
||||||
|
([key (or/c expr? seq? any/c)]
|
||||||
|
[val (or/c expr? seq? any/c)]
|
||||||
|
[body (or/c expr? seq? any/c)])]{
|
||||||
|
|
||||||
|
Represents a @racket[(call-with-immediate-continuation-mark key
|
||||||
|
(lambda (_arg) _body) val)] expression that is handled specially by
|
||||||
|
the run-time system to avoid a closure allocation. One initialized
|
||||||
|
slot is pushed onto the stack after @racket[expr] and @racket[val]
|
||||||
|
are evaluated and before @racket[body] is evaluated.
|
||||||
|
|
||||||
|
After each of @racket[key] and @racket[val] is evaluated, the stack is
|
||||||
|
restored to its depth from before evaluating @racket[key] or
|
||||||
|
@racket[val].}
|
||||||
|
|
||||||
|
|
||||||
@defstruct+[(primval expr)
|
@defstruct+[(primval expr)
|
||||||
([id exact-nonnegative-integer?])]{
|
([id exact-nonnegative-integer?])]{
|
||||||
Represents a direct reference to a variable imported from the run-time
|
Represents a direct reference to a variable imported from the run-time
|
||||||
|
@ -547,127 +609,207 @@ binding, constructor, etc.}
|
||||||
@; --------------------------------------------------
|
@; --------------------------------------------------
|
||||||
@section{Syntax Objects}
|
@section{Syntax Objects}
|
||||||
|
|
||||||
@defstruct+[(wrapped zo)
|
@defstruct+[(stx-obj zo)
|
||||||
([datum any/c]
|
([datum any/c]
|
||||||
[wraps (listof wrap?)]
|
[wrap wrap?]
|
||||||
|
[srcloc (or/c #f srcloc?)]
|
||||||
|
[props (hash/c symbol? any/c)]
|
||||||
[tamper-status (or/c 'clean 'armed 'tainted)])]{
|
[tamper-status (or/c 'clean 'armed 'tainted)])]{
|
||||||
Represents a syntax object, where @racket[wraps] contain the lexical
|
Represents a syntax object, where @racket[wrap] contains lexical
|
||||||
information and @racket[tamper-status] is taint information. When the
|
information, @racket[srcloc] is the source location,
|
||||||
@racket[datum] part is itself compound, its pieces are wrapped, too.}
|
@racket[props] contains preserved properties,
|
||||||
|
and @racket[tamper-status] is taint information. When the
|
||||||
|
@racket[datum] part is itself compound, its pieces are wrapped
|
||||||
|
as @racket[stx-obj]s, too.
|
||||||
|
|
||||||
@defstruct+[(wrap zo) ()]{
|
The content of @racket[wrap] is typically cyclic, since it includes
|
||||||
A supertype for lexical-information elements.}
|
scopes that contain bindings that refer to scopes.}
|
||||||
|
|
||||||
@defstruct+[(top-level-rename wrap) ([flag boolean?])]{
|
@defstruct+[(wrap zo) ([shifts (listof module-shift?)]
|
||||||
A top-level renaming.}
|
[simple-scopes (listof scope?)]
|
||||||
|
[multi-scopes (listof (list/c multi-scope? (or/c #f exact-integer?)))])]{
|
||||||
|
Lexical information for a syntax object. The @racket[shifts] field
|
||||||
|
allows binding information to be relative to the enclosing module's
|
||||||
|
run-time path. The @racket[simple-scopes] field records scopes that
|
||||||
|
are attached to the syntax object at all phases, and @racket[multi-scopes]
|
||||||
|
records phase-specific scopes (which are always attached as a group)
|
||||||
|
along with a phase shift for every scope within the group).}
|
||||||
|
|
||||||
@defstruct+[(mark-barrier wrap) ([value symbol?])]{
|
@defstruct+[(module-shift zo) ([from (or/c #f module-path-index?)]
|
||||||
A mark barrier.}
|
[to (or/c #f module-path-index?)]
|
||||||
|
[from-inspector-desc (or/c #f symbol?)]
|
||||||
|
[to-inspector-desc (or/c #f symbol?)])]{
|
||||||
|
|
||||||
@defstruct+[(free-id-info zo)
|
Records a history of module path index replacements. These replacements
|
||||||
([path0 module-path-index?]
|
are applied in reverse order, and a module instantiation typically adds
|
||||||
[symbol0 symbol?]
|
one more shift to replace the current ``self'' module path index
|
||||||
[path1 module-path-index?]
|
with a run-time module path. The @racket[from] and @racket[to]
|
||||||
[symbol1 symbol?]
|
fields should be both @racket[#f] or both non-@racket[#f].
|
||||||
[phase0 (or/c exact-integer? #f)]
|
|
||||||
[phase1 (or/c exact-integer? #f)]
|
|
||||||
[phase2 (or/c exact-integer? #f)]
|
|
||||||
[use-current-inspector? boolean?])]{
|
|
||||||
Information about a free identifier.}
|
|
||||||
|
|
||||||
@defstruct+[(lexical-rename wrap)
|
The @racket[from-inspector-desc] and @racket[to-inspector-desc] fields
|
||||||
([has-free-id-info? boolean?]
|
similarly should be both @racket[#f] or both non-@racket[#f]. They
|
||||||
[bool2 boolean?]
|
record a history of code-inspector replacements.}
|
||||||
[alist
|
|
||||||
(listof
|
|
||||||
(cons/c symbol?
|
|
||||||
(or/c symbol?
|
|
||||||
(cons/c symbol?
|
|
||||||
(or/c (cons/c symbol? (or/c symbol? #f))
|
|
||||||
free-id-info?)))))])]{
|
|
||||||
A local-binding mapping from symbols to binding-set names.}
|
|
||||||
|
|
||||||
|
|
||||||
@defstruct+[(phase-shift wrap)
|
@defstruct+[(scope zo) ([name (or/c 'root exact-nonnegative-integer?)]
|
||||||
([amt (or/c exact-integer? #f)]
|
[kind symbol?]
|
||||||
[src module-path-index?]
|
[bindings (listof (list/c symbol? (listof scope?) binding?)) #;#:mutable]
|
||||||
[dest module-path-index?]
|
[bulk-bindings (listof (list/c (listof scope?) all-from-module?)) #;#:mutable]
|
||||||
[cancel-id (or/c exact-integer? #f)])]{
|
[multi-owner (or/c #f multi-scope?) #;#:mutable])]{
|
||||||
Shifts module bindings later in the wrap set.}
|
|
||||||
|
|
||||||
@defstruct+[(module-rename wrap)
|
Represents a scope. When @racket[name] is @racket['root] then the
|
||||||
([phase exact-integer?]
|
scope represents the unique all-phases scope that is shared among
|
||||||
[kind (or/c 'marked 'normal)]
|
non-module namespaces. Otherwise, @racket[name] is intended to be
|
||||||
[set-id any/c]
|
distinct for each @racket[scope] instance within a module or top-level
|
||||||
[unmarshals (listof make-all-from-module?)]
|
compilation, but the @racket[eq?]-identity of the @racket[scope]
|
||||||
[renames (listof module-binding?)]
|
instance ultimately determines its identity. The @racket[kind] symbol
|
||||||
[mark-renames any/c]
|
similarly acts as a debugging hint in the same way as for
|
||||||
[plus-kern? boolean?])]{
|
@racket[syntax-debug-info].
|
||||||
Represents a set of module and import bindings.}
|
|
||||||
|
|
||||||
@defstruct+[(all-from-module zo)
|
The @racket[bindings] list indicates some bindings that are associated
|
||||||
([path module-path-index?]
|
with the scope. Each element of the list includes a symbolic name, a
|
||||||
[phase (or/c exact-integer? #f)]
|
list of scopes (including the enclosing one), and the binding for the
|
||||||
[src-phase (or/c exact-integer? #f)]
|
combination of name and scope set. A given symbol can appear in
|
||||||
[exceptions (listof symbol?)]
|
multiple elements of @racket[bindings], but the combination of the
|
||||||
[prefix (or/c symbol? #f)]
|
symbol and scope set are unique within @racket[bindings] and across
|
||||||
[context (or/c (listof exact-integer?)
|
all scopes. The mapping of a symbol and scope set to a binding is
|
||||||
(vector/c (listof exact-integer?) any/c)
|
recorded with an arbitrary member of the scope set.
|
||||||
#f)])]{
|
|
||||||
Represents a set of simple imports from one module within a
|
|
||||||
@racket[module-rename].}
|
|
||||||
|
|
||||||
@defstruct+[(module-binding zo) ()]{
|
The @racket[bulk-bindings] field lists bindings of all exports from a
|
||||||
A supertype for module bindings.}
|
given module, which is an optimization over including each export in
|
||||||
|
@racket[bindings]. Elements of @racket[bindings] take precedence over
|
||||||
|
elements of @racket[bulk-bindings], and earlier elements of
|
||||||
|
@racket[bulk-bindings] take precedence over later elements.
|
||||||
|
|
||||||
@defstruct+[(simple-module-binding module-binding)
|
If the @racket[scope] represents a scope at a particular phase for a
|
||||||
([path module-path-index?])]{
|
group of phase-specific scopes, @racket[mark-owner] refers to the
|
||||||
Represents a single identifier import within a
|
group.}
|
||||||
@racket[module-rename].}
|
|
||||||
|
|
||||||
@defstruct+[(phased-module-binding module-binding)
|
|
||||||
([path module-path-index?]
|
|
||||||
[phase exact-integer?]
|
|
||||||
[export-name any/c]
|
|
||||||
[nominal-path nominal-path?]
|
|
||||||
[nominal-export-name any/c])]{
|
|
||||||
Represents a single identifier import within a
|
|
||||||
@racket[module-rename].}
|
|
||||||
|
|
||||||
@defstruct+[(exported-nominal-module-binding module-binding)
|
@defstruct+[(multi-scope zo) ([name exact-nonnegative-integer?]
|
||||||
([path module-path-index?]
|
[src-name any/c]
|
||||||
[export-name any/c]
|
[scopes (listof (list/c (or/c #f exact-integer?) scope?)) #;#:mutable])]{
|
||||||
[nominal-path nominal-path?]
|
|
||||||
[nominal-export-name any/c])]{
|
|
||||||
Represents a single identifier import within a
|
|
||||||
@racket[module-rename].}
|
|
||||||
|
|
||||||
@defstruct+[(nominal-module-binding module-binding)
|
Represents a set of phase-specific scopes that are added or removed
|
||||||
([path module-path-index?]
|
from lexical information as a group. As for @racket[scope], the
|
||||||
[nominal-path nominal-path?])]{
|
@racket[name] field is intended to be distinct for different groups,
|
||||||
Represents a single identifier import within a
|
but the @racket[eq?] identity of the @racket[multi-scope] record
|
||||||
@racket[module-rename].}
|
ultimately determines its identity. The @racket[src-name] field
|
||||||
|
similarly acts as a debugging hint in the same way as for
|
||||||
|
@racket[syntax-debug-info].
|
||||||
|
|
||||||
@defstruct+[(exported-module-binding module-binding)
|
Scopes within the group are instantiated at different phases on
|
||||||
([path module-path-index?]
|
demand. The @racket[scopes] field lists all of the scopes instantiated
|
||||||
[export-name any/c])]{
|
for the group, and the phase at which it is instantiated. Each element
|
||||||
Represents a single identifier import within a
|
of @racket[scopes] must have a @racketidfont{multi-owner} field
|
||||||
@racket[module-rename].}
|
value that refers back to the @racket[multi-scope].}
|
||||||
|
|
||||||
@defstruct+[(nominal-path zo) ()]{
|
|
||||||
A supertype for nominal paths.}
|
|
||||||
|
|
||||||
@defstruct+[(simple-nominal-path nominal-path)
|
@defstruct+[(binding zo) ()]{
|
||||||
([value module-path-index?])]{
|
|
||||||
Represents a simple nominal path.}
|
|
||||||
|
|
||||||
@defstruct+[(imported-nominal-path nominal-path)
|
A supertype for all binding representations.}
|
||||||
([value module-path-index?]
|
|
||||||
[import-phase exact-integer?])]{
|
|
||||||
Represents an imported nominal path.}
|
|
||||||
|
|
||||||
@defstruct+[(phased-nominal-path nominal-path)
|
|
||||||
([value module-path-index?]
|
@defstruct+[(module-binding binding) ([encoded any/c])]{
|
||||||
[import-phase (or/c false/c exact-integer?)]
|
|
||||||
[phase exact-integer?])]{
|
Represents a binding to a module or top-level definition. The
|
||||||
Represents a phased nominal path.}
|
@racket[encoded] field can be unpacked using
|
||||||
|
@racket[decode-module-binding], providing the symbol name for which
|
||||||
|
the binding is the target (since @racket[encoded] can be relative to
|
||||||
|
that name).}
|
||||||
|
|
||||||
|
|
||||||
|
@defstruct+[(decoded-module-binding binding) ([path (or/c #f module-path-index?)]
|
||||||
|
[name symbol?]
|
||||||
|
[phase exact-integer?]
|
||||||
|
[nominal-path (or/c #f module-path-index?)]
|
||||||
|
[nominal-export-name symbol?]
|
||||||
|
[nominal-phase (or/c #f exact-integer?)]
|
||||||
|
[import-phase (or/c #f exact-integer?)]
|
||||||
|
[inspector-desc (or/c #f symbol?)])]{
|
||||||
|
|
||||||
|
Represents a binding to a module or top-level definition---like
|
||||||
|
@racket[module-binding], but in normalized form:
|
||||||
|
|
||||||
|
@itemlist[
|
||||||
|
|
||||||
|
@item{@racket[path]: the referenced module.}
|
||||||
|
|
||||||
|
@item{@racket[name]: the referenced definition within its module.}
|
||||||
|
|
||||||
|
@item{@racket[phase]: the phase of the referenced definition within
|
||||||
|
its module.}
|
||||||
|
|
||||||
|
@item{@racket[nominal-path]: the module that was explicitly imported
|
||||||
|
into the binding context; this path can be different from
|
||||||
|
@racket[path] when a definition is re-exported.}
|
||||||
|
|
||||||
|
@item{@racket[nominal-export-name]: the name of the binding as
|
||||||
|
exported from @racket[nominal-path], which can be different from
|
||||||
|
@racket[name] due to renaming on export.}
|
||||||
|
|
||||||
|
@item{@racket[nominal-phase]: the phase of the export from
|
||||||
|
@racket[nominal-path], which can be different from @racket[phase]
|
||||||
|
due to re-export from a module that imports at a phase level other
|
||||||
|
than @racket[0].}
|
||||||
|
|
||||||
|
@item{@racket[import-phase]: the phase of the import of
|
||||||
|
@racket[nominal-path], which shifted (if non-@racket[0]) the
|
||||||
|
binding phase relative to the export phase from
|
||||||
|
@racket[nominal-path].}
|
||||||
|
|
||||||
|
@item{@racket[inspector-desc]: a name for an inspector (mapped to a
|
||||||
|
specific inspector at run time) that determines access to the
|
||||||
|
definition.}
|
||||||
|
|
||||||
|
]}
|
||||||
|
|
||||||
|
@defstruct+[(local-binding binding) ([name symbol?])]{
|
||||||
|
|
||||||
|
Represents a local binding (i.e., not at the top level or module level).
|
||||||
|
Such bindings rarely appear in bytecode, since @racket[quote-syntax]
|
||||||
|
prunes them.}
|
||||||
|
|
||||||
|
|
||||||
|
@defstruct+[(free-id=?-binding binding) ([base (and/c binding?
|
||||||
|
(not/c free-id=?-binding?))]
|
||||||
|
[id stx-obj?]
|
||||||
|
[phase (or/c #f exact-integer?)])]{
|
||||||
|
|
||||||
|
Represents a binding that includes a @racket[free-identifier=?] alias
|
||||||
|
(to an identifier with a particular phase shift) as well as a base binding.}
|
||||||
|
|
||||||
|
|
||||||
|
@defstruct+[(all-from-module zo) ([path module-path-index?]
|
||||||
|
[phase (or/c exact-integer? #f)]
|
||||||
|
[src-phase (or/c exact-integer? #f)]
|
||||||
|
[inspector-desc symbol?]
|
||||||
|
[exceptions (listof symbol?)]
|
||||||
|
[prefix (or/c symbol? #f)])]{
|
||||||
|
|
||||||
|
Describes a bulk import as an optimization over individual imports of
|
||||||
|
a module's exports:
|
||||||
|
|
||||||
|
@itemlist[
|
||||||
|
|
||||||
|
@item{@racket[path]: the imported module.}
|
||||||
|
|
||||||
|
@item{@racket[phase]: the phase of the import module's exports.}
|
||||||
|
|
||||||
|
@item{@racket[src-phase]: the phase at which @racket[path] was
|
||||||
|
imported; @racket[src-phase] combined with @racket[phase]
|
||||||
|
determines the phase of the bindings.}
|
||||||
|
|
||||||
|
@item{@racket[inspector-desc]: a name for an inspector (mapped to a
|
||||||
|
specific inspector at run time) that determines access to the
|
||||||
|
definition.}
|
||||||
|
|
||||||
|
@item{@racket[exceptions]: exports of @racket[path] that are omitted
|
||||||
|
from the bulk import.}
|
||||||
|
|
||||||
|
@item{@racket[prefix]: a prefix, if any, applied (after
|
||||||
|
@racket[exceptions]) to each of the imported names.}
|
||||||
|
|
||||||
|
]}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -70,27 +70,27 @@ synchronization} when @racket[(async-channel-put ach v)] would return
|
||||||
a value (i.e., when the channel holds fewer values already than its
|
a value (i.e., when the channel holds fewer values already than its
|
||||||
limit); @resultItself{asychronous channel-put event}.}
|
limit); @resultItself{asychronous channel-put event}.}
|
||||||
|
|
||||||
@defexamples[#:eval (async-eval)
|
@examples[#:eval (async-eval) #:once
|
||||||
(define (server input-channel output-channel)
|
(eval:no-prompt
|
||||||
(thread (lambda ()
|
(define (server input-channel output-channel)
|
||||||
(define (get)
|
(thread (lambda ()
|
||||||
(async-channel-get input-channel))
|
(define (get)
|
||||||
(define (put x)
|
(async-channel-get input-channel))
|
||||||
(async-channel-put output-channel x))
|
(define (put x)
|
||||||
(define (do-large-computation)
|
(async-channel-put output-channel x))
|
||||||
(sqrt 9))
|
(define (do-large-computation)
|
||||||
(let loop ([data (get)])
|
(sqrt 9))
|
||||||
(case data
|
(let loop ([data (get)])
|
||||||
[(quit) (void)]
|
(case data
|
||||||
[(add) (begin
|
[(quit) (void)]
|
||||||
(put (+ 1 (get)))
|
[(add) (begin
|
||||||
(loop (get)))]
|
(put (+ 1 (get)))
|
||||||
[(long) (begin
|
(loop (get)))]
|
||||||
(put (do-large-computation))
|
[(long) (begin
|
||||||
(loop (get)))])))))
|
(put (do-large-computation))
|
||||||
|
(loop (get)))])))))
|
||||||
(define to-server (make-async-channel))
|
(define to-server (make-async-channel))
|
||||||
(define from-server (make-async-channel))
|
(define from-server (make-async-channel)))
|
||||||
|
|
||||||
(server to-server from-server)
|
(server to-server from-server)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require "mz.rkt" scribble/eval (for-label racket/block))
|
@(require "mz.rkt" (for-label racket/block))
|
||||||
|
|
||||||
@(define ev (make-base-eval))
|
@(define ev (make-base-eval))
|
||||||
@(ev '(require racket/block))
|
@(ev '(require racket/block))
|
||||||
|
|
|
@ -643,7 +643,7 @@ normally identified by @racket[""]). See also
|
||||||
@section{Additional Byte String Functions}
|
@section{Additional Byte String Functions}
|
||||||
@note-lib[racket/bytes]
|
@note-lib[racket/bytes]
|
||||||
@(define string-eval (make-base-eval))
|
@(define string-eval (make-base-eval))
|
||||||
@(interaction-eval #:eval string-eval (require racket/bytes racket/list))
|
@@examples[#:hidden #:eval string-eval (require racket/bytes racket/list)]
|
||||||
|
|
||||||
@defproc[(bytes-append* [str bytes?] ... [strs (listof bytes?)]) bytes?]{
|
@defproc[(bytes-append* [str bytes?] ... [strs (listof bytes?)]) bytes?]{
|
||||||
@; Note: this is exactly the same description as the one for append*
|
@; Note: this is exactly the same description as the one for append*
|
||||||
|
|
|
@ -15,10 +15,9 @@ often, then the thread eventually participates in a transaction.
|
||||||
|
|
||||||
In addition to its use with channel-specific procedures, a channel can
|
In addition to its use with channel-specific procedures, a channel can
|
||||||
be used as a @tech{synchronizable event} (see @secref["sync"]). A
|
be used as a @tech{synchronizable event} (see @secref["sync"]). A
|
||||||
channel is @tech{ready for synchronization} when @racket[make-channel]
|
channel is @tech{ready for synchronization} when @racket[channel-get]
|
||||||
is ready when @racket[channel-get] would not block; the channel's
|
would not block; the channel's @tech{synchronization result} is the
|
||||||
@tech{synchronization result} is the same as the @racket[channel-get]
|
same as the @racket[channel-get] result.
|
||||||
result.
|
|
||||||
|
|
||||||
For buffered asynchronous channels, see @secref["async-channel"].
|
For buffered asynchronous channels, see @secref["async-channel"].
|
||||||
|
|
||||||
|
|
|
@ -191,18 +191,31 @@ required keyword arguments of @racket[wrapper-proc] must be a subset
|
||||||
of the required keywords of @racket[proc].
|
of the required keywords of @racket[proc].
|
||||||
|
|
||||||
For applications without keywords, the result of @racket[wrapper-proc]
|
For applications without keywords, the result of @racket[wrapper-proc]
|
||||||
must be either the same number of values as supplied to it or one more
|
must be at least the same number of values as supplied to it.
|
||||||
than the number of supplied values, where an extra result is supplied
|
Additional results can be supplied---before the values that correspond
|
||||||
before the others. The additional result, if any, must be a procedure
|
to the supplied values---in the following pattern:
|
||||||
|
|
||||||
|
@itemlist[
|
||||||
|
|
||||||
|
@item{An optional procedure, @racket[_result-wrapper-proc], which
|
||||||
|
will be applied to the results of @racket[proc]; followed by}
|
||||||
|
|
||||||
|
@item{any number of repetitions of @racket['mark _key _val] (i.e.,
|
||||||
|
three values), where the call @racket[_proc] is wrapped to
|
||||||
|
install a @tech{continuation mark} @racket[_key] and @racket[_val].}
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
If @racket[_result-wrapper-proc] is produced, it must be a procedure
|
||||||
that accepts as many results as produced by @racket[proc]; it must
|
that accepts as many results as produced by @racket[proc]; it must
|
||||||
return the same number of results. If @racket[wrapper-proc] returns
|
return the same number of results. If @racket[_result-wrapper-proc] is
|
||||||
the same number of values as it is given (i.e., it does not return a
|
not supplied, then @racket[proc] is called in @tech{tail position}
|
||||||
procedure to impersonator @racket[proc]'s result), then @racket[proc] is
|
with respect to the call to the impersonator.
|
||||||
called in @tech{tail position} with respect to the call to the impersonator.
|
|
||||||
|
|
||||||
For applications that include keyword arguments, @racket[wrapper-proc]
|
For applications that include keyword arguments, @racket[wrapper-proc]
|
||||||
must return an additional value before any other values but after the
|
must return an additional value before any other values but after
|
||||||
result-impersonating procedure (if any). The additional value must be a
|
@racket[_result-wrapper-proc] and @racket['mark _key _val]
|
||||||
|
sequences (if any). The additional value must be a
|
||||||
list of replacements for the keyword arguments that were supplied to the
|
list of replacements for the keyword arguments that were supplied to the
|
||||||
impersonator (i.e., not counting optional arguments that were
|
impersonator (i.e., not counting optional arguments that were
|
||||||
not supplied). The arguments must be ordered according to the sorted
|
not supplied). The arguments must be ordered according to the sorted
|
||||||
|
@ -221,13 +234,59 @@ If any @racket[prop] is @racket[impersonator-prop:application-mark] and if the
|
||||||
associated @racket[prop-val] is a pair, then the call to @racket[proc]
|
associated @racket[prop-val] is a pair, then the call to @racket[proc]
|
||||||
is wrapped with @racket[with-continuation-mark] using @racket[(car
|
is wrapped with @racket[with-continuation-mark] using @racket[(car
|
||||||
prop-val)] as the mark key and @racket[(cdr prop-val)] as the mark
|
prop-val)] as the mark key and @racket[(cdr prop-val)] as the mark
|
||||||
value. In addition, if @racket[continuation-mark-set-first] with
|
value. In addition, if the immediate
|
||||||
@racket[(car prop-val)] produces a value for the immediate
|
continuation frame of the call to the impersonated procedure
|
||||||
continuation frame of the call to the impersonated procedure, the value is
|
includes a value for @racket[(car prop-val)]---that is, if
|
||||||
|
@racket[call-with-immediate-continuation-mark] would produce a value
|
||||||
|
for @racket[(car prop-val)] in the call's continuation---then the value is
|
||||||
also installed as an immediate value for @racket[(car prop-val)] as a
|
also installed as an immediate value for @racket[(car prop-val)] as a
|
||||||
mark during the call to @racket[wrapper-proc] (which allows tail-calls
|
mark during the call to @racket[wrapper-proc] (which allows tail-calls
|
||||||
of impersonators with respect to wrapping impersonators to be detected within
|
of impersonators with respect to wrapping impersonators to be detected within
|
||||||
@racket[wrapper-proc]).}
|
@racket[wrapper-proc]).
|
||||||
|
|
||||||
|
@history[#:changed "6.3.0.5" @elem{Added support for @racket['mark
|
||||||
|
_key _val] results from
|
||||||
|
@racket[wrapper-proc].}]
|
||||||
|
|
||||||
|
@examples[
|
||||||
|
|
||||||
|
(define (add15 x) (+ x 15))
|
||||||
|
(define add15+print
|
||||||
|
(impersonate-procedure add15
|
||||||
|
(λ (x)
|
||||||
|
(printf "called with ~s\n" x)
|
||||||
|
(values (λ (res)
|
||||||
|
(printf "returned ~s\n" res)
|
||||||
|
res)
|
||||||
|
x))))
|
||||||
|
(add15 27)
|
||||||
|
(add15+print 27)
|
||||||
|
|
||||||
|
(define-values (imp-prop:p1 imp-prop:p1? imp-prop:p1-get)
|
||||||
|
(make-impersonator-property 'imp-prop:p1))
|
||||||
|
(define-values (imp-prop:p2 imp-prop:p2? imp-prop:p2-get)
|
||||||
|
(make-impersonator-property 'imp-prop:p2))
|
||||||
|
|
||||||
|
(define add15.2 (impersonate-procedure add15 #f imp-prop:p1 11))
|
||||||
|
(add15.2 2)
|
||||||
|
(imp-prop:p1? add15.2)
|
||||||
|
(imp-prop:p1-get add15.2)
|
||||||
|
(imp-prop:p2? add15.2)
|
||||||
|
|
||||||
|
(define add15.3 (impersonate-procedure add15.2 #f imp-prop:p2 13))
|
||||||
|
(add15.3 3)
|
||||||
|
(imp-prop:p1? add15.3)
|
||||||
|
(imp-prop:p1-get add15.3)
|
||||||
|
(imp-prop:p2? add15.3)
|
||||||
|
(imp-prop:p2-get add15.3)
|
||||||
|
|
||||||
|
(define add15.4 (impersonate-procedure add15.3 #f imp-prop:p1 101))
|
||||||
|
(add15.4 4)
|
||||||
|
(imp-prop:p1? add15.4)
|
||||||
|
(imp-prop:p1-get add15.4)
|
||||||
|
(imp-prop:p2? add15.4)
|
||||||
|
(imp-prop:p2-get add15.4)]
|
||||||
|
}
|
||||||
|
|
||||||
@defproc[(impersonate-procedure* [proc procedure?]
|
@defproc[(impersonate-procedure* [proc procedure?]
|
||||||
[wrapper-proc (or/c procedure? #f)]
|
[wrapper-proc (or/c procedure? #f)]
|
||||||
|
@ -387,6 +446,7 @@ or override impersonator-property values of @racket[box].}
|
||||||
[remove-proc (hash? any/c . -> . any/c)]
|
[remove-proc (hash? any/c . -> . any/c)]
|
||||||
[key-proc (hash? any/c . -> . any/c)]
|
[key-proc (hash? any/c . -> . any/c)]
|
||||||
[clear-proc (or/c #f (hash? . -> . any)) #f]
|
[clear-proc (or/c #f (hash? . -> . any)) #f]
|
||||||
|
[equal-key-proc (or/c #f (hash? any/c . -> . any/c)) #f]
|
||||||
[prop impersonator-property?]
|
[prop impersonator-property?]
|
||||||
[prop-val any] ... ...)
|
[prop-val any] ... ...)
|
||||||
(and/c hash? impersonator?)]{
|
(and/c hash? impersonator?)]{
|
||||||
|
@ -402,7 +462,7 @@ In addition, operations like
|
||||||
@racket[hash-iterate-key] or @racket[hash-map], which extract
|
@racket[hash-iterate-key] or @racket[hash-map], which extract
|
||||||
keys from the table, use @racket[key-proc] to filter keys extracted
|
keys from the table, use @racket[key-proc] to filter keys extracted
|
||||||
from the table. Operations like @racket[hash-iterate-value] or
|
from the table. Operations like @racket[hash-iterate-value] or
|
||||||
@racket[hash-iterate-map] implicitly use @racket[hash-ref] and
|
@racket[hash-values] implicitly use @racket[hash-ref] and
|
||||||
therefore redirect through @racket[ref-proc].
|
therefore redirect through @racket[ref-proc].
|
||||||
|
|
||||||
The @racket[ref-proc] must accept @racket[hash] and a key passed
|
The @racket[ref-proc] must accept @racket[hash] and a key passed
|
||||||
|
@ -440,6 +500,19 @@ If @racket[clear-proc] is @racket[#f], then @racket[hash-clear] or
|
||||||
@racket[hash-clear!] on the impersonator is implemented using
|
@racket[hash-clear!] on the impersonator is implemented using
|
||||||
@racket[hash-iterate-key] and @racket[hash-remove] or @racket[hash-remove!].
|
@racket[hash-iterate-key] and @racket[hash-remove] or @racket[hash-remove!].
|
||||||
|
|
||||||
|
If @racket[equal-key-proc] is not @racket[#f], it effectively
|
||||||
|
interposes on calls to @racket[equal?], @racket[equal-hash-code], and
|
||||||
|
@racket[equal-secondary-hash-code] for the keys of @racket[hash]. The
|
||||||
|
@racket[equal-key-proc] must accept as its arguments @racket[hash] and
|
||||||
|
a key that is either mapped by @racket[hash] or passed to
|
||||||
|
@racket[hash-ref], etc., where the latter has potentially been
|
||||||
|
adjusted by the corresponding @racket[ref-proc], etc@|.__| The result
|
||||||
|
is a value that is passed to @racket[equal?],
|
||||||
|
@racket[equal-hash-code], and @racket[equal-secondary-hash-code] as
|
||||||
|
needed to hash and compare keys. In the case of @racket[hash-set!] or
|
||||||
|
@racket[hash-set], the key that is passed to @racket[equal-key-proc]
|
||||||
|
is the one stored in the hash table for future lookup.
|
||||||
|
|
||||||
The @racket[hash-iterate-value], @racket[hash-map], or
|
The @racket[hash-iterate-value], @racket[hash-map], or
|
||||||
@racket[hash-for-each] functions use a combination of
|
@racket[hash-for-each] functions use a combination of
|
||||||
@racket[hash-iterate-key] and @racket[hash-ref]. If a key
|
@racket[hash-iterate-key] and @racket[hash-ref]. If a key
|
||||||
|
@ -448,7 +521,10 @@ produced by @racket[key-proc] does not yield a value through
|
||||||
|
|
||||||
Pairs of @racket[prop] and @racket[prop-val] (the number of arguments
|
Pairs of @racket[prop] and @racket[prop-val] (the number of arguments
|
||||||
to @racket[impersonate-hash] must be odd) add impersonator properties
|
to @racket[impersonate-hash] must be odd) add impersonator properties
|
||||||
or override impersonator-property values of @racket[hash].}
|
or override impersonator-property values of @racket[hash].
|
||||||
|
|
||||||
|
@history[#:changed "6.3.0.11" @elem{Added the @racket[equal-key-proc]
|
||||||
|
argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(impersonate-channel [channel channel?]
|
@defproc[(impersonate-channel [channel channel?]
|
||||||
|
@ -707,7 +783,6 @@ or structure type.
|
||||||
#:changed "6.1.1.8" @elem{Added optional @racket[struct-type]
|
#:changed "6.1.1.8" @elem{Added optional @racket[struct-type]
|
||||||
argument.}]}
|
argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(chaperone-vector [vec vector?]
|
@defproc[(chaperone-vector [vec vector?]
|
||||||
[ref-proc (vector? exact-nonnegative-integer? any/c . -> . any/c)]
|
[ref-proc (vector? exact-nonnegative-integer? any/c . -> . any/c)]
|
||||||
[set-proc (vector? exact-nonnegative-integer? any/c . -> . any/c)]
|
[set-proc (vector? exact-nonnegative-integer? any/c . -> . any/c)]
|
||||||
|
@ -743,6 +818,7 @@ the same value or a chaperone of the value that it is given. The
|
||||||
[remove-proc (hash? any/c . -> . any/c)]
|
[remove-proc (hash? any/c . -> . any/c)]
|
||||||
[key-proc (hash? any/c . -> . any/c)]
|
[key-proc (hash? any/c . -> . any/c)]
|
||||||
[clear-proc (or/c #f (hash? . -> . any)) #f]
|
[clear-proc (or/c #f (hash? . -> . any)) #f]
|
||||||
|
[equal-key-proc (or/c #f (hash? any/c . -> . any/c)) #f]
|
||||||
[prop impersonator-property?]
|
[prop impersonator-property?]
|
||||||
[prop-val any] ... ...)
|
[prop-val any] ... ...)
|
||||||
(and/c hash? chaperone?)]{
|
(and/c hash? chaperone?)]{
|
||||||
|
@ -752,8 +828,12 @@ and support for immutable hashes. The @racket[ref-proc] procedure must
|
||||||
return a found value or a chaperone of the value. The
|
return a found value or a chaperone of the value. The
|
||||||
@racket[set-proc] procedure must produce two values: the key that it
|
@racket[set-proc] procedure must produce two values: the key that it
|
||||||
is given or a chaperone of the key and the value that it is given or a
|
is given or a chaperone of the key and the value that it is given or a
|
||||||
chaperone of the value. The @racket[remove-proc] and @racket[key-proc]
|
chaperone of the value. The @racket[remove-proc], @racket[key-proc],
|
||||||
procedures must produce the given key or a chaperone of the key.}
|
and @racket[equal-key-proc]
|
||||||
|
procedures must produce the given key or a chaperone of the key.
|
||||||
|
|
||||||
|
@history[#:changed "6.3.0.11" @elem{Added the @racket[equal-key-proc]
|
||||||
|
argument.}]}
|
||||||
|
|
||||||
@defproc[(chaperone-struct-type [struct-type struct-type?]
|
@defproc[(chaperone-struct-type [struct-type struct-type?]
|
||||||
[struct-info-proc procedure?]
|
[struct-info-proc procedure?]
|
||||||
|
@ -865,11 +945,12 @@ procedure.
|
||||||
(lambda (n) (* n 2))
|
(lambda (n) (* n 2))
|
||||||
(lambda (n) (+ n 1))))
|
(lambda (n) (+ n 1))))
|
||||||
|
|
||||||
(call-with-continuation-prompt
|
(eval:error
|
||||||
(lambda ()
|
(call-with-continuation-prompt
|
||||||
(abort-current-continuation bad-chaperone 5))
|
(lambda ()
|
||||||
bad-chaperone
|
(abort-current-continuation bad-chaperone 5))
|
||||||
(lambda (n) n))
|
bad-chaperone
|
||||||
|
(lambda (n) n)))
|
||||||
|
|
||||||
(define good-chaperone
|
(define good-chaperone
|
||||||
(chaperone-prompt-tag
|
(chaperone-prompt-tag
|
||||||
|
@ -907,10 +988,11 @@ given.
|
||||||
(lambda (l) (map char-upcase l))
|
(lambda (l) (map char-upcase l))
|
||||||
string->list))
|
string->list))
|
||||||
|
|
||||||
(with-continuation-mark bad-chaperone "timballo"
|
(eval:error
|
||||||
(continuation-mark-set-first
|
(with-continuation-mark bad-chaperone "timballo"
|
||||||
(current-continuation-marks)
|
(continuation-mark-set-first
|
||||||
bad-chaperone))
|
(current-continuation-marks)
|
||||||
|
bad-chaperone)))
|
||||||
|
|
||||||
(define (checker s)
|
(define (checker s)
|
||||||
(if (> (string-length s) 5)
|
(if (> (string-length s) 5)
|
||||||
|
|
|
@ -71,11 +71,10 @@
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@(interaction-eval #:eval class-eval (require racket/class racket/contract))
|
@examples[#:hidden #:eval class-eval
|
||||||
@(interaction-eval
|
(require racket/class racket/contract)]
|
||||||
#:eval class-ctc-eval
|
@examples[#:hidden #:eval class-ctc-eval
|
||||||
(require racket/class racket/contract))
|
(require racket/class racket/contract)]
|
||||||
|
|
||||||
|
|
||||||
@title[#:tag "mzlib:class" #:style 'toc]{Classes and Objects}
|
@title[#:tag "mzlib:class" #:style 'toc]{Classes and Objects}
|
||||||
|
|
||||||
|
@ -196,8 +195,9 @@ is the most specific requirement from its superinterfaces. If the
|
||||||
superinterfaces specify inconsistent derivation requirements, the
|
superinterfaces specify inconsistent derivation requirements, the
|
||||||
@exnraise[exn:fail:object].
|
@exnraise[exn:fail:object].
|
||||||
|
|
||||||
@defexamples[
|
@examples[
|
||||||
#:eval class-ctc-eval
|
#:eval class-ctc-eval
|
||||||
|
#:no-prompt
|
||||||
(define file-interface<%>
|
(define file-interface<%>
|
||||||
(interface () open close read-byte write-byte))
|
(interface () open close read-byte write-byte))
|
||||||
(define directory-interface<%>
|
(define directory-interface<%>
|
||||||
|
@ -226,8 +226,9 @@ extended to produce the internal structure type for instances of the
|
||||||
class (so that no information about fields is accessible to the
|
class (so that no information about fields is accessible to the
|
||||||
structure type property's guard, if any).
|
structure type property's guard, if any).
|
||||||
|
|
||||||
@defexamples[
|
@examples[
|
||||||
#:eval class-eval
|
#:eval class-eval
|
||||||
|
#:no-prompt
|
||||||
(define i<%> (interface* () ([prop:custom-write
|
(define i<%> (interface* () ([prop:custom-write
|
||||||
(lambda (obj port mode) (void))])
|
(lambda (obj port mode) (void))])
|
||||||
method1 method2 method3))
|
method1 method2 method3))
|
||||||
|
@ -387,8 +388,9 @@ calling subclass augmentations of methods (see
|
||||||
|
|
||||||
Like @racket[class*], but omits the @racket[_interface-expr]s, for the case that none are needed.
|
Like @racket[class*], but omits the @racket[_interface-expr]s, for the case that none are needed.
|
||||||
|
|
||||||
@defexamples[
|
@examples[
|
||||||
#:eval class-eval
|
#:eval class-eval
|
||||||
|
#:no-prompt
|
||||||
(define book-class%
|
(define book-class%
|
||||||
(class object%
|
(class object%
|
||||||
(field (pages 5))
|
(field (pages 5))
|
||||||
|
@ -404,15 +406,16 @@ to the current object (i.e., the object being initialized or whose
|
||||||
method was called). Use outside the body of a @racket[class*] form is
|
method was called). Use outside the body of a @racket[class*] form is
|
||||||
a syntax error.
|
a syntax error.
|
||||||
|
|
||||||
@defexamples[
|
@examples[
|
||||||
#:eval class-eval
|
#:eval class-eval
|
||||||
(define (describe obj)
|
(eval:no-prompt
|
||||||
(printf "Hello ~a\n" obj))
|
(define (describe obj)
|
||||||
(define table%
|
(printf "Hello ~a\n" obj))
|
||||||
(class object%
|
(define table%
|
||||||
(define/public (describe-self)
|
(class object%
|
||||||
(describe this))
|
(define/public (describe-self)
|
||||||
(super-new)))
|
(describe this))
|
||||||
|
(super-new))))
|
||||||
(send (new table%) describe-self)
|
(send (new table%) describe-self)
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
@ -423,21 +426,22 @@ of the current object (i.e., the object being initialized or whose
|
||||||
method was called). Use outside the body of a @racket[class*] form is
|
method was called). Use outside the body of a @racket[class*] form is
|
||||||
a syntax error.
|
a syntax error.
|
||||||
|
|
||||||
@defexamples[
|
@examples[
|
||||||
#:eval class-eval
|
#:eval class-eval
|
||||||
(define account%
|
(eval:no-prompt
|
||||||
(class object%
|
(define account%
|
||||||
(super-new)
|
(class object%
|
||||||
(init-field balance)
|
(super-new)
|
||||||
(define/public (add n)
|
(init-field balance)
|
||||||
(new this% [balance (+ n balance)]))))
|
(define/public (add n)
|
||||||
(define savings%
|
(new this% [balance (+ n balance)]))))
|
||||||
(class account%
|
(define savings%
|
||||||
(super-new)
|
(class account%
|
||||||
(inherit-field balance)
|
(super-new)
|
||||||
(define interest 0.04)
|
(inherit-field balance)
|
||||||
(define/public (add-interest)
|
(define interest 0.04)
|
||||||
(send this add (* interest balance)))))
|
(define/public (add-interest)
|
||||||
|
(send this add (* interest balance))))))
|
||||||
(let* ([acct (new savings% [balance 500])]
|
(let* ([acct (new savings% [balance 500])]
|
||||||
[acct (send acct add 500)]
|
[acct (send acct add 500)]
|
||||||
[acct (send acct add-interest)])
|
[acct (send acct add-interest)])
|
||||||
|
@ -447,7 +451,7 @@ a syntax error.
|
||||||
@defclassforms[
|
@defclassforms[
|
||||||
[(inspect inspector-expr) ()]
|
[(inspect inspector-expr) ()]
|
||||||
[(init init-decl ...) ("clinitvars")
|
[(init init-decl ...) ("clinitvars")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(class object%
|
(class object%
|
||||||
(super-new)
|
(super-new)
|
||||||
(init turnip
|
(init turnip
|
||||||
|
@ -455,7 +459,7 @@ a syntax error.
|
||||||
[carrot 'good]
|
[carrot 'good]
|
||||||
[(internal-rutabaga rutabaga) 'okay]))]]
|
[(internal-rutabaga rutabaga) 'okay]))]]
|
||||||
[(init-field init-decl ...) ("clinitvars" "clfields")
|
[(init-field init-decl ...) ("clinitvars" "clfields")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(class object%
|
(class object%
|
||||||
(super-new)
|
(super-new)
|
||||||
(init-field turkey
|
(init-field turkey
|
||||||
|
@ -463,181 +467,202 @@ a syntax error.
|
||||||
[chicken 7]
|
[chicken 7]
|
||||||
[(internal-emu emu) 13]))]]
|
[(internal-emu emu) 13]))]]
|
||||||
[(field field-decl ...) ("clfields")
|
[(field field-decl ...) ("clfields")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(class object%
|
(class object%
|
||||||
(super-new)
|
(super-new)
|
||||||
(field [minestrone 'ready]
|
(field [minestrone 'ready]
|
||||||
[(internal-coq-au-vin coq-au-vin) 'stewing]))]]
|
[(internal-coq-au-vin coq-au-vin) 'stewing]))]]
|
||||||
[(inherit-field maybe-renamed ...) ("clfields")
|
[(inherit-field maybe-renamed ...) ("clfields")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define cookbook%
|
(eval:no-prompt
|
||||||
(class object%
|
(define cookbook%
|
||||||
(super-new)
|
(class object%
|
||||||
(field [recipes '(caldo-verde oyakodon eggs-benedict)]
|
(super-new)
|
||||||
[pages 389])))
|
(field [recipes '(caldo-verde oyakodon eggs-benedict)]
|
||||||
|
[pages 389]))))
|
||||||
(class cookbook%
|
(class cookbook%
|
||||||
(super-new)
|
(super-new)
|
||||||
(inherit-field recipes
|
(inherit-field recipes
|
||||||
[internal-pages pages]))]]
|
[internal-pages pages]))]]
|
||||||
[* ((init-rest id) (init-rest)) ("clinitvars")
|
[* ((init-rest id) (init-rest)) ("clinitvars")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define fruit-basket%
|
(eval:no-prompt
|
||||||
(class object%
|
(define fruit-basket%
|
||||||
(super-new)
|
|
||||||
(init-rest fruits)
|
|
||||||
(displayln fruits)))
|
|
||||||
(make-object fruit-basket% 'kiwi 'lychee 'melon)]]
|
|
||||||
[(public maybe-renamed ...) ("clmethoddefs")
|
|
||||||
@defexamples[#:eval class-eval
|
|
||||||
(define jumper%
|
|
||||||
(class object%
|
(class object%
|
||||||
(super-new)
|
(super-new)
|
||||||
(define (skip) 'skip)
|
(init-rest fruits)
|
||||||
(define (hop) 'hop)
|
(displayln fruits))))
|
||||||
(public skip [hop jump])))
|
(make-object fruit-basket% 'kiwi 'lychee 'melon)]]
|
||||||
|
[(public maybe-renamed ...) ("clmethoddefs")
|
||||||
|
@examples[#:eval class-eval
|
||||||
|
(eval:no-prompt
|
||||||
|
(define jumper%
|
||||||
|
(class object%
|
||||||
|
(super-new)
|
||||||
|
(define (skip) 'skip)
|
||||||
|
(define (hop) 'hop)
|
||||||
|
(public skip [hop jump]))))
|
||||||
(send (new jumper%) skip)
|
(send (new jumper%) skip)
|
||||||
(send (new jumper%) jump)]]
|
(send (new jumper%) jump)]]
|
||||||
[(pubment maybe-renamed ...) ("clmethoddefs")
|
[(pubment maybe-renamed ...) ("clmethoddefs")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define runner%
|
(eval:no-prompt
|
||||||
(class object%
|
(define runner%
|
||||||
(super-new)
|
(class object%
|
||||||
(define (run) 'run)
|
(super-new)
|
||||||
(define (trot) 'trot)
|
(define (run) 'run)
|
||||||
(pubment run [trot jog])))
|
(define (trot) 'trot)
|
||||||
|
(pubment run [trot jog]))))
|
||||||
(send (new runner%) run)
|
(send (new runner%) run)
|
||||||
(send (new runner%) jog)]]
|
(send (new runner%) jog)]]
|
||||||
[(public-final maybe-renamed ...) ("clmethoddefs")
|
[(public-final maybe-renamed ...) ("clmethoddefs")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define point%
|
(eval:no-prompt
|
||||||
(class object%
|
(define point%
|
||||||
(super-new)
|
(class object%
|
||||||
(init-field [x 0] [y 0])
|
(super-new)
|
||||||
(define (get-x) x)
|
(init-field [x 0] [y 0])
|
||||||
(define (do-get-y) y)
|
(define (get-x) x)
|
||||||
(public-final get-x [do-get-y get-y])))
|
(define (do-get-y) y)
|
||||||
|
(public-final get-x [do-get-y get-y]))))
|
||||||
(send (new point% [x 1] [y 3]) get-y)
|
(send (new point% [x 1] [y 3]) get-y)
|
||||||
(class point%
|
(eval:error
|
||||||
(super-new)
|
(class point%
|
||||||
(define (get-x) 3.14)
|
(super-new)
|
||||||
(override get-x))]]
|
(define (get-x) 3.14)
|
||||||
|
(override get-x)))]]
|
||||||
[(override maybe-renamed ...) ("clmethoddefs")
|
[(override maybe-renamed ...) ("clmethoddefs")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define sheep%
|
(eval:no-prompt
|
||||||
(class object%
|
(define sheep%
|
||||||
(super-new)
|
(class object%
|
||||||
(define/public (bleat)
|
(super-new)
|
||||||
(displayln "baaaaaaaaah"))))
|
(define/public (bleat)
|
||||||
(define confused-sheep%
|
(displayln "baaaaaaaaah")))))
|
||||||
(class sheep%
|
(eval:no-prompt
|
||||||
(super-new)
|
(define confused-sheep%
|
||||||
(define (bleat)
|
(class sheep%
|
||||||
(super bleat)
|
(super-new)
|
||||||
(displayln "???"))
|
(define (bleat)
|
||||||
(override bleat)))
|
(super bleat)
|
||||||
|
(displayln "???"))
|
||||||
|
(override bleat))))
|
||||||
(send (new sheep%) bleat)
|
(send (new sheep%) bleat)
|
||||||
(send (new confused-sheep%) bleat)]]
|
(send (new confused-sheep%) bleat)]]
|
||||||
[(overment maybe-renamed ...) ("clmethoddefs")
|
[(overment maybe-renamed ...) ("clmethoddefs")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define turkey%
|
(eval:no-prompt
|
||||||
(class object%
|
(define turkey%
|
||||||
(super-new)
|
(class object%
|
||||||
(define/public (gobble)
|
(super-new)
|
||||||
(displayln "gobble gobble"))))
|
(define/public (gobble)
|
||||||
(define extra-turkey%
|
(displayln "gobble gobble")))))
|
||||||
(class turkey%
|
(eval:no-prompt
|
||||||
(super-new)
|
(define extra-turkey%
|
||||||
(define (gobble)
|
(class turkey%
|
||||||
(super gobble)
|
(super-new)
|
||||||
(displayln "gobble gobble gobble")
|
(define (gobble)
|
||||||
(inner (void) gobble))
|
(super gobble)
|
||||||
(overment gobble)))
|
(displayln "gobble gobble gobble")
|
||||||
(define cyborg-turkey%
|
(inner (void) gobble))
|
||||||
(class extra-turkey%
|
(overment gobble))))
|
||||||
(super-new)
|
(eval:no-prompt
|
||||||
(define/augment (gobble)
|
(define cyborg-turkey%
|
||||||
(displayln "110011111011111100010110001011011001100101"))))
|
(class extra-turkey%
|
||||||
|
(super-new)
|
||||||
|
(define/augment (gobble)
|
||||||
|
(displayln "110011111011111100010110001011011001100101")))))
|
||||||
(send (new extra-turkey%) gobble)
|
(send (new extra-turkey%) gobble)
|
||||||
(send (new cyborg-turkey%) gobble)]]
|
(send (new cyborg-turkey%) gobble)]]
|
||||||
[(override-final maybe-renamed ...) ("clmethoddefs")
|
[(override-final maybe-renamed ...) ("clmethoddefs")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define meeper%
|
(eval:no-prompt
|
||||||
(class object%
|
(define meeper%
|
||||||
(super-new)
|
(class object%
|
||||||
(define/public (meep)
|
(super-new)
|
||||||
(displayln "meep"))))
|
(define/public (meep)
|
||||||
(define final-meeper%
|
(displayln "meep")))))
|
||||||
(class meeper%
|
(eval:no-prompt
|
||||||
(super-new)
|
(define final-meeper%
|
||||||
(define (meep)
|
(class meeper%
|
||||||
(super meep)
|
(super-new)
|
||||||
(displayln "This meeping ends with me"))
|
(define (meep)
|
||||||
(override-final meep)))
|
(super meep)
|
||||||
|
(displayln "This meeping ends with me"))
|
||||||
|
(override-final meep))))
|
||||||
(send (new meeper%) meep)
|
(send (new meeper%) meep)
|
||||||
(send (new final-meeper%) meep)]]
|
(send (new final-meeper%) meep)]]
|
||||||
[(augment maybe-renamed ...) ("clmethoddefs")
|
[(augment maybe-renamed ...) ("clmethoddefs")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define buzzer%
|
(eval:no-prompt
|
||||||
(class object%
|
(define buzzer%
|
||||||
(super-new)
|
(class object%
|
||||||
(define/pubment (buzz)
|
(super-new)
|
||||||
(displayln "bzzzt")
|
(define/pubment (buzz)
|
||||||
(inner (void) buzz))))
|
(displayln "bzzzt")
|
||||||
(define loud-buzzer%
|
(inner (void) buzz)))))
|
||||||
(class buzzer%
|
(eval:no-prompt
|
||||||
(super-new)
|
(define loud-buzzer%
|
||||||
(define (buzz)
|
(class buzzer%
|
||||||
(displayln "BZZZZZZZZZT"))
|
(super-new)
|
||||||
(augment buzz)))
|
(define (buzz)
|
||||||
|
(displayln "BZZZZZZZZZT"))
|
||||||
|
(augment buzz))))
|
||||||
(send (new buzzer%) buzz)
|
(send (new buzzer%) buzz)
|
||||||
(send (new loud-buzzer%) buzz)]]
|
(send (new loud-buzzer%) buzz)]]
|
||||||
[(augride maybe-renamed ...) ("clmethoddefs")]
|
[(augride maybe-renamed ...) ("clmethoddefs")]
|
||||||
[(augment-final maybe-renamed ...) ("clmethoddefs")]
|
[(augment-final maybe-renamed ...) ("clmethoddefs")]
|
||||||
[(private id ...) ("clmethoddefs")
|
[(private id ...) ("clmethoddefs")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define light%
|
(eval:no-prompt
|
||||||
(class object%
|
(define light%
|
||||||
(super-new)
|
(class object%
|
||||||
(define on? #t)
|
(super-new)
|
||||||
(define (toggle) (set! on? (not on?)))
|
(define on? #t)
|
||||||
(private toggle)
|
(define (toggle) (set! on? (not on?)))
|
||||||
(define (flick) (toggle))
|
(private toggle)
|
||||||
(public flick)))
|
(define (flick) (toggle))
|
||||||
(send (new light%) toggle)
|
(public flick))))
|
||||||
|
(eval:error (send (new light%) toggle))
|
||||||
(send (new light%) flick)]]
|
(send (new light%) flick)]]
|
||||||
[(abstract id ...) ("clmethoddefs")
|
[(abstract id ...) ("clmethoddefs")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define train%
|
(eval:no-prompt
|
||||||
(class object%
|
(define train%
|
||||||
(super-new)
|
(class object%
|
||||||
(abstract get-speed)
|
(super-new)
|
||||||
(init-field [position 0])
|
(abstract get-speed)
|
||||||
(define/public (move)
|
(init-field [position 0])
|
||||||
(new this% [position (+ position (get-speed))]))))
|
(define/public (move)
|
||||||
(define acela%
|
(new this% [position (+ position (get-speed))])))))
|
||||||
(class train%
|
(eval:no-prompt
|
||||||
(super-new)
|
(define acela%
|
||||||
(define/override (get-speed) 241)))
|
(class train%
|
||||||
(define talgo-350%
|
(super-new)
|
||||||
(class train%
|
(define/override (get-speed) 241))))
|
||||||
(super-new)
|
(eval:no-prompt
|
||||||
(define/override (get-speed) 330)))
|
(define talgo-350%
|
||||||
(new train%)
|
(class train%
|
||||||
|
(super-new)
|
||||||
|
(define/override (get-speed) 330))))
|
||||||
|
(eval:error (new train%))
|
||||||
(send (new acela%) move)]]
|
(send (new acela%) move)]]
|
||||||
[(inherit maybe-renamed ...) ("classinherit")
|
[(inherit maybe-renamed ...) ("classinherit")
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define alarm%
|
(eval:no-prompt
|
||||||
(class object%
|
(define alarm%
|
||||||
(super-new)
|
(class object%
|
||||||
(define/public (alarm)
|
(super-new)
|
||||||
(displayln "beeeeeeeep"))))
|
(define/public (alarm)
|
||||||
(define car-alarm%
|
(displayln "beeeeeeeep")))))
|
||||||
(class alarm%
|
(eval:no-prompt
|
||||||
(super-new)
|
(define car-alarm%
|
||||||
(init-field proximity)
|
(class alarm%
|
||||||
(inherit alarm)
|
(super-new)
|
||||||
(when (< proximity 10)
|
(init-field proximity)
|
||||||
(alarm))))
|
(inherit alarm)
|
||||||
|
(when (< proximity 10)
|
||||||
|
(alarm)))))
|
||||||
(new car-alarm% [proximity 5])]]
|
(new car-alarm% [proximity 5])]]
|
||||||
[(inherit/super maybe-renamed ...) ("classinherit")]
|
[(inherit/super maybe-renamed ...) ("classinherit")]
|
||||||
[(inherit/inner maybe-renamed ...) ("classinherit")]
|
[(inherit/inner maybe-renamed ...) ("classinherit")]
|
||||||
|
@ -1067,21 +1092,22 @@ hidden name (except as a top-level definition). The
|
||||||
@racket[interface->method-names] procedure does not expose hidden
|
@racket[interface->method-names] procedure does not expose hidden
|
||||||
names.
|
names.
|
||||||
|
|
||||||
@defexamples[
|
@examples[
|
||||||
#:eval class-eval
|
#:eval class-eval
|
||||||
(define-values (r o)
|
(eval:no-prompt
|
||||||
(let ()
|
(define-values (r o)
|
||||||
(define-local-member-name m)
|
(let ()
|
||||||
(define c% (class object%
|
(define-local-member-name m)
|
||||||
(define/public (m) 10)
|
(define c% (class object%
|
||||||
(super-new)))
|
(define/public (m) 10)
|
||||||
(define o (new c%))
|
(super-new)))
|
||||||
|
(define o (new c%))
|
||||||
|
|
||||||
(values (send o m)
|
(values (send o m)
|
||||||
o)))
|
o))))
|
||||||
|
|
||||||
r
|
r
|
||||||
(send o m)
|
(eval:error (send o m))
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1121,28 +1147,27 @@ Produces an integer hash code consistent with
|
||||||
@racket[member-name-key=?] comparisons, analogous to
|
@racket[member-name-key=?] comparisons, analogous to
|
||||||
@racket[equal-hash-code].}
|
@racket[equal-hash-code].}
|
||||||
|
|
||||||
@defexamples[
|
@examples[
|
||||||
#:eval class-eval
|
#:eval class-eval
|
||||||
(define (make-c% key)
|
(eval:no-prompt
|
||||||
(define-member-name m key)
|
(define (make-c% key)
|
||||||
(class object%
|
(define-member-name m key)
|
||||||
(define/public (m) 10)
|
(class object%
|
||||||
(super-new)))
|
(define/public (m) 10)
|
||||||
|
(super-new))))
|
||||||
|
|
||||||
(send (new (make-c% (member-name-key m))) m)
|
(send (new (make-c% (member-name-key m))) m)
|
||||||
(send (new (make-c% (member-name-key p))) m)
|
(eval:error (send (new (make-c% (member-name-key p))) m))
|
||||||
(send (new (make-c% (member-name-key p))) p)
|
(send (new (make-c% (member-name-key p))) p)
|
||||||
]
|
|
||||||
|
|
||||||
@defs+int[
|
(eval:no-prompt
|
||||||
#:eval class-eval
|
(define (fresh-c%)
|
||||||
[(define (fresh-c%)
|
|
||||||
(let ([key (generate-member-key)])
|
(let ([key (generate-member-key)])
|
||||||
(values (make-c% key) key)))
|
(values (make-c% key) key)))
|
||||||
|
|
||||||
(define-values (fc% key) (fresh-c%))]
|
(define-values (fc% key) (fresh-c%)))
|
||||||
|
|
||||||
(send (new fc%) m)
|
(eval:error (send (new fc%) m))
|
||||||
(let ()
|
(let ()
|
||||||
(define-member-name p key)
|
(define-member-name p key)
|
||||||
(send (new fc%) p))
|
(send (new fc%) p))
|
||||||
|
@ -1352,15 +1377,16 @@ the last method call, which is expected to be an object. Each
|
||||||
|
|
||||||
This is the functional analogue of @racket[send*].
|
This is the functional analogue of @racket[send*].
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define point%
|
(eval:no-prompt
|
||||||
(class object%
|
(define point%
|
||||||
(super-new)
|
(class object%
|
||||||
(init-field [x 0] [y 0])
|
(super-new)
|
||||||
(define/public (move-x dx)
|
(init-field [x 0] [y 0])
|
||||||
(new this% [x (+ x dx)]))
|
(define/public (move-x dx)
|
||||||
(define/public (move-y dy)
|
(new this% [x (+ x dx)]))
|
||||||
(new this% [y (+ y dy)]))))
|
(define/public (move-y dy)
|
||||||
|
(new this% [y (+ y dy)])))))
|
||||||
|
|
||||||
(send+ (new point%)
|
(send+ (new point%)
|
||||||
(move-x 5)
|
(move-x 5)
|
||||||
|
@ -1802,21 +1828,21 @@ The external contracts are as follows:
|
||||||
If only the field name is present, this is equivalent to insisting only
|
If only the field name is present, this is equivalent to insisting only
|
||||||
that the method is present in the class.
|
that the method is present in the class.
|
||||||
|
|
||||||
@defexamples[#:eval
|
@examples[#:eval class-eval
|
||||||
class-eval
|
(eval:no-prompt
|
||||||
(define woody%
|
(define woody%
|
||||||
(class object%
|
(class object%
|
||||||
(define/public (draw who)
|
(define/public (draw who)
|
||||||
(format "reach for the sky, ~a" who))
|
(format "reach for the sky, ~a" who))
|
||||||
(super-new)))
|
(super-new)))
|
||||||
|
|
||||||
(define/contract woody+c%
|
(define/contract woody+c%
|
||||||
(class/c [draw (->m symbol? string?)])
|
(class/c [draw (->m symbol? string?)])
|
||||||
woody%)
|
woody%))
|
||||||
|
|
||||||
(send (new woody%) draw #f)
|
(send (new woody%) draw #f)
|
||||||
(send (new woody+c%) draw 'zurg)
|
(send (new woody+c%) draw 'zurg)
|
||||||
(send (new woody+c%) draw #f)]
|
(eval:error (send (new woody+c%) draw #f))]
|
||||||
}
|
}
|
||||||
@item{An external field contract, tagged with @racket[field], describes the
|
@item{An external field contract, tagged with @racket[field], describes the
|
||||||
behavior of the value contained in that field when accessed from outside
|
behavior of the value contained in that field when accessed from outside
|
||||||
|
@ -1827,28 +1853,29 @@ The external contracts are as follows:
|
||||||
If only the field name is present, this is equivalent to using the
|
If only the field name is present, this is equivalent to using the
|
||||||
contract @racket[any/c] (but it is checked more efficiently).
|
contract @racket[any/c] (but it is checked more efficiently).
|
||||||
|
|
||||||
@defexamples[#:eval
|
@examples[#:eval class-eval
|
||||||
class-eval
|
(eval:no-prompt
|
||||||
(define woody/hat%
|
(define woody/hat%
|
||||||
(class woody%
|
(class woody%
|
||||||
(field [hat-location 'uninitialized])
|
(field [hat-location 'uninitialized])
|
||||||
(define/public (lose-hat) (set! hat-location 'lost))
|
(define/public (lose-hat) (set! hat-location 'lost))
|
||||||
(define/public (find-hat) (set! hat-location 'on-head))
|
(define/public (find-hat) (set! hat-location 'on-head))
|
||||||
(super-new)))
|
(super-new)))
|
||||||
(define/contract woody/hat+c%
|
(define/contract woody/hat+c%
|
||||||
(class/c [draw (->m symbol? string?)]
|
(class/c [draw (->m symbol? string?)]
|
||||||
[lose-hat (->m void?)]
|
[lose-hat (->m void?)]
|
||||||
[find-hat (->m void?)]
|
[find-hat (->m void?)]
|
||||||
(field [hat-location (or/c 'on-head 'lost)]))
|
(field [hat-location (or/c 'on-head 'lost)]))
|
||||||
woody/hat%)
|
woody/hat%))
|
||||||
|
|
||||||
(get-field hat-location (new woody/hat%))
|
(get-field hat-location (new woody/hat%))
|
||||||
(let ([woody (new woody/hat+c%)])
|
(let ([woody (new woody/hat+c%)])
|
||||||
(send woody lose-hat)
|
(send woody lose-hat)
|
||||||
(get-field hat-location woody))
|
(get-field hat-location woody))
|
||||||
(get-field hat-location (new woody/hat+c%))
|
(eval:error (get-field hat-location (new woody/hat+c%)))
|
||||||
(let ([woody (new woody/hat+c%)])
|
(eval:error
|
||||||
(set-field! hat-location woody 'under-the-dresser))]
|
(let ([woody (new woody/hat+c%)])
|
||||||
|
(set-field! hat-location woody 'under-the-dresser)))]
|
||||||
|
|
||||||
}
|
}
|
||||||
@item{An initialization argument contract, tagged with @racket[init],
|
@item{An initialization argument contract, tagged with @racket[init],
|
||||||
|
@ -1861,28 +1888,29 @@ The external contracts are as follows:
|
||||||
If only the initialization argument name is present, this is equivalent to using the
|
If only the initialization argument name is present, this is equivalent to using the
|
||||||
contract @racket[any/c] (but it is checked more efficiently).
|
contract @racket[any/c] (but it is checked more efficiently).
|
||||||
|
|
||||||
@defexamples[#:eval
|
@examples[#:eval class-eval
|
||||||
class-eval
|
(eval:no-prompt
|
||||||
(define woody/init-hat%
|
(define woody/init-hat%
|
||||||
(class woody%
|
(class woody%
|
||||||
(init init-hat-location)
|
(init init-hat-location)
|
||||||
(field [hat-location init-hat-location])
|
(field [hat-location init-hat-location])
|
||||||
(define/public (lose-hat) (set! hat-location 'lost))
|
(define/public (lose-hat) (set! hat-location 'lost))
|
||||||
(define/public (find-hat) (set! hat-location 'on-head))
|
(define/public (find-hat) (set! hat-location 'on-head))
|
||||||
(super-new)))
|
(super-new)))
|
||||||
(define/contract woody/init-hat+c%
|
(define/contract woody/init-hat+c%
|
||||||
(class/c [draw (->m symbol? string?)]
|
(class/c [draw (->m symbol? string?)]
|
||||||
[lose-hat (->m void?)]
|
[lose-hat (->m void?)]
|
||||||
[find-hat (->m void?)]
|
[find-hat (->m void?)]
|
||||||
(init [init-hat-location (or/c 'on-head 'lost)])
|
(init [init-hat-location (or/c 'on-head 'lost)])
|
||||||
(field [hat-location (or/c 'on-head 'lost)]))
|
(field [hat-location (or/c 'on-head 'lost)]))
|
||||||
woody/init-hat%)
|
woody/init-hat%))
|
||||||
(get-field hat-location
|
(get-field hat-location
|
||||||
(new woody/init-hat+c%
|
(new woody/init-hat+c%
|
||||||
[init-hat-location 'lost]))
|
[init-hat-location 'lost]))
|
||||||
(get-field hat-location
|
(eval:error
|
||||||
(new woody/init-hat+c%
|
(get-field hat-location
|
||||||
[init-hat-location 'slinkys-mouth]))]
|
(new woody/init-hat+c%
|
||||||
|
[init-hat-location 'slinkys-mouth])))]
|
||||||
|
|
||||||
}
|
}
|
||||||
@item{The contracts listed in an @racket[init-field] section are
|
@item{The contracts listed in an @racket[init-field] section are
|
||||||
|
@ -1906,18 +1934,19 @@ As with the external contracts, when a method or field name is specified
|
||||||
contracted class's method implementation is no longer the entry point
|
contracted class's method implementation is no longer the entry point
|
||||||
for dynamic dispatch.
|
for dynamic dispatch.
|
||||||
|
|
||||||
@defexamples[#:eval
|
@examples[#:eval class-eval
|
||||||
class-eval
|
|
||||||
(new (class woody+c%
|
(new (class woody+c%
|
||||||
(inherit draw)
|
(inherit draw)
|
||||||
(super-new)
|
(super-new)
|
||||||
(printf "woody sez: “~a”\n" (draw "evil dr porkchop"))))
|
(printf "woody sez: “~a”\n" (draw "evil dr porkchop"))))
|
||||||
(define/contract woody+c-inherit%
|
(eval:no-prompt
|
||||||
(class/c (inherit [draw (->m symbol? string?)]))
|
(define/contract woody+c-inherit%
|
||||||
woody+c%)
|
(class/c (inherit [draw (->m symbol? string?)]))
|
||||||
(new (class woody+c-inherit%
|
woody+c%))
|
||||||
(inherit draw)
|
(eval:error
|
||||||
(printf "woody sez: ~a\n" (draw "evil dr porkchop"))))]
|
(new (class woody+c-inherit%
|
||||||
|
(inherit draw)
|
||||||
|
(printf "woody sez: ~a\n" (draw "evil dr porkchop")))))]
|
||||||
|
|
||||||
}
|
}
|
||||||
@item{A method contract tagged with @racket[super] describes the behavior of
|
@item{A method contract tagged with @racket[super] describes the behavior of
|
||||||
|
@ -1932,18 +1961,18 @@ As with the external contracts, when a method or field name is specified
|
||||||
contract the controls how the @racket[super] methods must
|
contract the controls how the @racket[super] methods must
|
||||||
be invoked.
|
be invoked.
|
||||||
|
|
||||||
@defexamples[#:eval
|
@examples[#:eval class-eval
|
||||||
class-eval
|
(eval:no-prompt
|
||||||
(define/contract woody2+c%
|
(define/contract woody2+c%
|
||||||
(class/c (super [draw (->m symbol? string?)]))
|
(class/c (super [draw (->m symbol? string?)]))
|
||||||
(class woody%
|
(class woody%
|
||||||
(define/override draw
|
(define/override draw
|
||||||
(case-lambda
|
(case-lambda
|
||||||
[(a) (super draw a)]
|
[(a) (super draw a)]
|
||||||
[(a b) (string-append (super draw a)
|
[(a b) (string-append (super draw a)
|
||||||
" and "
|
" and "
|
||||||
(super draw b))]))
|
(super draw b))]))
|
||||||
(super-new)))
|
(super-new))))
|
||||||
(send (new woody2+c%) draw 'evil-dr-porkchop 'zurg)
|
(send (new woody2+c%) draw 'evil-dr-porkchop 'zurg)
|
||||||
(send (new woody2+c%) draw "evil dr porkchop" "zurg")]
|
(send (new woody2+c%) draw "evil dr porkchop" "zurg")]
|
||||||
|
|
||||||
|
@ -1971,27 +2000,28 @@ As with the external contracts, when a method or field name is specified
|
||||||
add a contract to make sure that overriding @racket[draw]
|
add a contract to make sure that overriding @racket[draw]
|
||||||
doesn't break @racket[draw2].
|
doesn't break @racket[draw2].
|
||||||
|
|
||||||
@defexamples[#:eval
|
@examples[#:eval class-eval
|
||||||
class-eval
|
(eval:no-prompt
|
||||||
(define/contract woody2+override/c%
|
(define/contract woody2+override/c%
|
||||||
(class/c (override [draw (->m symbol? string?)]))
|
(class/c (override [draw (->m symbol? string?)]))
|
||||||
(class woody+c%
|
(class woody+c%
|
||||||
(inherit draw)
|
(inherit draw)
|
||||||
(define/public (draw2 a b)
|
(define/public (draw2 a b)
|
||||||
(string-append (draw a)
|
(string-append (draw a)
|
||||||
" and "
|
" and "
|
||||||
(draw b)))
|
(draw b)))
|
||||||
(super-new)))
|
(super-new)))
|
||||||
|
|
||||||
(define woody2+broken-draw
|
(define woody2+broken-draw
|
||||||
(class woody2+override/c%
|
(class woody2+override/c%
|
||||||
(define/override (draw x)
|
(define/override (draw x)
|
||||||
'not-a-string)
|
'not-a-string)
|
||||||
(super-new)))
|
(super-new))))
|
||||||
|
|
||||||
(send (new woody2+broken-draw) draw2
|
(eval:error
|
||||||
'evil-dr-porkchop
|
(send (new woody2+broken-draw) draw2
|
||||||
'zurg)]
|
'evil-dr-porkchop
|
||||||
|
'zurg))]
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2390,7 +2420,7 @@ A @racket[print] request is directed to @racket[custom-write].}
|
||||||
|
|
||||||
Returns @racket[#t] if @racket[v] is an object, @racket[#f] otherwise.
|
Returns @racket[#t] if @racket[v] is an object, @racket[#f] otherwise.
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(object? (new object%))
|
(object? (new object%))
|
||||||
(object? object%)
|
(object? object%)
|
||||||
(object? "clam chowder")
|
(object? "clam chowder")
|
||||||
|
@ -2401,7 +2431,7 @@ Returns @racket[#t] if @racket[v] is an object, @racket[#f] otherwise.
|
||||||
|
|
||||||
Returns @racket[#t] if @racket[v] is a class, @racket[#f] otherwise.
|
Returns @racket[#t] if @racket[v] is a class, @racket[#f] otherwise.
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(class? object%)
|
(class? object%)
|
||||||
(class? (class object% (super-new)))
|
(class? (class object% (super-new)))
|
||||||
(class? (new object%))
|
(class? (new object%))
|
||||||
|
@ -2413,7 +2443,7 @@ Returns @racket[#t] if @racket[v] is a class, @racket[#f] otherwise.
|
||||||
|
|
||||||
Returns @racket[#t] if @racket[v] is an interface, @racket[#f] otherwise.
|
Returns @racket[#t] if @racket[v] is an interface, @racket[#f] otherwise.
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(interface? (interface () empty cons first rest))
|
(interface? (interface () empty cons first rest))
|
||||||
(interface? object%)
|
(interface? object%)
|
||||||
(interface? "gazpacho")
|
(interface? "gazpacho")
|
||||||
|
@ -2424,7 +2454,7 @@ Returns @racket[#t] if @racket[v] is an interface, @racket[#f] otherwise.
|
||||||
|
|
||||||
Returns @racket[#t] if @racket[v] is a @tech{generic}, @racket[#f] otherwise.
|
Returns @racket[#t] if @racket[v] is a @tech{generic}, @racket[#f] otherwise.
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define c%
|
(define c%
|
||||||
(class object%
|
(class object%
|
||||||
(super-new)
|
(super-new)
|
||||||
|
@ -2448,7 +2478,7 @@ This procedure is similar in spirit to
|
||||||
@racket[eq?] but also works properly with contracts
|
@racket[eq?] but also works properly with contracts
|
||||||
(and has a stronger guarantee).
|
(and has a stronger guarantee).
|
||||||
|
|
||||||
@defexamples[#:eval class-ctc-eval
|
@examples[#:eval class-ctc-eval
|
||||||
(define obj-1 (new object%))
|
(define obj-1 (new object%))
|
||||||
(define obj-2 (new object%))
|
(define obj-2 (new object%))
|
||||||
(define/contract obj-3 (object/c) obj-1)
|
(define/contract obj-3 (object/c) obj-1)
|
||||||
|
@ -2468,7 +2498,7 @@ This procedure is similar in spirit to
|
||||||
Like @racket[object=?], but accepts @racket[#f] for either argument and
|
Like @racket[object=?], but accepts @racket[#f] for either argument and
|
||||||
returns @racket[#t] if both arguments are @racket[#f].
|
returns @racket[#t] if both arguments are @racket[#f].
|
||||||
|
|
||||||
@defexamples[#:eval class-ctc-eval
|
@examples[#:eval class-ctc-eval
|
||||||
(object-or-false=? #f (new object%))
|
(object-or-false=? #f (new object%))
|
||||||
(object-or-false=? (new object%) #f)
|
(object-or-false=? (new object%) #f)
|
||||||
(object-or-false=? #f #f)
|
(object-or-false=? #f #f)
|
||||||
|
@ -2482,7 +2512,7 @@ returns @racket[#t] if both arguments are @racket[#f].
|
||||||
Returns a vector representing @racket[object] that shows its
|
Returns a vector representing @racket[object] that shows its
|
||||||
inspectable fields, analogous to @racket[struct->vector].
|
inspectable fields, analogous to @racket[struct->vector].
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(object->vector (new object%))
|
(object->vector (new object%))
|
||||||
(object->vector (new (class object%
|
(object->vector (new (class object%
|
||||||
(super-new)
|
(super-new)
|
||||||
|
@ -2494,7 +2524,7 @@ inspectable fields, analogous to @racket[struct->vector].
|
||||||
|
|
||||||
Returns the interface implicitly defined by @racket[class].
|
Returns the interface implicitly defined by @racket[class].
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(class->interface object%)
|
(class->interface object%)
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
@ -2504,7 +2534,7 @@ Returns the interface implicitly defined by @racket[class].
|
||||||
Returns the interface implicitly defined by the class of
|
Returns the interface implicitly defined by the class of
|
||||||
@racket[object].
|
@racket[object].
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(object-interface (new object%))
|
(object-interface (new object%))
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
@ -2515,7 +2545,7 @@ Returns @racket[#t] if @racket[v] is an instance of a class
|
||||||
@racket[type] or a class that implements an interface @racket[type],
|
@racket[type] or a class that implements an interface @racket[type],
|
||||||
@racket[#f] otherwise.
|
@racket[#f] otherwise.
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define point<%> (interface () get-x get-y))
|
(define point<%> (interface () get-x get-y))
|
||||||
(define 2d-point%
|
(define 2d-point%
|
||||||
(class* object% (point<%>)
|
(class* object% (point<%>)
|
||||||
|
@ -2536,7 +2566,7 @@ Returns @racket[#t] if @racket[v] is an instance of a class
|
||||||
Returns @racket[#t] if @racket[v] is a class derived from (or equal
|
Returns @racket[#t] if @racket[v] is a class derived from (or equal
|
||||||
to) @racket[cls], @racket[#f] otherwise.
|
to) @racket[cls], @racket[#f] otherwise.
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(subclass? (class object% (super-new)) object%)
|
(subclass? (class object% (super-new)) object%)
|
||||||
(subclass? object% (class object% (super-new)))
|
(subclass? object% (class object% (super-new)))
|
||||||
(subclass? object% object%)
|
(subclass? object% object%)
|
||||||
|
@ -2548,7 +2578,7 @@ to) @racket[cls], @racket[#f] otherwise.
|
||||||
Returns @racket[#t] if @racket[v] is a class that implements
|
Returns @racket[#t] if @racket[v] is a class that implements
|
||||||
@racket[intf], @racket[#f] otherwise.
|
@racket[intf], @racket[#f] otherwise.
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define i<%> (interface () go))
|
(define i<%> (interface () go))
|
||||||
(define c%
|
(define c%
|
||||||
(class* object% (i<%>)
|
(class* object% (i<%>)
|
||||||
|
@ -2565,7 +2595,7 @@ Returns @racket[#t] if @racket[v] is a class that implements
|
||||||
Returns @racket[#t] if @racket[v] is an interface that extends
|
Returns @racket[#t] if @racket[v] is an interface that extends
|
||||||
@racket[intf], @racket[#f] otherwise.
|
@racket[intf], @racket[#f] otherwise.
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define point<%> (interface () get-x get-y))
|
(define point<%> (interface () get-x get-y))
|
||||||
(define colored-point<%> (interface (point<%>) color))
|
(define colored-point<%> (interface (point<%>) color))
|
||||||
|
|
||||||
|
@ -2581,7 +2611,7 @@ Returns @racket[#t] if @racket[intf] (or any of its ancestor
|
||||||
interfaces) includes a member with the name @racket[sym], @racket[#f]
|
interfaces) includes a member with the name @racket[sym], @racket[#f]
|
||||||
otherwise.
|
otherwise.
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define i<%> (interface () get-x get-y))
|
(define i<%> (interface () get-x get-y))
|
||||||
(method-in-interface? 'get-x i<%>)
|
(method-in-interface? 'get-x i<%>)
|
||||||
(method-in-interface? 'get-z i<%>)
|
(method-in-interface? 'get-z i<%>)
|
||||||
|
@ -2595,7 +2625,7 @@ including methods inherited from superinterfaces, but not including
|
||||||
methods whose names are local (i.e., declared with
|
methods whose names are local (i.e., declared with
|
||||||
@racket[define-local-member-name]).
|
@racket[define-local-member-name]).
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define i<%> (interface () get-x get-y))
|
(define i<%> (interface () get-x get-y))
|
||||||
(interface->method-names i<%>)
|
(interface->method-names i<%>)
|
||||||
]}
|
]}
|
||||||
|
@ -2607,7 +2637,7 @@ methods whose names are local (i.e., declared with
|
||||||
Returns @racket[#t] if @racket[object] has a method named @racket[sym]
|
Returns @racket[#t] if @racket[object] has a method named @racket[sym]
|
||||||
that accepts @racket[cnt] arguments, @racket[#f] otherwise.
|
that accepts @racket[cnt] arguments, @racket[#f] otherwise.
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(define c%
|
(define c%
|
||||||
(class object%
|
(class object%
|
||||||
(super-new)
|
(super-new)
|
||||||
|
@ -2628,7 +2658,7 @@ Returns a list of all of the names of the fields bound in
|
||||||
not including fields whose names are local (i.e., declared with
|
not including fields whose names are local (i.e., declared with
|
||||||
@racket[define-local-member-name]).
|
@racket[define-local-member-name]).
|
||||||
|
|
||||||
@defexamples[#:eval class-eval
|
@examples[#:eval class-eval
|
||||||
(field-names (new object%))
|
(field-names (new object%))
|
||||||
(field-names (new (class object% (super-new) (field [x 0] [y 0]))))
|
(field-names (new (class object% (super-new) (field [x 0] [y 0]))))
|
||||||
]}
|
]}
|
||||||
|
@ -2701,6 +2731,47 @@ a method that is not supplied by an object.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@defproc[(class-seal [class class?]
|
||||||
|
[key symbol?]
|
||||||
|
[unsealed-inits (listof symbol?)]
|
||||||
|
[unsealed-fields (listof symbol?)]
|
||||||
|
[unsealed-methods (listof symbol?)]
|
||||||
|
[inst-proc (-> class? any)]
|
||||||
|
[member-proc (-> class? (listof symbol?) any)])
|
||||||
|
class?]{
|
||||||
|
|
||||||
|
Adds a seal to a given class keyed with the symbol @racket[key]. The
|
||||||
|
given @racket[unsealed-inits], @racket[unsealed-fields], and
|
||||||
|
@racket[unsealed-methods] list corresponding class members that are
|
||||||
|
unaffected by sealing.
|
||||||
|
|
||||||
|
When a class has any seals, the @racket[inst-proc] procedure is called
|
||||||
|
on instantiation (normally, this is used to raise an error on
|
||||||
|
instantiation) and the @racket[member-proc] function is called
|
||||||
|
(again, this is normally used to raise an error) when a subclass
|
||||||
|
attempts to add class members that are not listed in the unsealed lists.
|
||||||
|
|
||||||
|
The @racket[inst-proc] is called with the class value on which an
|
||||||
|
instantiation was attempted. The @racket[member-proc] is called with
|
||||||
|
the class value and the list of initialization argument, field, or
|
||||||
|
method names.
|
||||||
|
}
|
||||||
|
|
||||||
|
@defproc[(class-unseal [class class?]
|
||||||
|
[key symbol?]
|
||||||
|
[wrong-key-proc (-> class? any)])
|
||||||
|
class?]{
|
||||||
|
|
||||||
|
Removes a seal on a class that has been previously sealed with the
|
||||||
|
@racket[class-seal] function and the given @racket[key].
|
||||||
|
|
||||||
|
If the unseal removed all of the seals in the class, the class
|
||||||
|
value can be instantiated or subclassed freely. If the given
|
||||||
|
class value does not contain or any seals or does not contain
|
||||||
|
any seals with the given key, the @racket[wrong-key-proc] function
|
||||||
|
is called with the class value.
|
||||||
|
}
|
||||||
|
|
||||||
@; ----------------------------------------------------------------------
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
@include-section["surrogate.scrbl"]
|
@include-section["surrogate.scrbl"]
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require "mz.rkt" (for-label racket/cmdline))
|
@(require "mz.rkt"
|
||||||
|
(for-label racket/cmdline)
|
||||||
|
(only-in scribble/core element))
|
||||||
|
|
||||||
@title{Command-Line Parsing}
|
@title{Command-Line Parsing}
|
||||||
|
|
||||||
|
@ -104,7 +106,7 @@ A normal flag specification has four parts:
|
||||||
@racketvalfont{"-}@racketvarfont{x}@racketvalfont{"} or
|
@racketvalfont{"-}@racketvarfont{x}@racketvalfont{"} or
|
||||||
@racketvalfont{"+}@racketvarfont{x}@racketvalfont{"} for some
|
@racketvalfont{"+}@racketvarfont{x}@racketvalfont{"} for some
|
||||||
character @racketvarfont{x}, or
|
character @racketvarfont{x}, or
|
||||||
@racketvalfont{"--}@racketvarfont{x}@racketvalfont{"} or
|
@racketvalfont[@element[#f]{"--}]@racketvarfont{x}@racketvalfont{"} or
|
||||||
@racketvalfont{"++}@racketvarfont{x}@racketvalfont{"} for some
|
@racketvalfont{"++}@racketvarfont{x}@racketvalfont{"} for some
|
||||||
sequence of characters @racketvarfont{x}. An @racketvarfont{x} cannot
|
sequence of characters @racketvarfont{x}. An @racketvarfont{x} cannot
|
||||||
contain only digits or digits plus a single decimal point, since
|
contain only digits or digits plus a single decimal point, since
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require "mz.rkt"
|
@(require "mz.rkt"
|
||||||
(for-label setup/dirs))
|
(for-label setup/dirs
|
||||||
|
setup/collection-search))
|
||||||
|
|
||||||
@title[#:tag "collects"]{Libraries and Collections}
|
@title[#:tag "collects"]{Libraries and Collections}
|
||||||
|
|
||||||
|
@ -264,6 +265,9 @@ collection specified by the @racket[collection]s, where the second
|
||||||
search uses the values of @racket[current-library-collection-links]
|
search uses the values of @racket[current-library-collection-links]
|
||||||
and @racket[current-library-collection-paths].
|
and @racket[current-library-collection-paths].
|
||||||
|
|
||||||
|
@margin-note{See also @racket[collection-search] in
|
||||||
|
@racketmodname[setup/collection-search].}
|
||||||
|
|
||||||
If @racket[file] is not found, but @racket[file] ends in
|
If @racket[file] is not found, but @racket[file] ends in
|
||||||
@filepath{.rkt} and a file with the suffix @filepath{.ss} exists, then
|
@filepath{.rkt} and a file with the suffix @filepath{.ss} exists, then
|
||||||
the directory of the @filepath{.ss} file is used. If @racket[file] is
|
the directory of the @filepath{.ss} file is used. If @racket[file] is
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user