shen-ruby 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,27 +36,27 @@ port " (shen.app (value *port*) (cn " ported by " (shen.app (value *porters*) "
36
36
 
37
37
  (defun shen.initialise_environment () (shen.multiple-set (cons shen.*call* (cons 0 (cons shen.*infs* (cons 0 (cons shen.*process-counter* (cons 0 (cons shen.*catch* (cons 0 ()))))))))))
38
38
 
39
- (defun shen.multiple-set (V2248) (cond ((= () V2248) ()) ((and (cons? V2248) (cons? (tl V2248))) (do (set (hd V2248) (hd (tl V2248))) (shen.multiple-set (tl (tl V2248))))) (true (shen.f_error shen.multiple-set))))
39
+ (defun shen.multiple-set (V18411) (cond ((= () V18411) ()) ((and (cons? V18411) (cons? (tl V18411))) (do (set (hd V18411) (hd (tl V18411))) (shen.multiple-set (tl (tl V18411))))) (true (shen.f_error shen.multiple-set))))
40
40
 
41
- (defun destroy (V2249) (declare V2249 symbol))
41
+ (defun destroy (V18413) (declare V18413 symbol))
42
42
 
43
43
  (set shen.*history* ())
44
44
 
45
45
  (defun shen.read-evaluate-print () (let Lineread (shen.toplineread) (let History (value shen.*history*) (let NewLineread (shen.retrieve-from-history-if-needed Lineread History) (let NewHistory (shen.update_history NewLineread History) (let Parsed (fst NewLineread) (shen.toplevel Parsed)))))))
46
46
 
47
- (defun shen.retrieve-from-history-if-needed (V2259 V2260) (cond ((and (tuple? V2259) (and (cons? (snd V2259)) (element? (hd (snd V2259)) (cons (shen.space) (cons (shen.newline) ()))))) (shen.retrieve-from-history-if-needed (@p (fst V2259) (tl (snd V2259))) V2260)) ((and (tuple? V2259) (and (cons? (snd V2259)) (and (cons? (tl (snd V2259))) (and (= () (tl (tl (snd V2259)))) (and (cons? V2260) (and (= (hd (snd V2259)) (shen.exclamation)) (= (hd (tl (snd V2259))) (shen.exclamation)))))))) (let PastPrint (shen.prbytes (snd (hd V2260))) (hd V2260))) ((and (tuple? V2259) (and (cons? (snd V2259)) (= (hd (snd V2259)) (shen.exclamation)))) (let Key? (shen.make-key (tl (snd V2259)) V2260) (let Find (head (shen.find-past-inputs Key? V2260)) (let PastPrint (shen.prbytes (snd Find)) Find)))) ((and (tuple? V2259) (and (cons? (snd V2259)) (and (= () (tl (snd V2259))) (= (hd (snd V2259)) (shen.percent))))) (do (shen.print-past-inputs (lambda X true) (reverse V2260) 0) (abort))) ((and (tuple? V2259) (and (cons? (snd V2259)) (= (hd (snd V2259)) (shen.percent)))) (let Key? (shen.make-key (tl (snd V2259)) V2260) (let Pastprint (shen.print-past-inputs Key? (reverse V2260) 0) (abort)))) (true V2259)))
47
+ (defun shen.retrieve-from-history-if-needed (V18425 V18426) (cond ((and (tuple? V18425) (and (cons? (snd V18425)) (element? (hd (snd V18425)) (cons (shen.space) (cons (shen.newline) ()))))) (shen.retrieve-from-history-if-needed (@p (fst V18425) (tl (snd V18425))) V18426)) ((and (tuple? V18425) (and (cons? (snd V18425)) (and (cons? (tl (snd V18425))) (and (= () (tl (tl (snd V18425)))) (and (cons? V18426) (and (= (hd (snd V18425)) (shen.exclamation)) (= (hd (tl (snd V18425))) (shen.exclamation)))))))) (let PastPrint (shen.prbytes (snd (hd V18426))) (hd V18426))) ((and (tuple? V18425) (and (cons? (snd V18425)) (= (hd (snd V18425)) (shen.exclamation)))) (let Key? (shen.make-key (tl (snd V18425)) V18426) (let Find (head (shen.find-past-inputs Key? V18426)) (let PastPrint (shen.prbytes (snd Find)) Find)))) ((and (tuple? V18425) (and (cons? (snd V18425)) (and (= () (tl (snd V18425))) (= (hd (snd V18425)) (shen.percent))))) (do (shen.print-past-inputs (lambda X true) (reverse V18426) 0) (abort))) ((and (tuple? V18425) (and (cons? (snd V18425)) (= (hd (snd V18425)) (shen.percent)))) (let Key? (shen.make-key (tl (snd V18425)) V18426) (let Pastprint (shen.print-past-inputs Key? (reverse V18426) 0) (abort)))) (true V18425)))
48
48
 
49
49
  (defun shen.percent () 37)
50
50
 
51
51
  (defun shen.exclamation () 33)
52
52
 
53
- (defun shen.prbytes (V2261) (do (map (lambda Byte (pr (n->string Byte) (stoutput))) V2261) (nl 1)))
53
+ (defun shen.prbytes (V18428) (do (map (lambda Byte (pr (n->string Byte) (stoutput))) V18428) (nl 1)))
54
54
 
55
- (defun shen.update_history (V2262 V2263) (set shen.*history* (cons V2262 V2263)))
55
+ (defun shen.update_history (V18431 V18432) (set shen.*history* (cons V18431 V18432)))
56
56
 
57
57
  (defun shen.toplineread () (shen.toplineread_loop (read-byte (stinput)) ()))
58
58
 
59
- (defun shen.toplineread_loop (V2265 V2266) (cond ((= V2265 (shen.hat)) (simple-error "line read aborted")) ((element? V2265 (cons (shen.newline) (cons (shen.carriage-return) ()))) (let Line (compile (lambda V2246 (shen.<st_input> V2246)) V2266 (lambda E shen.nextline)) (let It (shen.record-it V2266) (if (or (= Line shen.nextline) (empty? Line)) (shen.toplineread_loop (read-byte (stinput)) (append V2266 (cons V2265 ()))) (@p Line V2266))))) (true (shen.toplineread_loop (read-byte (stinput)) (append V2266 (cons V2265 ()))))))
59
+ (defun shen.toplineread_loop (V18436 V18437) (cond ((= V18436 (shen.hat)) (simple-error "line read aborted")) ((element? V18436 (cons (shen.newline) (cons (shen.carriage-return) ()))) (let Line (compile (lambda X (shen.<st_input> X)) V18437 (lambda E shen.nextline)) (let It (shen.record-it V18437) (if (or (= Line shen.nextline) (empty? Line)) (shen.toplineread_loop (read-byte (stinput)) (append V18437 (cons V18436 ()))) (@p Line V18437))))) (true (shen.toplineread_loop (read-byte (stinput)) (append V18437 (cons V18436 ()))))))
60
60
 
61
61
  (defun shen.hat () 94)
62
62
 
@@ -64,7 +64,7 @@ port " (shen.app (value *port*) (cn " ported by " (shen.app (value *porters*) "
64
64
 
65
65
  (defun shen.carriage-return () 13)
66
66
 
67
- (defun tc (V2271) (cond ((= + V2271) (set shen.*tc* true)) ((= - V2271) (set shen.*tc* false)) (true (simple-error "tc expects a + or -"))))
67
+ (defun tc (V18443) (cond ((= + V18443) (set shen.*tc* true)) ((= - V18443) (set shen.*tc* false)) (true (simple-error "tc expects a + or -"))))
68
68
 
