shen-ruby 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/.gitignore +2 -0
  2. data/.travis.yml +5 -0
  3. data/Gemfile +2 -2
  4. data/HISTORY.md +12 -0
  5. data/README.md +10 -7
  6. data/Rakefile +92 -0
  7. data/bin/srrepl +2 -2
  8. data/k_lambda_spec/primitives/arithmetic_spec.rb +175 -0
  9. data/k_lambda_spec/primitives/assignments_spec.rb +44 -0
  10. data/k_lambda_spec/primitives/generic_functions_spec.rb +115 -2
  11. data/k_lambda_spec/primitives/lists_spec.rb +40 -0
  12. data/k_lambda_spec/primitives/strings_spec.rb +77 -0
  13. data/k_lambda_spec/primitives/symbols_spec.rb +24 -0
  14. data/k_lambda_spec/primitives/vectors_spec.rb +92 -0
  15. data/k_lambda_spec/support/shared_examples.rb +93 -2
  16. data/k_lambda_spec/tail_recursion_spec.rb +30 -0
  17. data/lib/kl/compiler.rb +19 -33
  18. data/lib/kl/environment.rb +1 -0
  19. data/lib/kl/primitives/assignments.rb +1 -0
  20. data/lib/kl/primitives/generic_functions.rb +7 -0
  21. data/lib/kl/primitives/lists.rb +2 -0
  22. data/lib/kl/primitives/strings.rb +13 -5
  23. data/lib/kl/primitives/symbols.rb +1 -0
  24. data/lib/kl/primitives/vectors.rb +5 -0
  25. data/lib/shen_ruby/version.rb +1 -1
  26. data/shen-ruby.gemspec +1 -1
  27. data/shen/lib/shen_ruby/shen.rb +5 -6
  28. data/shen/release/benchmarks/benchmarks.shen +0 -4
  29. data/shen/release/benchmarks/interpreter.shen +2 -2
  30. data/shen/release/benchmarks/plato.jpg +0 -0
  31. data/shen/release/k_lambda/core.kl +171 -1000
  32. data/shen/release/k_lambda/declarations.kl +90 -992
  33. data/shen/release/k_lambda/load.kl +69 -81
  34. data/shen/release/k_lambda/macros.kl +113 -478
  35. data/shen/release/k_lambda/prolog.kl +250 -1307
  36. data/shen/release/k_lambda/reader.kl +115 -996
  37. data/shen/release/k_lambda/sequent.kl +154 -554
  38. data/shen/release/k_lambda/sys.kl +246 -562
  39. data/shen/release/k_lambda/t-star.kl +114 -3643
  40. data/shen/release/k_lambda/toplevel.kl +136 -221
  41. data/shen/release/k_lambda/track.kl +101 -206
  42. data/shen/release/k_lambda/types.kl +143 -298
  43. data/shen/release/k_lambda/writer.kl +93 -106
  44. data/shen/release/k_lambda/yacc.kl +77 -252
  45. data/shen/release/test_programs/README.shen +1 -1
  46. data/shen/release/test_programs/classes-typed.shen +1 -1
  47. data/shen/release/test_programs/interpreter.shen +2 -2
  48. data/shen/release/test_programs/metaprog.shen +2 -2
  49. data/shen/release/test_programs/prolog.shen +79 -0
  50. data/shen/release/test_programs/structures-typed.shen +2 -2
  51. data/shen/release/test_programs/tests.shen +19 -80
  52. data/shen/release/test_programs/yacc.shen +11 -15
  53. metadata +14 -6
  54. data/Gemfile.lock +0 -20
  55. data/shen/release/benchmarks/br.shen +0 -13
