]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G13.expected.txt
bug: a ref outside its def must be supported
[haskell/symantic-parser.git] / test / Golden / Splice / G13.expected.txt
1 test/Golden/Splice/G13.hs:0:0:: Splicing expression
2 P.runParser @Text Grammar.g13
3 ======>
4 \ (input :: inp)
5 -> let
6 !(# init, readMore, readNext #)
7 = let _ = "cursorOf" in
8 let
9 next t@(Data.Text.Internal.Text arr off unconsumed)
10 = let !(Data.Text.Unsafe.Iter c d) = (Data.Text.Unsafe.iter t) 0
11 in
12 (# c, ((Data.Text.Internal.Text arr) (off + d)) (unconsumed - d) #)
13 more (Data.Text.Internal.Text _ _ unconsumed) = (unconsumed > 0)
14 in (# input, more, next #) in
15 let finalRet = \ _farInp _farExp v _inp -> Right v in
16 let
17 finalRaise :: forall b. P.Catcher inp b
18 = \ _failInp !farInp !farExp
19 -> Left
20 P.ParsingErrorStandard
21 {P.parsingErrorOffset = P.offset farInp,
22 P.parsingErrorUnexpected = if readMore farInp then
23 Just (let (# c, _ #) = readNext farInp in c)
24 else
25 Nothing,
26 P.parsingErrorExpecting = Data.Set.Internal.fromList farExp} in
27 let
28 name
29 = \ !ok !inp !koByLabel
30 -> let
31 name
32 = \ !ok !inp !koByLabel
33 -> let _ = "catchException lbl=fail" in
34 let
35 readFail
36 = \ !failInp !farInp !farExp
37 -> if (\ x -> x)
38 (((\ (Data.Text.Internal.Text _ i _)
39 (Data.Text.Internal.Text _ j _)
40 -> (i == j))
41 inp)
42 failInp) then
43 let _ = "resume"
44 in
45 (((ok farInp) farExp)
46 (let _ = "resume.genCode" in \ x -> x))
47 failInp
48 else
49 let
50 (# farInp, farExp #)
51 = case
52 ((compare `Data.Function.on` P.offset)
53 farInp)
54 failInp
55 of
56 LT -> (# failInp, [] #)
57 EQ -> (# farInp, (farExp <> []) #)
58 GT -> (# farInp, farExp #)
59 in
60 (((((Data.Map.Strict.Internal.findWithDefault
61 finalRaise)
62 "fail")
63 koByLabel)
64 failInp)
65 farInp)
66 farExp
67 in
68 if readMore inp then
69 let !(# c, cs #) = readNext inp
70 in
71 if (\ c
72 -> not
73 (('<' == c)
74 ||
75 (('>' == c)
76 ||
77 (('+' == c)
78 ||
79 (('-' == c)
80 ||
81 (('[' == c)
82 ||
83 ((']' == c)
84 ||
85 ((',' == c)
86 ||
87 (('.' == c)
88 ||
89 (('$'
90 == c)
91 ||
92 False))))))))))
93 c then
94 let
95 _ = "call exceptionsByName(name_4)=[] catchStackByLabel(ctx)=["fail"]"
96 in
97 ((name
98 (let
99 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_4,fromList [])]"
100 in
101 \ farInp farExp v !inp
102 -> let _ = "resume"
103 in
104 (((ok farInp) farExp)
105 (let _ = "resume.genCode"
106 in
107 ((\ x -> \ x -> x x)
108 (((\ x -> \ x -> x x)
109 (\ x -> \ x -> \ x -> x x))
110 c))
111 v))
112 inp))
113 cs)
114 (((((Data.Map.Internal.Bin 1) "fail") readFail)
115 Data.Map.Internal.Tip)
116 Data.Map.Internal.Tip)
117 else
118 let _ = "checkToken.else" in
119 let
120 (# farInp, farExp #)
121 = case
122 ((compare `Data.Function.on` P.offset) init)
123 inp
124 of
125 LT
126 -> (# inp,
127 [P.ErrorItemToken '<',
128 P.ErrorItemToken '>',
129 P.ErrorItemToken '+',
130 P.ErrorItemToken '-',
131 P.ErrorItemToken '[',
132 P.ErrorItemToken ']',
133 P.ErrorItemToken ',',
134 P.ErrorItemToken '.',
135 P.ErrorItemToken '$'] #)
136 EQ
137 -> (# init,
138 ([]
139 <>
140 [P.ErrorItemToken '<',
141 P.ErrorItemToken '>',
142 P.ErrorItemToken '+',
143 P.ErrorItemToken '-',
144 P.ErrorItemToken '[',
145 P.ErrorItemToken ']',
146 P.ErrorItemToken ',',
147 P.ErrorItemToken '.',
148 P.ErrorItemToken '$']) #)
149 GT -> (# init, [] #)
150 in ((readFail inp) farInp) farExp
151 else
152 let _ = "checkHorizon.else" in
153 let
154 (# farInp, farExp #)
155 = case ((compare `Data.Function.on` P.offset) init) inp of
156 LT -> (# inp, [P.ErrorItemHorizon 1] #)
157 EQ -> (# init, ([] <> [P.ErrorItemHorizon 1]) #)
158 GT -> (# init, [] #)
159 in ((readFail inp) farInp) farExp in
160 let
161 _ = "call exceptionsByName(name_4)=["fail"] catchStackByLabel(ctx)=[]"
162 in
163 ((name
164 (let
165 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_4,fromList [("fail",())])]"
166 in
167 \ farInp farExp v !inp
168 -> let _ = "resume"
169 in
170 (((ok farInp) farExp)
171 (let _ = "resume.genCode"
172 in ((\ x -> \ x -> x x) (\ x -> ())) v))
173 inp))
174 inp)
175 Data.Map.Internal.Tip in
176 let
177 _ = "call exceptionsByName(name_1)=[] catchStackByLabel(ctx)=[]"
178 in
179 ((name
180 (let _ = "suspend raiseException=fromList [(name_1,fromList [])]"
181 in
182 \ farInp farExp v !inp
183 -> let
184 name
185 = \ !ok !inp !koByLabel
186 -> let
187 name
188 = \ !ok !inp !koByLabel
189 -> let _ = "catchException lbl=fail" in
190 let
191 join
192 = \ farInp farExp v !inp
193 -> let
194 _ = "call exceptionsByName(name_1)=[] catchStackByLabel(ctx)=["fail"]"
195 in
196 ((name
197 (let
198 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList []),(name_3,fromList [])]"
199 in
200 \ farInp farExp v !inp
201 -> let
202 _ = "call exceptionsByName(name_3)=[] catchStackByLabel(ctx)=["fail"]"
203 in
204 ((name
205 (let
206 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList []),(name_3,fromList [])]"
207 in
208 \ farInp
209 farExp
210 v
211 !inp
212 -> let _ = "resume"
213 in
214 (((ok farInp)
215 farExp)
216 (let
217 _ = "resume.genCode"
218 in
219 ((\ x
220 -> \ x
221 -> x x)
222 (((\ x
223 -> \ x
224 -> x x)
225 (((\ x
226 -> \ x
227 -> x x)
228 (\ x
229 -> \ x
230 -> \ x
231 -> \ x
232 -> (x x)
233 (x x)))
234 v))
235 v))
236 v))
237 inp))
238 inp)
239 (((((Data.Map.Internal.Bin
240 1)
241 "fail")
242 (\ !failInp
243 !farInp
244 !farExp
245 -> if (\ x -> x)
246 (((\ (Data.Text.Internal.Text _
247 i
248 _)
249 (Data.Text.Internal.Text _
250 j
251 _)
252 -> (i ==
253 j))
254 inp)
255 failInp) then
256 let
257 _ = "resume"
258 in
259 (((ok
260 farInp)
261 farExp)
262 (let
263 _ = "resume.genCode"
264 in
265 \ x
266 -> x))
267 failInp
268 else
269 let
270 (# farInp,
271 farExp #)
272 = case
273 ((compare
274 `Data.Function.on`
275 P.offset)
276 farInp)
277 failInp
278 of
279 LT
280 -> (# failInp,
281 [] #)
282 EQ
283 -> (# farInp,
284 (farExp
285 <>
286 []) #)
287 GT
288 -> (# farInp,
289 farExp #)
290 in
291 (((((Data.Map.Strict.Internal.findWithDefault
292 finalRaise)
293 "fail")
294 koByLabel)
295 failInp)
296 farInp)
297 farExp))
298 Data.Map.Internal.Tip)
299 Data.Map.Internal.Tip)))
300 inp)
301 (((((Data.Map.Internal.Bin 1) "fail")
302 (\ !failInp !farInp !farExp
303 -> if (\ x -> x)
304 (((\ (Data.Text.Internal.Text _
305 i
306 _)
307 (Data.Text.Internal.Text _
308 j
309 _)
310 -> (i == j))
311 inp)
312 failInp) then
313 let _ = "resume"
314 in
315 (((ok farInp) farExp)
316 (let
317 _ = "resume.genCode"
318 in \ x -> x))
319 failInp
320 else
321 let
322 (# farInp, farExp #)
323 = case
324 ((compare
325 `Data.Function.on`
326 P.offset)
327 farInp)
328 failInp
329 of
330 LT
331 -> (# failInp,
332 [] #)
333 EQ
334 -> (# farInp,
335 (farExp
336 <>
337 []) #)
338 GT
339 -> (# farInp,
340 farExp #)
341 in
342 (((((Data.Map.Strict.Internal.findWithDefault
343 finalRaise)
344 "fail")
345 koByLabel)
346 failInp)
347 farInp)
348 farExp))
349 Data.Map.Internal.Tip)
350 Data.Map.Internal.Tip) in
351 let
352 readFail
353 = \ !failInp !farInp !farExp
354 -> if (\ x -> x)
355 (((\ (Data.Text.Internal.Text _ i _)
356 (Data.Text.Internal.Text _ j _)
357 -> (i == j))
358 inp)
359 failInp) then
360 let _ = "resume"
361 in
362 (((ok farInp) farExp)
363 (let _ = "resume.genCode"
364 in \ x -> x))
365 failInp
366 else
367 let
368 (# farInp, farExp #)
369 = case
370 ((compare
371 `Data.Function.on`
372 P.offset)
373 farInp)
374 failInp
375 of
376 LT -> (# failInp, [] #)
377 EQ
378 -> (# farInp,
379 (farExp <> []) #)
380 GT -> (# farInp, farExp #)
381 in
382 (((((Data.Map.Strict.Internal.findWithDefault
383 finalRaise)
384 "fail")
385 koByLabel)
386 failInp)
387 farInp)
388 farExp
389 in
390 if readMore inp then
391 let !(# c, cs #) = readNext inp
392 in
393 if ((\ x -> \ x -> x) True) c then
394 if ('>' == c) then
395 let readFail = readFail
396 in
397 if readMore
398 ((P.shiftRightText 666)
399 inp) then
400 let !(# c, cs #) = readNext inp
401 in
402 if ((\ x -> \ x -> x) True)
403 c then
404 let _ = "resume"
405 in
406 (((join farInp) farExp)
407 (let
408 _ = "resume.genCode"
409 in
410 ((\ x
411 -> \ x -> x x)
412 (\ x
413 -> \ x
414 -> (Grammar.Brainfuck.RightPointer
415 :)))
416 c))
417 cs
418 else
419 let
420 _ = "checkToken.else" in
421 let
422 (# farInp, farExp #)
423 = case
424 ((compare
425 `Data.Function.on`
426 P.offset)
427 farInp)
428 inp
429 of
430 LT -> (# inp, [] #)
431 EQ
432 -> (# farInp,
433 (farExp
434 <>
435 []) #)
436 GT
437 -> (# farInp,
438 farExp #)
439 in
440 ((readFail inp) farInp)
441 farExp
442 else
443 let _ = "checkHorizon.else" in
444 let
445 (# farInp, farExp #)
446 = case
447 ((compare
448 `Data.Function.on`
449 P.offset)
450 farInp)
451 inp
452 of
453 LT
454 -> (# inp,
455 [P.ErrorItemHorizon
456 667] #)
457 EQ
458 -> (# farInp,
459 (farExp
460 <>
461 [P.ErrorItemHorizon
462 667]) #)
463 GT
464 -> (# farInp, farExp #)
465 in ((readFail inp) farInp) farExp
466 else
467 if ('<' == c) then
468 let readFail = readFail
469 in
470 if readMore
471 ((P.shiftRightText 666)
472 inp) then
473 let
474 !(# c, cs #) = readNext inp
475 in
476 if ((\ x -> \ x -> x) True)
477 c then
478 let _ = "resume"
479 in
480 (((join farInp)
481 farExp)
482 (let
483 _ = "resume.genCode"
484 in
485 ((\ x
486 -> \ x
487 -> x x)
488 (\ x
489 -> \ x
490 -> (Grammar.Brainfuck.LeftPointer
491 :)))
492 c))
493 cs
494 else
495 let
496 _ = "checkToken.else" in
497 let
498 (# farInp, farExp #)
499 = case
500 ((compare
501 `Data.Function.on`
502 P.offset)
503 farInp)
504 inp
505 of
506 LT
507 -> (# inp,
508 [] #)
509 EQ
510 -> (# farInp,
511 (farExp
512 <>
513 []) #)
514 GT
515 -> (# farInp,
516 farExp #)
517 in
518 ((readFail inp)
519 farInp)
520 farExp
521 else
522 let
523 _ = "checkHorizon.else" in
524 let
525 (# farInp, farExp #)
526 = case
527 ((compare
528 `Data.Function.on`
529 P.offset)
530 farInp)
531 inp
532 of
533 LT
534 -> (# inp,
535 [P.ErrorItemHorizon
536 667] #)
537 EQ
538 -> (# farInp,
539 (farExp
540 <>
541 [P.ErrorItemHorizon
542 667]) #)
543 GT
544 -> (# farInp,
545 farExp #)
546 in
547 ((readFail inp) farInp)
548 farExp
549 else
550 if ('+' == c) then
551 let readFail = readFail
552 in
553 if readMore
554 ((P.shiftRightText 666)
555 inp) then
556 let
557 !(# c, cs #)
558 = readNext inp
559 in
560 if ((\ x -> \ x -> x)
561 True)
562 c then
563 let _ = "resume"
564 in
565 (((join farInp)
566 farExp)
567 (let
568 _ = "resume.genCode"
569 in
570 ((\ x
571 -> \ x
572 -> x x)
573 (\ x
574 -> \ x
575 -> (Grammar.Brainfuck.Increment
576 :)))
577 c))
578 cs
579 else
580 let
581 _ = "checkToken.else" in
582 let
583 (# farInp,
584 farExp #)
585 = case
586 ((compare
587 `Data.Function.on`
588 P.offset)
589 farInp)
590 inp
591 of
592 LT
593 -> (# inp,
594 [] #)
595 EQ
596 -> (# farInp,
597 (farExp
598 <>
599 []) #)
600 GT
601 -> (# farInp,
602 farExp #)
603 in
604 ((readFail inp)
605 farInp)
606 farExp
607 else
608 let
609 _ = "checkHorizon.else" in
610 let
611 (# farInp, farExp #)
612 = case
613 ((compare
614 `Data.Function.on`
615 P.offset)
616 farInp)
617 inp
618 of
619 LT
620 -> (# inp,
621 [P.ErrorItemHorizon
622 667] #)
623 EQ
624 -> (# farInp,
625 (farExp
626 <>
627 [P.ErrorItemHorizon
628 667]) #)
629 GT
630 -> (# farInp,
631 farExp #)
632 in
633 ((readFail inp) farInp)
634 farExp
635 else
636 if ('-' == c) then
637 let readFail = readFail
638 in
639 if readMore
640 ((P.shiftRightText
641 666)
642 inp) then
643 let
644 !(# c, cs #)
645 = readNext inp
646 in
647 if ((\ x
648 -> \ x -> x)
649 True)
650 c then
651 let
652 _ = "resume"
653 in
654 (((join
655 farInp)
656 farExp)
657 (let
658 _ = "resume.genCode"
659 in
660 ((\ x
661 -> \ x
662 -> x x)
663 (\ x
664 -> \ x
665 -> (Grammar.Brainfuck.Decrement
666 :)))
667 c))
668 cs
669 else
670 let
671 _ = "checkToken.else" in
672 let
673 (# farInp,
674 farExp #)
675 = case
676 ((compare
677 `Data.Function.on`
678 P.offset)
679 farInp)
680 inp
681 of
682 LT
683 -> (# inp,
684 [] #)
685 EQ
686 -> (# farInp,
687 (farExp
688 <>
689 []) #)
690 GT
691 -> (# farInp,
692 farExp #)
693 in
694 ((readFail
695 inp)
696 farInp)
697 farExp
698 else
699 let
700 _ = "checkHorizon.else" in
701 let
702 (# farInp,
703 farExp #)
704 = case
705 ((compare
706 `Data.Function.on`
707 P.offset)
708 farInp)
709 inp
710 of
711 LT
712 -> (# inp,
713 [P.ErrorItemHorizon
714 667] #)
715 EQ
716 -> (# farInp,
717 (farExp
718 <>
719 [P.ErrorItemHorizon
720 667]) #)
721 GT
722 -> (# farInp,
723 farExp #)
724 in
725 ((readFail inp)
726 farInp)
727 farExp
728 else
729 if ('.' == c) then
730 let readFail = readFail
731 in
732 if readMore
733 ((P.shiftRightText
734 666)
735 inp) then
736 let
737 !(# c, cs #)
738 = readNext
739 inp
740 in
741 if ((\ x
742 -> \ x
743 -> x)
744 True)
745 c then
746 let
747 _ = "resume"
748 in
749 (((join
750 farInp)
751 farExp)
752 (let
753 _ = "resume.genCode"
754 in
755 ((\ x
756 -> \ x
757 -> x x)
758 (\ x
759 -> \ x
760 -> (Grammar.Brainfuck.Output
761 :)))
762 c))
763 cs
764 else
765 let
766 _ = "checkToken.else" in
767 let
768 (# farInp,
769 farExp #)
770 = case
771 ((compare
772 `Data.Function.on`
773 P.offset)
774 farInp)
775 inp
776 of
777 LT
778 -> (# inp,
779 [] #)
780 EQ
781 -> (# farInp,
782 (farExp
783 <>
784 []) #)
785 GT
786 -> (# farInp,
787 farExp #)
788 in
789 ((readFail
790 inp)
791 farInp)
792 farExp
793 else
794 let
795 _ = "checkHorizon.else" in
796 let
797 (# farInp,
798 farExp #)
799 = case
800 ((compare
801 `Data.Function.on`
802 P.offset)
803 farInp)
804 inp
805 of
806 LT
807 -> (# inp,
808 [P.ErrorItemHorizon
809 667] #)
810 EQ
811 -> (# farInp,
812 (farExp
813 <>
814 [P.ErrorItemHorizon
815 667]) #)
816 GT
817 -> (# farInp,
818 farExp #)
819 in
820 ((readFail inp)
821 farInp)
822 farExp
823 else
824 if (',' == c) then
825 let
826 readFail
827 = readFail
828 in
829 if readMore
830 ((P.shiftRightText
831 666)
832 inp) then
833 let
834 !(# c,
835 cs #)
836 = readNext
837 inp
838 in
839 if ((\ x
840 -> \ x
841 -> x)
842 True)
843 c then
844 let
845 _ = "resume"
846 in
847 (((join
848 farInp)
849 farExp)
850 (let
851 _ = "resume.genCode"
852 in
853 ((\ x
854 -> \ x
855 -> x x)
856 (\ x
857 -> \ x
858 -> (Grammar.Brainfuck.Input
859 :)))
860 c))
861 cs
862 else
863 let
864 _ = "checkToken.else" in
865 let
866 (# farInp,
867 farExp #)
868 = case
869 ((compare
870 `Data.Function.on`
871 P.offset)
872 farInp)
873 inp
874 of
875 LT
876 -> (# inp,
877 [] #)
878 EQ
879 -> (# farInp,
880 (farExp
881 <>
882 []) #)
883 GT
884 -> (# farInp,
885 farExp #)
886 in
887 ((readFail
888 inp)
889 farInp)
890 farExp
891 else
892 let
893 _ = "checkHorizon.else" in
894 let
895 (# farInp,
896 farExp #)
897 = case
898 ((compare
899 `Data.Function.on`
900 P.offset)
901 farInp)
902 inp
903 of
904 LT
905 -> (# inp,
906 [P.ErrorItemHorizon
907 667] #)
908 EQ
909 -> (# farInp,
910 (farExp
911 <>
912 [P.ErrorItemHorizon
913 667]) #)
914 GT
915 -> (# farInp,
916 farExp #)
917 in
918 ((readFail
919 inp)
920 farInp)
921 farExp
922 else
923 if ('[' == c) then
924 let
925 readFail
926 = readFail
927 in
928 if readMore
929 ((P.shiftRightText
930 666)
931 inp) then
932 let
933 !(# c,
934 cs #)
935 = readNext
936 inp
937 in
938 if ((\ x
939 -> \ x
940 -> x)
941 True)
942 c then
943 let
944 _ = "call exceptionsByName(name_1)=[] catchStackByLabel(ctx)=["fail"]"
945 in
946 ((name
947 (let
948 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList []),(name_3,fromList []),(join_46,fromList [])]"
949 in
950 \ farInp
951 farExp
952 v
953 !inp
954 -> let
955 _ = "call exceptionsByName(name_2)=[] catchStackByLabel(ctx)=["fail"]"
956 in
957 ((name
958 (let
959 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList []),(name_3,fromList []),(join_46,fromList [])]"
960 in
961 \ farInp
962 farExp
963 v
964 !inp
965 -> let
966 readFail
967 = readFail
968 in
969 if readMore
970 ((P.shiftRightText
971 666)
972 inp) then
973 let
974 !(# c,
975 cs #)
976 = readNext
977 inp
978 in
979 if (']'
980 ==)
981 c then
982 let
983 _ = "resume"
984 in
985 (((join
986 farInp)
987 farExp)
988 (let
989 _ = "resume.genCode"
990 in
991 ((\ x
992 -> \ x
993 -> x x)
994 (((\ x
995 -> \ x
996 -> x x)
997 (((\ x
998 -> \ x
999 -> x x)
1000 (((\ x
1001 -> \ x
1002 -> x x)
1003 (\ x
1004 -> \ x
1005 -> \ x
1006 -> \ x
1007 -> \ x
1008 -> (Grammar.Brainfuck.Loop
1009 x
1010 :)))
1011 c))
1012 v))
1013 v))
1014 c))
1015 cs
1016 else
1017 let
1018 _ = "checkToken.else" in
1019 let
1020 (# farInp,
1021 farExp #)
1022 = case
1023 ((compare
1024 `Data.Function.on`
1025 P.offset)
1026 farInp)
1027 inp
1028 of
1029 LT
1030 -> (# inp,
1031 [P.ErrorItemToken
1032 ']'] #)
1033 EQ
1034 -> (# farInp,
1035 (farExp
1036 <>
1037 [P.ErrorItemToken
1038 ']']) #)
1039 GT
1040 -> (# farInp,
1041 farExp #)
1042 in
1043 ((readFail
1044 inp)
1045 farInp)
1046 farExp
1047 else
1048 let
1049 _ = "checkHorizon.else" in
1050 let
1051 (# farInp,
1052 farExp #)
1053 = case
1054 ((compare
1055 `Data.Function.on`
1056 P.offset)
1057 farInp)
1058 inp
1059 of
1060 LT
1061 -> (# inp,
1062 [P.ErrorItemHorizon
1063 667] #)
1064 EQ
1065 -> (# farInp,
1066 (farExp
1067 <>
1068 [P.ErrorItemHorizon
1069 667]) #)
1070 GT
1071 -> (# farInp,
1072 farExp #)
1073 in
1074 ((readFail
1075 inp)
1076 farInp)
1077 farExp))
1078 inp)
1079 (((((Data.Map.Internal.Bin
1080 1)
1081 "fail")
1082 readFail)
1083 Data.Map.Internal.Tip)
1084 Data.Map.Internal.Tip)))
1085 cs)
1086 (((((Data.Map.Internal.Bin
1087 1)
1088 "fail")
1089 readFail)
1090 Data.Map.Internal.Tip)
1091 Data.Map.Internal.Tip)
1092 else
1093 let
1094 _ = "checkToken.else" in
1095 let
1096 (# farInp,
1097 farExp #)
1098 = case
1099 ((compare
1100 `Data.Function.on`
1101 P.offset)
1102 farInp)
1103 inp
1104 of
1105 LT
1106 -> (# inp,
1107 [] #)
1108 EQ
1109 -> (# farInp,
1110 (farExp
1111 <>
1112 []) #)
1113 GT
1114 -> (# farInp,
1115 farExp #)
1116 in
1117 ((readFail
1118 inp)
1119 farInp)
1120 farExp
1121 else
1122 let
1123 _ = "checkHorizon.else" in
1124 let
1125 (# farInp,
1126 farExp #)
1127 = case
1128 ((compare
1129 `Data.Function.on`
1130 P.offset)
1131 farInp)
1132 inp
1133 of
1134 LT
1135 -> (# inp,
1136 [P.ErrorItemHorizon
1137 667] #)
1138 EQ
1139 -> (# farInp,
1140 (farExp
1141 <>
1142 [P.ErrorItemHorizon
1143 667]) #)
1144 GT
1145 -> (# farInp,
1146 farExp #)
1147 in
1148 ((readFail
1149 inp)
1150 farInp)
1151 farExp
1152 else
1153 let
1154 (# farInp,
1155 farExp #)
1156 = case
1157 ((compare
1158 `Data.Function.on`
1159 P.offset)
1160 farInp)
1161 inp
1162 of
1163 LT
1164 -> (# inp,
1165 [] #)
1166 EQ
1167 -> (# farInp,
1168 (farExp
1169 <>
1170 []) #)
1171 GT
1172 -> (# farInp,
1173 farExp #)
1174 in
1175 ((readFail
1176 inp)
1177 farInp)
1178 farExp
1179 else
1180 let _ = "checkToken.else" in
1181 let
1182 (# farInp, farExp #)
1183 = case
1184 ((compare
1185 `Data.Function.on` P.offset)
1186 farInp)
1187 inp
1188 of
1189 LT -> (# inp, [] #)
1190 EQ -> (# farInp, (farExp <> []) #)
1191 GT -> (# farInp, farExp #)
1192 in ((readFail inp) farInp) farExp
1193 else
1194 let _ = "checkHorizon.else" in
1195 let
1196 (# farInp, farExp #)
1197 = case
1198 ((compare `Data.Function.on` P.offset)
1199 farInp)
1200 inp
1201 of
1202 LT -> (# inp, [P.ErrorItemHorizon 1] #)
1203 EQ
1204 -> (# farInp,
1205 (farExp
1206 <> [P.ErrorItemHorizon 1]) #)
1207 GT -> (# farInp, farExp #)
1208 in ((readFail inp) farInp) farExp in
1209 let
1210 _ = "call exceptionsByName(name_3)=["fail"] catchStackByLabel(ctx)=[]"
1211 in
1212 ((name
1213 (let
1214 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList []),(name_3,fromList [("fail",())])]"
1215 in
1216 \ farInp farExp v !inp
1217 -> let _ = "resume"
1218 in
1219 (((ok farInp) farExp)
1220 (let _ = "resume.genCode"
1221 in ((\ x -> \ x -> x x) (\ x -> x [])) v))
1222 inp))
1223 inp)
1224 Data.Map.Internal.Tip in
1225 let
1226 _ = "call exceptionsByName(name_2)=[] catchStackByLabel(ctx)=[]"
1227 in
1228 ((name
1229 (let
1230 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList [])]"
1231 in
1232 \ farInp farExp v !inp
1233 -> let _ = "resume"
1234 in
1235 (((finalRet farInp) farExp)
1236 (let _ = "resume.genCode"
1237 in
1238 ((\ x -> \ x -> x x)
1239 (((\ x -> \ x -> x x) (\ x -> \ x -> x)) v))
1240 v))
1241 inp))
1242 inp)
1243 Data.Map.Internal.Tip))
1244 init)
1245 Data.Map.Internal.Tip