69
69
  (defun shen.prompt () (if (value shen.*tc*) (shen.prhush (cn "
70
70
 
@@ -72,16 +72,16 @@ port " (shen.app (value *port*) (cn " ported by " (shen.app (value *porters*) "
72
72
 
73
73
  (" (shen.app (length (value shen.*history*)) "-) " shen.a)) (stoutput))))
74
74
 
75
- (defun shen.toplevel (V2272) (shen.toplevel_evaluate V2272 (value shen.*tc*)))
75
+ (defun shen.toplevel (V18445) (shen.toplevel_evaluate V18445 (value shen.*tc*)))
76
76
 
77
- (defun shen.find-past-inputs (V2273 V2274) (let F (shen.find V2273 V2274) (if (empty? F) (simple-error "input not found
77
+ (defun shen.find-past-inputs (V18448 V18449) (let F (shen.find V18448 V18449) (if (empty? F) (simple-error "input not found
78
78
  ") F)))
79
79
 
80
- (defun shen.make-key (V2275 V2276) (let Atom (hd (compile (lambda V2247 (shen.<st_input> V2247)) V2275 (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
80
+ (defun shen.make-key (V18452 V18453) (let Atom (hd (compile (lambda X (shen.<st_input> X)) V18452 (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
81
81
  " shen.s))) (simple-error "parse error
82
- "))))) (if (integer? Atom) (lambda X (= X (nth (+ Atom 1) (reverse V2276)))) (lambda X (shen.prefix? V2275 (shen.trim-gubbins (snd X)))))))
82
+ "))))) (if (integer? Atom) (lambda X (= X (nth (+ Atom 1) (reverse V18453)))) (lambda X (shen.prefix? V18452 (shen.trim-gubbins (snd X)))))))
83
83
 
84
- (defun shen.trim-gubbins (V2277) (cond ((and (cons? V2277) (= (hd V2277) (shen.space))) (shen.trim-gubbins (tl V2277))) ((and (cons? V2277) (= (hd V2277) (shen.newline))) (shen.trim-gubbins (tl V2277))) ((and (cons? V2277) (= (hd V2277) (shen.carriage-return))) (shen.trim-gubbins (tl V2277))) ((and (cons? V2277) (= (hd V2277) (shen.tab))) (shen.trim-gubbins (tl V2277))) ((and (cons? V2277) (= (hd V2277) (shen.left-round))) (shen.trim-gubbins (tl V2277))) (true V2277)))
84
+ (defun shen.trim-gubbins (V18455) (cond ((and (cons? V18455) (= (hd V18455) (shen.space))) (shen.trim-gubbins (tl V18455))) ((and (cons? V18455) (= (hd V18455) (shen.newline))) (shen.trim-gubbins (tl V18455))) ((and (cons? V18455) (= (hd V18455) (shen.carriage-return))) (shen.trim-gubbins (tl V18455))) ((and (cons? V18455) (= (hd V18455) (shen.tab))) (shen.trim-gubbins (tl V18455))) ((and (cons? V18455) (= (hd V18455) (shen.left-round))) (shen.trim-gubbins (tl V18455))) (true V18455)))
85
85
 
86
86
  (defun shen.space () 32)
87
87
 
@@ -89,22 +89,22 @@ port " (shen.app (value *port*) (cn " ported by " (shen.app (value *porters*) "
89
89
 
90
90
  (defun shen.left-round () 40)
91
91
 
92
- (defun shen.find (V2284 V2285) (cond ((= () V2285) ()) ((and (cons? V2285) (V2284 (hd V2285))) (cons (hd V2285) (shen.find V2284 (tl V2285)))) ((cons? V2285) (shen.find V2284 (tl V2285))) (true (shen.f_error shen.find))))
92
+ (defun shen.find (V18464 V18465) (cond ((= () V18465) ()) ((and (cons? V18465) (V18464 (hd V18465))) (cons (hd V18465) (shen.find V18464 (tl V18465)))) ((cons? V18465) (shen.find V18464 (tl V18465))) (true (shen.f_error shen.find))))
93
93
 
94
- (defun shen.prefix? (V2297 V2298) (cond ((= () V2297) true) ((and (cons? V2297) (and (cons? V2298) (= (hd V2298) (hd V2297)))) (shen.prefix? (tl V2297) (tl V2298))) (true false)))
94
+ (defun shen.prefix? (V18479 V18480) (cond ((= () V18479) true) ((and (cons? V18479) (and (cons? V18480) (= (hd V18480) (hd V18479)))) (shen.prefix? (tl V18479) (tl V18480))) (true false)))
95
95
 
96
- (defun shen.print-past-inputs (V2307 V2308 V2309) (cond ((= () V2308) _) ((and (cons? V2308) (not (V2307 (hd V2308)))) (shen.print-past-inputs V2307 (tl V2308) (+ V2309 1))) ((and (cons? V2308) (tuple? (hd V2308))) (do (shen.prhush (shen.app V2309 ". " shen.a) (stoutput)) (do (shen.prbytes (snd (hd V2308))) (shen.print-past-inputs V2307 (tl V2308) (+ V2309 1))))) (true (shen.f_error shen.print-past-inputs))))
96
+ (defun shen.print-past-inputs (V18492 V18493 V18494) (cond ((= () V18493) _) ((and (cons? V18493) (not (V18492 (hd V18493)))) (shen.print-past-inputs V18492 (tl V18493) (+ V18494 1))) ((and (cons? V18493) (tuple? (hd V18493))) (do (shen.prhush (shen.app V18494 ". " shen.a) (stoutput)) (do (shen.prbytes (snd (hd V18493))) (shen.print-past-inputs V18492 (tl V18493) (+ V18494 1))))) (true (shen.f_error shen.print-past-inputs))))
97
97
 
98
- (defun shen.toplevel_evaluate (V2310 V2311) (cond ((and (cons? V2310) (and (cons? (tl V2310)) (and (= : (hd (tl V2310))) (and (cons? (tl (tl V2310))) (and (= () (tl (tl (tl V2310)))) (= true V2311)))))) (shen.typecheck-and-evaluate (hd V2310) (hd (tl (tl V2310))))) ((and (cons? V2310) (cons? (tl V2310))) (do (shen.toplevel_evaluate (cons (hd V2310) ()) V2311) (do (nl 1) (shen.toplevel_evaluate (tl V2310) V2311)))) ((and (cons? V2310) (and (= () (tl V2310)) (= true V2311))) (shen.typecheck-and-evaluate (hd V2310) (gensym A))) ((and (cons? V2310) (and (= () (tl V2310)) (= false V2311))) (let Eval (shen.eval-without-macros (hd V2310)) (print Eval))) (true (shen.f_error shen.toplevel_evaluate))))
98
+ (defun shen.toplevel_evaluate (V18497 V18498) (cond ((and (cons? V18497) (and (cons? (tl V18497)) (and (= : (hd (tl V18497))) (and (cons? (tl (tl V18497))) (and (= () (tl (tl (tl V18497)))) (= true V18498)))))) (shen.typecheck-and-evaluate (hd V18497) (hd (tl (tl V18497))))) ((and (cons? V18497) (cons? (tl V18497))) (do (shen.toplevel_evaluate (cons (hd V18497) ()) V18498) (do (nl 1) (shen.toplevel_evaluate (tl V18497) V18498)))) ((and (cons? V18497) (and (= () (tl V18497)) (= true V18498))) (shen.typecheck-and-evaluate (hd V18497) (gensym A))) ((and (cons? V18497) (and (= () (tl V18497)) (= false V18498))) (let Eval (shen.eval-without-macros (hd V18497)) (print Eval))) (true (shen.f_error shen.toplevel_evaluate))))
99
99
 
100
- (defun shen.typecheck-and-evaluate (V2312 V2313) (let Typecheck (shen.typecheck V2312 V2313) (if (= Typecheck false) (simple-error "type error
101
- ") (let Eval (shen.eval-without-macros V2312) (let Type (shen.pretty-type Typecheck) (shen.prhush (shen.app Eval (cn " : " (shen.app Type "" shen.r)) shen.s) (stoutput)))))))
100
+ (defun shen.typecheck-and-evaluate (V18501 V18502) (let Typecheck (shen.typecheck V18501 V18502) (if (= Typecheck false) (simple-error "type error
101
+ ") (let Eval (shen.eval-without-macros V18501) (let Type (shen.pretty-type Typecheck) (shen.prhush (shen.app Eval (cn " : " (shen.app Type "" shen.r)) shen.s) (stoutput)))))))
102
102
 
103
- (defun shen.pretty-type (V2314) (shen.mult_subst (value shen.*alphabet*) (shen.extract-pvars V2314) V2314))
103
+ (defun shen.pretty-type (V18504) (shen.mult_subst (value shen.*alphabet*) (shen.extract-pvars V18504) V18504))
104
104
 
105
- (defun shen.extract-pvars (V2319) (cond ((shen.pvar? V2319) (cons V2319 ())) ((cons? V2319) (union (shen.extract-pvars (hd V2319)) (shen.extract-pvars (tl V2319)))) (true ())))
105
+ (defun shen.extract-pvars (V18510) (cond ((shen.pvar? V18510) (cons V18510 ())) ((cons? V18510) (union (shen.extract-pvars (hd V18510)) (shen.extract-pvars (tl V18510)))) (true ())))
106
106
 
107
- (defun shen.mult_subst (V2324 V2325 V2326) (cond ((= () V2324) V2326) ((= () V2325) V2326) ((and (cons? V2324) (cons? V2325)) (shen.mult_subst (tl V2324) (tl V2325) (subst (hd V2324) (hd V2325) V2326))) (true (shen.f_error shen.mult_subst))))
107
+ (defun shen.mult_subst (V18518 V18519 V18520) (cond ((= () V18518) V18520) ((= () V18519) V18520) ((and (cons? V18518) (cons? V18519)) (shen.mult_subst (tl V18518) (tl V18519) (subst (hd V18518) (hd V18519) V18520))) (true (shen.f_error shen.mult_subst))))
108
108
 
109
109
 
110
110
 
@@ -23,57 +23,57 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
23
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
24
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
25
25
 
26
- (defun shen.f_error (V2327) (do (shen.prhush (cn "partial function " (shen.app V2327 ";
27
- " shen.a)) (stoutput)) (do (if (and (not (shen.tracked? V2327)) (y-or-n? (cn "track " (shen.app V2327 "? " shen.a)))) (shen.track-function (ps V2327)) shen.ok) (simple-error "aborted"))))
26
+ (defun shen.f_error (V18522) (do (shen.prhush (cn "partial function " (shen.app V18522 ";
27
+ " shen.a)) (stoutput)) (do (if (and (not (shen.tracked? V18522)) (y-or-n? (cn "track " (shen.app V18522 "? " shen.a)))) (shen.track-function (ps V18522)) shen.ok) (simple-error "aborted"))))
28
28
 
29
- (defun shen.tracked? (V2328) (element? V2328 (value shen.*tracking*)))
29
+ (defun shen.tracked? (V18524) (element? V18524 (value shen.*tracking*)))
30
30
 
31
- (defun track (V2329) (let Source (ps V2329) (shen.track-function Source)))
31
+ (defun track (V18526) (let Source (ps V18526) (shen.track-function Source)))
32
32
 
33
- (defun shen.track-function (V2330) (cond ((and (cons? V2330) (and (= defun (hd V2330)) (and (cons? (tl V2330)) (and (cons? (tl (tl V2330))) (and (cons? (tl (tl (tl V2330)))) (= () (tl (tl (tl (tl V2330)))))))))) (let KL (cons defun (cons (hd (tl V2330)) (cons (hd (tl (tl V2330))) (cons (shen.insert-tracking-code (hd (tl V2330)) (hd (tl (tl V2330))) (hd (tl (tl (tl V2330))))) ())))) (let Ob (eval-kl KL) (let Tr (set shen.*tracking* (cons Ob (value shen.*tracking*))) Ob)))) (true (shen.f_error shen.track-function))))
33
+ (defun shen.track-function (V18528) (cond ((and (cons? V18528) (and (= defun (hd V18528)) (and (cons? (tl V18528)) (and (cons? (tl (tl V18528))) (and (cons? (tl (tl (tl V18528)))) (= () (tl (tl (tl (tl V18528)))))))))) (let KL (cons defun (cons (hd (tl V18528)) (cons (hd (tl (tl V18528))) (cons (shen.insert-tracking-code (hd (tl V18528)) (hd (tl (tl V18528))) (hd (tl (tl (tl V18528))))) ())))) (let Ob (eval-kl KL) (let Tr (set shen.*tracking* (cons Ob (value shen.*tracking*))) Ob)))) (true (shen.f_error shen.track-function))))
34
34
 
35
- (defun shen.insert-tracking-code (V2331 V2332 V2333) (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 V2331 (cons (shen.cons_form V2332) ())))) (cons (cons do (cons (cons shen.terpri-or-read-char ()) (cons (cons let (cons Result (cons V2333 (cons (cons do (cons (cons shen.output-track (cons (cons value (cons shen.*call* ())) (cons V2331 (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 ()))) ()))) ()))) ())))) ()))) ()))) ()))))
35
+ (defun shen.insert-tracking-code (V18532 V18533 V18534) (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 V18532 (cons (shen.cons_form V18533) ())))) (cons (cons do (cons (cons shen.terpri-or-read-char ()) (cons (cons let (cons Result (cons V18534 (cons (cons do (cons (cons shen.output-track (cons (cons value (cons shen.*call* ())) (cons V18532 (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 ()))) ()))) ()))) ())))) ()))) ()))) ()))))
36
36
 
37
37
  (set shen.*step* false)
38
38
 
39
- (defun step (V2338) (cond ((= + V2338) (set shen.*step* true)) ((= - V2338) (set shen.*step* false)) (true (simple-error "step expects a + or a -.
39
+ (defun step (V18540) (cond ((= + V18540) (set shen.*step* true)) ((= - V18540) (set shen.*step* false)) (true (simple-error "step expects a + or a -.
40
40
  "))))
41
41
 
42
- (defun spy (V2343) (cond ((= + V2343) (set shen.*spy* true)) ((= - V2343) (set shen.*spy* false)) (true (simple-error "spy expects a + or a -.
42
+ (defun spy (V18546) (cond ((= + V18546) (set shen.*spy* true)) ((= - V18546) (set shen.*spy* false)) (true (simple-error "spy expects a + or a -.
43
43
  "))))
44
44
 
45
45
  (defun shen.terpri-or-read-char () (if (value shen.*step*) (shen.check-byte (read-byte (value *stinput*))) (nl 1)))
46
46
 
47
- (defun shen.check-byte (V2348) (cond ((= V2348 (shen.hat)) (simple-error "aborted")) (true true)))
47
+ (defun shen.check-byte (V18552) (cond ((= V18552 (shen.hat)) (simple-error "aborted")) (true true)))
48
48
 
49
- (defun shen.input-track (V2349 V2350 V2351) (do (shen.prhush (cn "
50
- " (shen.app (shen.spaces V2349) (cn "<" (shen.app V2349 (cn "> Inputs to " (shen.app V2350 (cn "
51
- " (shen.app (shen.spaces V2349) "" shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)) (shen.recursively-print V2351)))
49
+ (defun shen.input-track (V18556 V18557 V18558) (do (shen.prhush (cn "
50
+ " (shen.app (shen.spaces V18556) (cn "<" (shen.app V18556 (cn "> Inputs to " (shen.app V18557 (cn "
51
+ " (shen.app (shen.spaces V18556) "" shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)) (shen.recursively-print V18558)))
52
52
 
53
- (defun shen.recursively-print (V2352) (cond ((= () V2352) (shen.prhush " ==>" (stoutput))) ((cons? V2352) (do (print (hd V2352)) (do (shen.prhush ", " (stoutput)) (shen.recursively-print (tl V2352))))) (true (shen.f_error shen.recursively-print))))
53
+ (defun shen.recursively-print (V18560) (cond ((= () V18560) (shen.prhush " ==>" (stoutput))) ((cons? V18560) (do (print (hd V18560)) (do (shen.prhush ", " (stoutput)) (shen.recursively-print (tl V18560))))) (true (shen.f_error shen.recursively-print))))
54
54
 
55
- (defun shen.spaces (V2353) (cond ((= 0 V2353) "") (true (cn " " (shen.spaces (- V2353 1))))))
55
+ (defun shen.spaces (V18562) (cond ((= 0 V18562) "") (true (cn " " (shen.spaces (- V18562 1))))))
56
56
 
57
- (defun shen.output-track (V2354 V2355 V2356) (shen.prhush (cn "
58
- " (shen.app (shen.spaces V2354) (cn "<" (shen.app V2354 (cn "> Output from " (shen.app V2355 (cn "
59
- " (shen.app (shen.spaces V2354) (cn "==> " (shen.app V2356 "" shen.s)) shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)))
57
+ (defun shen.output-track (V18566 V18567 V18568) (shen.prhush (cn "
58
+ " (shen.app (shen.spaces V18566) (cn "<" (shen.app V18566 (cn "> Output from " (shen.app V18567 (cn "
59
+ " (shen.app (shen.spaces V18566) (cn "==> " (shen.app V18568 "" shen.s)) shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)))
60
60
 
61
- (defun untrack (V2357) (eval (ps V2357)))
61
+ (defun untrack (V18570) (eval (ps V18570)))
62
62
 
63
- (defun profile (V2358) (shen.profile-help (ps V2358)))
63
+ (defun profile (V18572) (shen.profile-help (ps V18572)))
64
64
 
65
- (defun shen.profile-help (V2363) (cond ((and (cons? V2363) (and (= defun (hd V2363)) (and (cons? (tl V2363)) (and (cons? (tl (tl V2363))) (and (cons? (tl (tl (tl V2363)))) (= () (tl (tl (tl (tl V2363)))))))))) (let G (gensym shen.f) (let Profile (cons defun (cons (hd (tl V2363)) (cons (hd (tl (tl V2363))) (cons (shen.profile-func (hd (tl V2363)) (hd (tl (tl V2363))) (cons G (hd (tl (tl V2363))))) ())))) (let Def (cons defun (cons G (cons (hd (tl (tl V2363))) (cons (subst G (hd (tl V2363)) (hd (tl (tl (tl V2363))))) ())))) (let CompileProfile (shen.eval-without-macros Profile) (let CompileG (shen.eval-without-macros Def) (hd (tl V2363)))))))) (true (simple-error "Cannot profile.
65
+ (defun shen.profile-help (V18578) (cond ((and (cons? V18578) (and (= defun (hd V18578)) (and (cons? (tl V18578)) (and (cons? (tl (tl V18578))) (and (cons? (tl (tl (tl V18578)))) (= () (tl (tl (tl (tl V18578)))))))))) (let G (gensym shen.f) (let Profile (cons defun (cons (hd (tl V18578)) (cons (hd (tl (tl V18578))) (cons (shen.profile-func (hd (tl V18578)) (hd (tl (tl V18578))) (cons G (hd (tl (tl V18578))))) ())))) (let Def (cons defun (cons G (cons (hd (tl (tl V18578))) (cons (subst G (hd (tl V18578)) (hd (tl (tl (tl V18578))))) ())))) (let CompileProfile (shen.eval-without-macros Profile) (let CompileG (shen.eval-without-macros Def) (hd (tl V18578)))))))) (true (simple-error "Cannot profile.
66
66
  "))))
67
67
 
68
- (defun unprofile (V2364) (untrack V2364))
68
+ (defun unprofile (V18580) (untrack V18580))
69
69
 
70
- (defun shen.profile-func (V2365 V2366 V2367) (cons let (cons Start (cons (cons get-time (cons run ())) (cons (cons let (cons Result (cons V2367 (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 V2365 (cons (cons + (cons (cons shen.get-profile (cons V2365 ())) (cons Finish ()))) ()))) (cons Result ())))) ())))) ())))) ())))))
70
+ (defun shen.profile-func (V18584 V18585 V18586) (cons let (cons Start (cons (cons get-time (cons run ())) (cons (cons let (cons Result (cons V18586 (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 V18584 (cons (cons + (cons (cons shen.get-profile (cons V18584 ())) (cons Finish ()))) ()))) (cons Result ())))) ())))) ())))) ())))))
71
71
 
72
- (defun profile-results (V2368) (let Results (shen.get-profile V2368) (let Initialise (shen.put-profile V2368 0) (@p V2368 Results))))
72
+ (defun profile-results (V18588) (let Results (shen.get-profile V18588) (let Initialise (shen.put-profile V18588 0) (@p V18588 Results))))
73
73
 
74
- (defun shen.get-profile (V2369) (trap-error (get V2369 profile (value *property-vector*)) (lambda E 0)))
74
+ (defun shen.get-profile (V18590) (trap-error (get V18590 profile (value *property-vector*)) (lambda E 0)))
75
75
 
76
- (defun shen.put-profile (V2370 V2371) (put V2370 profile V2371 (value *property-vector*)))
76
+ (defun shen.put-profile (V18593 V18594) (put V18593 profile V18594 (value *property-vector*)))
77
77
 
78
78
 
79
79
 
@@ -23,14 +23,14 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
23
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
24
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
25
25
 
26
- (defun declare (V2373 V2374) (let Record (set shen.*signedfuncs* (cons (cons V2373 V2374) (value shen.*signedfuncs*))) (let Variancy (trap-error (shen.variancy-test V2373 V2374) (lambda E shen.skip)) (let Type (shen.rcons_form (shen.demodulate V2374)) (let F* (concat shen.type-signature-of- V2373) (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) V2373)))))))))))
26
+ (defun declare (V18597 V18598) (let Record (set shen.*signedfuncs* (cons (cons V18597 V18598) (value shen.*signedfuncs*))) (let Variancy (trap-error (shen.variancy-test V18597 V18598) (lambda E shen.skip)) (let Type (shen.rcons_form (shen.demodulate V18598)) (let F* (concat shen.type-signature-of- V18597) (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) V18597)))))))))))
27
27
 
28
- (defun shen.demodulate (V2375) (trap-error (let Demod (shen.walk (lambda V2372 (shen.demod V2372)) V2375) (if (= Demod V2375) V2375 (shen.demodulate Demod))) (lambda E V2375)))
28
+ (defun shen.demodulate (V18600) (trap-error (let Demod (shen.walk (lambda Y (shen.demod Y)) V18600) (if (= Demod V18600) V18600 (shen.demodulate Demod))) (lambda E V18600)))
29
29
 
30
- (defun shen.variancy-test (V2376 V2377) (let TypeF (shen.typecheck V2376 B) (let Check (if (= symbol TypeF) shen.skip (if (shen.variant? TypeF V2377) shen.skip (shen.prhush (cn "warning: changing the type of " (shen.app V2376 " may create errors
30
+ (defun shen.variancy-test (V18603 V18604) (let TypeF (shen.typecheck V18603 B) (let Check (if (= symbol TypeF) shen.skip (if (shen.variant? TypeF V18604) shen.skip (shen.prhush (cn "warning: changing the type of " (shen.app V18603 " may create errors
31
31
  " shen.a)) (stoutput)))) shen.skip)))
32
32
 
33
- (defun shen.variant? (V2388 V2389) (cond ((= V2389 V2388) true) ((and (cons? V2388) (and (cons? V2389) (= (hd V2389) (hd V2388)))) (shen.variant? (tl V2388) (tl V2389))) ((and (cons? V2388) (and (cons? V2389) (and (shen.pvar? (hd V2388)) (variable? (hd V2389))))) (shen.variant? (subst shen.a (hd V2388) (tl V2388)) (subst shen.a (hd V2389) (tl V2389)))) ((and (cons? V2388) (and (cons? (hd V2388)) (and (cons? V2389) (cons? (hd V2389))))) (shen.variant? (append (hd V2388) (tl V2388)) (append (hd V2389) (tl V2389)))) (true false)))
33
+ (defun shen.variant? (V18617 V18618) (cond ((= V18618 V18617) true) ((and (cons? V18617) (and (cons? V18618) (= (hd V18618) (hd V18617)))) (shen.variant? (tl V18617) (tl V18618))) ((and (cons? V18617) (and (cons? V18618) (and (shen.pvar? (hd V18617)) (variable? (hd V18618))))) (shen.variant? (subst shen.a (hd V18617) (tl V18617)) (subst shen.a (hd V18618) (tl V18618)))) ((and (cons? V18617) (and (cons? (hd V18617)) (and (cons? V18618) (cons? (hd V18618))))) (shen.variant? (append (hd V18617) (tl V18617)) (append (hd V18618) (tl V18618)))) (true false)))
34
34
 
35
35
  (declare absvector? (cons A (cons --> (cons boolean ()))))
36
36
 
@@ -92,6 +92,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
92
92
 
93
93
  (declare fst (cons (cons A (cons * (cons B ()))) (cons --> (cons A ()))))
94
94
 
95
+ (declare function (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons A (cons --> (cons B ()))) ()))))
96
+
95
97
  (declare gensym (cons symbol (cons --> (cons symbol ()))))
96
98
 
97
99
  (declare <-vector (cons (cons vector (cons A ())) (cons --> (cons (cons number (cons --> (cons A ()))) ()))))
@@ -23,59 +23,59 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
23
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
24
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
25
25
 
26
- (defun pr (V2390 V2391) (trap-error (shen.prh V2390 V2391 0) (lambda E V2390)))
26
+ (defun pr (V18621 V18622) (trap-error (shen.prh V18621 V18622 0) (lambda E V18621)))
27
27
 
28
- (defun shen.prh (V2392 V2393 V2394) (shen.prh V2392 V2393 (shen.write-char-and-inc V2392 V2393 V2394)))
28
+ (defun shen.prh (V18626 V18627 V18628) (shen.prh V18626 V18627 (shen.write-char-and-inc V18626 V18627 V18628)))
29
29
 
30
- (defun shen.write-char-and-inc (V2395 V2396 V2397) (do (write-byte (string->n (pos V2395 V2397)) V2396) (+ V2397 1)))
30
+ (defun shen.write-char-and-inc (V18632 V18633 V18634) (do (write-byte (string->n (pos V18632 V18634)) V18633) (+ V18634 1)))
31
31
 
32
- (defun print (V2398) (let String (shen.insert V2398 "~S") (let Print (shen.prhush String (stoutput)) V2398)))
32
+ (defun print (V18636) (let String (shen.insert V18636 "~S") (let Print (shen.prhush String (stoutput)) V18636)))
33
33
 
34
- (defun shen.prhush (V2399 V2400) (if (value *hush*) V2399 (pr V2399 V2400)))
34
+ (defun shen.prhush (V18639 V18640) (if (value *hush*) V18639 (pr V18639 V18640)))
35
35
 
36
- (defun shen.mkstr (V2401 V2402) (cond ((string? V2401) (shen.mkstr-l (shen.proc-nl V2401) V2402)) (true (shen.mkstr-r (cons shen.proc-nl (cons V2401 ())) V2402))))
36
+ (defun shen.mkstr (V18643 V18644) (cond ((string? V18643) (shen.mkstr-l (shen.proc-nl V18643) V18644)) (true (shen.mkstr-r (cons shen.proc-nl (cons V18643 ())) V18644))))
37
37
 
38
- (defun shen.mkstr-l (V2403 V2404) (cond ((= () V2404) V2403) ((cons? V2404) (shen.mkstr-l (shen.insert-l (hd V2404) V2403) (tl V2404))) (true (shen.f_error shen.mkstr-l))))
38
+ (defun shen.mkstr-l (V18647 V18648) (cond ((= () V18648) V18647) ((cons? V18648) (shen.mkstr-l (shen.insert-l (hd V18648) V18647) (tl V18648))) (true (shen.f_error shen.mkstr-l))))
39
39
 
40
- (defun shen.insert-l (V2407 V2408) (cond ((= "" V2408) "") ((and (shen.+string? V2408) (and (= "~" (pos V2408 0)) (and (shen.+string? (tlstr V2408)) (= "A" (pos (tlstr V2408) 0))))) (cons shen.app (cons V2407 (cons (tlstr (tlstr V2408)) (cons shen.a ()))))) ((and (shen.+string? V2408) (and (= "~" (pos V2408 0)) (and (shen.+string? (tlstr V2408)) (= "R" (pos (tlstr V2408) 0))))) (cons shen.app (cons V2407 (cons (tlstr (tlstr V2408)) (cons shen.r ()))))) ((and (shen.+string? V2408) (and (= "~" (pos V2408 0)) (and (shen.+string? (tlstr V2408)) (= "S" (pos (tlstr V2408) 0))))) (cons shen.app (cons V2407 (cons (tlstr (tlstr V2408)) (cons shen.s ()))))) ((shen.+string? V2408) (shen.factor-cn (cons cn (cons (pos V2408 0) (cons (shen.insert-l V2407 (tlstr V2408)) ()))))) ((and (cons? V2408) (and (= cn (hd V2408)) (and (cons? (tl V2408)) (and (cons? (tl (tl V2408))) (= () (tl (tl (tl V2408)))))))) (cons cn (cons (hd (tl V2408)) (cons (shen.insert-l V2407 (hd (tl (tl V2408)))) ())))) ((and (cons? V2408) (and (= shen.app (hd V2408)) (and (cons? (tl V2408)) (and (cons? (tl (tl V2408))) (and (cons? (tl (tl (tl V2408)))) (= () (tl (tl (tl (tl V2408)))))))))) (cons shen.app (cons (hd (tl V2408)) (cons (shen.insert-l V2407 (hd (tl (tl V2408)))) (tl (tl (tl V2408))))))) (true (shen.f_error shen.insert-l))))
40
+ (defun shen.insert-l (V18653 V18654) (cond ((= "" V18654) "") ((and (shen.+string? V18654) (and (= "~" (pos V18654 0)) (and (shen.+string? (tlstr V18654)) (= "A" (pos (tlstr V18654) 0))))) (cons shen.app (cons V18653 (cons (tlstr (tlstr V18654)) (cons shen.a ()))))) ((and (shen.+string? V18654) (and (= "~" (pos V18654 0)) (and (shen.+string? (tlstr V18654)) (= "R" (pos (tlstr V18654) 0))))) (cons shen.app (cons V18653 (cons (tlstr (tlstr V18654)) (cons shen.r ()))))) ((and (shen.+string? V18654) (and (= "~" (pos V18654 0)) (and (shen.+string? (tlstr V18654)) (= "S" (pos (tlstr V18654) 0))))) (cons shen.app (cons V18653 (cons (tlstr (tlstr V18654)) (cons shen.s ()))))) ((shen.+string? V18654) (shen.factor-cn (cons cn (cons (pos V18654 0) (cons (shen.insert-l V18653 (tlstr V18654)) ()))))) ((and (cons? V18654) (and (= cn (hd V18654)) (and (cons? (tl V18654)) (and (cons? (tl (tl V18654))) (= () (tl (tl (tl V18654)))))))) (cons cn (cons (hd (tl V18654)) (cons (shen.insert-l V18653 (hd (tl (tl V18654)))) ())))) ((and (cons? V18654) (and (= shen.app (hd V18654)) (and (cons? (tl V18654)) (and (cons? (tl (tl V18654))) (and (cons? (tl (tl (tl V18654)))) (= () (tl (tl (tl (tl V18654)))))))))) (cons shen.app (cons (hd (tl V18654)) (cons (shen.insert-l V18653 (hd (tl (tl V18654)))) (tl (tl (tl V18654))))))) (true (shen.f_error shen.insert-l))))
41
41
 
42
- (defun shen.factor-cn (V2409) (cond ((and (cons? V2409) (and (= cn (hd V2409)) (and (cons? (tl V2409)) (and (cons? (tl (tl V2409))) (and (cons? (hd (tl (tl V2409)))) (and (= cn (hd (hd (tl (tl V2409))))) (and (cons? (tl (hd (tl (tl V2409))))) (and (cons? (tl (tl (hd (tl (tl V2409)))))) (and (= () (tl (tl (tl (hd (tl (tl V2409))))))) (and (= () (tl (tl (tl V2409)))) (and (string? (hd (tl V2409))) (string? (hd (tl (hd (tl (tl V2409))))))))))))))))) (cons cn (cons (cn (hd (tl V2409)) (hd (tl (hd (tl (tl V2409)))))) (tl (tl (hd (tl (tl V2409)))))))) (true V2409)))
42
+ (defun shen.factor-cn (V18656) (cond ((and (cons? V18656) (and (= cn (hd V18656)) (and (cons? (tl V18656)) (and (cons? (tl (tl V18656))) (and (cons? (hd (tl (tl V18656)))) (and (= cn (hd (hd (tl (tl V18656))))) (and (cons? (tl (hd (tl (tl V18656))))) (and (cons? (tl (tl (hd (tl (tl V18656)))))) (and (= () (tl (tl (tl (hd (tl (tl V18656))))))) (and (= () (tl (tl (tl V18656)))) (and (string? (hd (tl V18656))) (string? (hd (tl (hd (tl (tl V18656))))))))))))))))) (cons cn (cons (cn (hd (tl V18656)) (hd (tl (hd (tl (tl V18656)))))) (tl (tl (hd (tl (tl V18656)))))))) (true V18656)))
43
43
 
44
- (defun shen.proc-nl (V2410) (cond ((= "" V2410) "") ((and (shen.+string? V2410) (and (= "~" (pos V2410 0)) (and (shen.+string? (tlstr V2410)) (= "%" (pos (tlstr V2410) 0))))) (cn (n->string 10) (shen.proc-nl (tlstr (tlstr V2410))))) ((shen.+string? V2410) (cn (pos V2410 0) (shen.proc-nl (tlstr V2410)))) (true (shen.f_error shen.proc-nl))))
44
+ (defun shen.proc-nl (V18658) (cond ((= "" V18658) "") ((and (shen.+string? V18658) (and (= "~" (pos V18658 0)) (and (shen.+string? (tlstr V18658)) (= "%" (pos (tlstr V18658) 0))))) (cn (n->string 10) (shen.proc-nl (tlstr (tlstr V18658))))) ((shen.+string? V18658) (cn (pos V18658 0) (shen.proc-nl (tlstr V18658)))) (true (shen.f_error shen.proc-nl))))
45
45
 
46
- (defun shen.mkstr-r (V2411 V2412) (cond ((= () V2412) V2411) ((cons? V2412) (shen.mkstr-r (cons shen.insert (cons (hd V2412) (cons V2411 ()))) (tl V2412))) (true (shen.f_error shen.mkstr-r))))
46
+ (defun shen.mkstr-r (V18661 V18662) (cond ((= () V18662) V18661) ((cons? V18662) (shen.mkstr-r (cons shen.insert (cons (hd V18662) (cons V18661 ()))) (tl V18662))) (true (shen.f_error shen.mkstr-r))))
47
47
 
48
- (defun shen.insert (V2413 V2414) (shen.insert-h V2413 V2414 ""))
48
+ (defun shen.insert (V18665 V18666) (shen.insert-h V18665 V18666 ""))
49
49
 
50
- (defun shen.insert-h (V2417 V2418 V2419) (cond ((= "" V2418) V2419) ((and (shen.+string? V2418) (and (= "~" (pos V2418 0)) (and (shen.+string? (tlstr V2418)) (= "A" (pos (tlstr V2418) 0))))) (cn V2419 (shen.app V2417 (tlstr (tlstr V2418)) shen.a))) ((and (shen.+string? V2418) (and (= "~" (pos V2418 0)) (and (shen.+string? (tlstr V2418)) (= "R" (pos (tlstr V2418) 0))))) (cn V2419 (shen.app V2417 (tlstr (tlstr V2418)) shen.r))) ((and (shen.+string? V2418) (and (= "~" (pos V2418 0)) (and (shen.+string? (tlstr V2418)) (= "S" (pos (tlstr V2418) 0))))) (cn V2419 (shen.app V2417 (tlstr (tlstr V2418)) shen.s))) ((shen.+string? V2418) (shen.insert-h V2417 (tlstr V2418) (cn V2419 (pos V2418 0)))) (true (shen.f_error shen.insert-h))))
50
+ (defun shen.insert-h (V18672 V18673 V18674) (cond ((= "" V18673) V18674) ((and (shen.+string? V18673) (and (= "~" (pos V18673 0)) (and (shen.+string? (tlstr V18673)) (= "A" (pos (tlstr V18673) 0))))) (cn V18674 (shen.app V18672 (tlstr (tlstr V18673)) shen.a))) ((and (shen.+string? V18673) (and (= "~" (pos V18673 0)) (and (shen.+string? (tlstr V18673)) (= "R" (pos (tlstr V18673) 0))))) (cn V18674 (shen.app V18672 (tlstr (tlstr V18673)) shen.r))) ((and (shen.+string? V18673) (and (= "~" (pos V18673 0)) (and (shen.+string? (tlstr V18673)) (= "S" (pos (tlstr V18673) 0))))) (cn V18674 (shen.app V18672 (tlstr (tlstr V18673)) shen.s))) ((shen.+string? V18673) (shen.insert-h V18672 (tlstr V18673) (cn V18674 (pos V18673 0)))) (true (shen.f_error shen.insert-h))))
51
51
 
52
- (defun shen.app (V2420 V2421 V2422) (cn (shen.arg->str V2420 V2422) V2421))
52
+ (defun shen.app (V18678 V18679 V18680) (cn (shen.arg->str V18678 V18680) V18679))
53
53
 
54
- (defun shen.arg->str (V2428 V2429) (cond ((= V2428 (fail)) "...") ((shen.list? V2428) (shen.list->str V2428 V2429)) ((string? V2428) (shen.str->str V2428 V2429)) ((absvector? V2428) (shen.vector->str V2428 V2429)) (true (shen.atom->str V2428))))
54
+ (defun shen.arg->str (V18688 V18689) (cond ((= V18688 (fail)) "...") ((shen.list? V18688) (shen.list->str V18688 V18689)) ((string? V18688) (shen.str->str V18688 V18689)) ((absvector? V18688) (shen.vector->str V18688 V18689)) (true (shen.atom->str V18688))))
55
55
 
56
- (defun shen.list->str (V2430 V2431) (cond ((= shen.r V2431) (@s "(" (@s (shen.iter-list V2430 shen.r (shen.maxseq)) ")"))) (true (@s "[" (@s (shen.iter-list V2430 V2431 (shen.maxseq)) "]")))))
56
+ (defun shen.list->str (V18692 V18693) (cond ((= shen.r V18693) (@s "(" (@s (shen.iter-list V18692 shen.r (shen.maxseq)) ")"))) (true (@s "[" (@s (shen.iter-list V18692 V18693 (shen.maxseq)) "]")))))
57
57
 
58
58
  (defun shen.maxseq () (value *maximum-print-sequence-size*))
59
59
 
60
- (defun shen.iter-list (V2442 V2443 V2444) (cond ((= () V2442) "") ((= 0 V2444) "... etc") ((and (cons? V2442) (= () (tl V2442))) (shen.arg->str (hd V2442) V2443)) ((cons? V2442) (@s (shen.arg->str (hd V2442) V2443) (@s " " (shen.iter-list (tl V2442) V2443 (- V2444 1))))) (true (@s "|" (@s " " (shen.arg->str V2442 V2443))))))
60
+ (defun shen.iter-list (V18707 V18708 V18709) (cond ((= () V18707) "") ((= 0 V18709) "... etc") ((and (cons? V18707) (= () (tl V18707))) (shen.arg->str (hd V18707) V18708)) ((cons? V18707) (@s (shen.arg->str (hd V18707) V18708) (@s " " (shen.iter-list (tl V18707) V18708 (- V18709 1))))) (true (@s "|" (@s " " (shen.arg->str V18707 V18708))))))
61
61
 
62
- (defun shen.str->str (V2449 V2450) (cond ((= shen.a V2450) V2449) (true (@s (n->string 34) (@s V2449 (n->string 34))))))
62
+ (defun shen.str->str (V18716 V18717) (cond ((= shen.a V18717) V18716) (true (@s (n->string 34) (@s V18716 (n->string 34))))))
63
63
 
64
- (defun shen.vector->str (V2451 V2452) (if (shen.print-vector? V2451) ((<-address V2451 0) V2451) (if (vector? V2451) (@s "<" (@s (shen.iter-vector V2451 1 V2452 (shen.maxseq)) ">")) (@s "<" (@s "<" (@s (shen.iter-vector V2451 0 V2452 (shen.maxseq)) ">>"))))))
64
+ (defun shen.vector->str (V18720 V18721) (if (shen.print-vector? V18720) ((function (<-address V18720 0)) V18720) (if (vector? V18720) (@s "<" (@s (shen.iter-vector V18720 1 V18721 (shen.maxseq)) ">")) (@s "<" (@s "<" (@s (shen.iter-vector V18720 0 V18721 (shen.maxseq)) ">>"))))))
65
65
 
66
- (defun shen.print-vector? (V2453) (let Zero (<-address V2453 0) (if (= Zero shen.tuple) true (if (= Zero shen.pvar) true (if (not (number? Zero)) (shen.fbound? Zero) false)))))
66
+ (defun shen.print-vector? (V18723) (let Zero (<-address V18723 0) (if (= Zero shen.tuple) true (if (= Zero shen.pvar) true (if (not (number? Zero)) (shen.fbound? Zero) false)))))
67
67
 
68
- (defun shen.fbound? (V2454) (trap-error (do (ps V2454) true) (lambda E false)))
68
+ (defun shen.fbound? (V18725) (trap-error (do (ps V18725) true) (lambda E false)))
69
69
 
70
- (defun shen.tuple (V2455) (cn "(@p " (shen.app (<-address V2455 1) (cn " " (shen.app (<-address V2455 2) ")" shen.s)) shen.s)))
70
+ (defun shen.tuple (V18727) (cn "(@p " (shen.app (<-address V18727 1) (cn " " (shen.app (<-address V18727 2) ")" shen.s)) shen.s)))
71
71
 
72
- (defun shen.iter-vector (V2462 V2463 V2464 V2465) (cond ((= 0 V2465) "... etc") (true (let Item (trap-error (<-address V2462 V2463) (lambda E shen.out-of-bounds)) (let Next (trap-error (<-address V2462 (+ V2463 1)) (lambda E shen.out-of-bounds)) (if (= Item shen.out-of-bounds) "" (if (= Next shen.out-of-bounds) (shen.arg->str Item V2464) (@s (shen.arg->str Item V2464) (@s " " (shen.iter-vector V2462 (+ V2463 1) V2464 (- V2465 1)))))))))))
72
+ (defun shen.iter-vector (V18738 V18739 V18740 V18741) (cond ((= 0 V18741) "... etc") (true (let Item (trap-error (<-address V18738 V18739) (lambda E shen.out-of-bounds)) (let Next (trap-error (<-address V18738 (+ V18739 1)) (lambda E shen.out-of-bounds)) (if (= Item shen.out-of-bounds) "" (if (= Next shen.out-of-bounds) (shen.arg->str Item V18740) (@s (shen.arg->str Item V18740) (@s " " (shen.iter-vector V18738 (+ V18739 1) V18740 (- V18741 1)))))))))))
73
73
 
74
- (defun shen.atom->str (V2466) (trap-error (str V2466) (lambda E (shen.funexstring))))
74
+ (defun shen.atom->str (V18743) (trap-error (str V18743) (lambda E (shen.funexstring))))
75
75
 
76
76
  (defun shen.funexstring () (@s "" (@s "f" (@s "u" (@s "n" (@s "e" (@s (shen.arg->str (gensym (intern "x")) shen.a) "")))))))
77
77
 
78
- (defun shen.list? (V2467) (or (empty? V2467) (cons? V2467)))
78
+ (defun shen.list? (V18745) (or (empty? V18745) (cons? V18745)))
79
79
 
80
80
 
81
81
 
@@ -23,65 +23,65 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
23
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
24
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
25
25
 
26
- (defun shen.yacc (V2470) (cond ((and (cons? V2470) (and (= defcc (hd V2470)) (cons? (tl V2470)))) (shen.yacc->shen (hd (tl V2470)) (tl (tl V2470)))) (true (shen.f_error shen.yacc))))
26
+ (defun shen.yacc (V18747) (cond ((and (cons? V18747) (and (= defcc (hd V18747)) (cons? (tl V18747)))) (shen.yacc->shen (hd (tl V18747)) (tl (tl V18747)))) (true (shen.f_error shen.yacc))))
27
27
 
28
- (defun shen.yacc->shen (V2471 V2472) (let CCRules (shen.split_cc_rules true V2472 ()) (let CCBody (map (lambda V2468 (shen.cc_body V2468)) CCRules) (let YaccCases (shen.yacc_cases CCBody) (cons define (cons V2471 (cons Stream (cons -> (cons (shen.kill-code YaccCases) ())))))))))
28
+ (defun shen.yacc->shen (V18750 V18751) (let CCRules (shen.split_cc_rules true V18751 ()) (let CCBody (map (lambda X (shen.cc_body X)) CCRules) (let YaccCases (shen.yacc_cases CCBody) (cons define (cons V18750 (cons Stream (cons -> (cons (shen.kill-code YaccCases) ())))))))))
29
29
 
30
- (defun shen.kill-code (V2473) (cond ((> (occurrences kill V2473) 0) (cons trap-error (cons V2473 (cons (cons lambda (cons E (cons (cons shen.analyse-kill (cons E ())) ()))) ())))) (true V2473)))
30
+ (defun shen.kill-code (V18753) (cond ((> (occurrences kill V18753) 0) (cons trap-error (cons V18753 (cons (cons lambda (cons E (cons (cons shen.analyse-kill (cons E ())) ()))) ())))) (true V18753)))
31
31
 
32
32
  (defun kill () (simple-error "yacc kill"))
33
33
 
34
- (defun shen.analyse-kill (V2474) (let String (error-to-string V2474) (if (= String "yacc kill") (fail) V2474)))
34
+ (defun shen.analyse-kill (V18755) (let String (error-to-string V18755) (if (= String "yacc kill") (fail) V18755)))
35
35
 
36
- (defun shen.split_cc_rules (V2477 V2478 V2479) (cond ((and (= () V2478) (= () V2479)) ()) ((= () V2478) (cons (shen.split_cc_rule V2477 (reverse V2479) ()) ())) ((and (cons? V2478) (= ; (hd V2478))) (cons (shen.split_cc_rule V2477 (reverse V2479) ()) (shen.split_cc_rules V2477 (tl V2478) ()))) ((cons? V2478) (shen.split_cc_rules V2477 (tl V2478) (cons (hd V2478) V2479))) (true (shen.f_error shen.split_cc_rules))))
36
+ (defun shen.split_cc_rules (V18761 V18762 V18763) (cond ((and (= () V18762) (= () V18763)) ()) ((= () V18762) (cons (shen.split_cc_rule V18761 (reverse V18763) ()) ())) ((and (cons? V18762) (= ; (hd V18762))) (cons (shen.split_cc_rule V18761 (reverse V18763) ()) (shen.split_cc_rules V18761 (tl V18762) ()))) ((cons? V18762) (shen.split_cc_rules V18761 (tl V18762) (cons (hd V18762) V18763))) (true (shen.f_error shen.split_cc_rules))))
37
37
 
38
- (defun shen.split_cc_rule (V2484 V2485 V2486) (cond ((and (cons? V2485) (and (= := (hd V2485)) (and (cons? (tl V2485)) (= () (tl (tl V2485)))))) (cons (reverse V2486) (tl V2485))) ((and (cons? V2485) (and (= := (hd V2485)) (and (cons? (tl V2485)) (and (cons? (tl (tl V2485))) (and (= where (hd (tl (tl V2485)))) (and (cons? (tl (tl (tl V2485)))) (= () (tl (tl (tl (tl V2485))))))))))) (cons (reverse V2486) (cons (cons where (cons (hd (tl (tl (tl V2485)))) (cons (hd (tl V2485)) ()))) ()))) ((= () V2485) (do (shen.semantic-completion-warning V2484 V2486) (shen.split_cc_rule V2484 (cons := (cons (shen.default_semantics (reverse V2486)) ())) V2486))) ((cons? V2485) (shen.split_cc_rule V2484 (tl V2485) (cons (hd V2485) V2486))) (true (shen.f_error shen.split_cc_rule))))
38
+ (defun shen.split_cc_rule (V18771 V18772 V18773) (cond ((and (cons? V18772) (and (= := (hd V18772)) (and (cons? (tl V18772)) (= () (tl (tl V18772)))))) (cons (reverse V18773) (tl V18772))) ((and (cons? V18772) (and (= := (hd V18772)) (and (cons? (tl V18772)) (and (cons? (tl (tl V18772))) (and (= where (hd (tl (tl V18772)))) (and (cons? (tl (tl (tl V18772)))) (= () (tl (tl (tl (tl V18772))))))))))) (cons (reverse V18773) (cons (cons where (cons (hd (tl (tl (tl V18772)))) (cons (hd (tl V18772)) ()))) ()))) ((= () V18772) (do (shen.semantic-completion-warning V18771 V18773) (shen.split_cc_rule V18771 (cons := (cons (shen.default_semantics (reverse V18773)) ())) V18773))) ((cons? V18772) (shen.split_cc_rule V18771 (tl V18772) (cons (hd V18772) V18773))) (true (shen.f_error shen.split_cc_rule))))
39
39
 
40
- (defun shen.semantic-completion-warning (V2495 V2496) (cond ((= true V2495) (do (shen.prhush "warning: " (stoutput)) (do (map (lambda X (shen.prhush (shen.app X " " shen.a) (stoutput))) (reverse V2496)) (shen.prhush "has no semantics.
40
+ (defun shen.semantic-completion-warning (V18784 V18785) (cond ((= true V18784) (do (shen.prhush "warning: " (stoutput)) (do (map (lambda X (shen.prhush (shen.app X " " shen.a) (stoutput))) (reverse V18785)) (shen.prhush "has no semantics.
41
41
  " (stoutput))))) (true shen.skip)))
42
42
 
43
- (defun shen.default_semantics (V2497) (cond ((= () V2497) ()) ((and (cons? V2497) (and (= () (tl V2497)) (shen.grammar_symbol? (hd V2497)))) (hd V2497)) ((and (cons? V2497) (shen.grammar_symbol? (hd V2497))) (cons append (cons (hd V2497) (cons (shen.default_semantics (tl V2497)) ())))) ((cons? V2497) (cons cons (cons (hd V2497) (cons (shen.default_semantics (tl V2497)) ())))) (true (shen.f_error shen.default_semantics))))
43
+ (defun shen.default_semantics (V18787) (cond ((= () V18787) ()) ((and (cons? V18787) (and (= () (tl V18787)) (shen.grammar_symbol? (hd V18787)))) (hd V18787)) ((and (cons? V18787) (shen.grammar_symbol? (hd V18787))) (cons append (cons (hd V18787) (cons (shen.default_semantics (tl V18787)) ())))) ((cons? V18787) (cons cons (cons (hd V18787) (cons (shen.default_semantics (tl V18787)) ())))) (true (shen.f_error shen.default_semantics))))
44
44
 
45
- (defun shen.grammar_symbol? (V2498) (and (symbol? V2498) (let Cs (shen.strip-pathname (explode V2498)) (and (= (hd Cs) "<") (= (hd (reverse Cs)) ">")))))
45
+ (defun shen.grammar_symbol? (V18789) (and (symbol? V18789) (let Cs (shen.strip-pathname (explode V18789)) (and (= (hd Cs) "<") (= (hd (reverse Cs)) ">")))))
46
46
 
47
- (defun shen.yacc_cases (V2499) (cond ((and (cons? V2499) (= () (tl V2499))) (hd V2499)) ((cons? V2499) (let P YaccParse (cons let (cons P (cons (hd V2499) (cons (cons if (cons (cons = (cons P (cons (cons fail ()) ()))) (cons (shen.yacc_cases (tl V2499)) (cons P ())))) ())))))) (true (shen.f_error shen.yacc_cases))))
47
+ (defun shen.yacc_cases (V18791) (cond ((and (cons? V18791) (= () (tl V18791))) (hd V18791)) ((cons? V18791) (let P YaccParse (cons let (cons P (cons (hd V18791) (cons (cons if (cons (cons = (cons P (cons (cons fail ()) ()))) (cons (shen.yacc_cases (tl V18791)) (cons P ())))) ())))))) (true (shen.f_error shen.yacc_cases))))
48
48
 
49
- (defun shen.cc_body (V2500) (cond ((and (cons? V2500) (and (cons? (tl V2500)) (= () (tl (tl V2500))))) (shen.syntax (hd V2500) Stream (hd (tl V2500)))) (true (shen.f_error shen.cc_body))))
49
+ (defun shen.cc_body (V18793) (cond ((and (cons? V18793) (and (cons? (tl V18793)) (= () (tl (tl V18793))))) (shen.syntax (hd V18793) Stream (hd (tl V18793)))) (true (shen.f_error shen.cc_body))))
50
50
 
51
- (defun shen.syntax (V2501 V2502 V2503) (cond ((and (= () V2501) (and (cons? V2503) (and (= where (hd V2503)) (and (cons? (tl V2503)) (and (cons? (tl (tl V2503))) (= () (tl (tl (tl V2503))))))))) (cons if (cons (shen.semantics (hd (tl V2503))) (cons (cons shen.pair (cons (cons hd (cons V2502 ())) (cons (shen.semantics (hd (tl (tl V2503)))) ()))) (cons (cons fail ()) ()))))) ((= () V2501) (cons shen.pair (cons (cons hd (cons V2502 ())) (cons (shen.semantics V2503) ())))) ((cons? V2501) (if (shen.grammar_symbol? (hd V2501)) (shen.recursive_descent V2501 V2502 V2503) (if (variable? (hd V2501)) (shen.variable-match V2501 V2502 V2503) (if (shen.jump_stream? (hd V2501)) (shen.jump_stream V2501 V2502 V2503) (if (shen.terminal? (hd V2501)) (shen.check_stream V2501 V2502 V2503) (if (cons? (hd V2501)) (shen.list-stream (shen.decons (hd V2501)) (tl V2501) V2502 V2503) (simple-error (shen.app (hd V2501) " is not legal syntax
51
+ (defun shen.syntax (V18797 V18798 V18799) (cond ((and (= () V18797) (and (cons? V18799) (and (= where (hd V18799)) (and (cons? (tl V18799)) (and (cons? (tl (tl V18799))) (= () (tl (tl (tl V18799))))))))) (cons if (cons (shen.semantics (hd (tl V18799))) (cons (cons shen.pair (cons (cons hd (cons V18798 ())) (cons (shen.semantics (hd (tl (tl V18799)))) ()))) (cons (cons fail ()) ()))))) ((= () V18797) (cons shen.pair (cons (cons hd (cons V18798 ())) (cons (shen.semantics V18799) ())))) ((cons? V18797) (if (shen.grammar_symbol? (hd V18797)) (shen.recursive_descent V18797 V18798 V18799) (if (variable? (hd V18797)) (shen.variable-match V18797 V18798 V18799) (if (shen.jump_stream? (hd V18797)) (shen.jump_stream V18797 V18798 V18799) (if (shen.terminal? (hd V18797)) (shen.check_stream V18797 V18798 V18799) (if (cons? (hd V18797)) (shen.list-stream (shen.decons (hd V18797)) (tl V18797) V18798 V18799) (simple-error (shen.app (hd V18797) " is not legal syntax
52
52
  " shen.a)))))))) (true (shen.f_error shen.syntax))))
53
53
 
54
- (defun shen.list-stream (V2504 V2505 V2506 V2507) (let Test (cons and (cons (cons cons? (cons (cons hd (cons V2506 ())) ())) (cons (cons cons? (cons (cons hd (cons (cons hd (cons V2506 ())) ())) ())) ()))) (let Placeholder (gensym shen.place) (let RunOn (shen.syntax V2505 (cons shen.pair (cons (cons tl (cons (cons hd (cons V2506 ())) ())) (cons (cons hd (cons (cons tl (cons V2506 ())) ())) ()))) V2507) (let Action (shen.insert-runon RunOn Placeholder (shen.syntax V2504 (cons shen.pair (cons (cons hd (cons (cons hd (cons V2506 ())) ())) (cons (cons hd (cons (cons tl (cons V2506 ())) ())) ()))) Placeholder)) (cons if (cons Test (cons Action (cons (cons fail ()) ())))))))))
54
+ (defun shen.list-stream (V18804 V18805 V18806 V18807) (let Test (cons and (cons (cons cons? (cons (cons hd (cons V18806 ())) ())) (cons (cons cons? (cons (cons hd (cons (cons hd (cons V18806 ())) ())) ())) ()))) (let Placeholder (gensym shen.place) (let RunOn (shen.syntax V18805 (cons shen.pair (cons (cons tl (cons (cons hd (cons V18806 ())) ())) (cons (cons hd (cons (cons tl (cons V18806 ())) ())) ()))) V18807) (let Action (shen.insert-runon RunOn Placeholder (shen.syntax V18804 (cons shen.pair (cons (cons hd (cons (cons hd (cons V18806 ())) ())) (cons (cons hd (cons (cons tl (cons V18806 ())) ())) ()))) Placeholder)) (cons if (cons Test (cons Action (cons (cons fail ()) ())))))))))
55
55
 
56
- (defun shen.decons (V2508) (cond ((and (cons? V2508) (and (= cons (hd V2508)) (and (cons? (tl V2508)) (and (cons? (tl (tl V2508))) (and (= () (hd (tl (tl V2508)))) (= () (tl (tl (tl V2508))))))))) (cons (hd (tl V2508)) ())) ((and (cons? V2508) (and (= cons (hd V2508)) (and (cons? (tl V2508)) (and (cons? (tl (tl V2508))) (= () (tl (tl (tl V2508)))))))) (cons (hd (tl V2508)) (shen.decons (hd (tl (tl V2508)))))) (true V2508)))
56
+ (defun shen.decons (V18809) (cond ((and (cons? V18809) (and (= cons (hd V18809)) (and (cons? (tl V18809)) (and (cons? (tl (tl V18809))) (and (= () (hd (tl (tl V18809)))) (= () (tl (tl (tl V18809))))))))) (cons (hd (tl V18809)) ())) ((and (cons? V18809) (and (= cons (hd V18809)) (and (cons? (tl V18809)) (and (cons? (tl (tl V18809))) (= () (tl (tl (tl V18809)))))))) (cons (hd (tl V18809)) (shen.decons (hd (tl (tl V18809)))))) (true V18809)))
57
57
 
58
- (defun shen.insert-runon (V2520 V2521 V2522) (cond ((and (cons? V2522) (and (= shen.pair (hd V2522)) (and (cons? (tl V2522)) (and (cons? (tl (tl V2522))) (and (= () (tl (tl (tl V2522)))) (= (hd (tl (tl V2522))) V2521)))))) V2520) ((cons? V2522) (map (lambda Z (shen.insert-runon V2520 V2521 Z)) V2522)) (true V2522)))
58
+ (defun shen.insert-runon (V18824 V18825 V18826) (cond ((and (cons? V18826) (and (= shen.pair (hd V18826)) (and (cons? (tl V18826)) (and (cons? (tl (tl V18826))) (and (= () (tl (tl (tl V18826)))) (= (hd (tl (tl V18826))) V18825)))))) V18824) ((cons? V18826) (map (lambda Z (shen.insert-runon V18824 V18825 Z)) V18826)) (true V18826)))
59
59
 
60
- (defun shen.strip-pathname (V2527) (cond ((not (element? "." V2527)) V2527) ((cons? V2527) (shen.strip-pathname (tl V2527))) (true (shen.f_error shen.strip-pathname))))
60
+ (defun shen.strip-pathname (V18832) (cond ((not (element? "." V18832)) V18832) ((cons? V18832) (shen.strip-pathname (tl V18832))) (true (shen.f_error shen.strip-pathname))))
61
61
 
62
- (defun shen.recursive_descent (V2528 V2529 V2530) (cond ((cons? V2528) (let Test (cons (hd V2528) (cons V2529 ())) (let Action (shen.syntax (tl V2528) (concat Parse_ (hd V2528)) V2530) (let Else (cons fail ()) (cons let (cons (concat Parse_ (hd V2528)) (cons Test (cons (cons if (cons (cons not (cons (cons = (cons (cons fail ()) (cons (concat Parse_ (hd V2528)) ()))) ())) (cons Action (cons Else ())))) ())))))))) (true (shen.f_error shen.recursive_descent))))
62
+ (defun shen.recursive_descent (V18836 V18837 V18838) (cond ((cons? V18836) (let Test (cons (hd V18836) (cons V18837 ())) (let Action (shen.syntax (tl V18836) (concat Parse_ (hd V18836)) V18838) (let Else (cons fail ()) (cons let (cons (concat Parse_ (hd V18836)) (cons Test (cons (cons if (cons (cons not (cons (cons = (cons (cons fail ()) (cons (concat Parse_ (hd V18836)) ()))) ())) (cons Action (cons Else ())))) ())))))))) (true (shen.f_error shen.recursive_descent))))
63
63
 
64
- (defun shen.variable-match (V2531 V2532 V2533) (cond ((cons? V2531) (let Test (cons cons? (cons (cons hd (cons V2532 ())) ())) (let Action (cons let (cons (concat Parse_ (hd V2531)) (cons (cons hd (cons (cons hd (cons V2532 ())) ())) (cons (shen.syntax (tl V2531) (cons shen.pair (cons (cons tl (cons (cons hd (cons V2532 ())) ())) (cons (cons shen.hdtl (cons V2532 ())) ()))) V2533) ())))) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.f_error shen.variable-match))))
64
+ (defun shen.variable-match (V18842 V18843 V18844) (cond ((cons? V18842) (let Test (cons cons? (cons (cons hd (cons V18843 ())) ())) (let Action (cons let (cons (concat Parse_ (hd V18842)) (cons (cons hd (cons (cons hd (cons V18843 ())) ())) (cons (shen.syntax (tl V18842) (cons shen.pair (cons (cons tl (cons (cons hd (cons V18843 ())) ())) (cons (cons shen.hdtl (cons V18843 ())) ()))) V18844) ())))) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.f_error shen.variable-match))))
65
65
 
66
- (defun shen.terminal? (V2542) (cond ((cons? V2542) false) ((variable? V2542) false) (true true)))
66
+ (defun shen.terminal? (V18854) (cond ((cons? V18854) false) ((variable? V18854) false) (true true)))
67
67
 
68
- (defun shen.jump_stream? (V2547) (cond ((= V2547 _) true) (true false)))
68
+ (defun shen.jump_stream? (V18860) (cond ((= V18860 _) true) (true false)))
69
69
 
70
- (defun shen.check_stream (V2548 V2549 V2550) (cond ((cons? V2548) (let Test (cons and (cons (cons cons? (cons (cons hd (cons V2549 ())) ())) (cons (cons = (cons (hd V2548) (cons (cons hd (cons (cons hd (cons V2549 ())) ())) ()))) ()))) (let Action (shen.syntax (tl V2548) (cons shen.pair (cons (cons tl (cons (cons hd (cons V2549 ())) ())) (cons (cons shen.hdtl (cons V2549 ())) ()))) V2550) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.f_error shen.check_stream))))
70
+ (defun shen.check_stream (V18864 V18865 V18866) (cond ((cons? V18864) (let Test (cons and (cons (cons cons? (cons (cons hd (cons V18865 ())) ())) (cons (cons = (cons (hd V18864) (cons (cons hd (cons (cons hd (cons V18865 ())) ())) ()))) ()))) (let Action (shen.syntax (tl V18864) (cons shen.pair (cons (cons tl (cons (cons hd (cons V18865 ())) ())) (cons (cons shen.hdtl (cons V18865 ())) ()))) V18866) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.f_error shen.check_stream))))
71
71
 
72
- (defun shen.jump_stream (V2551 V2552 V2553) (cond ((cons? V2551) (let Test (cons cons? (cons (cons hd (cons V2552 ())) ())) (let Action (shen.syntax (tl V2551) (cons shen.pair (cons (cons tl (cons (cons hd (cons V2552 ())) ())) (cons (cons shen.hdtl (cons V2552 ())) ()))) V2553) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.f_error shen.jump_stream))))
72
+ (defun shen.jump_stream (V18870 V18871 V18872) (cond ((cons? V18870) (let Test (cons cons? (cons (cons hd (cons V18871 ())) ())) (let Action (shen.syntax (tl V18870) (cons shen.pair (cons (cons tl (cons (cons hd (cons V18871 ())) ())) (cons (cons shen.hdtl (cons V18871 ())) ()))) V18872) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.f_error shen.jump_stream))))
73
73
 
74
- (defun shen.semantics (V2554) (cond ((= () V2554) ()) ((shen.grammar_symbol? V2554) (cons shen.hdtl (cons (concat Parse_ V2554) ()))) ((variable? V2554) (concat Parse_ V2554)) ((cons? V2554) (map (lambda V2469 (shen.semantics V2469)) V2554)) (true V2554)))
74
+ (defun shen.semantics (V18874) (cond ((= () V18874) ()) ((shen.grammar_symbol? V18874) (cons shen.hdtl (cons (concat Parse_ V18874) ()))) ((variable? V18874) (concat Parse_ V18874)) ((cons? V18874) (map (lambda Z (shen.semantics Z)) V18874)) (true V18874)))
75
75
 
76
- (defun shen.snd-or-fail (V2561) (cond ((and (cons? V2561) (and (cons? (tl V2561)) (= () (tl (tl V2561))))) (hd (tl V2561))) (true (fail))))
76
+ (defun shen.snd-or-fail (V18882) (cond ((and (cons? V18882) (and (cons? (tl V18882)) (= () (tl (tl V18882))))) (hd (tl V18882))) (true (fail))))
77
77
 
78
- (defun fail () shen.fail!)(defun shen.pair (V2562 V2563) (cons V2562 (cons V2563 ())))
78
+ (defun fail () shen.fail!)(defun shen.pair (V18885 V18886) (cons V18885 (cons V18886 ())))
79
79
 
80
- (defun shen.hdtl (V2564) (hd (tl V2564)))
80
+ (defun shen.hdtl (V18888) (hd (tl V18888)))
81
81
 
82
- (defun shen.<!> (V2571) (cond ((and (cons? V2571) (and (cons? (tl V2571)) (= () (tl (tl V2571))))) (cons () (cons (hd V2571) ()))) (true (fail))))
82
+ (defun shen.<!> (V18896) (cond ((and (cons? V18896) (and (cons? (tl V18896)) (= () (tl (tl V18896))))) (cons () (cons (hd V18896) ()))) (true (fail))))
83
83
 
84
- (defun <e> (V2576) (cond ((and (cons? V2576) (and (cons? (tl V2576)) (= () (tl (tl V2576))))) (cons (hd V2576) (cons () ()))) (true (shen.f_error <e>))))
84
+ (defun <e> (V18902) (cond ((and (cons? V18902) (and (cons? (tl V18902)) (= () (tl (tl V18902))))) (cons (hd V18902) (cons () ()))) (true (shen.f_error <e>))))
85
85
 
86
86
 
87
87
 
data/shen-ruby.gemspec CHANGED
@@ -12,11 +12,11 @@ Gem::Specification.new do |s|
12
12
  s.email = ["greg@sourcematters.org"]
13
13
  s.homepage = "https://github.com/gregspurrier/shen-ruby"
14
14
  s.summary = %q{ShenRuby is a Ruby port of the Shen programming language}
15
- s.description = %q{ShenRuby is a port of the Shen programming language to Ruby. It currently supports Shen version 17.2.}
15
+ s.description = %q{ShenRuby is a port of the Shen programming language to Ruby. It currently supports Shen version 8.1.}
16
16
 
17
17
  s.required_ruby_version = ">= 1.9.3"
18
18
 
19
- s.add_runtime_dependency 'klam', '0.0.7', '0.0.7'
19
+ s.add_runtime_dependency 'klam', '0.0.9', '0.0.9'
20
20
 
21
21
  s.add_development_dependency 'rake', '~> 10.4.2', '>= 10.4.2'
22
22
  s.add_development_dependency 'rspec', '~> 3.1', '>= 3.1.0'
@@ -24,6 +24,6 @@ Gem::Specification.new do |s|
24
24
  git_files = `git ls-files`.split("\n") rescue ''
25
25
  s.files = git_files
26
26
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
27
- s.executables = %w(srrepl)
27
+ s.executables = %w(shen_ruby shen-ruby srrepl)
28
28
  s.require_paths = ["lib"]
29
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shen-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Spurrier
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-25 00:00:00.000000000 Z
12
+ date: 2015-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: klam
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 0.0.7
20
+ version: 0.0.9
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 0.0.7
27
+ version: 0.0.9
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -66,10 +66,12 @@ dependencies:
66
66
  - !ruby/object:Gem::Version
67
67
  version: 3.1.0
68
68
  description: ShenRuby is a port of the Shen programming language to Ruby. It currently
69
- supports Shen version 17.2.
69
+ supports Shen version 8.1.
70
70
  email:
71
71
  - greg@sourcematters.org
72
72
  executables:
73
+ - shen_ruby
74
+ - shen-ruby
73
75
  - srrepl
74
76
  extensions: []
75
77
  extra_rdoc_files: []
@@ -82,6 +84,8 @@ files:
82
84
  - MIT_LICENSE.txt
83
85
  - README.md
84
86
  - Rakefile
87
+ - bin/shen-ruby
88
+ - bin/shen_ruby
85
89
  - bin/shen_test_suite.rb
86
90
  - bin/srrepl
87
91
  - lib/shen_ruby.rb