on master help sign in
fix temp file
commit99f59f1c43aba428c4c06f776d8bb4bdc4fbf498 authorbe5invis <belleve@typeof.net> dateWed 24 May 2017, 01:29 (9 years ago) parent44f772d
1 file changed−298
jstest/tarai.js−298
jstest/tarai.jsdeleted−298
@@ -1,298 +0,0 @@
1−#!/usr/bin/env node
2−"use strict";
3−
4−(function(){
5−
6−const jsbn = require('jsbn')
7−var fs = require('fs');
8−function $partial_5_6$u$io_95_bind(x1, x2, x3, x4, x5){
9− return (function(x6){
10− return u$io_95_bind(x1, x2, x3, x4, x5, x6);
11− });
12−}
13−
14−function $partial_3_4$u$io_95_pure(x1, x2, x3){
15− return (function(x4){
16− return u$io_95_pure(x1, x2, x3, x4);
17− });
18−}
19−
20−function $partial_0_1$u$prim_95__95_toStrInt(){
21− return (function(x1){
22− return u$prim_95__95_toStrInt(x1);
23− });
24−}
25−
26−function $partial_2_3$u$prim_95_write(x1, x2){
27− return (function(x3){
28− return u$prim_95_write(x1, x2, x3);
29− });
30−}
31−
32−function $partial_0_1$q_2$Prelude$Show$t$primNumShow$0(){
33− return (function(x1){
34− return q_2$Prelude$Show$t$primNumShow$0(x1);
35− });
36−}
37−
38−function $partial_0_1$q_2$Prelude$Interactive$t$putStr_39_$0(){
39− return (function(x1){
40− return q_2$Prelude$Interactive$t$putStr_39_$0(x1);
41− });
42−}
43−
44−function $partial_6_7$t$io_95_bind$1(x1, x2, x3, x4, x5, x6){
45− return (function(x7){
46− return t$io_95_bind$1(x1, x2, x3, x4, x5, x6, x7);
47− });
48−}
49−
50−
51−var js_idris_throw2 = function (x){
52− throw x;
53−}
54−
55−var js_idris_force = function (x){
56− if(x === undefined || x.js_idris_lazy_calc === undefined){
57− return x
58− }else{
59− if(x.js_idris_lazy_val === undefined){
60− x.js_idris_lazy_val = x.js_idris_lazy_calc()
61− }
62− return x.js_idris_lazy_val
63− }
64−}
65−
66−var js_idris_systemInfo = function(index) {
67− var os = require('os')
68− switch(index) {
69− case 0:
70− return "node";
71− case 1:
72− return os.platform();
73− }
74− return "";
75−}
76−
77−function u$io_95_bind(t$e$0, t$e$1, t$e$2, t$e$3, t$e$4, u$w){
78− return t$io_95_bind$2(t$e$0, t$e$1, t$e$2, t$e$3, t$e$4, u$w)(t$e$3(u$w));
79−}
80−
81−function u$io_95_pure(t$e$0, t$e$1, t$e$2, u$w){
82− return t$e$2;
83−}
84−
85−function u$prim_95__95_toStrInt(t$op$0){
86− return (''+(t$op$0));
87−}
88−
89−function u$prim_95_write(t$e$0, t$e$1, u$w){
90− return (process.stdout.write((t$e$1)));
91−}
92−
93−function q_1$Main$u$main(){
94− return q_2$Prelude$Interactive$u$putStr_39_(null, q_2$Prelude$Show$u$primNumShow(null, $partial_0_1$u$prim_95__95_toStrInt(), 0, q_1$Main$u$tarai(11, 5, 0)));
95−}
96−
97−function q_2$Prelude$Show$u$precCon(t$e$0){
98−
99− if((t$e$0 === 0)) {
100− return (new jsbn.BigInteger(("0")));
101− } else {
102− return (new jsbn.BigInteger(("5")));
103− }
104−}
105−
106−function q_2$Prelude$Show$u$primNumShow(t$e$0, t$e$1, t$e$2, t$e$3){
107− const t$in$0 = t$e$1(t$e$3);
108− let $cg$1 = null;
109− if(q_2$Prelude$Interfaces$where$q_2$Prelude$Show$impl_1$q_2$Prelude$Interfaces$u$Ord$Prec$meth$u$_62__61_$0(t$e$2, 5)) {
110− $cg$1 = q_2$Prelude$Show$t$primNumShow$2(t$in$0, t$e$0, t$e$1, t$e$2, t$e$3);
111− } else {
112− $cg$1 = false;
113− }
114−
115−
116− if($cg$1) {
117− return ("(" + (t$in$0 + ")"));
118− } else {
119− return t$in$0;
120− }
121−}
122−
123−function q_2$Prelude$Interactive$u$putStr_39_(t$e$0, t$e$1){
124− return $partial_5_6$u$io_95_bind(null, null, null, $partial_2_3$u$prim_95_write(null, t$e$1), $partial_0_1$q_2$Prelude$Interactive$t$putStr_39_$0());
125−}
126−
127−function q_2$Prelude$Strings$u$strM(t$e$0){
128− let $cg$1 = null;
129− if((t$e$0 == "")) {
130− $cg$1 = false;
131− } else {
132− $cg$1 = true;
133− }
134−
135−
136− if((q_2$Decidable$Equality$where$q_2$Decidable$Equality$impl_1$q_2$Decidable$Equality$u$DecEq$Bool$meth$u$decEq$0($cg$1, true) === 1)) {
137− return 0;
138− } else {
139− return ({type: 1, $1: t$e$0[0]});
140− }
141−}
142−
143−function q_1$Main$u$tarai(t$e$0, t$e$1, t$e$2){
144− let $tco$t$e$1 = t$e$1;
145− let $tco$t$e$2 = t$e$2;
146− for(;;) {
147−
148− if(q_2$Prelude$Interfaces$where$q_2$Prelude$Interfaces$impl_1$q_2$Prelude$Interfaces$u$Ord$Int$meth$u$_60__61_$0(t$e$0, t$e$1)) {
149− return t$e$1;
150− } else {
151− $tco$t$e$1 = q_1$Main$u$tarai(((t$e$1)-(1)|0), t$e$2, t$e$0);
152− $tco$t$e$2 = q_1$Main$u$tarai(((t$e$2)-(1)|0), t$e$0, t$e$1);
153− t$e$0 = q_1$Main$u$tarai(((t$e$0)-(1)|0), t$e$1, t$e$2);
154− t$e$1 = $tco$t$e$1;
155− t$e$2 = $tco$t$e$2;
156− }
157− }
158−}
159−
160−function q_2$Prelude$Interfaces$t$Prelude__Interfaces___64_Prelude__Interfaces__Ord_36_Int_58__33__60__61__58_0_95_lam$0(t$e$0, t$e$1){
161− return (t$e$0 === t$e$1);
162−}
163−
164−function q_2$Prelude$Interfaces$t$Prelude__Show___64_Prelude__Interfaces__Ord_36_Prec_58__33__62__61__58_0_95_lam$0(t$e$0, t$e$1){
165− return q_2$Prelude$Interfaces$where$q_2$Prelude$Show$impl_1$q_2$Prelude$Interfaces$u$Eq$Prec$meth$u$_61__61_$0(t$e$0, t$e$1);
166−}
167−
168−function q_2$Prelude$Show$t$primNumShow$0(t$in$1){
169− return (t$in$1 === "-");
170−}
171−
172−function q_2$Prelude$Interactive$t$putStr_39_$0(t$in$0){
173− return $partial_3_4$u$io_95_pure(null, null, 0);
174−}
175−
176−function q_2$Prelude$Show$t$primNumShow$1(t$e$0, t$e$1, t$e$2, t$e$3, t$in$0, t$in$2){
177− return $partial_0_1$q_2$Prelude$Show$t$primNumShow$0();
178−}
179−
180−function q_2$Prelude$Show$t$primNumShow$2(t$in$0, t$e$0, t$e$1, t$e$2, t$e$3){
181− const $cg$2 = q_2$Prelude$Strings$u$strM(t$in$0);
182− if(($cg$2.type === 1)) {
183− return q_2$Prelude$Show$t$primNumShow$1(t$e$0, t$e$1, t$e$2, t$e$3, t$in$0, $cg$2.$1)($cg$2.$1);
184− } else {
185− return false;
186− }
187−}
188−
189−function q_2$Decidable$Equality$where$q_2$Decidable$Equality$impl_1$q_2$Decidable$Equality$u$DecEq$Bool$meth$u$decEq$0(t$e$0, t$e$1){
190−
191− if(t$e$1) {
192−
193− if(t$e$0) {
194− return 0;
195− } else {
196− return 1;
197− }
198− } else {
199−
200− if(t$e$0) {
201− return 1;
202− } else {
203− return 0;
204− }
205− }
206−}
207−
208−function q_2$Prelude$Interfaces$where$q_2$Prelude$Show$impl_1$q_2$Prelude$Interfaces$u$Eq$Prec$meth$u$_61__61_$0(t$e$0, t$e$1){
209−
210− return q_2$Prelude$Show$u$precCon(t$e$0).equals(q_2$Prelude$Show$u$precCon(t$e$1));
211−}
212−
213−function q_2$Prelude$Interfaces$where$q_2$Prelude$Interfaces$impl_1$q_2$Prelude$Interfaces$u$Ord$Int$meth$u$_60__61_$0(t$e$0, t$e$1){
214− let $cg$1 = null;
215− if((q_2$Prelude$Interfaces$where$q_2$Prelude$Interfaces$impl_1$q_2$Prelude$Interfaces$u$Ord$Int$meth$u$compare$0(t$e$0, t$e$1) === 0)) {
216− $cg$1 = true;
217− } else {
218− $cg$1 = false;
219− }
220−
221−
222− if($cg$1) {
223− return true;
224− } else {
225− return q_2$Prelude$Interfaces$t$Prelude__Interfaces___64_Prelude__Interfaces__Ord_36_Int_58__33__60__61__58_0_95_lam$0(t$e$0, t$e$1);
226− }
227−}
228−
229−function q_2$Prelude$Interfaces$where$q_2$Prelude$Interfaces$impl_1$q_2$Prelude$Interfaces$u$Ord$Int$meth$u$compare$0(t$e$0, t$e$1){
230−
231− if((t$e$0 === t$e$1)) {
232− return 1;
233− } else {
234−
235− if((t$e$0 < t$e$1)) {
236− return 0;
237− } else {
238− return 2;
239− }
240− }
241−}
242−
243−function q_2$Prelude$Interfaces$where$q_2$Prelude$Interfaces$impl_1$q_2$Prelude$Interfaces$u$Ord$Integer$meth$u$compare$0(t$e$0, t$e$1){
244−
245− if(t$e$0.equals(t$e$1)) {
246− return 1;
247− } else {
248−
249− if(((t$e$0).compareTo((t$e$1)) < 0)) {
250− return 0;
251− } else {
252− return 2;
253− }
254− }
255−}
256−
257−function q_2$Prelude$Interfaces$where$q_2$Prelude$Show$impl_1$q_2$Prelude$Interfaces$u$Ord$Prec$meth$u$_62__61_$0(t$e$0, t$e$1){
258− let $cg$1 = null;
259− if((q_2$Prelude$Interfaces$where$q_2$Prelude$Show$impl_1$q_2$Prelude$Interfaces$u$Ord$Prec$meth$u$compare$0(t$e$0, t$e$1) === 2)) {
260− $cg$1 = true;
261− } else {
262− $cg$1 = false;
263− }
264−
265−
266− if($cg$1) {
267− return true;
268− } else {
269− return q_2$Prelude$Interfaces$t$Prelude__Show___64_Prelude__Interfaces__Ord_36_Prec_58__33__62__61__58_0_95_lam$0(t$e$0, t$e$1);
270− }
271−}
272−
273−function q_2$Prelude$Interfaces$where$q_2$Prelude$Show$impl_1$q_2$Prelude$Interfaces$u$Ord$Prec$meth$u$compare$0(t$e$0, t$e$1){
274−
275− return q_2$Prelude$Interfaces$where$q_2$Prelude$Interfaces$impl_1$q_2$Prelude$Interfaces$u$Ord$Integer$meth$u$compare$0(q_2$Prelude$Show$u$precCon(t$e$0), q_2$Prelude$Show$u$precCon(t$e$1));
276−}
277−
278−function t$io_95_bind$0(t$e$0, t$e$1, t$e$2, t$e$3, t$e$4, u$w, t$in$0){
279− return t$e$4(t$in$0);
280−}
281−
282−function t$runMain$0(){
283− return js_idris_force(q_1$Main$u$main()(null));
284−}
285−
286−function t$io_95_bind$1(t$e$0, t$e$1, t$e$2, t$e$3, t$e$4, u$w, t$in$0){
287− return t$io_95_bind$0(t$e$0, t$e$1, t$e$2, t$e$3, t$e$4, u$w, t$in$0)(u$w);
288−}
289−
290−function t$io_95_bind$2(t$e$0, t$e$1, t$e$2, t$e$3, t$e$4, u$w){
291− return $partial_6_7$t$io_95_bind$1(t$e$0, t$e$1, t$e$2, t$e$3, t$e$4, u$w);
292−}
293−
294−
295−t$runMain$0();
296−
297−
298−}.call(this))