shen-ruby 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -0
  3. data/.travis.yml +9 -3
  4. data/Gemfile +1 -4
  5. data/HISTORY.md +16 -0
  6. data/MIT_LICENSE.txt +1 -1
  7. data/README.md +25 -26
  8. data/Rakefile +3 -11
  9. data/bin/shen_test_suite.rb +15 -3
  10. data/bin/srrepl +6 -8
  11. data/lib/shen_ruby.rb +6 -1
  12. data/lib/shen_ruby/converters.rb +23 -0
  13. data/lib/shen_ruby/version.rb +1 -1
  14. data/shen-ruby.gemspec +4 -1
  15. data/shen/lib/shen_ruby/shen.rb +49 -33
  16. data/shen/release/benchmarks/N_queens.shen +45 -45
  17. data/shen/release/benchmarks/README.shen +14 -14
  18. data/shen/release/benchmarks/benchmarks.shen +52 -52
  19. data/shen/release/benchmarks/einstein.shen +32 -32
  20. data/shen/release/benchmarks/interpreter.shen +219 -219
  21. data/shen/release/benchmarks/jnk.shen +193 -193
  22. data/shen/release/benchmarks/powerset.shen +10 -10
  23. data/shen/release/benchmarks/prime.shen +10 -10
  24. data/shen/release/benchmarks/short.shen +129 -129
  25. data/shen/release/k_lambda/core.kl +181 -181
  26. data/shen/release/k_lambda/declarations.kl +131 -131
  27. data/shen/release/k_lambda/load.kl +84 -84
  28. data/shen/release/k_lambda/macros.kl +112 -112
  29. data/shen/release/k_lambda/prolog.kl +252 -252
  30. data/shen/release/k_lambda/reader.kl +222 -222
  31. data/shen/release/k_lambda/sequent.kl +166 -166
  32. data/shen/release/k_lambda/sys.kl +271 -271
  33. data/shen/release/k_lambda/t-star.kl +139 -139
  34. data/shen/release/k_lambda/toplevel.kl +135 -135
  35. data/shen/release/k_lambda/track.kl +103 -103
  36. data/shen/release/k_lambda/types.kl +324 -324
  37. data/shen/release/k_lambda/writer.kl +105 -105
  38. data/shen/release/k_lambda/yacc.kl +113 -113
  39. data/shen/release/test_programs/Chap13/problems.txt +26 -26
  40. data/shen/release/test_programs/README.shen +52 -52
  41. data/shen/release/test_programs/TinyLispFunctions.txt +15 -15
  42. data/shen/release/test_programs/TinyTypes.shen +55 -55
  43. data/shen/release/test_programs/binary.shen +24 -24
  44. data/shen/release/test_programs/bubble_version_1.shen +28 -28
  45. data/shen/release/test_programs/bubble_version_2.shen +22 -22
  46. data/shen/release/test_programs/calculator.shen +21 -21
  47. data/shen/release/test_programs/cartprod.shen +23 -23
  48. data/shen/release/test_programs/change.shen +25 -25
  49. data/shen/release/test_programs/classes-defaults.shen +94 -94
  50. data/shen/release/test_programs/classes-inheritance.shen +100 -100
  51. data/shen/release/test_programs/classes-typed.shen +74 -74
  52. data/shen/release/test_programs/classes-untyped.shen +46 -46
  53. data/shen/release/test_programs/depth_.shen +14 -14
  54. data/shen/release/test_programs/einstein.shen +34 -34
  55. data/shen/release/test_programs/fruit_machine.shen +46 -46
  56. data/shen/release/test_programs/interpreter.shen +217 -217
  57. data/shen/release/test_programs/metaprog.shen +85 -85
  58. data/shen/release/test_programs/minim.shen +192 -192
  59. data/shen/release/test_programs/mutual.shen +11 -11
  60. data/shen/release/test_programs/n_queens.shen +45 -45
  61. data/shen/release/test_programs/newton_version_1.shen +33 -33
  62. data/shen/release/test_programs/newton_version_2.shen +24 -24
  63. data/shen/release/test_programs/parse.prl +14 -14
  64. data/shen/release/test_programs/parser.shen +51 -51
  65. data/shen/release/test_programs/powerset.shen +10 -10
  66. data/shen/release/test_programs/prime.shen +10 -10
  67. data/shen/release/test_programs/prolog.shen +78 -78
  68. data/shen/release/test_programs/proof_assistant.shen +80 -80
  69. data/shen/release/test_programs/proplog_version_1.shen +25 -25
  70. data/shen/release/test_programs/proplog_version_2.shen +27 -27
  71. data/shen/release/test_programs/qmachine.shen +66 -66
  72. data/shen/release/test_programs/red-black.shen +54 -54
  73. data/shen/release/test_programs/search.shen +55 -55
  74. data/shen/release/test_programs/semantic_net.shen +44 -44
  75. data/shen/release/test_programs/spreadsheet.shen +34 -34
  76. data/shen/release/test_programs/stack.shen +27 -27
  77. data/shen/release/test_programs/streams.shen +20 -20
  78. data/shen/release/test_programs/strings.shen +57 -57
  79. data/shen/release/test_programs/structures-typed.shen +71 -71
  80. data/shen/release/test_programs/structures-untyped.shen +41 -41
  81. data/shen/release/test_programs/tests.shen +232 -232
  82. data/shen/release/test_programs/types.shen +11 -11
  83. data/shen/release/test_programs/whist.shen +239 -239
  84. data/shen/release/test_programs/yacc.shen +132 -132
  85. data/spec/shen_ruby/converters_spec.rb +48 -0
  86. data/spec/spec_helper.rb +1 -2
  87. metadata +55 -60
  88. data/k_lambda_spec/atom_spec.rb +0 -85
  89. data/k_lambda_spec/primitives/arithmetic_spec.rb +0 -175
  90. data/k_lambda_spec/primitives/assignments_spec.rb +0 -44
  91. data/k_lambda_spec/primitives/boolean_operations_spec.rb +0 -136
  92. data/k_lambda_spec/primitives/generic_functions_spec.rb +0 -120
  93. data/k_lambda_spec/primitives/lists_spec.rb +0 -40
  94. data/k_lambda_spec/primitives/strings_spec.rb +0 -77
  95. data/k_lambda_spec/primitives/symbols_spec.rb +0 -24
  96. data/k_lambda_spec/primitives/vectors_spec.rb +0 -92
  97. data/k_lambda_spec/spec_helper.rb +0 -29
  98. data/k_lambda_spec/support/shared_examples.rb +0 -124
  99. data/k_lambda_spec/tail_recursion_spec.rb +0 -30
  100. data/lib/kl.rb +0 -7
  101. data/lib/kl/absvector.rb +0 -12
  102. data/lib/kl/compiler.rb +0 -360
  103. data/lib/kl/cons.rb +0 -51
  104. data/lib/kl/empty_list.rb +0 -12
  105. data/lib/kl/environment.rb +0 -163
  106. data/lib/kl/error.rb +0 -4
  107. data/lib/kl/internal_error.rb +0 -7
  108. data/lib/kl/lexer.rb +0 -186
  109. data/lib/kl/primitives/arithmetic.rb +0 -60
  110. data/lib/kl/primitives/assignments.rb +0 -15
  111. data/lib/kl/primitives/booleans.rb +0 -21
  112. data/lib/kl/primitives/error_handling.rb +0 -13
  113. data/lib/kl/primitives/extensions.rb +0 -12
  114. data/lib/kl/primitives/generic_functions.rb +0 -29
  115. data/lib/kl/primitives/lists.rb +0 -23
  116. data/lib/kl/primitives/streams.rb +0 -28
  117. data/lib/kl/primitives/strings.rb +0 -63
  118. data/lib/kl/primitives/symbols.rb +0 -18
  119. data/lib/kl/primitives/time.rb +0 -17
  120. data/lib/kl/primitives/vectors.rb +0 -36
  121. data/lib/kl/reader.rb +0 -46
  122. data/spec/kl/cons_spec.rb +0 -12
  123. data/spec/kl/environment_spec.rb +0 -282
  124. data/spec/kl/interop_spec.rb +0 -68
  125. data/spec/kl/lexer_spec.rb +0 -149
  126. data/spec/kl/primitives/generic_functions_spec.rb +0 -29
  127. data/spec/kl/primitives/symbols_spec.rb +0 -21
  128. data/spec/kl/reader_spec.rb +0 -42