@@ -1,108 +1,78 @@
1
-
2
- " The License
3
-
4
- The user is free to produce commercial applications with the software, to distribute these applications in source or binary form, and to charge monies for them as he sees fit and in concordance with the laws of the land subject to the following license.
5
-
6
- 1. The license applies to all the software and all derived software and must appear on such.
7
- 2. It is illegal to distribute the software without this license attached to it and use of the software implies agreement
8
- with the license as such. It is illegal for anyone who is not the copyright holder to tamper with or change the license.
9
- 3. Neither the names of Lambda Associates or the copyright holder may be used to endorse or promote products built using
10
- the software without specific prior written permission from the copyright holder.
11
- 4. That possession of this license does not confer on the copyright holder any special contractual obligation towards the user. That in no event shall the copyright holder be liable for any direct, indirect, incidental, special, exemplary or consequential damages (including but not limited to procurement of substitute goods or services, loss of use, data, or profits; or business interruption), however caused and on any theory of liability, whether in contract, strict liability or tort (including negligence) arising in any way out of the use of the software, even if advised of the possibility of such damage.
12
- 5. It is permitted for the user to change the software, for the purpose of improving performance, correcting an error, or porting to a new platform, and distribute the modified version of Shen (hereafter the modified version) provided the resulting program conforms in all respects to the Shen standard and is issued under that title. The user must make it clear with his distribution that he/she is the author of the changes and what these changes are and why.
13
- 6. Derived versions of this software in whatever form are subject to the same restrictions. In particular it is not permitted to make derived copies of this software which do not conform to the Shen standard or appear under a different title.
14
- 7. It is permitted to distribute versions of Shen which incorporate libraries, graphics or other facilities which are not part of the Shen standard.
15
-
16
- For an explication of this license see http://www.lambdassociates.org/News/june11/license.htm which explains this license in full."
17
-
18
- (defun declare (V1679 V1680)
19
- (let Record (set shen-*signedfuncs* (adjoin V1679 (value shen-*signedfuncs*)))
20
- (let Variancy
21
- (trap-error (shen-variancy-test V1679 V1680) (lambda E shen-skip))
22
- (let Type (shen-rcons_form (shen-normalise-type V1680))
23
- (let F* (concat shen-type-signature-of- V1679)
24
- (let Parameters (shen-parameters 1)
25
- (let Clause
26
- (cons (cons F* (cons X ()))
27
- (cons :- (cons (cons (cons unify! (cons X (cons Type ()))) ()) ())))
28
- (let AUM_instruction (shen-aum Clause Parameters)
29
- (let Code (shen-aum_to_shen AUM_instruction)
30
- (let ShenDef
31
- (cons define
32
- (cons F*
33
- (append Parameters
34
- (append (cons ProcessN (cons Continuation ()))
35
- (cons -> (cons Code ()))))))
36
- (let Eval (shen-eval-without-macros ShenDef) V1679)))))))))))
37
-
38
- (defun shen-normalise-type (V1681)
39
- (fix (lambda V1682 (shen-normalise-type-help V1682)) V1681))
40
-
41
- (defun shen-normalise-type-help (V1683)
42
- (cond
43
- ((cons? V1683)
44
- (shen-normalise-X
45
- (map (lambda V1684 (shen-normalise-type-help V1684)) V1683)))
46
- (true (shen-normalise-X V1683))))
47
-
48
- (defun shen-normalise-X (V1685)
49
- (let Val (assoc V1685 (value shen-*synonyms*))
50
- (if (empty? Val) V1685 (tl Val))))
51
-
52
- (defun shen-variancy-test (V1686 V1687)
53
- (let TypeF (shen-typecheck V1686 B)
54
- (let Check
55
- (if (= symbol TypeF) shen-skip
56
- (if (shen-variant? TypeF V1687) shen-skip
57
- (intoutput "warning: changing the type of ~A may create errors~%"
58
- (@p V1686 ()))))
59
- shen-skip)))
60
-
61
- (defun shen-variant? (V1696 V1697)
62
- (cond ((= V1697 V1696) true)
63
- ((and (cons? V1696) (and (cons? V1697) (= (hd V1697) (hd V1696))))
64
- (shen-variant? (tl V1696) (tl V1697)))
65
- ((and (cons? V1696)
66
- (and (cons? V1697) (and (shen-pvar? (hd V1696)) (variable? (hd V1697)))))
67
- (shen-variant? (subst shen-a (hd V1696) (tl V1696))
68
- (subst shen-a (hd V1697) (tl V1697))))
69
- ((and (cons? V1696)
70
- (and (cons? (hd V1696)) (and (cons? V1697) (cons? (hd V1697)))))
71
- (shen-variant? (append (hd V1696) (tl V1696))
72
- (append (hd V1697) (tl V1697))))
73
- (true false)))
1
+ "**********************************************************************************
2
+ * The License *
3
+ * *
4
+ * The user is free to produce commercial applications with the software, to *
5
+ * distribute these applications in source or binary form, and to charge monies *
6
+ * for them as he sees fit and in concordance with the laws of the land subject *
7
+ * to the following license. *
8
+ * *
9
+ * 1. The license applies to all the software and all derived software and *
10
+ * must appear on such. *
11
+ * *
12
+ * 2. It is illegal to distribute the software without this license attached *
13
+ * to it and use of the software implies agreement with the license as such. *
14
+ * It is illegal for anyone who is not the copyright holder to tamper with *
15
+ * or change the license. *
16
+ * *
17
+ * 3. Neither the names of Lambda Associates or the copyright holder may be used *
18
+ * to endorse or promote products built using the software without specific *
19
+ * prior written permission from the copyright holder. *
20
+ * *
21
+ * 4. That possession of this license does not confer on the copyright holder *
22
+ * any special contractual obligation towards the user. That in no event *
23
+ * shall the copyright holder be liable for any direct, indirect, incidental, *
24
+ * special, exemplary or consequential damages (including but not limited *
25
+ * to procurement of substitute goods or services, loss of use, data, *
26
+ * interruption), however caused and on any theory of liability, whether in *
27
+ * contract, strict liability or tort (including negligence) arising in any *
28
+ * way out of the use of the software, even if advised of the possibility of *
29
+ * such damage. *
30
+ * *
31
+ * 5. It is permitted for the user to change the software, for the purpose of *
32
+ * improving performance, correcting an error, or porting to a new platform, *
33
+ * and distribute the derived version of Shen provided the resulting program *
34
+ * conforms in all respects to the Shen standard and is issued under that *
35
+ * title. The user must make it clear with his distribution that he/she is *
36
+ * the author of the changes and what these changes are and why. *
37
+ * *
38
+ * 6. Derived versions of this software in whatever form are subject to the same *
39
+ * restrictions. In particular it is not permitted to make derived copies of *
40
+ * this software which do not conform to the Shen standard or appear under a *
41
+ * different title. *
42
+ * *
43
+ * It is permitted to distribute versions of Shen which incorporate libraries, *
44
+ * graphics or other facilities which are not part of the Shen standard. *
45
+ * *
46
+ * For an explication of this license see www.shenlanguage.org/license.htm which *
47
+ * explains this license in full. *
48
+ * *
49
+ *****************************************************************************************
50
+ "(defun declare (V2071 V2072) (let Record (set shen.*signedfuncs* (adjoin V2071 (value shen.*signedfuncs*))) (let Variancy (trap-error (shen.variancy-test V2071 V2072) (lambda E shen.skip)) (let Type (shen.rcons_form (shen.normalise-type V2072)) (let F* (concat shen.type-signature-of- V2071) (let Parameters (shen.parameters 1) (let Clause (cons (cons F* (cons X ())) (cons :- (cons (cons (cons unify! (cons X (cons Type ()))) ()) ()))) (let AUM_instruction (shen.aum Clause Parameters) (let Code (shen.aum_to_shen AUM_instruction) (let ShenDef (cons define (cons F* (append Parameters (append (cons ProcessN (cons Continuation ())) (cons -> (cons Code ())))))) (let Eval (shen.eval-without-macros ShenDef) V2071)))))))))))
51
+
52
+ (defun shen.normalise-type (V2073) (fix shen.normalise-type-help V2073))
53
+
54
+ (defun shen.normalise-type-help (V2074) (cond ((cons? V2074) (shen.normalise-X (map shen.normalise-type-help V2074))) (true (shen.normalise-X V2074))))
55
+
56
+ (defun shen.normalise-X (V2075) (let Val (assoc V2075 (value shen.*synonyms*)) (if (empty? Val) V2075 (tl Val))))
57
+
58
+ (defun shen.variancy-test (V2076 V2077) (let TypeF (shen.typecheck V2076 B) (let Check (if (= symbol TypeF) shen.skip (if (shen.variant? TypeF V2077) shen.skip (pr (cn "warning: changing the type of " (shen.app V2076 " may create errors
59
+ " shen.a)) (stoutput)))) shen.skip)))
60
+
61
+ (defun shen.variant? (V2086 V2087) (cond ((= V2087 V2086) true) ((and (cons? V2086) (and (cons? V2087) (= (hd V2087) (hd V2086)))) (shen.variant? (tl V2086) (tl V2087))) ((and (cons? V2086) (and (cons? V2087) (and (shen.pvar? (hd V2086)) (variable? (hd V2087))))) (shen.variant? (subst shen.a (hd V2086) (tl V2086)) (subst shen.a (hd V2087) (tl V2087)))) ((and (cons? V2086) (and (cons? (hd V2086)) (and (cons? V2087) (cons? (hd V2087))))) (shen.variant? (append (hd V2086) (tl V2086)) (append (hd V2087) (tl V2087)))) (true false)))
74
62
 
75
63
  (declare absvector? (cons A (cons --> (cons boolean ()))))
76
64
 
77
- (declare adjoin
78
- (cons A
79
- (cons -->
80
- (cons
81
- (cons (cons list (cons A ()))
82
- (cons --> (cons (cons list (cons A ())) ())))
83
- ()))))
84
-
85
- (declare and
86
- (cons boolean
87
- (cons --> (cons (cons boolean (cons --> (cons boolean ()))) ()))))
88
-
89
- (declare append
90
- (cons (cons list (cons A ()))
91
- (cons -->
92
- (cons
93
- (cons (cons list (cons A ()))
94
- (cons --> (cons (cons list (cons A ())) ())))
95
- ()))))
65
+ (declare adjoin (cons A (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
66
+
67
+ (declare and (cons boolean (cons --> (cons (cons boolean (cons --> (cons boolean ()))) ()))))
68
+
69
+ (declare shen.app (cons A (cons --> (cons (cons string (cons --> (cons (cons symbol (cons --> (cons string ()))) ()))) ()))))
70
+
71
+ (declare append (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
96
72
 
97
73
  (declare arity (cons A (cons --> (cons number ()))))
98
74
 
99
- (declare assoc
100
- (cons A
101
- (cons -->
102
- (cons
103
- (cons (cons list (cons (cons list (cons A ())) ()))
104
- (cons --> (cons (cons list (cons A ())) ())))
105
- ()))))
75
+ (declare assoc (cons A (cons --> (cons (cons (cons list (cons (cons list (cons A ())) ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
106
76
 
107
77
  (declare boolean? (cons A (cons --> (cons boolean ()))))
108
78
 
@@ -110,67 +80,41 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
110
80
 
111
81
  (declare cd (cons string (cons --> (cons string ()))))
112
82
 
113
- (declare close
114
- (cons (cons stream (cons A ()))
115
- (cons --> (cons (cons list (cons B ())) ()))))
83
+ (declare close (cons (cons stream (cons A ())) (cons --> (cons (cons list (cons B ())) ()))))
116
84
 
117
- (declare cn
118
- (cons string
119
- (cons --> (cons (cons string (cons --> (cons string ()))) ()))))
85
+ (declare cn (cons string (cons --> (cons (cons string (cons --> (cons string ()))) ()))))
120
86
 
121
- (declare concat
122
- (cons symbol
123
- (cons --> (cons (cons symbol (cons --> (cons symbol ()))) ()))))
87
+ (declare compile (cons (cons (cons list (cons A ())) (cons ==> (cons B ()))) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons (cons (cons list (cons A ())) (cons --> (cons B ()))) (cons --> (cons B ()))) ()))) ()))))
124
88
 
125
89
  (declare cons? (cons A (cons --> (cons boolean ()))))
126
90
 
127
- (declare destroy
128
- (cons (cons A (cons --> (cons B ())))
129
- (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
91
+ (declare destroy (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
130
92
 
131
- (declare difference
132
- (cons (cons list (cons A ()))
133
- (cons -->
134
- (cons
135
- (cons (cons list (cons A ()))
136
- (cons --> (cons (cons list (cons A ())) ())))
137
- ()))))
93
+ (declare difference (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
138
94
 
139
95
  (declare do (cons A (cons --> (cons (cons B (cons --> (cons B ()))) ()))))
140
96
 
141
- (declare element?
142
- (cons A
143
- (cons -->
144
- (cons (cons (cons list (cons A ())) (cons --> (cons boolean ()))) ()))))
97
+ (declare <e> (cons (cons list (cons A ())) (cons ==> (cons (cons list (cons B ())) ()))))
98
+
99
+ (declare <!> (cons (cons list (cons A ())) (cons ==> (cons (cons list (cons A ())) ()))))
100
+
101
+ (declare element? (cons A (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons boolean ()))) ()))))
145
102
 
146
103
  (declare empty? (cons A (cons --> (cons boolean ()))))
147
104
 
148
105
  (declare enable-type-theory (cons symbol (cons --> (cons boolean ()))))
149
106
 
150
- (declare external
151
- (cons symbol (cons --> (cons (cons list (cons symbol ())) ()))))
152
-
153
- (declare interror
154
- (cons string (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
107
+ (declare external (cons symbol (cons --> (cons (cons list (cons symbol ())) ()))))
155
108
 
156
109
  (declare error-to-string (cons exception (cons --> (cons string ()))))
157
110
 
158
111
  (declare explode (cons A (cons --> (cons (cons list (cons string ())) ()))))
159
112
 
160
- (declare fail-if
161
- (cons (cons symbol (cons --> (cons boolean ())))
162
- (cons --> (cons (cons symbol (cons --> (cons symbol ()))) ()))))
113
+ (declare fail-if (cons (cons symbol (cons --> (cons boolean ()))) (cons --> (cons (cons symbol (cons --> (cons symbol ()))) ()))))
163
114
 
164
- (declare fix
165
- (cons (cons A (cons --> (cons A ())))
166
- (cons --> (cons (cons A (cons --> (cons A ()))) ()))))
115
+ (declare fix (cons (cons A (cons --> (cons A ()))) (cons --> (cons (cons A (cons --> (cons A ()))) ()))))
167
116
 
168
- (declare format
169
- (cons (cons stream (cons out ()))
170
- (cons -->
171
- (cons
172
- (cons string (cons --> (cons (cons A (cons --> (cons string ()))) ())))
173
- ()))))
117
+ (declare format (cons (cons stream (cons out ())) (cons --> (cons (cons string (cons --> (cons (cons A (cons --> (cons string ()))) ()))) ()))))
174
118
 
175
119
  (declare freeze (cons A (cons --> (cons (cons lazy (cons A ())) ()))))
176
120
 
@@ -178,25 +122,15 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
178
122
 
179
123
  (declare gensym (cons symbol (cons --> (cons symbol ()))))
180
124
 
181
- (declare <-vector
182
- (cons (cons vector (cons A ()))
183
- (cons --> (cons (cons number (cons --> (cons A ()))) ()))))
125
+ (declare <-vector (cons (cons vector (cons A ())) (cons --> (cons (cons number (cons --> (cons A ()))) ()))))
184
126
 
185
- (declare vector->
186
- (cons (cons vector (cons A ()))
187
- (cons -->
188
- (cons
189
- (cons number
190
- (cons -->
191
- (cons (cons A (cons --> (cons (cons vector (cons A ())) ()))) ())))
192
- ()))))
127
+ (declare vector-> (cons (cons vector (cons A ())) (cons --> (cons (cons number (cons --> (cons (cons A (cons --> (cons (cons vector (cons A ())) ()))) ()))) ()))))
193
128
 
194
129
  (declare vector (cons number (cons --> (cons (cons vector (cons A ())) ()))))
195
130
 
196
131
  (declare get-time (cons symbol (cons --> (cons number ()))))
197
132
 
198
- (declare hash
199
- (cons A (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
133
+ (declare hash (cons A (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
200
134
 
201
135
  (declare head (cons (cons list (cons A ())) (cons --> (cons A ()))))
202
136
 
@@ -204,31 +138,19 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
204
138
 
205
139
  (declare hdstr (cons string (cons --> (cons string ()))))
206
140
 
207
- (declare if
208
- (cons boolean
209
- (cons -->
210
- (cons (cons A (cons --> (cons (cons A (cons --> (cons A ()))) ())))
211
- ()))))
141
+ (declare if (cons boolean (cons --> (cons (cons A (cons --> (cons (cons A (cons --> (cons A ()))) ()))) ()))))
212
142
 
213
- (declare include
214
- (cons (cons list (cons symbol ()))
215
- (cons --> (cons (cons list (cons symbol ())) ()))))
143
+ (declare include (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
216
144
 
217
- (declare include-all-but
218
- (cons (cons list (cons symbol ()))
219
- (cons --> (cons (cons list (cons symbol ())) ()))))
145
+ (declare include-all-but (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
220
146
 
221
- (declare inferences (cons A (cons --> (cons number ()))))
147
+ (declare inferences (cons --> (cons number ())))
148
+
149
+ (declare shen.insert (cons A (cons --> (cons (cons string (cons --> (cons string ()))) ()))))
222
150
 
223
151
  (declare integer? (cons A (cons --> (cons boolean ()))))
224
152
 
225
- (declare intersection
226
- (cons (cons list (cons A ()))
227
- (cons -->
228
- (cons
229
- (cons (cons list (cons A ()))
230
- (cons --> (cons (cons list (cons A ())) ())))
231
- ()))))
153
+ (declare intersection (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
232
154
 
233
155
  (declare length (cons (cons list (cons A ())) (cons --> (cons number ()))))
234
156
 
@@ -236,24 +158,9 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
236
158
 
237
159
  (declare load (cons string (cons --> (cons symbol ()))))
238
160
 
239
- (declare intmake-string
240
- (cons string (cons --> (cons (cons A (cons --> (cons string ()))) ()))))
241
-
242
- (declare map
243
- (cons (cons A (cons --> (cons B ())))
244
- (cons -->
245
- (cons
246
- (cons (cons list (cons A ()))
247
- (cons --> (cons (cons list (cons B ())) ())))
248
- ()))))
249
-
250
- (declare mapcan
251
- (cons (cons A (cons --> (cons (cons list (cons B ())) ())))
252
- (cons -->
253
- (cons
254
- (cons (cons list (cons A ()))
255
- (cons --> (cons (cons list (cons B ())) ())))
256
- ()))))
161
+ (declare map (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons B ())) ()))) ()))))
162
+
163
+ (declare mapcan (cons (cons A (cons --> (cons (cons list (cons B ())) ()))) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons B ())) ()))) ()))))
257
164
 
258
165
  (declare maxinferences (cons number (cons --> (cons number ()))))
259
166
 
@@ -263,79 +170,49 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
263
170
 
264
171
  (declare not (cons boolean (cons --> (cons boolean ()))))
265
172
 
266
- (declare nth
267
- (cons number
268
- (cons -->
269
- (cons (cons (cons list (cons A ())) (cons --> (cons A ()))) ()))))
173
+ (declare nth (cons number (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons A ()))) ()))))
270
174
 
271
175
  (declare number? (cons A (cons --> (cons boolean ()))))
272
176
 
273
- (declare occurrences
274
- (cons A (cons --> (cons (cons B (cons --> (cons number ()))) ()))))
177
+ (declare occurrences (cons A (cons --> (cons (cons B (cons --> (cons number ()))) ()))))
275
178
 
276
179
  (declare occurs-check (cons symbol (cons --> (cons boolean ()))))
277
180
 
278
- (declare or
279
- (cons boolean
280
- (cons --> (cons (cons boolean (cons --> (cons boolean ()))) ()))))
181
+ (declare or (cons boolean (cons --> (cons (cons boolean (cons --> (cons boolean ()))) ()))))
281
182
 
282
- (declare intoutput
283
- (cons string (cons --> (cons (cons A (cons --> (cons string ()))) ()))))
183
+ (declare pos (cons string (cons --> (cons (cons number (cons --> (cons string ()))) ()))))
284
184
 
285
- (declare pos
286
- (cons string
287
- (cons --> (cons (cons number (cons --> (cons string ()))) ()))))
288
-
289
- (declare pr
290
- (cons string
291
- (cons -->
292
- (cons (cons (cons stream (cons out ())) (cons --> (cons string ())))
293
- ()))))
185
+ (declare pr (cons string (cons --> (cons (cons (cons stream (cons out ())) (cons --> (cons string ()))) ()))))
294
186
 
295
187
  (declare print (cons A (cons --> (cons A ()))))
296
188
 
297
- (declare profile
298
- (cons (cons A (cons --> (cons B ())))
299
- (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
189
+ (declare profile (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
190
+
191
+ (declare preclude (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
300
192
 
301
- (declare preclude
302
- (cons (cons list (cons symbol ()))
303
- (cons --> (cons (cons list (cons symbol ())) ()))))
193
+ (declare shen.proc-nl (cons string (cons --> (cons string ()))))
304
194
 
305
195
  (declare profile-results (cons A (cons --> (cons symbol ()))))
306
196
 
307
197
  (declare protect (cons symbol (cons --> (cons symbol ()))))
308
198
 
309
- (declare preclude-all-but
310
- (cons (cons list (cons symbol ()))
311
- (cons --> (cons (cons list (cons symbol ())) ()))))
199
+ (declare preclude-all-but (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
200
+
201
+ (declare ps (cons symbol (cons --> (cons (cons list (cons unit ())) ()))))
312
202
 
313
- (declare read-byte
314
- (cons (cons stream (cons in ())) (cons --> (cons number ()))))
203
+ (declare read-byte (cons (cons stream (cons in ())) (cons --> (cons number ()))))
315
204
 
316
- (declare read-file-as-bytelist
317
- (cons string (cons --> (cons (cons list (cons number ())) ()))))
205
+ (declare read-file-as-bytelist (cons string (cons --> (cons (cons list (cons number ())) ()))))
318
206
 
319
- (declare read-file-as-string
320
- (cons string (cons --> (cons string ()))))
207
+ (declare read-file-as-string (cons string (cons --> (cons string ()))))
321
208
 
322
- (declare read-file
323
- (cons string (cons --> (cons (cons list (cons unit ())) ()))))
209
+ (declare read-file (cons string (cons --> (cons (cons list (cons unit ())) ()))))
324
210
 
325
- (declare read-from-string
326
- (cons string (cons --> (cons (cons list (cons unit ())) ()))))
211
+ (declare read-from-string (cons string (cons --> (cons (cons list (cons unit ())) ()))))
327
212
 
328
- (declare remove
329
- (cons A
330
- (cons -->
331
- (cons
332
- (cons (cons list (cons A ()))
333
- (cons --> (cons (cons list (cons A ())) ())))
334
- ()))))
213
+ (declare remove (cons A (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
335
214
 
336
- (declare reverse
337
- (cons (cons list (cons A ()))
338
- (cons --> (cons (cons list (cons A ())) ()))))
215
+ (declare reverse (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))))
339
216
 
340
217
  (declare simple-error (cons string (cons --> (cons A ()))))
341
218
 
@@ -347,33 +224,29 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
347
224
 
348
225
  (declare step (cons symbol (cons --> (cons boolean ()))))
349
226
 
350
- (declare stinput (cons A (cons --> (cons (cons stream (cons in ())) ()))))
227
+ (declare stinput (cons --> (cons (cons stream (cons in ())) ())))
351
228
 
352
- (declare shen-stoutput
353
- (cons A (cons --> (cons (cons stream (cons out ())) ()))))
229
+ (declare stoutput (cons --> (cons (cons stream (cons out ())) ())))
354
230
 
355
231
  (declare string? (cons A (cons --> (cons boolean ()))))
356
232
 
357
- (declare sum (cons (cons list (cons number ())) (cons --> (cons number ()))))
358
-
359
233
  (declare str (cons A (cons --> (cons string ()))))
360
234
 
361
235
  (declare string->n (cons string (cons --> (cons number ()))))
362
236
 
237
+ (declare string->symbol (cons string (cons --> (cons symbol ()))))
238
+
239
+ (declare shen.sum (cons (cons list (cons number ())) (cons --> (cons number ()))))
240
+
363
241
  (declare symbol? (cons A (cons --> (cons boolean ()))))
364
242
 
365
- (declare systemf
366
- (cons symbol (cons --> (cons (cons list (cons symbol ())) ()))))
243
+ (declare systemf (cons symbol (cons --> (cons (cons list (cons symbol ())) ()))))
367
244
 
368
- (declare tail
369
- (cons (cons list (cons A ()))
370
- (cons --> (cons (cons list (cons A ())) ()))))
245
+ (declare tail (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))))
371
246
 
372
247
  (declare tlstr (cons string (cons --> (cons string ()))))
373
248
 
374
- (declare tlv
375
- (cons (cons vector (cons A ()))
376
- (cons --> (cons (cons vector (cons A ())) ()))))
249
+ (declare tlv (cons (cons vector (cons A ())) (cons --> (cons (cons vector (cons A ())) ()))))
377
250
 
378
251
  (declare tc (cons symbol (cons --> (cons boolean ()))))
379
252
 
@@ -383,28 +256,17 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
383
256
 
384
257
  (declare track (cons symbol (cons --> (cons symbol ()))))
385
258
 
386
- (declare trap-error
387
- (cons A
388
- (cons -->
389
- (cons
390
- (cons (cons exception (cons --> (cons A ()))) (cons --> (cons A ())))
391
- ()))))
259
+ (declare trap-error (cons A (cons --> (cons (cons (cons exception (cons --> (cons A ()))) (cons --> (cons A ()))) ()))))
260
+
261
+ (declare shen.truncate (cons string (cons --> (cons string ()))))
392
262
 
393
263
  (declare tuple? (cons A (cons --> (cons boolean ()))))
394
264
 
395
- (declare shen-undefmacro (cons symbol (cons --> (cons symbol ()))))
265
+ (declare undefmacro (cons symbol (cons --> (cons symbol ()))))
396
266
 
397
- (declare union
398
- (cons (cons list (cons A ()))
399
- (cons -->
400
- (cons
401
- (cons (cons list (cons A ()))
402
- (cons --> (cons (cons list (cons A ())) ())))
403
- ()))))
267
+ (declare union (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
404
268
 
405
- (declare unprofile
406
- (cons (cons A (cons --> (cons B ())))
407
- (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
269
+ (declare unprofile (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
408
270
 
409
271
  (declare untrack (cons symbol (cons --> (cons symbol ()))))
410
272
 
@@ -416,46 +278,29 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
416
278
 
417
279
  (declare version (cons string (cons --> (cons string ()))))
418
280
 
419
- (declare write-to-file
420
- (cons string (cons --> (cons (cons A (cons --> (cons A ()))) ()))))
281
+ (declare write-to-file (cons string (cons --> (cons (cons A (cons --> (cons A ()))) ()))))
421
282
 
422
283
  (declare y-or-n? (cons string (cons --> (cons boolean ()))))
423
284
 
424
- (declare >
425
- (cons number
426
- (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
285
+ (declare > (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
286
+
287
+ (declare < (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
288
+
289
+ (declare >= (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
427
290
 
428
- (declare <
429
- (cons number
430
- (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
291
+ (declare <= (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
431
292
 
432
- (declare >=
433
- (cons number
434
- (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
293
+ (declare = (cons A (cons --> (cons (cons A (cons --> (cons boolean ()))) ()))))
435
294
 
436
- (declare <=
437
- (cons number
438
- (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
295
+ (declare + (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
439
296
 
440
- (declare =
441
- (cons A (cons --> (cons (cons A (cons --> (cons boolean ()))) ()))))
297
+ (declare / (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
442
298
 
443
- (declare +
444
- (cons number
445
- (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
299
+ (declare - (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
446
300
 
447
- (declare /
448
- (cons number
449
- (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
301
+ (declare * (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
450
302
 
451
- (declare -
452
- (cons number
453
- (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
303
+ (declare == (cons A (cons --> (cons (cons B (cons --> (cons boolean ()))) ()))))
454
304
 
455
- (declare *
456
- (cons number
457
- (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
458
305
 
459
- (declare ==
460
- (cons A (cons --> (cons (cons B (cons --> (cons boolean ()))) ()))))
461
306