@@ -1,103 +1,103 @@
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 shen.f_error (V2122) (do (shen.prhush (cn "partial function " (shen.app V2122 ";
51
- " shen.a)) (stoutput)) (do (if (and (not (shen.tracked? V2122)) (y-or-n? (cn "track " (shen.app V2122 "? " shen.a)))) (shen.track-function (ps V2122)) shen.ok) (simple-error "aborted"))))
52
-
53
- (defun shen.tracked? (V2123) (element? V2123 (value shen.*tracking*)))
54
-
55
- (defun track (V2124) (let Source (ps V2124) (shen.track-function Source)))
56
-
57
- (defun shen.track-function (V2125) (cond ((and (cons? V2125) (and (= defun (hd V2125)) (and (cons? (tl V2125)) (and (cons? (tl (tl V2125))) (and (cons? (tl (tl (tl V2125)))) (= () (tl (tl (tl (tl V2125)))))))))) (let KL (cons defun (cons (hd (tl V2125)) (cons (hd (tl (tl V2125))) (cons (shen.insert-tracking-code (hd (tl V2125)) (hd (tl (tl V2125))) (hd (tl (tl (tl V2125))))) ())))) (let Ob (eval-kl KL) (let Tr (set shen.*tracking* (cons Ob (value shen.*tracking*))) Ob)))) (true (shen.sys-error shen.track-function))))
58
-
59
- (defun shen.insert-tracking-code (V2126 V2127 V2128) (cons do (cons (cons set (cons shen.*call* (cons (cons + (cons (cons value (cons shen.*call* ())) (cons 1 ()))) ()))) (cons (cons do (cons (cons shen.input-track (cons (cons value (cons shen.*call* ())) (cons V2126 (cons (shen.cons_form V2127) ())))) (cons (cons do (cons (cons shen.terpri-or-read-char ()) (cons (cons let (cons Result (cons V2128 (cons (cons do (cons (cons shen.output-track (cons (cons value (cons shen.*call* ())) (cons V2126 (cons Result ())))) (cons (cons do (cons (cons set (cons shen.*call* (cons (cons - (cons (cons value (cons shen.*call* ())) (cons 1 ()))) ()))) (cons (cons do (cons (cons shen.terpri-or-read-char ()) (cons Result ()))) ()))) ()))) ())))) ()))) ()))) ()))))
60
-
61
- (set shen.*step* false)
62
-
63
- (defun step (V2133) (cond ((= + V2133) (set shen.*step* true)) ((= - V2133) (set shen.*step* false)) (true (simple-error "step expects a + or a -.
64
- "))))
65
-
66
- (defun spy (V2138) (cond ((= + V2138) (set shen.*spy* true)) ((= - V2138) (set shen.*spy* false)) (true (simple-error "spy expects a + or a -.
67
- "))))
68
-
69
- (defun shen.terpri-or-read-char () (if (value shen.*step*) (shen.check-byte (read-byte (value *stinput*))) (nl 1)))
70
-
71
- (defun shen.check-byte (V2143) (cond ((= V2143 (shen.hat)) (simple-error "aborted")) (true true)))
72
-
73
- (defun shen.input-track (V2144 V2145 V2146) (do (shen.prhush (cn "
74
- " (shen.app (shen.spaces V2144) (cn "<" (shen.app V2144 (cn "> Inputs to " (shen.app V2145 (cn "
75
- " (shen.app (shen.spaces V2144) "" shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)) (shen.recursively-print V2146)))
76
-
77
- (defun shen.recursively-print (V2147) (cond ((= () V2147) (shen.prhush " ==>" (stoutput))) ((cons? V2147) (do (print (hd V2147)) (do (shen.prhush ", " (stoutput)) (shen.recursively-print (tl V2147))))) (true (shen.sys-error shen.recursively-print))))
78
-
79
- (defun shen.spaces (V2148) (cond ((= 0 V2148) "") (true (cn " " (shen.spaces (- V2148 1))))))
80
-
81
- (defun shen.output-track (V2149 V2150 V2151) (shen.prhush (cn "
82
- " (shen.app (shen.spaces V2149) (cn "<" (shen.app V2149 (cn "> Output from " (shen.app V2150 (cn "
83
- " (shen.app (shen.spaces V2149) (cn "==> " (shen.app V2151 "" shen.s)) shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)))
84
-
85
- (defun untrack (V2152) (eval (ps V2152)))
86
-
87
- (defun profile (V2153) (shen.profile-help (ps V2153)))
88
-
89
- (defun shen.profile-help (V2158) (cond ((and (cons? V2158) (and (= defun (hd V2158)) (and (cons? (tl V2158)) (and (cons? (tl (tl V2158))) (and (cons? (tl (tl (tl V2158)))) (= () (tl (tl (tl (tl V2158)))))))))) (let G (gensym shen.f) (let Profile (cons defun (cons (hd (tl V2158)) (cons (hd (tl (tl V2158))) (cons (shen.profile-func (hd (tl V2158)) (hd (tl (tl V2158))) (cons G (hd (tl (tl V2158))))) ())))) (let Def (cons defun (cons G (cons (hd (tl (tl V2158))) (cons (subst G (hd (tl V2158)) (hd (tl (tl (tl V2158))))) ())))) (let CompileProfile (shen.eval-without-macros Profile) (let CompileG (shen.eval-without-macros Def) (hd (tl V2158)))))))) (true (simple-error "Cannot profile.
90
- "))))
91
-
92
- (defun unprofile (V2159) (untrack V2159))
93
-
94
- (defun shen.profile-func (V2160 V2161 V2162) (cons let (cons Start (cons (cons get-time (cons run ())) (cons (cons let (cons Result (cons V2162 (cons (cons let (cons Finish (cons (cons - (cons (cons get-time (cons run ())) (cons Start ()))) (cons (cons let (cons Record (cons (cons shen.put-profile (cons V2160 (cons (cons + (cons (cons shen.get-profile (cons V2160 ())) (cons Finish ()))) ()))) (cons Result ())))) ())))) ())))) ())))))
95
-
96
- (defun profile-results (V2163) (let Results (shen.get-profile V2163) (let Initialise (shen.put-profile V2163 0) (@p V2163 Results))))
97
-
98
- (defun shen.get-profile (V2164) (trap-error (get V2164 profile (value *property-vector*)) (lambda E 0)))
99
-
100
- (defun shen.put-profile (V2165 V2166) (put V2165 profile V2166 (value *property-vector*)))
101
-
102
-
103
-
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 shen.f_error (V2122) (do (shen.prhush (cn "partial function " (shen.app V2122 ";
51
+ " shen.a)) (stoutput)) (do (if (and (not (shen.tracked? V2122)) (y-or-n? (cn "track " (shen.app V2122 "? " shen.a)))) (shen.track-function (ps V2122)) shen.ok) (simple-error "aborted"))))
52
+
53
+ (defun shen.tracked? (V2123) (element? V2123 (value shen.*tracking*)))
54
+
55
+ (defun track (V2124) (let Source (ps V2124) (shen.track-function Source)))
56
+
57
+ (defun shen.track-function (V2125) (cond ((and (cons? V2125) (and (= defun (hd V2125)) (and (cons? (tl V2125)) (and (cons? (tl (tl V2125))) (and (cons? (tl (tl (tl V2125)))) (= () (tl (tl (tl (tl V2125)))))))))) (let KL (cons defun (cons (hd (tl V2125)) (cons (hd (tl (tl V2125))) (cons (shen.insert-tracking-code (hd (tl V2125)) (hd (tl (tl V2125))) (hd (tl (tl (tl V2125))))) ())))) (let Ob (eval-kl KL) (let Tr (set shen.*tracking* (cons Ob (value shen.*tracking*))) Ob)))) (true (shen.sys-error shen.track-function))))
58
+
59
+ (defun shen.insert-tracking-code (V2126 V2127 V2128) (cons do (cons (cons set (cons shen.*call* (cons (cons + (cons (cons value (cons shen.*call* ())) (cons 1 ()))) ()))) (cons (cons do (cons (cons shen.input-track (cons (cons value (cons shen.*call* ())) (cons V2126 (cons (shen.cons_form V2127) ())))) (cons (cons do (cons (cons shen.terpri-or-read-char ()) (cons (cons let (cons Result (cons V2128 (cons (cons do (cons (cons shen.output-track (cons (cons value (cons shen.*call* ())) (cons V2126 (cons Result ())))) (cons (cons do (cons (cons set (cons shen.*call* (cons (cons - (cons (cons value (cons shen.*call* ())) (cons 1 ()))) ()))) (cons (cons do (cons (cons shen.terpri-or-read-char ()) (cons Result ()))) ()))) ()))) ())))) ()))) ()))) ()))))
60
+
61
+ (set shen.*step* false)
62
+
63
+ (defun step (V2133) (cond ((= + V2133) (set shen.*step* true)) ((= - V2133) (set shen.*step* false)) (true (simple-error "step expects a + or a -.
64
+ "))))
65
+
66
+ (defun spy (V2138) (cond ((= + V2138) (set shen.*spy* true)) ((= - V2138) (set shen.*spy* false)) (true (simple-error "spy expects a + or a -.
67
+ "))))
68
+
69
+ (defun shen.terpri-or-read-char () (if (value shen.*step*) (shen.check-byte (read-byte (value *stinput*))) (nl 1)))
70
+
71
+ (defun shen.check-byte (V2143) (cond ((= V2143 (shen.hat)) (simple-error "aborted")) (true true)))
72
+
73
+ (defun shen.input-track (V2144 V2145 V2146) (do (shen.prhush (cn "
74
+ " (shen.app (shen.spaces V2144) (cn "<" (shen.app V2144 (cn "> Inputs to " (shen.app V2145 (cn "
75
+ " (shen.app (shen.spaces V2144) "" shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)) (shen.recursively-print V2146)))
76
+
77
+ (defun shen.recursively-print (V2147) (cond ((= () V2147) (shen.prhush " ==>" (stoutput))) ((cons? V2147) (do (print (hd V2147)) (do (shen.prhush ", " (stoutput)) (shen.recursively-print (tl V2147))))) (true (shen.sys-error shen.recursively-print))))
78
+
79
+ (defun shen.spaces (V2148) (cond ((= 0 V2148) "") (true (cn " " (shen.spaces (- V2148 1))))))
80
+
81
+ (defun shen.output-track (V2149 V2150 V2151) (shen.prhush (cn "
82
+ " (shen.app (shen.spaces V2149) (cn "<" (shen.app V2149 (cn "> Output from " (shen.app V2150 (cn "
83
+ " (shen.app (shen.spaces V2149) (cn "==> " (shen.app V2151 "" shen.s)) shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)))
84
+
85
+ (defun untrack (V2152) (eval (ps V2152)))
86
+
87
+ (defun profile (V2153) (shen.profile-help (ps V2153)))
88
+
89
+ (defun shen.profile-help (V2158) (cond ((and (cons? V2158) (and (= defun (hd V2158)) (and (cons? (tl V2158)) (and (cons? (tl (tl V2158))) (and (cons? (tl (tl (tl V2158)))) (= () (tl (tl (tl (tl V2158)))))))))) (let G (gensym shen.f) (let Profile (cons defun (cons (hd (tl V2158)) (cons (hd (tl (tl V2158))) (cons (shen.profile-func (hd (tl V2158)) (hd (tl (tl V2158))) (cons G (hd (tl (tl V2158))))) ())))) (let Def (cons defun (cons G (cons (hd (tl (tl V2158))) (cons (subst G (hd (tl V2158)) (hd (tl (tl (tl V2158))))) ())))) (let CompileProfile (shen.eval-without-macros Profile) (let CompileG (shen.eval-without-macros Def) (hd (tl V2158)))))))) (true (simple-error "Cannot profile.
90
+ "))))
91
+
92
+ (defun unprofile (V2159) (untrack V2159))
93
+
94
+ (defun shen.profile-func (V2160 V2161 V2162) (cons let (cons Start (cons (cons get-time (cons run ())) (cons (cons let (cons Result (cons V2162 (cons (cons let (cons Finish (cons (cons - (cons (cons get-time (cons run ())) (cons Start ()))) (cons (cons let (cons Record (cons (cons shen.put-profile (cons V2160 (cons (cons + (cons (cons shen.get-profile (cons V2160 ())) (cons Finish ()))) ()))) (cons Result ())))) ())))) ())))) ())))))
95
+
96
+ (defun profile-results (V2163) (let Results (shen.get-profile V2163) (let Initialise (shen.put-profile V2163 0) (@p V2163 Results))))
97
+
98
+ (defun shen.get-profile (V2164) (trap-error (get V2164 profile (value *property-vector*)) (lambda E 0)))
99
+
100
+ (defun shen.put-profile (V2165 V2166) (put V2165 profile V2166 (value *property-vector*)))
101
+
102
+
103
+
@@ -1,324 +1,324 @@
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 (V2168 V2169) (let Record (set shen.*signedfuncs* (cons (cons V2168 V2169) (value shen.*signedfuncs*))) (let Variancy (trap-error (shen.variancy-test V2168 V2169) (lambda E shen.skip)) (let Type (shen.rcons_form (shen.demodulate V2169)) (let F* (concat shen.type-signature-of- V2168) (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) V2168)))))))))))
51
-
52
- (defun shen.demodulate (V2170) (trap-error (let Demod (shen.walk (lambda X2167 (shen.demod X2167)) V2170) (if (= Demod V2170) V2170 (shen.demodulate Demod))) (lambda E V2170)))
53
-
54
- (defun shen.variancy-test (V2171 V2172) (let TypeF (shen.typecheck V2171 B) (let Check (if (= symbol TypeF) shen.skip (if (shen.variant? TypeF V2172) shen.skip (shen.prhush (cn "warning: changing the type of " (shen.app V2171 " may create errors
55
- " shen.a)) (stoutput)))) shen.skip)))
56
-
57
- (defun shen.variant? (V2181 V2182) (cond ((= V2182 V2181) true) ((and (cons? V2181) (and (cons? V2182) (= (hd V2182) (hd V2181)))) (shen.variant? (tl V2181) (tl V2182))) ((and (cons? V2181) (and (cons? V2182) (and (shen.pvar? (hd V2181)) (variable? (hd V2182))))) (shen.variant? (subst shen.a (hd V2181) (tl V2181)) (subst shen.a (hd V2182) (tl V2182)))) ((and (cons? V2181) (and (cons? (hd V2181)) (and (cons? V2182) (cons? (hd V2182))))) (shen.variant? (append (hd V2181) (tl V2181)) (append (hd V2182) (tl V2182)))) (true false)))
58
-
59
- (declare absvector? (cons A (cons --> (cons boolean ()))))
60
-
61
- (declare adjoin (cons A (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
62
-
63
- (declare and (cons boolean (cons --> (cons (cons boolean (cons --> (cons boolean ()))) ()))))
64
-
65
- (declare shen.app (cons A (cons --> (cons (cons string (cons --> (cons (cons symbol (cons --> (cons string ()))) ()))) ()))))
66
-
67
- (declare append (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
68
-
69
- (declare arity (cons A (cons --> (cons number ()))))
70
-
71
- (declare assoc (cons A (cons --> (cons (cons (cons list (cons (cons list (cons A ())) ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
72
-
73
- (declare boolean? (cons A (cons --> (cons boolean ()))))
74
-
75
- (declare bound? (cons symbol (cons --> (cons boolean ()))))
76
-
77
- (declare cd (cons string (cons --> (cons string ()))))
78
-
79
- (declare close (cons (cons stream (cons A ())) (cons --> (cons (cons list (cons B ())) ()))))
80
-
81
- (declare cn (cons string (cons --> (cons (cons string (cons --> (cons string ()))) ()))))
82
-
83
- (declare compile (cons (cons A (cons ==> (cons B ()))) (cons --> (cons (cons A (cons --> (cons (cons (cons A (cons --> (cons B ()))) (cons --> (cons B ()))) ()))) ()))))
84
-
85
- (declare cons? (cons A (cons --> (cons boolean ()))))
86
-
87
- (declare destroy (cons (cons A (cons --> (cons B ()))) (cons --> (cons symbol ()))))
88
-
89
- (declare difference (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
90
-
91
- (declare do (cons A (cons --> (cons (cons B (cons --> (cons B ()))) ()))))
92
-
93
- (declare <e> (cons (cons list (cons A ())) (cons ==> (cons (cons list (cons B ())) ()))))
94
-
95
- (declare <!> (cons (cons list (cons A ())) (cons ==> (cons (cons list (cons A ())) ()))))
96
-
97
- (declare element? (cons A (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons boolean ()))) ()))))
98
-
99
- (declare empty? (cons A (cons --> (cons boolean ()))))
100
-
101
- (declare enable-type-theory (cons symbol (cons --> (cons boolean ()))))
102
-
103
- (declare external (cons symbol (cons --> (cons (cons list (cons symbol ())) ()))))
104
-
105
- (declare error-to-string (cons exception (cons --> (cons string ()))))
106
-
107
- (declare explode (cons A (cons --> (cons (cons list (cons string ())) ()))))
108
-
109
- (declare fail-if (cons (cons symbol (cons --> (cons boolean ()))) (cons --> (cons (cons symbol (cons --> (cons symbol ()))) ()))))
110
-
111
- (declare fix (cons (cons A (cons --> (cons A ()))) (cons --> (cons (cons A (cons --> (cons A ()))) ()))))
112
-
113
- (declare freeze (cons A (cons --> (cons (cons lazy (cons A ())) ()))))
114
-
115
- (declare fst (cons (cons A (cons * (cons B ()))) (cons --> (cons A ()))))
116
-
117
- (declare gensym (cons symbol (cons --> (cons symbol ()))))
118
-
119
- (declare <-vector (cons (cons vector (cons A ())) (cons --> (cons (cons number (cons --> (cons A ()))) ()))))
120
-
121
- (declare vector-> (cons (cons vector (cons A ())) (cons --> (cons (cons number (cons --> (cons (cons A (cons --> (cons (cons vector (cons A ())) ()))) ()))) ()))))
122
-
123
- (declare vector (cons number (cons --> (cons (cons vector (cons A ())) ()))))
124
-
125
- (declare get-time (cons symbol (cons --> (cons number ()))))
126
-
127
- (declare hash (cons A (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
128
-
129
- (declare head (cons (cons list (cons A ())) (cons --> (cons A ()))))
130
-
131
- (declare hdv (cons (cons vector (cons A ())) (cons --> (cons A ()))))
132
-
133
- (declare hdstr (cons string (cons --> (cons string ()))))
134
-
135
- (declare if (cons boolean (cons --> (cons (cons A (cons --> (cons (cons A (cons --> (cons A ()))) ()))) ()))))
136
-
137
- (declare it (cons --> (cons string ())))
138
-
139
- (declare implementation (cons --> (cons string ())))
140
-
141
- (declare include (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
142
-
143
- (declare include-all-but (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
144
-
145
- (declare inferences (cons --> (cons number ())))
146
-
147
- (declare shen.insert (cons A (cons --> (cons (cons string (cons --> (cons string ()))) ()))))
148
-
149
- (declare integer? (cons A (cons --> (cons boolean ()))))
150
-
151
- (declare intersection (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
152
-
153
- (declare kill (cons --> (cons A ())))
154
-
155
- (declare language (cons --> (cons string ())))
156
-
157
- (declare length (cons (cons list (cons A ())) (cons --> (cons number ()))))
158
-
159
- (declare limit (cons (cons vector (cons A ())) (cons --> (cons number ()))))
160
-
161
- (declare load (cons string (cons --> (cons symbol ()))))
162
-
163
- (declare map (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons B ())) ()))) ()))))
164
-
165
- (declare mapcan (cons (cons A (cons --> (cons (cons list (cons B ())) ()))) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons B ())) ()))) ()))))
166
-
167
- (declare maxinferences (cons number (cons --> (cons number ()))))
168
-
169
- (declare n->string (cons number (cons --> (cons string ()))))
170
-
171
- (declare nl (cons number (cons --> (cons number ()))))
172
-
173
- (declare not (cons boolean (cons --> (cons boolean ()))))
174
-
175
- (declare nth (cons number (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons A ()))) ()))))
176
-
177
- (declare number? (cons A (cons --> (cons boolean ()))))
178
-
179
- (declare occurrences (cons A (cons --> (cons (cons B (cons --> (cons number ()))) ()))))
180
-
181
- (declare occurs-check (cons symbol (cons --> (cons boolean ()))))
182
-
183
- (declare optimise (cons symbol (cons --> (cons boolean ()))))
184
-
185
- (declare or (cons boolean (cons --> (cons (cons boolean (cons --> (cons boolean ()))) ()))))
186
-
187
- (declare os (cons --> (cons string ())))
188
-
189
- (declare port (cons --> (cons string ())))
190
-
191
- (declare porters (cons --> (cons string ())))
192
-
193
- (declare pos (cons string (cons --> (cons (cons number (cons --> (cons string ()))) ()))))
194
-
195
- (declare pr (cons string (cons --> (cons (cons (cons stream (cons out ())) (cons --> (cons string ()))) ()))))
196
-
197
- (declare print (cons A (cons --> (cons A ()))))
198
-
199
- (declare profile (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
200
-
201
- (declare preclude (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
202
-
203
- (declare shen.proc-nl (cons string (cons --> (cons string ()))))
204
-
205
- (declare profile-results (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons (cons A (cons --> (cons B ()))) (cons * (cons number ()))) ()))))
206
-
207
- (declare protect (cons symbol (cons --> (cons symbol ()))))
208
-
209
- (declare preclude-all-but (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
210
-
211
- (declare shen.prhush (cons string (cons --> (cons (cons (cons stream (cons out ())) (cons --> (cons string ()))) ()))))
212
-
213
- (declare ps (cons symbol (cons --> (cons (cons list (cons unit ())) ()))))
214
-
215
- (declare read-byte (cons (cons stream (cons in ())) (cons --> (cons number ()))))
216
-
217
- (declare read-file-as-bytelist (cons string (cons --> (cons (cons list (cons number ())) ()))))
218
-
219
- (declare read-file-as-string (cons string (cons --> (cons string ()))))
220
-
221
- (declare read-file (cons string (cons --> (cons (cons list (cons unit ())) ()))))
222
-
223
- (declare read-from-string (cons string (cons --> (cons (cons list (cons unit ())) ()))))
224
-
225
- (declare release (cons --> (cons string ())))
226
-
227
- (declare remove (cons A (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
228
-
229
- (declare reverse (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))))
230
-
231
- (declare simple-error (cons string (cons --> (cons A ()))))
232
-
233
- (declare snd (cons (cons A (cons * (cons B ()))) (cons --> (cons B ()))))
234
-
235
- (declare specialise (cons symbol (cons --> (cons symbol ()))))
236
-
237
- (declare spy (cons symbol (cons --> (cons boolean ()))))
238
-
239
- (declare step (cons symbol (cons --> (cons boolean ()))))
240
-
241
- (declare stinput (cons --> (cons (cons stream (cons in ())) ())))
242
-
243
- (declare stoutput (cons --> (cons (cons stream (cons out ())) ())))
244
-
245
- (declare string? (cons A (cons --> (cons boolean ()))))
246
-
247
- (declare str (cons A (cons --> (cons string ()))))
248
-
249
- (declare string->n (cons string (cons --> (cons number ()))))
250
-
251
- (declare string->symbol (cons string (cons --> (cons symbol ()))))
252
-
253
- (declare sum (cons (cons list (cons number ())) (cons --> (cons number ()))))
254
-
255
- (declare symbol? (cons A (cons --> (cons boolean ()))))
256
-
257
- (declare systemf (cons symbol (cons --> (cons (cons list (cons symbol ())) ()))))
258
-
259
- (declare tail (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))))
260
-
261
- (declare tlstr (cons string (cons --> (cons string ()))))
262
-
263
- (declare tlv (cons (cons vector (cons A ())) (cons --> (cons (cons vector (cons A ())) ()))))
264
-
265
- (declare tc (cons symbol (cons --> (cons boolean ()))))
266
-
267
- (declare tc? (cons --> (cons boolean ())))
268
-
269
- (declare thaw (cons (cons lazy (cons A ())) (cons --> (cons A ()))))
270
-
271
- (declare track (cons symbol (cons --> (cons symbol ()))))
272
-
273
- (declare trap-error (cons A (cons --> (cons (cons (cons exception (cons --> (cons A ()))) (cons --> (cons A ()))) ()))))
274
-
275
- (declare tuple? (cons A (cons --> (cons boolean ()))))
276
-
277
- (declare undefmacro (cons symbol (cons --> (cons symbol ()))))
278
-
279
- (declare union (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
280
-
281
- (declare unprofile (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
282
-
283
- (declare untrack (cons symbol (cons --> (cons symbol ()))))
284
-
285
- (declare unspecialise (cons symbol (cons --> (cons symbol ()))))
286
-
287
- (declare variable? (cons A (cons --> (cons boolean ()))))
288
-
289
- (declare vector? (cons A (cons --> (cons boolean ()))))
290
-
291
- (declare version (cons --> (cons string ())))
292
-
293
- (declare write-to-file (cons string (cons --> (cons (cons A (cons --> (cons A ()))) ()))))
294
-
295
- (declare write-byte (cons number (cons --> (cons (cons (cons stream (cons out ())) (cons --> (cons number ()))) ()))))
296
-
297
- (declare y-or-n? (cons string (cons --> (cons boolean ()))))
298
-
299
- (declare > (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
300
-
301
- (declare < (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
302
-
303
- (declare >= (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
304
-
305
- (declare <= (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
306
-
307
- (declare = (cons A (cons --> (cons (cons A (cons --> (cons boolean ()))) ()))))
308
-
309
- (declare + (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
310
-
311
- (declare / (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
312
-
313
- (declare - (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
314
-
315
- (declare * (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
316
-
317
- (declare == (cons A (cons --> (cons (cons B (cons --> (cons boolean ()))) ()))))
318
-
319
- (declare shen.in-> (cons (cons A (cons ==> (cons B ()))) (cons --> (cons A ()))))
320
-
321
- (declare shen.<-out (cons (cons A (cons ==> (cons B ()))) (cons --> (cons B ()))))
322
-
323
-
324
-
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 (V2168 V2169) (let Record (set shen.*signedfuncs* (cons (cons V2168 V2169) (value shen.*signedfuncs*))) (let Variancy (trap-error (shen.variancy-test V2168 V2169) (lambda E shen.skip)) (let Type (shen.rcons_form (shen.demodulate V2169)) (let F* (concat shen.type-signature-of- V2168) (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) V2168)))))))))))
51
+
52
+ (defun shen.demodulate (V2170) (trap-error (let Demod (shen.walk (lambda X2167 (shen.demod X2167)) V2170) (if (= Demod V2170) V2170 (shen.demodulate Demod))) (lambda E V2170)))
53
+
54
+ (defun shen.variancy-test (V2171 V2172) (let TypeF (shen.typecheck V2171 B) (let Check (if (= symbol TypeF) shen.skip (if (shen.variant? TypeF V2172) shen.skip (shen.prhush (cn "warning: changing the type of " (shen.app V2171 " may create errors
55
+ " shen.a)) (stoutput)))) shen.skip)))
56
+
57
+ (defun shen.variant? (V2181 V2182) (cond ((= V2182 V2181) true) ((and (cons? V2181) (and (cons? V2182) (= (hd V2182) (hd V2181)))) (shen.variant? (tl V2181) (tl V2182))) ((and (cons? V2181) (and (cons? V2182) (and (shen.pvar? (hd V2181)) (variable? (hd V2182))))) (shen.variant? (subst shen.a (hd V2181) (tl V2181)) (subst shen.a (hd V2182) (tl V2182)))) ((and (cons? V2181) (and (cons? (hd V2181)) (and (cons? V2182) (cons? (hd V2182))))) (shen.variant? (append (hd V2181) (tl V2181)) (append (hd V2182) (tl V2182)))) (true false)))
58
+
59
+ (declare absvector? (cons A (cons --> (cons boolean ()))))
60
+
61
+ (declare adjoin (cons A (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
62
+
63
+ (declare and (cons boolean (cons --> (cons (cons boolean (cons --> (cons boolean ()))) ()))))
64
+
65
+ (declare shen.app (cons A (cons --> (cons (cons string (cons --> (cons (cons symbol (cons --> (cons string ()))) ()))) ()))))
66
+
67
+ (declare append (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
68
+
69
+ (declare arity (cons A (cons --> (cons number ()))))
70
+
71
+ (declare assoc (cons A (cons --> (cons (cons (cons list (cons (cons list (cons A ())) ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
72
+
73
+ (declare boolean? (cons A (cons --> (cons boolean ()))))
74
+
75
+ (declare bound? (cons symbol (cons --> (cons boolean ()))))
76
+
77
+ (declare cd (cons string (cons --> (cons string ()))))
78
+
79
+ (declare close (cons (cons stream (cons A ())) (cons --> (cons (cons list (cons B ())) ()))))
80
+
81
+ (declare cn (cons string (cons --> (cons (cons string (cons --> (cons string ()))) ()))))
82
+
83
+ (declare compile (cons (cons A (cons ==> (cons B ()))) (cons --> (cons (cons A (cons --> (cons (cons (cons A (cons --> (cons B ()))) (cons --> (cons B ()))) ()))) ()))))
84
+
85
+ (declare cons? (cons A (cons --> (cons boolean ()))))
86
+
87
+ (declare destroy (cons (cons A (cons --> (cons B ()))) (cons --> (cons symbol ()))))
88
+
89
+ (declare difference (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
90
+
91
+ (declare do (cons A (cons --> (cons (cons B (cons --> (cons B ()))) ()))))
92
+
93
+ (declare <e> (cons (cons list (cons A ())) (cons ==> (cons (cons list (cons B ())) ()))))
94
+
95
+ (declare <!> (cons (cons list (cons A ())) (cons ==> (cons (cons list (cons A ())) ()))))
96
+
97
+ (declare element? (cons A (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons boolean ()))) ()))))
98
+
99
+ (declare empty? (cons A (cons --> (cons boolean ()))))
100
+
101
+ (declare enable-type-theory (cons symbol (cons --> (cons boolean ()))))
102
+
103
+ (declare external (cons symbol (cons --> (cons (cons list (cons symbol ())) ()))))
104
+
105
+ (declare error-to-string (cons exception (cons --> (cons string ()))))
106
+
107
+ (declare explode (cons A (cons --> (cons (cons list (cons string ())) ()))))
108
+
109
+ (declare fail-if (cons (cons symbol (cons --> (cons boolean ()))) (cons --> (cons (cons symbol (cons --> (cons symbol ()))) ()))))
110
+
111
+ (declare fix (cons (cons A (cons --> (cons A ()))) (cons --> (cons (cons A (cons --> (cons A ()))) ()))))
112
+
113
+ (declare freeze (cons A (cons --> (cons (cons lazy (cons A ())) ()))))
114
+
115
+ (declare fst (cons (cons A (cons * (cons B ()))) (cons --> (cons A ()))))
116
+
117
+ (declare gensym (cons symbol (cons --> (cons symbol ()))))
118
+
119
+ (declare <-vector (cons (cons vector (cons A ())) (cons --> (cons (cons number (cons --> (cons A ()))) ()))))
120
+
121
+ (declare vector-> (cons (cons vector (cons A ())) (cons --> (cons (cons number (cons --> (cons (cons A (cons --> (cons (cons vector (cons A ())) ()))) ()))) ()))))
122
+
123
+ (declare vector (cons number (cons --> (cons (cons vector (cons A ())) ()))))
124
+
125
+ (declare get-time (cons symbol (cons --> (cons number ()))))
126
+
127
+ (declare hash (cons A (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
128
+
129
+ (declare head (cons (cons list (cons A ())) (cons --> (cons A ()))))
130
+
131
+ (declare hdv (cons (cons vector (cons A ())) (cons --> (cons A ()))))
132
+
133
+ (declare hdstr (cons string (cons --> (cons string ()))))
134
+
135
+ (declare if (cons boolean (cons --> (cons (cons A (cons --> (cons (cons A (cons --> (cons A ()))) ()))) ()))))
136
+
137
+ (declare it (cons --> (cons string ())))
138
+
139
+ (declare implementation (cons --> (cons string ())))
140
+
141
+ (declare include (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
142
+
143
+ (declare include-all-but (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
144
+
145
+ (declare inferences (cons --> (cons number ())))
146
+
147
+ (declare shen.insert (cons A (cons --> (cons (cons string (cons --> (cons string ()))) ()))))
148
+
149
+ (declare integer? (cons A (cons --> (cons boolean ()))))
150
+
151
+ (declare intersection (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
152
+
153
+ (declare kill (cons --> (cons A ())))
154
+
155
+ (declare language (cons --> (cons string ())))
156
+
157
+ (declare length (cons (cons list (cons A ())) (cons --> (cons number ()))))
158
+
159
+ (declare limit (cons (cons vector (cons A ())) (cons --> (cons number ()))))
160
+
161
+ (declare load (cons string (cons --> (cons symbol ()))))
162
+
163
+ (declare map (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons B ())) ()))) ()))))
164
+
165
+ (declare mapcan (cons (cons A (cons --> (cons (cons list (cons B ())) ()))) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons B ())) ()))) ()))))
166
+
167
+ (declare maxinferences (cons number (cons --> (cons number ()))))
168
+
169
+ (declare n->string (cons number (cons --> (cons string ()))))
170
+
171
+ (declare nl (cons number (cons --> (cons number ()))))
172
+
173
+ (declare not (cons boolean (cons --> (cons boolean ()))))
174
+
175
+ (declare nth (cons number (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons A ()))) ()))))
176
+
177
+ (declare number? (cons A (cons --> (cons boolean ()))))
178
+
179
+ (declare occurrences (cons A (cons --> (cons (cons B (cons --> (cons number ()))) ()))))
180
+
181
+ (declare occurs-check (cons symbol (cons --> (cons boolean ()))))
182
+
183
+ (declare optimise (cons symbol (cons --> (cons boolean ()))))
184
+
185
+ (declare or (cons boolean (cons --> (cons (cons boolean (cons --> (cons boolean ()))) ()))))
186
+
187
+ (declare os (cons --> (cons string ())))
188
+
189
+ (declare port (cons --> (cons string ())))
190
+
191
+ (declare porters (cons --> (cons string ())))
192
+
193
+ (declare pos (cons string (cons --> (cons (cons number (cons --> (cons string ()))) ()))))
194
+
195
+ (declare pr (cons string (cons --> (cons (cons (cons stream (cons out ())) (cons --> (cons string ()))) ()))))
196
+
197
+ (declare print (cons A (cons --> (cons A ()))))
198
+
199
+ (declare profile (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
200
+
201
+ (declare preclude (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
202
+
203
+ (declare shen.proc-nl (cons string (cons --> (cons string ()))))
204
+
205
+ (declare profile-results (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons (cons A (cons --> (cons B ()))) (cons * (cons number ()))) ()))))
206
+
207
+ (declare protect (cons symbol (cons --> (cons symbol ()))))
208
+
209
+ (declare preclude-all-but (cons (cons list (cons symbol ())) (cons --> (cons (cons list (cons symbol ())) ()))))
210
+
211
+ (declare shen.prhush (cons string (cons --> (cons (cons (cons stream (cons out ())) (cons --> (cons string ()))) ()))))
212
+
213
+ (declare ps (cons symbol (cons --> (cons (cons list (cons unit ())) ()))))
214
+
215
+ (declare read-byte (cons (cons stream (cons in ())) (cons --> (cons number ()))))
216
+
217
+ (declare read-file-as-bytelist (cons string (cons --> (cons (cons list (cons number ())) ()))))
218
+
219
+ (declare read-file-as-string (cons string (cons --> (cons string ()))))
220
+
221
+ (declare read-file (cons string (cons --> (cons (cons list (cons unit ())) ()))))
222
+
223
+ (declare read-from-string (cons string (cons --> (cons (cons list (cons unit ())) ()))))
224
+
225
+ (declare release (cons --> (cons string ())))
226
+
227
+ (declare remove (cons A (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
228
+
229
+ (declare reverse (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))))
230
+
231
+ (declare simple-error (cons string (cons --> (cons A ()))))
232
+
233
+ (declare snd (cons (cons A (cons * (cons B ()))) (cons --> (cons B ()))))
234
+
235
+ (declare specialise (cons symbol (cons --> (cons symbol ()))))
236
+
237
+ (declare spy (cons symbol (cons --> (cons boolean ()))))
238
+
239
+ (declare step (cons symbol (cons --> (cons boolean ()))))
240
+
241
+ (declare stinput (cons --> (cons (cons stream (cons in ())) ())))
242
+
243
+ (declare stoutput (cons --> (cons (cons stream (cons out ())) ())))
244
+
245
+ (declare string? (cons A (cons --> (cons boolean ()))))
246
+
247
+ (declare str (cons A (cons --> (cons string ()))))
248
+
249
+ (declare string->n (cons string (cons --> (cons number ()))))
250
+
251
+ (declare string->symbol (cons string (cons --> (cons symbol ()))))
252
+
253
+ (declare sum (cons (cons list (cons number ())) (cons --> (cons number ()))))
254
+
255
+ (declare symbol? (cons A (cons --> (cons boolean ()))))
256
+
257
+ (declare systemf (cons symbol (cons --> (cons (cons list (cons symbol ())) ()))))
258
+
259
+ (declare tail (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))))
260
+
261
+ (declare tlstr (cons string (cons --> (cons string ()))))
262
+
263
+ (declare tlv (cons (cons vector (cons A ())) (cons --> (cons (cons vector (cons A ())) ()))))
264
+
265
+ (declare tc (cons symbol (cons --> (cons boolean ()))))
266
+
267
+ (declare tc? (cons --> (cons boolean ())))
268
+
269
+ (declare thaw (cons (cons lazy (cons A ())) (cons --> (cons A ()))))
270
+
271
+ (declare track (cons symbol (cons --> (cons symbol ()))))
272
+
273
+ (declare trap-error (cons A (cons --> (cons (cons (cons exception (cons --> (cons A ()))) (cons --> (cons A ()))) ()))))
274
+
275
+ (declare tuple? (cons A (cons --> (cons boolean ()))))
276
+
277
+ (declare undefmacro (cons symbol (cons --> (cons symbol ()))))
278
+
279
+ (declare union (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
280
+
281
+ (declare unprofile (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
282
+
283
+ (declare untrack (cons symbol (cons --> (cons symbol ()))))
284
+
285
+ (declare unspecialise (cons symbol (cons --> (cons symbol ()))))
286
+
287
+ (declare variable? (cons A (cons --> (cons boolean ()))))
288
+
289
+ (declare vector? (cons A (cons --> (cons boolean ()))))
290
+
291
+ (declare version (cons --> (cons string ())))
292
+
293
+ (declare write-to-file (cons string (cons --> (cons (cons A (cons --> (cons A ()))) ()))))
294
+
295
+ (declare write-byte (cons number (cons --> (cons (cons (cons stream (cons out ())) (cons --> (cons number ()))) ()))))
296
+
297
+ (declare y-or-n? (cons string (cons --> (cons boolean ()))))
298
+
299
+ (declare > (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
300
+
301
+ (declare < (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
302
+
303
+ (declare >= (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
304
+
305
+ (declare <= (cons number (cons --> (cons (cons number (cons --> (cons boolean ()))) ()))))
306
+
307
+ (declare = (cons A (cons --> (cons (cons A (cons --> (cons boolean ()))) ()))))
308
+
309
+ (declare + (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
310
+
311
+ (declare / (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
312
+
313
+ (declare - (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
314
+
315
+ (declare * (cons number (cons --> (cons (cons number (cons --> (cons number ()))) ()))))
316
+
317
+ (declare == (cons A (cons --> (cons (cons B (cons --> (cons boolean ()))) ()))))
318
+
319
+ (declare shen.in-> (cons (cons A (cons ==> (cons B ()))) (cons --> (cons A ()))))
320
+
321
+ (declare shen.<-out (cons (cons A (cons ==> (cons B ()))) (cons --> (cons B ()))))
322
+
323
+
324
+