]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G14.expected.txt
machine: normalOrderReduction at the last moment
[haskell/symantic-parser.git] / test / Golden / Splice / G14.expected.txt
1 \(input :: inp) ->
2 let !(#
3 init,
4 readMore,
5 readNext
6 #) =
7 let _ = "cursorOf"
8 in let next
9 ( t@( Data.Text.Internal.Text
10 arr
11 off
12 unconsumed
13 )
14 ) =
15 let !( Data.Text.Unsafe.Iter
16 c
17 d
18 ) = Data.Text.Unsafe.iter t 0
19 in (#
20 c,
21 Data.Text.Internal.Text arr (off GHC.Num.+ d) (unconsumed GHC.Num.- d)
22 #)
23 more
24 ( Data.Text.Internal.Text
25 _
26 _
27 unconsumed
28 ) = unconsumed GHC.Classes.> 0
29 in (# input, more, next #)
30 finalRet = \_farInp _farExp v _inp -> Symantic.Parser.Machine.Generate.returnST GHC.Base.$ Data.Either.Right v
31 finalRaise ::
32 forall st b.
33 Symantic.Parser.Machine.Generate.Catcher
34 st
35 inp
36 b = \(!exn) _failInp (!farInp) (!farExp) ->
37 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
38 Data.Either.Left
39 Symantic.Parser.Machine.Generate.ParsingError
40 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp,
41 Symantic.Parser.Machine.Generate.parsingErrorException = exn,
42 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
43 if readMore farInp
44 then
45 GHC.Maybe.Just
46 ( let (#
47 c,
48 _
49 #) = readNext farInp
50 in c
51 )
52 else GHC.Maybe.Nothing,
53 Symantic.Parser.Machine.Generate.parsingErrorExpecting = farExp
54 }
55 in GHC.ST.runST
56 ( let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp)
57 in let name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
58 name
59 ( let _ = "suspend"
60 in \farInp farExp v (!inp) ->
61 let join = \farInp farExp v (!inp) ->
62 let _ = "resume"
63 in callReturn
64 farInp
65 farExp
66 ( let _ = "resume.genCode"
67 in v
68 )
69 inp
70 in let _ = "catch ExceptionFailure"
71 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
72 let _ = "catch.ko ExceptionFailure"
73 in if ( \( Data.Text.Internal.Text
74 _
75 i
76 _
77 )
78 ( Data.Text.Internal.Text
79 _
80 j
81 _
82 ) -> i GHC.Classes.== j
83 )
84 inp
85 failInp
86 then
87 let _ = "choicesBranch.then"
88 in name
89 ( let _ = "suspend"
90 in \farInp farExp v (!inp) ->
91 let _ = "resume"
92 in join
93 farInp
94 farExp
95 ( let _ = "resume.genCode"
96 in v
97 )
98 inp
99 )
100 failInp
101 Data.Map.Internal.Tip
102 else
103 let _ = "choicesBranch.else"
104 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
105 in name
106 ( let _ = "suspend"
107 in \farInp farExp v (!inp) ->
108 let _ = "resume"
109 in join
110 farInp
111 farExp
112 ( let _ = "resume.genCode"
113 in GHC.Tuple . ()
114 )
115 inp
116 )
117 inp
118 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
119 )
120 callInput
121 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
122 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
123 name
124 ( let _ = "suspend"
125 in \farInp farExp v (!inp) -> do
126 let dupv = \x -> x
127 reg <- GHC.STRef.newSTRef dupv
128 let _ = "iter"
129 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
130 if ( \( Data.Text.Internal.Text
131 _
132 i
133 _
134 )
135 ( Data.Text.Internal.Text
136 _
137 j
138 _
139 ) -> i GHC.Classes.== j
140 )
141 loopInput
142 failInp
143 then
144 let _ = "choicesBranch.then"
145 in do
146 sr <- GHC.STRef.readSTRef reg
147 name
148 ( let _ = "suspend"
149 in \farInp farExp v (!inp) ->
150 name
151 ( let _ = "suspend"
152 in \farInp farExp v (!inp) ->
153 let _ = "resume"
154 in callReturn
155 farInp
156 farExp
157 ( let _ = "resume.genCode"
158 in v
159 )
160 inp
161 )
162 inp
163 Data.Map.Internal.Tip
164 )
165 failInp
166 Data.Map.Internal.Tip
167 else
168 let _ = "choicesBranch.else"
169 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
170 loop = \_callReturn callInput callCatchStackByLabel ->
171 let readFail = catchHandler callInput
172 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 3 callInput)
173 then
174 let !(#
175 c,
176 cs
177 #) = readNext callInput
178 in if (GHC.Classes.==) '!' c
179 then
180 name
181 ( let _ = "suspend"
182 in \farInp farExp v (!inp) ->
183 name
184 ( let _ = "suspend"
185 in \farInp farExp v (!inp) -> do
186 sr <- GHC.STRef.readSTRef reg
187 do
188 let dupv = sr
189 GHC.STRef.writeSTRef reg dupv
190 let _ = "jump"
191 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
192 )
193 inp
194 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
195 )
196 cs
197 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
198 else
199 let _ = "checkToken.else"
200 in let failExp =
201 Data.Set.Internal.Bin
202 1
203 ( Symantic.Parser.Grammar.Combinators.SomeFailure
204 ( case inputToken of
205 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '!'
206 )
207 )
208 Data.Set.Internal.Tip
209 Data.Set.Internal.Tip
210 in let (#
211 farInp,
212 farExp
213 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp callInput of
214 GHC.Types.LT ->
215 (#
216 callInput,
217 failExp
218 #)
219 GHC.Types.EQ ->
220 (#
221 farInp,
222 failExp GHC.Base.<> farExp
223 #)
224 GHC.Types.GT ->
225 (#
226 farInp,
227 farExp
228 #)
229 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
230 else
231 let _ = "checkHorizon.else"
232 in let failExp =
233 Data.Set.Internal.Bin
234 1
235 ( Symantic.Parser.Grammar.Combinators.SomeFailure
236 ( case inputToken of
237 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
238 )
239 )
240 Data.Set.Internal.Tip
241 Data.Set.Internal.Tip
242 in let (#
243 farInp,
244 farExp
245 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp callInput of
246 GHC.Types.LT ->
247 (#
248 callInput,
249 failExp
250 #)
251 GHC.Types.EQ ->
252 (#
253 farInp,
254 failExp GHC.Base.<> farExp
255 #)
256 GHC.Types.GT ->
257 (#
258 farInp,
259 farExp
260 #)
261 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
262 in let _ = "jump"
263 in loop callReturn inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
264 )
265 callInput
266 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
267 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
268 name
269 ( let _ = "suspend"
270 in \farInp farExp v (!inp) -> do
271 let dupv = \x -> x
272 reg <- GHC.STRef.newSTRef dupv
273 let _ = "iter"
274 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
275 if ( \( Data.Text.Internal.Text
276 _
277 i
278 _
279 )
280 ( Data.Text.Internal.Text
281 _
282 j
283 _
284 ) -> i GHC.Classes.== j
285 )
286 loopInput
287 failInp
288 then
289 let _ = "choicesBranch.then"
290 in do
291 sr <- GHC.STRef.readSTRef reg
292 let _ = "resume"
293 in callReturn
294 farInp
295 farExp
296 ( let _ = "resume.genCode"
297 in GHC.Tuple . ()
298 )
299 failInp
300 else
301 let _ = "choicesBranch.else"
302 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
303 loop = \_callReturn callInput callCatchStackByLabel ->
304 name
305 ( let _ = "suspend"
306 in \farInp farExp v (!inp) -> do
307 sr <- GHC.STRef.readSTRef reg
308 do
309 let dupv = sr
310 GHC.STRef.writeSTRef reg dupv
311 let _ = "jump"
312 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
313 )
314 callInput
315 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
316 in let _ = "jump"
317 in loop callReturn inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
318 )
319 callInput
320 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
321 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
322 let readFail = Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel
323 in if readMore callInput
324 then
325 let !(#
326 c,
327 cs
328 #) = readNext callInput
329 in if GHC.Unicode.isSpace c
330 then
331 name
332 ( let _ = "suspend"
333 in \farInp farExp v (!inp) ->
334 let _ = "resume"
335 in callReturn
336 farInp
337 farExp
338 ( let _ = "resume.genCode"
339 in v
340 )
341 inp
342 )
343 cs
344 Data.Map.Internal.Tip
345 else
346 let _ = "checkToken.else"
347 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput init Data.Set.Internal.empty
348 else
349 let _ = "checkHorizon.else"
350 in let failExp =
351 Data.Set.Internal.Bin
352 1
353 ( Symantic.Parser.Grammar.Combinators.SomeFailure
354 ( case inputToken of
355 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
356 )
357 )
358 Data.Set.Internal.Tip
359 Data.Set.Internal.Tip
360 in let (#
361 farInp,
362 farExp
363 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
364 GHC.Types.LT ->
365 (#
366 callInput,
367 failExp
368 #)
369 GHC.Types.EQ ->
370 (#
371 init,
372 failExp GHC.Base.<> Data.Set.Internal.empty
373 #)
374 GHC.Types.GT ->
375 (#
376 init,
377 Data.Set.Internal.empty
378 #)
379 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
380 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
381 let readFail = Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel
382 in if readMore callInput
383 then
384 let !(#
385 c,
386 cs
387 #) = readNext callInput
388 in if (\t -> ('0' GHC.Classes.== t) GHC.Classes.|| (('1' GHC.Classes.== t) GHC.Classes.|| (('2' GHC.Classes.== t) GHC.Classes.|| (('3' GHC.Classes.== t) GHC.Classes.|| (('4' GHC.Classes.== t) GHC.Classes.|| (('5' GHC.Classes.== t) GHC.Classes.|| (('6' GHC.Classes.== t) GHC.Classes.|| (('7' GHC.Classes.== t) GHC.Classes.|| (('8' GHC.Classes.== t) GHC.Classes.|| (('9' GHC.Classes.== t) GHC.Classes.|| GHC.Types.False)))))))))) c
389 then
390 let _ = "resume"
391 in callReturn
392 init
393 Data.Set.Internal.empty
394 ( let _ = "resume.genCode"
395 in c
396 )
397 cs
398 else
399 let _ = "checkToken.else"
400 in let failExp =
401 Data.Set.Internal.Bin
402 10
403 ( Symantic.Parser.Grammar.Combinators.SomeFailure
404 ( case inputToken of
405 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '3'
406 )
407 )
408 ( Data.Set.Internal.Bin
409 3
410 ( Symantic.Parser.Grammar.Combinators.SomeFailure
411 ( case inputToken of
412 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '1'
413 )
414 )
415 ( Data.Set.Internal.Bin
416 1
417 ( Symantic.Parser.Grammar.Combinators.SomeFailure
418 ( case inputToken of
419 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '0'
420 )
421 )
422 Data.Set.Internal.Tip
423 Data.Set.Internal.Tip
424 )
425 ( Data.Set.Internal.Bin
426 1
427 ( Symantic.Parser.Grammar.Combinators.SomeFailure
428 ( case inputToken of
429 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '2'
430 )
431 )
432 Data.Set.Internal.Tip
433 Data.Set.Internal.Tip
434 )
435 )
436 ( Data.Set.Internal.Bin
437 6
438 ( Symantic.Parser.Grammar.Combinators.SomeFailure
439 ( case inputToken of
440 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '7'
441 )
442 )
443 ( Data.Set.Internal.Bin
444 3
445 ( Symantic.Parser.Grammar.Combinators.SomeFailure
446 ( case inputToken of
447 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '5'
448 )
449 )
450 ( Data.Set.Internal.Bin
451 1
452 ( Symantic.Parser.Grammar.Combinators.SomeFailure
453 ( case inputToken of
454 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '4'
455 )
456 )
457 Data.Set.Internal.Tip
458 Data.Set.Internal.Tip
459 )
460 ( Data.Set.Internal.Bin
461 1
462 ( Symantic.Parser.Grammar.Combinators.SomeFailure
463 ( case inputToken of
464 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '6'
465 )
466 )
467 Data.Set.Internal.Tip
468 Data.Set.Internal.Tip
469 )
470 )
471 ( Data.Set.Internal.Bin
472 2
473 ( Symantic.Parser.Grammar.Combinators.SomeFailure
474 ( case inputToken of
475 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '8'
476 )
477 )
478 Data.Set.Internal.Tip
479 ( Data.Set.Internal.Bin
480 1
481 ( Symantic.Parser.Grammar.Combinators.SomeFailure
482 ( case inputToken of
483 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '9'
484 )
485 )
486 Data.Set.Internal.Tip
487 Data.Set.Internal.Tip
488 )
489 )
490 )
491 in let (#
492 farInp,
493 farExp
494 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
495 GHC.Types.LT ->
496 (#
497 callInput,
498 failExp
499 #)
500 GHC.Types.EQ ->
501 (#
502 init,
503 failExp GHC.Base.<> Data.Set.Internal.empty
504 #)
505 GHC.Types.GT ->
506 (#
507 init,
508 Data.Set.Internal.empty
509 #)
510 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
511 else
512 let _ = "checkHorizon.else"
513 in let failExp =
514 Data.Set.Internal.Bin
515 1
516 ( Symantic.Parser.Grammar.Combinators.SomeFailure
517 ( case inputToken of
518 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
519 )
520 )
521 Data.Set.Internal.Tip
522 Data.Set.Internal.Tip
523 in let (#
524 farInp,
525 farExp
526 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
527 GHC.Types.LT ->
528 (#
529 callInput,
530 failExp
531 #)
532 GHC.Types.EQ ->
533 (#
534 init,
535 failExp GHC.Base.<> Data.Set.Internal.empty
536 #)
537 GHC.Types.GT ->
538 (#
539 init,
540 Data.Set.Internal.empty
541 #)
542 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
543 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
544 let readFail = Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel
545 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 callInput)
546 then
547 let !(#
548 c,
549 cs
550 #) = readNext callInput
551 in if (GHC.Classes.==) '(' c
552 then
553 name
554 ( let _ = "suspend"
555 in \farInp farExp v (!inp) ->
556 let _ = "resume"
557 in callReturn
558 farInp
559 farExp
560 ( let _ = "resume.genCode"
561 in '('
562 )
563 inp
564 )
565 cs
566 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
567 else
568 let _ = "checkToken.else"
569 in let failExp =
570 Data.Set.Internal.Bin
571 1
572 ( Symantic.Parser.Grammar.Combinators.SomeFailure
573 ( case inputToken of
574 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '('
575 )
576 )
577 Data.Set.Internal.Tip
578 Data.Set.Internal.Tip
579 in let (#
580 farInp,
581 farExp
582 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
583 GHC.Types.LT ->
584 (#
585 callInput,
586 failExp
587 #)
588 GHC.Types.EQ ->
589 (#
590 init,
591 failExp GHC.Base.<> Data.Set.Internal.empty
592 #)
593 GHC.Types.GT ->
594 (#
595 init,
596 Data.Set.Internal.empty
597 #)
598 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
599 else
600 let _ = "checkHorizon.else"
601 in let failExp =
602 Data.Set.Internal.Bin
603 1
604 ( Symantic.Parser.Grammar.Combinators.SomeFailure
605 ( case inputToken of
606 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
607 )
608 )
609 Data.Set.Internal.Tip
610 Data.Set.Internal.Tip
611 in let (#
612 farInp,
613 farExp
614 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
615 GHC.Types.LT ->
616 (#
617 callInput,
618 failExp
619 #)
620 GHC.Types.EQ ->
621 (#
622 init,
623 failExp GHC.Base.<> Data.Set.Internal.empty
624 #)
625 GHC.Types.GT ->
626 (#
627 init,
628 Data.Set.Internal.empty
629 #)
630 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
631 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
632 let readFail = Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel
633 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 callInput)
634 then
635 let !(#
636 c,
637 cs
638 #) = readNext callInput
639 in if (GHC.Classes.==) ')' c
640 then
641 name
642 ( let _ = "suspend"
643 in \farInp farExp v (!inp) ->
644 let _ = "resume"
645 in callReturn
646 farInp
647 farExp
648 ( let _ = "resume.genCode"
649 in ')'
650 )
651 inp
652 )
653 cs
654 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
655 else
656 let _ = "checkToken.else"
657 in let failExp =
658 Data.Set.Internal.Bin
659 1
660 ( Symantic.Parser.Grammar.Combinators.SomeFailure
661 ( case inputToken of
662 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken ')'
663 )
664 )
665 Data.Set.Internal.Tip
666 Data.Set.Internal.Tip
667 in let (#
668 farInp,
669 farExp
670 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
671 GHC.Types.LT ->
672 (#
673 callInput,
674 failExp
675 #)
676 GHC.Types.EQ ->
677 (#
678 init,
679 failExp GHC.Base.<> Data.Set.Internal.empty
680 #)
681 GHC.Types.GT ->
682 (#
683 init,
684 Data.Set.Internal.empty
685 #)
686 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
687 else
688 let _ = "checkHorizon.else"
689 in let failExp =
690 Data.Set.Internal.Bin
691 1
692 ( Symantic.Parser.Grammar.Combinators.SomeFailure
693 ( case inputToken of
694 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
695 )
696 )
697 Data.Set.Internal.Tip
698 Data.Set.Internal.Tip
699 in let (#
700 farInp,
701 farExp
702 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
703 GHC.Types.LT ->
704 (#
705 callInput,
706 failExp
707 #)
708 GHC.Types.EQ ->
709 (#
710 init,
711 failExp GHC.Base.<> Data.Set.Internal.empty
712 #)
713 GHC.Types.GT ->
714 (#
715 init,
716 Data.Set.Internal.empty
717 #)
718 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
719 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
720 let readFail = Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel
721 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 callInput)
722 then
723 let !(#
724 c,
725 cs
726 #) = readNext callInput
727 in if (GHC.Classes.==) ',' c
728 then
729 name
730 ( let _ = "suspend"
731 in \farInp farExp v (!inp) ->
732 let _ = "resume"
733 in callReturn
734 farInp
735 farExp
736 ( let _ = "resume.genCode"
737 in ','
738 )
739 inp
740 )
741 cs
742 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
743 else
744 let _ = "checkToken.else"
745 in let failExp =
746 Data.Set.Internal.Bin
747 1
748 ( Symantic.Parser.Grammar.Combinators.SomeFailure
749 ( case inputToken of
750 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken ','
751 )
752 )
753 Data.Set.Internal.Tip
754 Data.Set.Internal.Tip
755 in let (#
756 farInp,
757 farExp
758 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
759 GHC.Types.LT ->
760 (#
761 callInput,
762 failExp
763 #)
764 GHC.Types.EQ ->
765 (#
766 init,
767 failExp GHC.Base.<> Data.Set.Internal.empty
768 #)
769 GHC.Types.GT ->
770 (#
771 init,
772 Data.Set.Internal.empty
773 #)
774 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
775 else
776 let _ = "checkHorizon.else"
777 in let failExp =
778 Data.Set.Internal.Bin
779 1
780 ( Symantic.Parser.Grammar.Combinators.SomeFailure
781 ( case inputToken of
782 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
783 )
784 )
785 Data.Set.Internal.Tip
786 Data.Set.Internal.Tip
787 in let (#
788 farInp,
789 farExp
790 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
791 GHC.Types.LT ->
792 (#
793 callInput,
794 failExp
795 #)
796 GHC.Types.EQ ->
797 (#
798 init,
799 failExp GHC.Base.<> Data.Set.Internal.empty
800 #)
801 GHC.Types.GT ->
802 (#
803 init,
804 Data.Set.Internal.empty
805 #)
806 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
807 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
808 let readFail = Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel
809 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 callInput)
810 then
811 let !(#
812 c,
813 cs
814 #) = readNext callInput
815 in if (GHC.Classes.==) ';' c
816 then
817 name
818 ( let _ = "suspend"
819 in \farInp farExp v (!inp) ->
820 let _ = "resume"
821 in callReturn
822 farInp
823 farExp
824 ( let _ = "resume.genCode"
825 in ';'
826 )
827 inp
828 )
829 cs
830 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
831 else
832 let _ = "checkToken.else"
833 in let failExp =
834 Data.Set.Internal.Bin
835 1
836 ( Symantic.Parser.Grammar.Combinators.SomeFailure
837 ( case inputToken of
838 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken ';'
839 )
840 )
841 Data.Set.Internal.Tip
842 Data.Set.Internal.Tip
843 in let (#
844 farInp,
845 farExp
846 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
847 GHC.Types.LT ->
848 (#
849 callInput,
850 failExp
851 #)
852 GHC.Types.EQ ->
853 (#
854 init,
855 failExp GHC.Base.<> Data.Set.Internal.empty
856 #)
857 GHC.Types.GT ->
858 (#
859 init,
860 Data.Set.Internal.empty
861 #)
862 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
863 else
864 let _ = "checkHorizon.else"
865 in let failExp =
866 Data.Set.Internal.Bin
867 1
868 ( Symantic.Parser.Grammar.Combinators.SomeFailure
869 ( case inputToken of
870 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
871 )
872 )
873 Data.Set.Internal.Tip
874 Data.Set.Internal.Tip
875 in let (#
876 farInp,
877 farExp
878 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
879 GHC.Types.LT ->
880 (#
881 callInput,
882 failExp
883 #)
884 GHC.Types.EQ ->
885 (#
886 init,
887 failExp GHC.Base.<> Data.Set.Internal.empty
888 #)
889 GHC.Types.GT ->
890 (#
891 init,
892 Data.Set.Internal.empty
893 #)
894 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
895 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
896 let readFail = Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel
897 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 3 callInput)
898 then
899 let !(#
900 c,
901 cs
902 #) = readNext callInput
903 in if (GHC.Classes.==) '{' c
904 then
905 name
906 ( let _ = "suspend"
907 in \farInp farExp v (!inp) -> do
908 let dupv = \x -> x
909 reg <- GHC.STRef.newSTRef dupv
910 let _ = "iter"
911 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
912 if ( \( Data.Text.Internal.Text
913 _
914 i
915 _
916 )
917 ( Data.Text.Internal.Text
918 _
919 j
920 _
921 ) -> i GHC.Classes.== j
922 )
923 loopInput
924 failInp
925 then
926 let _ = "choicesBranch.then"
927 in do
928 sr <- GHC.STRef.readSTRef reg
929 name
930 ( let _ = "suspend"
931 in \farInp farExp v (!inp) ->
932 name
933 ( let _ = "suspend"
934 in \farInp farExp v (!inp) ->
935 let readFail = readFail
936 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 inp)
937 then
938 let !(#
939 c,
940 cs
941 #) = readNext inp
942 in if (GHC.Classes.==) '}' c
943 then
944 name
945 ( let _ = "suspend"
946 in \farInp farExp v (!inp) ->
947 let _ = "resume"
948 in callReturn
949 farInp
950 farExp
951 ( let _ = "resume.genCode"
952 in v
953 )
954 inp
955 )
956 cs
957 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
958 else
959 let _ = "checkToken.else"
960 in let failExp =
961 Data.Set.Internal.Bin
962 1
963 ( Symantic.Parser.Grammar.Combinators.SomeFailure
964 ( case inputToken of
965 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '}'
966 )
967 )
968 Data.Set.Internal.Tip
969 Data.Set.Internal.Tip
970 in let (#
971 farInp,
972 farExp
973 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
974 GHC.Types.LT ->
975 (#
976 inp,
977 failExp
978 #)
979 GHC.Types.EQ ->
980 (#
981 farInp,
982 failExp GHC.Base.<> farExp
983 #)
984 GHC.Types.GT ->
985 (#
986 farInp,
987 farExp
988 #)
989 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
990 else
991 let _ = "checkHorizon.else"
992 in let failExp =
993 Data.Set.Internal.Bin
994 1
995 ( Symantic.Parser.Grammar.Combinators.SomeFailure
996 ( case inputToken of
997 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
998 )
999 )
1000 Data.Set.Internal.Tip
1001 Data.Set.Internal.Tip
1002 in let (#
1003 farInp,
1004 farExp
1005 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
1006 GHC.Types.LT ->
1007 (#
1008 inp,
1009 failExp
1010 #)
1011 GHC.Types.EQ ->
1012 (#
1013 farInp,
1014 failExp GHC.Base.<> farExp
1015 #)
1016 GHC.Types.GT ->
1017 (#
1018 farInp,
1019 farExp
1020 #)
1021 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
1022 )
1023 inp
1024 Data.Map.Internal.Tip
1025 )
1026 failInp
1027 Data.Map.Internal.Tip
1028 else
1029 let _ = "choicesBranch.else"
1030 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1031 loop = \_callReturn callInput callCatchStackByLabel ->
1032 let join = \farInp farExp v (!inp) -> do
1033 sr <- GHC.STRef.readSTRef reg
1034 do
1035 let dupv = sr
1036 GHC.STRef.writeSTRef reg dupv
1037 let _ = "jump"
1038 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
1039 in let _ = "catch ExceptionFailure"
1040 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
1041 let _ = "catch.ko ExceptionFailure"
1042 in if ( \( Data.Text.Internal.Text
1043 _
1044 i
1045 _
1046 )
1047 ( Data.Text.Internal.Text
1048 _
1049 j
1050 _
1051 ) -> i GHC.Classes.== j
1052 )
1053 callInput
1054 failInp
1055 then
1056 let _ = "choicesBranch.then"
1057 in let _ = "catch ExceptionFailure"
1058 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
1059 let _ = "catch.ko ExceptionFailure"
1060 in if ( \( Data.Text.Internal.Text
1061 _
1062 i
1063 _
1064 )
1065 ( Data.Text.Internal.Text
1066 _
1067 j
1068 _
1069 ) -> i GHC.Classes.== j
1070 )
1071 failInp
1072 failInp
1073 then
1074 let _ = "choicesBranch.then"
1075 in let _ = "catch ExceptionFailure"
1076 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
1077 let _ = "catch.ko ExceptionFailure"
1078 in if ( \( Data.Text.Internal.Text
1079 _
1080 i
1081 _
1082 )
1083 ( Data.Text.Internal.Text
1084 _
1085 j
1086 _
1087 ) -> i GHC.Classes.== j
1088 )
1089 failInp
1090 failInp
1091 then
1092 let _ = "choicesBranch.then"
1093 in name
1094 ( let _ = "suspend"
1095 in \farInp farExp v (!inp) ->
1096 name
1097 ( let _ = "suspend"
1098 in \farInp farExp v (!inp) ->
1099 let _ = "resume"
1100 in join
1101 farInp
1102 farExp
1103 ( let _ = "resume.genCode"
1104 in v
1105 )
1106 inp
1107 )
1108 inp
1109 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
1110 )
1111 failInp
1112 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
1113 else
1114 let _ = "choicesBranch.else"
1115 in catchHandler callInput Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1116 in let _ = "catch ExceptionFailure"
1117 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
1118 let _ = "catch.ko ExceptionFailure"
1119 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1120 in let join = \farInp farExp v (!inp) ->
1121 name
1122 ( let _ = "suspend"
1123 in \farInp farExp v (!inp) -> do
1124 let dupv = \x -> x
1125 reg <- GHC.STRef.newSTRef dupv
1126 let _ = "iter"
1127 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
1128 if ( \( Data.Text.Internal.Text
1129 _
1130 i
1131 _
1132 )
1133 ( Data.Text.Internal.Text
1134 _
1135 j
1136 _
1137 ) -> i GHC.Classes.== j
1138 )
1139 loopInput
1140 failInp
1141 then
1142 let _ = "choicesBranch.then"
1143 in do
1144 sr <- GHC.STRef.readSTRef reg
1145 name
1146 ( let _ = "suspend"
1147 in \farInp farExp v (!inp) ->
1148 name
1149 ( let _ = "suspend"
1150 in \farInp farExp v (!inp) ->
1151 let readFail = catchHandler
1152 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 5 inp)
1153 then
1154 let !(#
1155 c,
1156 cs
1157 #) = readNext inp
1158 in if (GHC.Classes.==) '=' c
1159 then
1160 name
1161 ( let _ = "suspend"
1162 in \farInp farExp v (!inp) ->
1163 name
1164 ( let _ = "suspend"
1165 in \farInp farExp v (!inp) -> do
1166 let dupv = \x -> x
1167 reg <- GHC.STRef.newSTRef dupv
1168 let _ = "iter"
1169 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
1170 if ( \( Data.Text.Internal.Text
1171 _
1172 i
1173 _
1174 )
1175 ( Data.Text.Internal.Text
1176 _
1177 j
1178 _
1179 ) -> i GHC.Classes.== j
1180 )
1181 loopInput
1182 failInp
1183 then
1184 let _ = "choicesBranch.then"
1185 in do
1186 sr <- GHC.STRef.readSTRef reg
1187 name
1188 ( let _ = "suspend"
1189 in \farInp farExp v (!inp) ->
1190 name
1191 ( let _ = "suspend"
1192 in \farInp farExp v (!inp) ->
1193 name
1194 ( let _ = "suspend"
1195 in \farInp farExp v (!inp) ->
1196 let _ = "resume"
1197 in join
1198 farInp
1199 farExp
1200 ( let _ = "resume.genCode"
1201 in v
1202 )
1203 inp
1204 )
1205 inp
1206 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
1207 )
1208 inp
1209 Data.Map.Internal.Tip
1210 )
1211 failInp
1212 Data.Map.Internal.Tip
1213 else
1214 let _ = "choicesBranch.else"
1215 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1216 loop = \_callReturn callInput callCatchStackByLabel ->
1217 name
1218 ( let _ = "suspend"
1219 in \farInp farExp v (!inp) ->
1220 name
1221 ( let _ = "suspend"
1222 in \farInp farExp v (!inp) ->
1223 name
1224 ( let _ = "suspend"
1225 in \farInp farExp v (!inp) -> do
1226 sr <- GHC.STRef.readSTRef reg
1227 do
1228 let dupv = v v sr
1229 GHC.STRef.writeSTRef reg dupv
1230 let _ = "jump"
1231 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
1232 )
1233 inp
1234 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
1235 )
1236 inp
1237 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
1238 )
1239 callInput
1240 Data.Map.Internal.Tip
1241 in let _ = "jump"
1242 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
1243 )
1244 inp
1245 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
1246 )
1247 cs
1248 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
1249 else
1250 let _ = "checkToken.else"
1251 in let failExp =
1252 Data.Set.Internal.Bin
1253 1
1254 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1255 ( case inputToken of
1256 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '='
1257 )
1258 )
1259 Data.Set.Internal.Tip
1260 Data.Set.Internal.Tip
1261 in let (#
1262 farInp,
1263 farExp
1264 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
1265 GHC.Types.LT ->
1266 (#
1267 inp,
1268 failExp
1269 #)
1270 GHC.Types.EQ ->
1271 (#
1272 farInp,
1273 failExp GHC.Base.<> farExp
1274 #)
1275 GHC.Types.GT ->
1276 (#
1277 farInp,
1278 farExp
1279 #)
1280 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
1281 else
1282 let _ = "checkHorizon.else"
1283 in let failExp =
1284 Data.Set.Internal.Bin
1285 1
1286 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1287 ( case inputToken of
1288 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 6
1289 )
1290 )
1291 Data.Set.Internal.Tip
1292 Data.Set.Internal.Tip
1293 in let (#
1294 farInp,
1295 farExp
1296 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
1297 GHC.Types.LT ->
1298 (#
1299 inp,
1300 failExp
1301 #)
1302 GHC.Types.EQ ->
1303 (#
1304 farInp,
1305 failExp GHC.Base.<> farExp
1306 #)
1307 GHC.Types.GT ->
1308 (#
1309 farInp,
1310 farExp
1311 #)
1312 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
1313 )
1314 inp
1315 Data.Map.Internal.Tip
1316 )
1317 failInp
1318 Data.Map.Internal.Tip
1319 else
1320 let _ = "choicesBranch.else"
1321 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1322 loop = \_callReturn callInput callCatchStackByLabel ->
1323 name
1324 ( let _ = "suspend"
1325 in \farInp farExp v (!inp) ->
1326 name
1327 ( let _ = "suspend"
1328 in \farInp farExp v (!inp) ->
1329 name
1330 ( let _ = "suspend"
1331 in \farInp farExp v (!inp) -> do
1332 sr <- GHC.STRef.readSTRef reg
1333 do
1334 let dupv = v v sr
1335 GHC.STRef.writeSTRef reg dupv
1336 let _ = "jump"
1337 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
1338 )
1339 inp
1340 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
1341 )
1342 inp
1343 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
1344 )
1345 callInput
1346 Data.Map.Internal.Tip
1347 in let _ = "jump"
1348 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
1349 )
1350 inp
1351 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
1352 in let _ = "catch ExceptionFailure"
1353 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
1354 let _ = "catch.ko ExceptionFailure"
1355 in if ( \( Data.Text.Internal.Text
1356 _
1357 i
1358 _
1359 )
1360 ( Data.Text.Internal.Text
1361 _
1362 j
1363 _
1364 ) -> i GHC.Classes.== j
1365 )
1366 failInp
1367 failInp
1368 then
1369 let _ = "choicesBranch.then"
1370 in name
1371 ( let _ = "suspend"
1372 in \farInp farExp v (!inp) ->
1373 let _ = "resume"
1374 in join
1375 farInp
1376 farExp
1377 ( let _ = "resume.genCode"
1378 in v
1379 )
1380 inp
1381 )
1382 failInp
1383 Data.Map.Internal.Tip
1384 else
1385 let _ = "choicesBranch.else"
1386 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1387 in let _ = "catch ExceptionFailure"
1388 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
1389 let _ = "catch.ko ExceptionFailure"
1390 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1391 in let readFail = catchHandler
1392 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 10 failInp)
1393 then
1394 let !(#
1395 c,
1396 cs
1397 #) = readNext failInp
1398 in if (GHC.Classes.==) 'v' c
1399 then
1400 let readFail = readFail
1401 in let !(#
1402 c,
1403 cs
1404 #) = readNext cs
1405 in if (GHC.Classes.==) 'a' c
1406 then
1407 let readFail = readFail
1408 in let !(#
1409 c,
1410 cs
1411 #) = readNext cs
1412 in if (GHC.Classes.==) 'r' c
1413 then
1414 name
1415 ( let _ = "suspend"
1416 in \farInp farExp v (!inp) ->
1417 let _ = "resume"
1418 in join
1419 farInp
1420 farExp
1421 ( let _ = "resume.genCode"
1422 in GHC.Tuple . ()
1423 )
1424 inp
1425 )
1426 cs
1427 Data.Map.Internal.Tip
1428 else
1429 let _ = "checkToken.else"
1430 in let failExp =
1431 Data.Set.Internal.Bin
1432 1
1433 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1434 ( case inputToken of
1435 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'r'
1436 )
1437 )
1438 Data.Set.Internal.Tip
1439 Data.Set.Internal.Tip
1440 in let (#
1441 farInp,
1442 farExp
1443 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
1444 GHC.Types.LT ->
1445 (#
1446 cs,
1447 failExp
1448 #)
1449 GHC.Types.EQ ->
1450 (#
1451 farInp,
1452 failExp GHC.Base.<> farExp
1453 #)
1454 GHC.Types.GT ->
1455 (#
1456 farInp,
1457 farExp
1458 #)
1459 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
1460 else
1461 let _ = "checkToken.else"
1462 in let failExp =
1463 Data.Set.Internal.Bin
1464 1
1465 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1466 ( case inputToken of
1467 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
1468 )
1469 )
1470 Data.Set.Internal.Tip
1471 Data.Set.Internal.Tip
1472 in let (#
1473 farInp,
1474 farExp
1475 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
1476 GHC.Types.LT ->
1477 (#
1478 cs,
1479 failExp
1480 #)
1481 GHC.Types.EQ ->
1482 (#
1483 farInp,
1484 failExp GHC.Base.<> farExp
1485 #)
1486 GHC.Types.GT ->
1487 (#
1488 farInp,
1489 farExp
1490 #)
1491 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
1492 else
1493 let _ = "checkToken.else"
1494 in let failExp =
1495 Data.Set.Internal.Bin
1496 1
1497 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1498 ( case inputToken of
1499 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'v'
1500 )
1501 )
1502 Data.Set.Internal.Tip
1503 Data.Set.Internal.Tip
1504 in let (#
1505 farInp,
1506 farExp
1507 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
1508 GHC.Types.LT ->
1509 (#
1510 failInp,
1511 failExp
1512 #)
1513 GHC.Types.EQ ->
1514 (#
1515 farInp,
1516 failExp GHC.Base.<> farExp
1517 #)
1518 GHC.Types.GT ->
1519 (#
1520 farInp,
1521 farExp
1522 #)
1523 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1524 else
1525 let _ = "checkHorizon.else"
1526 in let failExp =
1527 Data.Set.Internal.Bin
1528 1
1529 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1530 ( case inputToken of
1531 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 11
1532 )
1533 )
1534 Data.Set.Internal.Tip
1535 Data.Set.Internal.Tip
1536 in let (#
1537 farInp,
1538 farExp
1539 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
1540 GHC.Types.LT ->
1541 (#
1542 failInp,
1543 failExp
1544 #)
1545 GHC.Types.EQ ->
1546 (#
1547 farInp,
1548 failExp GHC.Base.<> farExp
1549 #)
1550 GHC.Types.GT ->
1551 (#
1552 farInp,
1553 farExp
1554 #)
1555 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1556 else
1557 let _ = "choicesBranch.else"
1558 in catchHandler callInput Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1559 in let _ = "catch ExceptionFailure"
1560 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
1561 let _ = "catch.ko ExceptionFailure"
1562 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1563 in let readFail = catchHandler
1564 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 6 failInp)
1565 then
1566 let !(#
1567 c,
1568 cs
1569 #) = readNext failInp
1570 in if (GHC.Classes.==) 'w' c
1571 then
1572 let readFail = readFail
1573 in let !(#
1574 c,
1575 cs
1576 #) = readNext cs
1577 in if (GHC.Classes.==) 'h' c
1578 then
1579 let readFail = readFail
1580 in let !(#
1581 c,
1582 cs
1583 #) = readNext cs
1584 in if (GHC.Classes.==) 'i' c
1585 then
1586 let readFail = readFail
1587 in let !(#
1588 c,
1589 cs
1590 #) = readNext cs
1591 in if (GHC.Classes.==) 'l' c
1592 then
1593 let readFail = readFail
1594 in let !(#
1595 c,
1596 cs
1597 #) = readNext cs
1598 in if (GHC.Classes.==) 'e' c
1599 then
1600 name
1601 ( let _ = "suspend"
1602 in \farInp farExp v (!inp) ->
1603 name
1604 ( let _ = "suspend"
1605 in \farInp farExp v (!inp) ->
1606 name
1607 ( let _ = "suspend"
1608 in \farInp farExp v (!inp) ->
1609 let _ = "resume"
1610 in join
1611 farInp
1612 farExp
1613 ( let _ = "resume.genCode"
1614 in v
1615 )
1616 inp
1617 )
1618 inp
1619 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
1620 )
1621 inp
1622 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
1623 )
1624 cs
1625 Data.Map.Internal.Tip
1626 else
1627 let _ = "checkToken.else"
1628 in let failExp =
1629 Data.Set.Internal.Bin
1630 1
1631 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1632 ( case inputToken of
1633 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'e'
1634 )
1635 )
1636 Data.Set.Internal.Tip
1637 Data.Set.Internal.Tip
1638 in let (#
1639 farInp,
1640 farExp
1641 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
1642 GHC.Types.LT ->
1643 (#
1644 cs,
1645 failExp
1646 #)
1647 GHC.Types.EQ ->
1648 (#
1649 farInp,
1650 failExp GHC.Base.<> farExp
1651 #)
1652 GHC.Types.GT ->
1653 (#
1654 farInp,
1655 farExp
1656 #)
1657 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
1658 else
1659 let _ = "checkToken.else"
1660 in let failExp =
1661 Data.Set.Internal.Bin
1662 1
1663 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1664 ( case inputToken of
1665 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'l'
1666 )
1667 )
1668 Data.Set.Internal.Tip
1669 Data.Set.Internal.Tip
1670 in let (#
1671 farInp,
1672 farExp
1673 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
1674 GHC.Types.LT ->
1675 (#
1676 cs,
1677 failExp
1678 #)
1679 GHC.Types.EQ ->
1680 (#
1681 farInp,
1682 failExp GHC.Base.<> farExp
1683 #)
1684 GHC.Types.GT ->
1685 (#
1686 farInp,
1687 farExp
1688 #)
1689 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
1690 else
1691 let _ = "checkToken.else"
1692 in let failExp =
1693 Data.Set.Internal.Bin
1694 1
1695 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1696 ( case inputToken of
1697 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'i'
1698 )
1699 )
1700 Data.Set.Internal.Tip
1701 Data.Set.Internal.Tip
1702 in let (#
1703 farInp,
1704 farExp
1705 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
1706 GHC.Types.LT ->
1707 (#
1708 cs,
1709 failExp
1710 #)
1711 GHC.Types.EQ ->
1712 (#
1713 farInp,
1714 failExp GHC.Base.<> farExp
1715 #)
1716 GHC.Types.GT ->
1717 (#
1718 farInp,
1719 farExp
1720 #)
1721 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
1722 else
1723 let _ = "checkToken.else"
1724 in let failExp =
1725 Data.Set.Internal.Bin
1726 1
1727 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1728 ( case inputToken of
1729 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'h'
1730 )
1731 )
1732 Data.Set.Internal.Tip
1733 Data.Set.Internal.Tip
1734 in let (#
1735 farInp,
1736 farExp
1737 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
1738 GHC.Types.LT ->
1739 (#
1740 cs,
1741 failExp
1742 #)
1743 GHC.Types.EQ ->
1744 (#
1745 farInp,
1746 failExp GHC.Base.<> farExp
1747 #)
1748 GHC.Types.GT ->
1749 (#
1750 farInp,
1751 farExp
1752 #)
1753 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
1754 else
1755 let _ = "checkToken.else"
1756 in let failExp =
1757 Data.Set.Internal.Bin
1758 1
1759 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1760 ( case inputToken of
1761 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'w'
1762 )
1763 )
1764 Data.Set.Internal.Tip
1765 Data.Set.Internal.Tip
1766 in let (#
1767 farInp,
1768 farExp
1769 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
1770 GHC.Types.LT ->
1771 (#
1772 failInp,
1773 failExp
1774 #)
1775 GHC.Types.EQ ->
1776 (#
1777 farInp,
1778 failExp GHC.Base.<> farExp
1779 #)
1780 GHC.Types.GT ->
1781 (#
1782 farInp,
1783 farExp
1784 #)
1785 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1786 else
1787 let _ = "checkHorizon.else"
1788 in let failExp =
1789 Data.Set.Internal.Bin
1790 1
1791 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1792 ( case inputToken of
1793 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 7
1794 )
1795 )
1796 Data.Set.Internal.Tip
1797 Data.Set.Internal.Tip
1798 in let (#
1799 farInp,
1800 farExp
1801 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
1802 GHC.Types.LT ->
1803 (#
1804 failInp,
1805 failExp
1806 #)
1807 GHC.Types.EQ ->
1808 (#
1809 farInp,
1810 failExp GHC.Base.<> farExp
1811 #)
1812 GHC.Types.GT ->
1813 (#
1814 farInp,
1815 farExp
1816 #)
1817 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1818 else
1819 let _ = "choicesBranch.else"
1820 in catchHandler callInput Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
1821 in let _ = "catch ExceptionFailure"
1822 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
1823 let _ = "catch.ko ExceptionFailure"
1824 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
1825 in let readFail = catchHandler
1826 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 callInput)
1827 then
1828 let !(#
1829 c,
1830 cs
1831 #) = readNext callInput
1832 in if (GHC.Classes.==) 'i' c
1833 then
1834 let readFail = readFail
1835 in let !(#
1836 c,
1837 cs
1838 #) = readNext cs
1839 in if (GHC.Classes.==) 'f' c
1840 then
1841 name
1842 ( let _ = "suspend"
1843 in \farInp farExp v (!inp) ->
1844 let _ = "resume"
1845 in join
1846 farInp
1847 farExp
1848 ( let _ = "resume.genCode"
1849 in v
1850 )
1851 inp
1852 )
1853 cs
1854 Data.Map.Internal.Tip
1855 else
1856 let _ = "checkToken.else"
1857 in let failExp =
1858 Data.Set.Internal.Bin
1859 1
1860 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1861 ( case inputToken of
1862 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'f'
1863 )
1864 )
1865 Data.Set.Internal.Tip
1866 Data.Set.Internal.Tip
1867 in let (#
1868 farInp,
1869 farExp
1870 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
1871 GHC.Types.LT ->
1872 (#
1873 cs,
1874 failExp
1875 #)
1876 GHC.Types.EQ ->
1877 (#
1878 farInp,
1879 failExp GHC.Base.<> farExp
1880 #)
1881 GHC.Types.GT ->
1882 (#
1883 farInp,
1884 farExp
1885 #)
1886 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
1887 else
1888 let _ = "checkToken.else"
1889 in let failExp =
1890 Data.Set.Internal.Bin
1891 1
1892 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1893 ( case inputToken of
1894 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'i'
1895 )
1896 )
1897 Data.Set.Internal.Tip
1898 Data.Set.Internal.Tip
1899 in let (#
1900 farInp,
1901 farExp
1902 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp callInput of
1903 GHC.Types.LT ->
1904 (#
1905 callInput,
1906 failExp
1907 #)
1908 GHC.Types.EQ ->
1909 (#
1910 farInp,
1911 failExp GHC.Base.<> farExp
1912 #)
1913 GHC.Types.GT ->
1914 (#
1915 farInp,
1916 farExp
1917 #)
1918 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
1919 else
1920 let _ = "checkHorizon.else"
1921 in let failExp =
1922 Data.Set.Internal.Bin
1923 1
1924 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1925 ( case inputToken of
1926 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
1927 )
1928 )
1929 Data.Set.Internal.Tip
1930 Data.Set.Internal.Tip
1931 in let (#
1932 farInp,
1933 farExp
1934 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp callInput of
1935 GHC.Types.LT ->
1936 (#
1937 callInput,
1938 failExp
1939 #)
1940 GHC.Types.EQ ->
1941 (#
1942 farInp,
1943 failExp GHC.Base.<> farExp
1944 #)
1945 GHC.Types.GT ->
1946 (#
1947 farInp,
1948 farExp
1949 #)
1950 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
1951 in let _ = "jump"
1952 in loop callReturn inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
1953 )
1954 cs
1955 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
1956 else
1957 let _ = "checkToken.else"
1958 in let failExp =
1959 Data.Set.Internal.Bin
1960 1
1961 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1962 ( case inputToken of
1963 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '{'
1964 )
1965 )
1966 Data.Set.Internal.Tip
1967 Data.Set.Internal.Tip
1968 in let (#
1969 farInp,
1970 farExp
1971 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
1972 GHC.Types.LT ->
1973 (#
1974 callInput,
1975 failExp
1976 #)
1977 GHC.Types.EQ ->
1978 (#
1979 init,
1980 failExp GHC.Base.<> Data.Set.Internal.empty
1981 #)
1982 GHC.Types.GT ->
1983 (#
1984 init,
1985 Data.Set.Internal.empty
1986 #)
1987 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
1988 else
1989 let _ = "checkHorizon.else"
1990 in let failExp =
1991 Data.Set.Internal.Bin
1992 1
1993 ( Symantic.Parser.Grammar.Combinators.SomeFailure
1994 ( case inputToken of
1995 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
1996 )
1997 )
1998 Data.Set.Internal.Tip
1999 Data.Set.Internal.Tip
2000 in let (#
2001 farInp,
2002 farExp
2003 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
2004 GHC.Types.LT ->
2005 (#
2006 callInput,
2007 failExp
2008 #)
2009 GHC.Types.EQ ->
2010 (#
2011 init,
2012 failExp GHC.Base.<> Data.Set.Internal.empty
2013 #)
2014 GHC.Types.GT ->
2015 (#
2016 init,
2017 Data.Set.Internal.empty
2018 #)
2019 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
2020 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
2021 let readFail = Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel
2022 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 4 callInput)
2023 then
2024 let !(#
2025 c,
2026 cs
2027 #) = readNext callInput
2028 in if (GHC.Classes.==) '[' c
2029 then
2030 name
2031 ( let _ = "suspend"
2032 in \farInp farExp v (!inp) ->
2033 name
2034 ( let _ = "suspend"
2035 in \farInp farExp v (!inp) -> do
2036 let dupv = \x -> x
2037 reg <- GHC.STRef.newSTRef dupv
2038 let _ = "iter"
2039 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
2040 if ( \( Data.Text.Internal.Text
2041 _
2042 i
2043 _
2044 )
2045 ( Data.Text.Internal.Text
2046 _
2047 j
2048 _
2049 ) -> i GHC.Classes.== j
2050 )
2051 loopInput
2052 failInp
2053 then
2054 let _ = "choicesBranch.then"
2055 in do
2056 sr <- GHC.STRef.readSTRef reg
2057 let readFail = readFail
2058 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 failInp)
2059 then
2060 let !(#
2061 c,
2062 cs
2063 #) = readNext failInp
2064 in if (GHC.Classes.==) ']' c
2065 then
2066 name
2067 ( let _ = "suspend"
2068 in \farInp farExp v (!inp) ->
2069 let _ = "resume"
2070 in callReturn
2071 farInp
2072 farExp
2073 ( let _ = "resume.genCode"
2074 in GHC.Tuple . ()
2075 )
2076 inp
2077 )
2078 cs
2079 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
2080 else
2081 let _ = "checkToken.else"
2082 in let failExp =
2083 Data.Set.Internal.Bin
2084 1
2085 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2086 ( case inputToken of
2087 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken ']'
2088 )
2089 )
2090 Data.Set.Internal.Tip
2091 Data.Set.Internal.Tip
2092 in let (#
2093 farInp,
2094 farExp
2095 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
2096 GHC.Types.LT ->
2097 (#
2098 failInp,
2099 failExp
2100 #)
2101 GHC.Types.EQ ->
2102 (#
2103 farInp,
2104 failExp GHC.Base.<> farExp
2105 #)
2106 GHC.Types.GT ->
2107 (#
2108 farInp,
2109 farExp
2110 #)
2111 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2112 else
2113 let _ = "checkHorizon.else"
2114 in let failExp =
2115 Data.Set.Internal.Bin
2116 1
2117 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2118 ( case inputToken of
2119 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
2120 )
2121 )
2122 Data.Set.Internal.Tip
2123 Data.Set.Internal.Tip
2124 in let (#
2125 farInp,
2126 farExp
2127 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
2128 GHC.Types.LT ->
2129 (#
2130 failInp,
2131 failExp
2132 #)
2133 GHC.Types.EQ ->
2134 (#
2135 farInp,
2136 failExp GHC.Base.<> farExp
2137 #)
2138 GHC.Types.GT ->
2139 (#
2140 farInp,
2141 farExp
2142 #)
2143 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2144 else
2145 let _ = "choicesBranch.else"
2146 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2147 loop = \_callReturn callInput callCatchStackByLabel ->
2148 name
2149 ( let _ = "suspend"
2150 in \farInp farExp v (!inp) -> do
2151 sr <- GHC.STRef.readSTRef reg
2152 do
2153 let dupv = sr
2154 GHC.STRef.writeSTRef reg dupv
2155 let _ = "jump"
2156 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
2157 )
2158 callInput
2159 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
2160 in let _ = "jump"
2161 in loop callReturn inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
2162 )
2163 inp
2164 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
2165 )
2166 cs
2167 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
2168 else
2169 let _ = "checkToken.else"
2170 in let failExp =
2171 Data.Set.Internal.Bin
2172 1
2173 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2174 ( case inputToken of
2175 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '['
2176 )
2177 )
2178 Data.Set.Internal.Tip
2179 Data.Set.Internal.Tip
2180 in let (#
2181 farInp,
2182 farExp
2183 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
2184 GHC.Types.LT ->
2185 (#
2186 callInput,
2187 failExp
2188 #)
2189 GHC.Types.EQ ->
2190 (#
2191 init,
2192 failExp GHC.Base.<> Data.Set.Internal.empty
2193 #)
2194 GHC.Types.GT ->
2195 (#
2196 init,
2197 Data.Set.Internal.empty
2198 #)
2199 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
2200 else
2201 let _ = "checkHorizon.else"
2202 in let failExp =
2203 Data.Set.Internal.Bin
2204 1
2205 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2206 ( case inputToken of
2207 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 5
2208 )
2209 )
2210 Data.Set.Internal.Tip
2211 Data.Set.Internal.Tip
2212 in let (#
2213 farInp,
2214 farExp
2215 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
2216 GHC.Types.LT ->
2217 (#
2218 callInput,
2219 failExp
2220 #)
2221 GHC.Types.EQ ->
2222 (#
2223 init,
2224 failExp GHC.Base.<> Data.Set.Internal.empty
2225 #)
2226 GHC.Types.GT ->
2227 (#
2228 init,
2229 Data.Set.Internal.empty
2230 #)
2231 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
2232 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
2233 let _ = "catch ExceptionFailure"
2234 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
2235 let _ = "catch.ko ExceptionFailure"
2236 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
2237 in let readFail = catchHandler
2238 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 callInput)
2239 then
2240 let !(#
2241 c,
2242 cs
2243 #) = readNext callInput
2244 in if Parsers.Nandlang.nandIdentStart c
2245 then do
2246 let dupv = \x -> x
2247 reg <- GHC.STRef.newSTRef dupv
2248 let _ = "iter"
2249 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
2250 if ( \( Data.Text.Internal.Text
2251 _
2252 i
2253 _
2254 )
2255 ( Data.Text.Internal.Text
2256 _
2257 j
2258 _
2259 ) -> i GHC.Classes.== j
2260 )
2261 loopInput
2262 failInp
2263 then
2264 let _ = "choicesBranch.then"
2265 in do
2266 sr <- GHC.STRef.readSTRef reg
2267 name
2268 ( let _ = "suspend"
2269 in \farInp farExp v (!inp) ->
2270 name
2271 ( let _ = "suspend"
2272 in \farInp farExp v (!inp) ->
2273 name
2274 ( let _ = "suspend"
2275 in \farInp farExp v (!inp) ->
2276 let _ = "resume"
2277 in callReturn
2278 farInp
2279 farExp
2280 ( let _ = "resume.genCode"
2281 in v
2282 )
2283 inp
2284 )
2285 inp
2286 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
2287 )
2288 inp
2289 Data.Map.Internal.Tip
2290 )
2291 failInp
2292 Data.Map.Internal.Tip
2293 else
2294 let _ = "choicesBranch.else"
2295 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2296 loop = \_callReturn callInput callCatchStackByLabel ->
2297 let readFail = catchHandler callInput
2298 in if readMore callInput
2299 then
2300 let !(#
2301 c,
2302 cs
2303 #) = readNext callInput
2304 in if Parsers.Nandlang.nandIdentLetter c
2305 then do
2306 sr <- GHC.STRef.readSTRef reg
2307 do
2308 let dupv = sr
2309 GHC.STRef.writeSTRef reg dupv
2310 let _ = "jump"
2311 in loop (GHC.Err.error "invalid return") cs (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
2312 else
2313 let _ = "checkToken.else"
2314 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput init Data.Set.Internal.empty
2315 else
2316 let _ = "checkHorizon.else"
2317 in let failExp =
2318 Data.Set.Internal.Bin
2319 1
2320 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2321 ( case inputToken of
2322 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
2323 )
2324 )
2325 Data.Set.Internal.Tip
2326 Data.Set.Internal.Tip
2327 in let (#
2328 farInp,
2329 farExp
2330 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
2331 GHC.Types.LT ->
2332 (#
2333 callInput,
2334 failExp
2335 #)
2336 GHC.Types.EQ ->
2337 (#
2338 init,
2339 failExp GHC.Base.<> Data.Set.Internal.empty
2340 #)
2341 GHC.Types.GT ->
2342 (#
2343 init,
2344 Data.Set.Internal.empty
2345 #)
2346 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
2347 in let _ = "jump"
2348 in loop callReturn cs (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
2349 else
2350 let _ = "checkToken.else"
2351 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput init Data.Set.Internal.empty
2352 else
2353 let _ = "checkHorizon.else"
2354 in let failExp =
2355 Data.Set.Internal.Bin
2356 1
2357 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2358 ( case inputToken of
2359 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
2360 )
2361 )
2362 Data.Set.Internal.Tip
2363 Data.Set.Internal.Tip
2364 in let (#
2365 farInp,
2366 farExp
2367 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
2368 GHC.Types.LT ->
2369 (#
2370 callInput,
2371 failExp
2372 #)
2373 GHC.Types.EQ ->
2374 (#
2375 init,
2376 failExp GHC.Base.<> Data.Set.Internal.empty
2377 #)
2378 GHC.Types.GT ->
2379 (#
2380 init,
2381 Data.Set.Internal.empty
2382 #)
2383 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
2384 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
2385 let _ = "catch ExceptionFailure"
2386 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
2387 let _ = "catch.ko ExceptionFailure"
2388 in if ( \( Data.Text.Internal.Text
2389 _
2390 i
2391 _
2392 )
2393 ( Data.Text.Internal.Text
2394 _
2395 j
2396 _
2397 ) -> i GHC.Classes.== j
2398 )
2399 callInput
2400 failInp
2401 then
2402 let _ = "choicesBranch.then"
2403 in let _ = "catch ExceptionFailure"
2404 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
2405 let _ = "catch.ko ExceptionFailure"
2406 in if ( \( Data.Text.Internal.Text
2407 _
2408 i
2409 _
2410 )
2411 ( Data.Text.Internal.Text
2412 _
2413 j
2414 _
2415 ) -> i GHC.Classes.== j
2416 )
2417 failInp
2418 failInp
2419 then
2420 let _ = "choicesBranch.then"
2421 in name
2422 ( let _ = "suspend"
2423 in \farInp farExp v (!inp) ->
2424 let join = \farInp farExp v (!inp) ->
2425 let _ = "resume"
2426 in callReturn
2427 farInp
2428 farExp
2429 ( let _ = "resume.genCode"
2430 in v
2431 )
2432 inp
2433 in let _ = "catch ExceptionFailure"
2434 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
2435 let _ = "catch.ko ExceptionFailure"
2436 in if ( \( Data.Text.Internal.Text
2437 _
2438 i
2439 _
2440 )
2441 ( Data.Text.Internal.Text
2442 _
2443 j
2444 _
2445 ) -> i GHC.Classes.== j
2446 )
2447 inp
2448 failInp
2449 then
2450 let _ = "choicesBranch.then"
2451 in name
2452 ( let _ = "suspend"
2453 in \farInp farExp v (!inp) ->
2454 let _ = "resume"
2455 in join
2456 farInp
2457 farExp
2458 ( let _ = "resume.genCode"
2459 in v
2460 )
2461 inp
2462 )
2463 failInp
2464 Data.Map.Internal.Tip
2465 else
2466 let _ = "choicesBranch.else"
2467 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2468 in let join = \farInp farExp v (!inp) ->
2469 let _ = "resume"
2470 in join
2471 farInp
2472 farExp
2473 ( let _ = "resume.genCode"
2474 in GHC.Tuple . ()
2475 )
2476 inp
2477 in let _ = "catch ExceptionFailure"
2478 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
2479 let _ = "catch.ko ExceptionFailure"
2480 in if ( \( Data.Text.Internal.Text
2481 _
2482 i
2483 _
2484 )
2485 ( Data.Text.Internal.Text
2486 _
2487 j
2488 _
2489 ) -> i GHC.Classes.== j
2490 )
2491 inp
2492 failInp
2493 then
2494 let _ = "choicesBranch.then"
2495 in name
2496 ( let _ = "suspend"
2497 in \farInp farExp v (!inp) ->
2498 let _ = "resume"
2499 in join
2500 farInp
2501 farExp
2502 ( let _ = "resume.genCode"
2503 in v
2504 )
2505 inp
2506 )
2507 failInp
2508 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
2509 else
2510 let _ = "choicesBranch.else"
2511 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2512 in name
2513 ( let _ = "suspend"
2514 in \farInp farExp v (!inp) ->
2515 let join = \farInp farExp v (!inp) ->
2516 name
2517 ( let _ = "suspend"
2518 in \farInp farExp v (!inp) ->
2519 let _ = "resume"
2520 in join
2521 farInp
2522 farExp
2523 ( let _ = "resume.genCode"
2524 in v
2525 )
2526 inp
2527 )
2528 inp
2529 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
2530 in let _ = "catch ExceptionFailure"
2531 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
2532 let _ = "catch.ko ExceptionFailure"
2533 in if ( \( Data.Text.Internal.Text
2534 _
2535 i
2536 _
2537 )
2538 ( Data.Text.Internal.Text
2539 _
2540 j
2541 _
2542 ) -> i GHC.Classes.== j
2543 )
2544 inp
2545 failInp
2546 then
2547 let _ = "choicesBranch.then"
2548 in name
2549 ( let _ = "suspend"
2550 in \farInp farExp v (!inp) ->
2551 let _ = "resume"
2552 in join
2553 farInp
2554 farExp
2555 ( let _ = "resume.genCode"
2556 in v
2557 )
2558 inp
2559 )
2560 failInp
2561 Data.Map.Internal.Tip
2562 else
2563 let _ = "choicesBranch.else"
2564 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2565 in name
2566 ( let _ = "suspend"
2567 in \farInp farExp v (!inp) -> do
2568 let dupv = \x -> x
2569 reg <- GHC.STRef.newSTRef dupv
2570 let _ = "iter"
2571 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
2572 if ( \( Data.Text.Internal.Text
2573 _
2574 i
2575 _
2576 )
2577 ( Data.Text.Internal.Text
2578 _
2579 j
2580 _
2581 ) -> i GHC.Classes.== j
2582 )
2583 loopInput
2584 failInp
2585 then
2586 let _ = "choicesBranch.then"
2587 in do
2588 sr <- GHC.STRef.readSTRef reg
2589 name
2590 ( let _ = "suspend"
2591 in \farInp farExp v (!inp) ->
2592 name
2593 ( let _ = "suspend"
2594 in \farInp farExp v (!inp) ->
2595 let _ = "resume"
2596 in join
2597 farInp
2598 farExp
2599 ( let _ = "resume.genCode"
2600 in GHC.Tuple . ()
2601 )
2602 inp
2603 )
2604 inp
2605 Data.Map.Internal.Tip
2606 )
2607 failInp
2608 Data.Map.Internal.Tip
2609 else
2610 let _ = "choicesBranch.else"
2611 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2612 loop = \_callReturn callInput callCatchStackByLabel ->
2613 name
2614 ( let _ = "suspend"
2615 in \farInp farExp v (!inp) ->
2616 name
2617 ( let _ = "suspend"
2618 in \farInp farExp v (!inp) ->
2619 name
2620 ( let _ = "suspend"
2621 in \farInp farExp v (!inp) -> do
2622 sr <- GHC.STRef.readSTRef reg
2623 do
2624 let dupv = v v sr
2625 GHC.STRef.writeSTRef reg dupv
2626 let _ = "jump"
2627 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
2628 )
2629 inp
2630 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
2631 )
2632 inp
2633 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
2634 )
2635 callInput
2636 Data.Map.Internal.Tip
2637 in let _ = "jump"
2638 in loop callReturn inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
2639 )
2640 inp
2641 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
2642 )
2643 inp
2644 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
2645 )
2646 failInp
2647 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
2648 else
2649 let _ = "choicesBranch.else"
2650 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2651 in let readFail = catchHandler
2652 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 3 failInp)
2653 then
2654 let !(#
2655 c,
2656 cs
2657 #) = readNext failInp
2658 in if (GHC.Classes.==) '\'' c
2659 then
2660 let join = \farInp farExp v (!inp) ->
2661 let readFail = readFail
2662 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 inp)
2663 then
2664 let !(#
2665 c,
2666 cs
2667 #) = readNext inp
2668 in if (GHC.Classes.==) '\'' c
2669 then
2670 name
2671 ( let _ = "suspend"
2672 in \farInp farExp v (!inp) ->
2673 let _ = "resume"
2674 in callReturn
2675 farInp
2676 farExp
2677 ( let _ = "resume.genCode"
2678 in v
2679 )
2680 inp
2681 )
2682 cs
2683 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
2684 else
2685 let _ = "checkToken.else"
2686 in let failExp =
2687 Data.Set.Internal.Bin
2688 1
2689 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2690 ( case inputToken of
2691 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '\''
2692 )
2693 )
2694 Data.Set.Internal.Tip
2695 Data.Set.Internal.Tip
2696 in let (#
2697 farInp,
2698 farExp
2699 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
2700 GHC.Types.LT ->
2701 (#
2702 inp,
2703 failExp
2704 #)
2705 GHC.Types.EQ ->
2706 (#
2707 farInp,
2708 failExp GHC.Base.<> farExp
2709 #)
2710 GHC.Types.GT ->
2711 (#
2712 farInp,
2713 farExp
2714 #)
2715 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
2716 else
2717 let _ = "checkHorizon.else"
2718 in let failExp =
2719 Data.Set.Internal.Bin
2720 1
2721 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2722 ( case inputToken of
2723 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
2724 )
2725 )
2726 Data.Set.Internal.Tip
2727 Data.Set.Internal.Tip
2728 in let (#
2729 farInp,
2730 farExp
2731 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
2732 GHC.Types.LT ->
2733 (#
2734 inp,
2735 failExp
2736 #)
2737 GHC.Types.EQ ->
2738 (#
2739 farInp,
2740 failExp GHC.Base.<> farExp
2741 #)
2742 GHC.Types.GT ->
2743 (#
2744 farInp,
2745 farExp
2746 #)
2747 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
2748 in let _ = "catch ExceptionFailure"
2749 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
2750 let _ = "catch.ko ExceptionFailure"
2751 in if ( \( Data.Text.Internal.Text
2752 _
2753 i
2754 _
2755 )
2756 ( Data.Text.Internal.Text
2757 _
2758 j
2759 _
2760 ) -> i GHC.Classes.== j
2761 )
2762 cs
2763 failInp
2764 then
2765 let _ = "choicesBranch.then"
2766 in let readFail = readFail
2767 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 3 failInp)
2768 then
2769 let !(#
2770 c,
2771 cs
2772 #) = readNext failInp
2773 in if (GHC.Classes.==) '\\' c
2774 then
2775 let readFail = readFail
2776 in let !(#
2777 c,
2778 cs
2779 #) = readNext cs
2780 in if (\t -> ('0' GHC.Classes.== t) GHC.Classes.|| (('t' GHC.Classes.== t) GHC.Classes.|| (('n' GHC.Classes.== t) GHC.Classes.|| (('v' GHC.Classes.== t) GHC.Classes.|| (('f' GHC.Classes.== t) GHC.Classes.|| (('r' GHC.Classes.== t) GHC.Classes.|| GHC.Types.False)))))) c
2781 then
2782 name
2783 ( let _ = "suspend"
2784 in \farInp farExp v (!inp) ->
2785 let _ = "resume"
2786 in join
2787 farInp
2788 farExp
2789 ( let _ = "resume.genCode"
2790 in v
2791 )
2792 inp
2793 )
2794 cs
2795 Data.Map.Internal.Tip
2796 else
2797 let _ = "checkToken.else"
2798 in let failExp =
2799 Data.Set.Internal.Bin
2800 6
2801 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2802 ( case inputToken of
2803 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'n'
2804 )
2805 )
2806 ( Data.Set.Internal.Bin
2807 2
2808 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2809 ( case inputToken of
2810 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '0'
2811 )
2812 )
2813 Data.Set.Internal.Tip
2814 ( Data.Set.Internal.Bin
2815 1
2816 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2817 ( case inputToken of
2818 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'f'
2819 )
2820 )
2821 Data.Set.Internal.Tip
2822 Data.Set.Internal.Tip
2823 )
2824 )
2825 ( Data.Set.Internal.Bin
2826 3
2827 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2828 ( case inputToken of
2829 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 't'
2830 )
2831 )
2832 ( Data.Set.Internal.Bin
2833 1
2834 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2835 ( case inputToken of
2836 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'r'
2837 )
2838 )
2839 Data.Set.Internal.Tip
2840 Data.Set.Internal.Tip
2841 )
2842 ( Data.Set.Internal.Bin
2843 1
2844 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2845 ( case inputToken of
2846 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'v'
2847 )
2848 )
2849 Data.Set.Internal.Tip
2850 Data.Set.Internal.Tip
2851 )
2852 )
2853 in let (#
2854 farInp,
2855 farExp
2856 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
2857 GHC.Types.LT ->
2858 (#
2859 cs,
2860 failExp
2861 #)
2862 GHC.Types.EQ ->
2863 (#
2864 farInp,
2865 failExp GHC.Base.<> farExp
2866 #)
2867 GHC.Types.GT ->
2868 (#
2869 farInp,
2870 farExp
2871 #)
2872 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
2873 else
2874 let _ = "checkToken.else"
2875 in let failExp =
2876 Data.Set.Internal.Bin
2877 1
2878 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2879 ( case inputToken of
2880 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '\\'
2881 )
2882 )
2883 Data.Set.Internal.Tip
2884 Data.Set.Internal.Tip
2885 in let (#
2886 farInp,
2887 farExp
2888 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
2889 GHC.Types.LT ->
2890 (#
2891 failInp,
2892 failExp
2893 #)
2894 GHC.Types.EQ ->
2895 (#
2896 farInp,
2897 failExp GHC.Base.<> farExp
2898 #)
2899 GHC.Types.GT ->
2900 (#
2901 farInp,
2902 farExp
2903 #)
2904 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2905 else
2906 let _ = "checkHorizon.else"
2907 in let failExp =
2908 Data.Set.Internal.Bin
2909 1
2910 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2911 ( case inputToken of
2912 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
2913 )
2914 )
2915 Data.Set.Internal.Tip
2916 Data.Set.Internal.Tip
2917 in let (#
2918 farInp,
2919 farExp
2920 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
2921 GHC.Types.LT ->
2922 (#
2923 failInp,
2924 failExp
2925 #)
2926 GHC.Types.EQ ->
2927 (#
2928 farInp,
2929 failExp GHC.Base.<> farExp
2930 #)
2931 GHC.Types.GT ->
2932 (#
2933 farInp,
2934 farExp
2935 #)
2936 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2937 else
2938 let _ = "choicesBranch.else"
2939 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2940 in let readFail = catchHandler
2941 in let !(#
2942 c,
2943 cs
2944 #) = readNext cs
2945 in if Parsers.Nandlang.nandStringLetter c
2946 then
2947 name
2948 ( let _ = "suspend"
2949 in \farInp farExp v (!inp) ->
2950 let _ = "resume"
2951 in join
2952 farInp
2953 farExp
2954 ( let _ = "resume.genCode"
2955 in v
2956 )
2957 inp
2958 )
2959 cs
2960 Data.Map.Internal.Tip
2961 else
2962 let _ = "checkToken.else"
2963 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
2964 else
2965 let _ = "checkToken.else"
2966 in let failExp =
2967 Data.Set.Internal.Bin
2968 1
2969 ( Symantic.Parser.Grammar.Combinators.SomeFailure
2970 ( case inputToken of
2971 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '\''
2972 )
2973 )
2974 Data.Set.Internal.Tip
2975 Data.Set.Internal.Tip
2976 in let (#
2977 farInp,
2978 farExp
2979 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
2980 GHC.Types.LT ->
2981 (#
2982 failInp,
2983 failExp
2984 #)
2985 GHC.Types.EQ ->
2986 (#
2987 farInp,
2988 failExp GHC.Base.<> farExp
2989 #)
2990 GHC.Types.GT ->
2991 (#
2992 farInp,
2993 farExp
2994 #)
2995 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
2996 else
2997 let _ = "checkHorizon.else"
2998 in let failExp =
2999 Data.Set.Internal.Bin
3000 1
3001 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3002 ( case inputToken of
3003 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
3004 )
3005 )
3006 Data.Set.Internal.Tip
3007 Data.Set.Internal.Tip
3008 in let (#
3009 farInp,
3010 farExp
3011 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
3012 GHC.Types.LT ->
3013 (#
3014 failInp,
3015 failExp
3016 #)
3017 GHC.Types.EQ ->
3018 (#
3019 farInp,
3020 failExp GHC.Base.<> farExp
3021 #)
3022 GHC.Types.GT ->
3023 (#
3024 farInp,
3025 farExp
3026 #)
3027 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3028 else
3029 let _ = "choicesBranch.else"
3030 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3031 in let join = \farInp farExp v (!inp) ->
3032 name
3033 ( let _ = "suspend"
3034 in \farInp farExp v (!inp) ->
3035 let _ = "resume"
3036 in callReturn
3037 farInp
3038 farExp
3039 ( let _ = "resume.genCode"
3040 in v
3041 )
3042 inp
3043 )
3044 inp
3045 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
3046 in let _ = "catch ExceptionFailure"
3047 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
3048 let _ = "catch.ko ExceptionFailure"
3049 in if ( \( Data.Text.Internal.Text
3050 _
3051 i
3052 _
3053 )
3054 ( Data.Text.Internal.Text
3055 _
3056 j
3057 _
3058 ) -> i GHC.Classes.== j
3059 )
3060 callInput
3061 failInp
3062 then
3063 let _ = "choicesBranch.then"
3064 in let readFail = catchHandler
3065 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 failInp)
3066 then
3067 let !(#
3068 c,
3069 cs
3070 #) = readNext failInp
3071 in if (GHC.Classes.==) '1' c
3072 then
3073 let _ = "resume"
3074 in join
3075 farInp
3076 farExp
3077 ( let _ = "resume.genCode"
3078 in '1'
3079 )
3080 cs
3081 else
3082 let _ = "checkToken.else"
3083 in let failExp =
3084 Data.Set.Internal.Bin
3085 1
3086 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3087 ( case inputToken of
3088 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '1'
3089 )
3090 )
3091 Data.Set.Internal.Tip
3092 Data.Set.Internal.Tip
3093 in let (#
3094 farInp,
3095 farExp
3096 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
3097 GHC.Types.LT ->
3098 (#
3099 failInp,
3100 failExp
3101 #)
3102 GHC.Types.EQ ->
3103 (#
3104 farInp,
3105 failExp GHC.Base.<> farExp
3106 #)
3107 GHC.Types.GT ->
3108 (#
3109 farInp,
3110 farExp
3111 #)
3112 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3113 else
3114 let _ = "checkHorizon.else"
3115 in let failExp =
3116 Data.Set.Internal.Bin
3117 1
3118 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3119 ( case inputToken of
3120 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
3121 )
3122 )
3123 Data.Set.Internal.Tip
3124 Data.Set.Internal.Tip
3125 in let (#
3126 farInp,
3127 farExp
3128 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
3129 GHC.Types.LT ->
3130 (#
3131 failInp,
3132 failExp
3133 #)
3134 GHC.Types.EQ ->
3135 (#
3136 farInp,
3137 failExp GHC.Base.<> farExp
3138 #)
3139 GHC.Types.GT ->
3140 (#
3141 farInp,
3142 farExp
3143 #)
3144 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3145 else
3146 let _ = "choicesBranch.else"
3147 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3148 in let readFail = catchHandler
3149 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 callInput)
3150 then
3151 let !(#
3152 c,
3153 cs
3154 #) = readNext callInput
3155 in if (GHC.Classes.==) '0' c
3156 then
3157 let _ = "resume"
3158 in join
3159 init
3160 Data.Set.Internal.empty
3161 ( let _ = "resume.genCode"
3162 in '0'
3163 )
3164 cs
3165 else
3166 let _ = "checkToken.else"
3167 in let failExp =
3168 Data.Set.Internal.Bin
3169 1
3170 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3171 ( case inputToken of
3172 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken '0'
3173 )
3174 )
3175 Data.Set.Internal.Tip
3176 Data.Set.Internal.Tip
3177 in let (#
3178 farInp,
3179 farExp
3180 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
3181 GHC.Types.LT ->
3182 (#
3183 callInput,
3184 failExp
3185 #)
3186 GHC.Types.EQ ->
3187 (#
3188 init,
3189 failExp GHC.Base.<> Data.Set.Internal.empty
3190 #)
3191 GHC.Types.GT ->
3192 (#
3193 init,
3194 Data.Set.Internal.empty
3195 #)
3196 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
3197 else
3198 let _ = "checkHorizon.else"
3199 in let failExp =
3200 Data.Set.Internal.Bin
3201 1
3202 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3203 ( case inputToken of
3204 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
3205 )
3206 )
3207 Data.Set.Internal.Tip
3208 Data.Set.Internal.Tip
3209 in let (#
3210 farInp,
3211 farExp
3212 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
3213 GHC.Types.LT ->
3214 (#
3215 callInput,
3216 failExp
3217 #)
3218 GHC.Types.EQ ->
3219 (#
3220 init,
3221 failExp GHC.Base.<> Data.Set.Internal.empty
3222 #)
3223 GHC.Types.GT ->
3224 (#
3225 init,
3226 Data.Set.Internal.empty
3227 #)
3228 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
3229 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
3230 let _ = "catch ExceptionFailure"
3231 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
3232 let _ = "catch.ko ExceptionFailure"
3233 in if ( \( Data.Text.Internal.Text
3234 _
3235 i
3236 _
3237 )
3238 ( Data.Text.Internal.Text
3239 _
3240 j
3241 _
3242 ) -> i GHC.Classes.== j
3243 )
3244 callInput
3245 failInp
3246 then
3247 let _ = "choicesBranch.then"
3248 in let _ = "jump"
3249 in name callReturn failInp Data.Map.Internal.Tip
3250 else
3251 let _ = "choicesBranch.else"
3252 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3253 in name
3254 ( let _ = "suspend"
3255 in \farInp farExp v (!inp) -> do
3256 let dupv = \x -> x
3257 reg <- GHC.STRef.newSTRef dupv
3258 let _ = "iter"
3259 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
3260 if ( \( Data.Text.Internal.Text
3261 _
3262 i
3263 _
3264 )
3265 ( Data.Text.Internal.Text
3266 _
3267 j
3268 _
3269 ) -> i GHC.Classes.== j
3270 )
3271 loopInput
3272 failInp
3273 then
3274 let _ = "choicesBranch.then"
3275 in do
3276 sr <- GHC.STRef.readSTRef reg
3277 name
3278 ( let _ = "suspend"
3279 in \farInp farExp v (!inp) ->
3280 name
3281 ( let _ = "suspend"
3282 in \farInp farExp v (!inp) ->
3283 let _ = "resume"
3284 in callReturn
3285 farInp
3286 farExp
3287 ( let _ = "resume.genCode"
3288 in GHC.Tuple . ()
3289 )
3290 inp
3291 )
3292 inp
3293 Data.Map.Internal.Tip
3294 )
3295 failInp
3296 Data.Map.Internal.Tip
3297 else
3298 let _ = "choicesBranch.else"
3299 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3300 loop = \_callReturn callInput callCatchStackByLabel ->
3301 name
3302 ( let _ = "suspend"
3303 in \farInp farExp v (!inp) ->
3304 name
3305 ( let _ = "suspend"
3306 in \farInp farExp v (!inp) ->
3307 name
3308 ( let _ = "suspend"
3309 in \farInp farExp v (!inp) -> do
3310 sr <- GHC.STRef.readSTRef reg
3311 do
3312 let dupv = v v sr
3313 GHC.STRef.writeSTRef reg dupv
3314 let _ = "jump"
3315 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
3316 )
3317 inp
3318 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
3319 )
3320 inp
3321 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
3322 )
3323 callInput
3324 Data.Map.Internal.Tip
3325 in let _ = "jump"
3326 in loop callReturn inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
3327 )
3328 callInput
3329 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
3330 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
3331 let _ = "resume"
3332 in callReturn
3333 init
3334 Data.Set.Internal.empty
3335 ( let _ = "resume.genCode"
3336 in GHC.Tuple . ()
3337 )
3338 callInput
3339 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
3340 let _ = "resume"
3341 in callReturn
3342 init
3343 Data.Set.Internal.empty
3344 ( let _ = "resume.genCode"
3345 in GHC.Tuple . ()
3346 )
3347 callInput
3348 name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
3349 let _ = "resume"
3350 in callReturn
3351 init
3352 Data.Set.Internal.empty
3353 ( let _ = "resume.genCode"
3354 in \x -> \x -> x
3355 )
3356 callInput
3357 in name
3358 ( let _ = "suspend"
3359 in \farInp farExp v (!inp) -> do
3360 let dupv = \x -> x
3361 reg <- GHC.STRef.newSTRef dupv
3362 let _ = "iter"
3363 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
3364 if ( \( Data.Text.Internal.Text
3365 _
3366 i
3367 _
3368 )
3369 ( Data.Text.Internal.Text
3370 _
3371 j
3372 _
3373 ) -> i GHC.Classes.== j
3374 )
3375 loopInput
3376 failInp
3377 then
3378 let _ = "choicesBranch.then"
3379 in do
3380 sr <- GHC.STRef.readSTRef reg
3381 name
3382 ( let _ = "suspend"
3383 in \farInp farExp v (!inp) ->
3384 name
3385 ( let _ = "suspend"
3386 in \farInp farExp v (!inp) ->
3387 let join = \farInp farExp v (!inp) ->
3388 let _ = "resume"
3389 in finalRet
3390 farInp
3391 farExp
3392 ( let _ = "resume.genCode"
3393 in GHC.Show.show v
3394 )
3395 inp
3396 in let _ = "catch ExceptionFailure"
3397 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
3398 let _ = "catch.ko ExceptionFailure"
3399 in if ( \( Data.Text.Internal.Text
3400 _
3401 i
3402 _
3403 )
3404 ( Data.Text.Internal.Text
3405 _
3406 j
3407 _
3408 ) -> i GHC.Classes.== j
3409 )
3410 inp
3411 failInp
3412 then
3413 let _ = "choicesBranch.then"
3414 in let failExp = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure Symantic.Parser.Grammar.Combinators.FailureEnd) Data.Set.Internal.Tip Data.Set.Internal.Tip
3415 in let (#
3416 farInp,
3417 farExp
3418 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
3419 GHC.Types.LT ->
3420 (#
3421 failInp,
3422 failExp
3423 #)
3424 GHC.Types.EQ ->
3425 (#
3426 farInp,
3427 failExp GHC.Base.<> farExp
3428 #)
3429 GHC.Types.GT ->
3430 (#
3431 farInp,
3432 farExp
3433 #)
3434 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3435 else
3436 let _ = "choicesBranch.else"
3437 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3438 in let _ = "catch ExceptionFailure"
3439 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
3440 let _ = "catch.ko ExceptionFailure"
3441 in let _ = "resume"
3442 in join
3443 farInp
3444 farExp
3445 ( let _ = "resume.genCode"
3446 in GHC.Tuple . ()
3447 )
3448 inp
3449 in let readFail = catchHandler
3450 in if readMore inp
3451 then
3452 let !(#
3453 c,
3454 cs
3455 #) = readNext inp
3456 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
3457 else
3458 let _ = "checkHorizon.else"
3459 in let failExp =
3460 Data.Set.Internal.Bin
3461 1
3462 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3463 ( case inputToken of
3464 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
3465 )
3466 )
3467 Data.Set.Internal.Tip
3468 Data.Set.Internal.Tip
3469 in let (#
3470 farInp,
3471 farExp
3472 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
3473 GHC.Types.LT ->
3474 (#
3475 inp,
3476 failExp
3477 #)
3478 GHC.Types.EQ ->
3479 (#
3480 farInp,
3481 failExp GHC.Base.<> farExp
3482 #)
3483 GHC.Types.GT ->
3484 (#
3485 farInp,
3486 farExp
3487 #)
3488 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
3489 )
3490 inp
3491 Data.Map.Internal.Tip
3492 )
3493 failInp
3494 Data.Map.Internal.Tip
3495 else
3496 let _ = "choicesBranch.else"
3497 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3498 loop = \_callReturn callInput callCatchStackByLabel ->
3499 let _ = "catch ExceptionFailure"
3500 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
3501 let _ = "catch.ko ExceptionFailure"
3502 in catchHandler callInput Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
3503 in let readFail = catchHandler
3504 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 17 callInput)
3505 then
3506 let !(#
3507 c,
3508 cs
3509 #) = readNext callInput
3510 in if (GHC.Classes.==) 'f' c
3511 then
3512 let readFail = readFail
3513 in let !(#
3514 c,
3515 cs
3516 #) = readNext cs
3517 in if (GHC.Classes.==) 'u' c
3518 then
3519 let readFail = readFail
3520 in let !(#
3521 c,
3522 cs
3523 #) = readNext cs
3524 in if (GHC.Classes.==) 'n' c
3525 then
3526 let readFail = readFail
3527 in let !(#
3528 c,
3529 cs
3530 #) = readNext cs
3531 in if (GHC.Classes.==) 'c' c
3532 then
3533 let readFail = readFail
3534 in let !(#
3535 c,
3536 cs
3537 #) = readNext cs
3538 in if (GHC.Classes.==) 't' c
3539 then
3540 let readFail = readFail
3541 in let !(#
3542 c,
3543 cs
3544 #) = readNext cs
3545 in if (GHC.Classes.==) 'i' c
3546 then
3547 let readFail = readFail
3548 in let !(#
3549 c,
3550 cs
3551 #) = readNext cs
3552 in if (GHC.Classes.==) 'o' c
3553 then
3554 let readFail = readFail
3555 in let !(#
3556 c,
3557 cs
3558 #) = readNext cs
3559 in if (GHC.Classes.==) 'n' c
3560 then
3561 name
3562 ( let _ = "suspend"
3563 in \farInp farExp v (!inp) ->
3564 name
3565 ( let _ = "suspend"
3566 in \farInp farExp v (!inp) ->
3567 name
3568 ( let _ = "suspend"
3569 in \farInp farExp v (!inp) ->
3570 name
3571 ( let _ = "suspend"
3572 in \farInp farExp v (!inp) ->
3573 let join = \farInp farExp v (!inp) ->
3574 name
3575 ( let _ = "suspend"
3576 in \farInp farExp v (!inp) ->
3577 name
3578 ( let _ = "suspend"
3579 in \farInp farExp v (!inp) -> do
3580 sr <- GHC.STRef.readSTRef reg
3581 do
3582 let dupv = sr
3583 GHC.STRef.writeSTRef reg dupv
3584 let _ = "jump"
3585 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
3586 )
3587 inp
3588 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
3589 )
3590 inp
3591 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
3592 in let _ = "catch ExceptionFailure"
3593 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
3594 let _ = "catch.ko ExceptionFailure"
3595 in if ( \( Data.Text.Internal.Text
3596 _
3597 i
3598 _
3599 )
3600 ( Data.Text.Internal.Text
3601 _
3602 j
3603 _
3604 ) -> i GHC.Classes.== j
3605 )
3606 inp
3607 failInp
3608 then
3609 let _ = "choicesBranch.then"
3610 in name
3611 ( let _ = "suspend"
3612 in \farInp farExp v (!inp) ->
3613 let _ = "resume"
3614 in join
3615 farInp
3616 farExp
3617 ( let _ = "resume.genCode"
3618 in v
3619 )
3620 inp
3621 )
3622 failInp
3623 Data.Map.Internal.Tip
3624 else
3625 let _ = "choicesBranch.else"
3626 in catchHandler callInput Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
3627 in let readFail = catchHandler
3628 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 7 inp)
3629 then
3630 let !(#
3631 c,
3632 cs
3633 #) = readNext inp
3634 in if (GHC.Classes.==) ':' c
3635 then
3636 name
3637 ( let _ = "suspend"
3638 in \farInp farExp v (!inp) ->
3639 name
3640 ( let _ = "suspend"
3641 in \farInp farExp v (!inp) ->
3642 let _ = "resume"
3643 in join
3644 farInp
3645 farExp
3646 ( let _ = "resume.genCode"
3647 in GHC.Tuple . ()
3648 )
3649 inp
3650 )
3651 inp
3652 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
3653 )
3654 cs
3655 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
3656 else
3657 let _ = "checkToken.else"
3658 in let failExp =
3659 Data.Set.Internal.Bin
3660 1
3661 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3662 ( case inputToken of
3663 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken ':'
3664 )
3665 )
3666 Data.Set.Internal.Tip
3667 Data.Set.Internal.Tip
3668 in let (#
3669 farInp,
3670 farExp
3671 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
3672 GHC.Types.LT ->
3673 (#
3674 inp,
3675 failExp
3676 #)
3677 GHC.Types.EQ ->
3678 (#
3679 farInp,
3680 failExp GHC.Base.<> farExp
3681 #)
3682 GHC.Types.GT ->
3683 (#
3684 farInp,
3685 farExp
3686 #)
3687 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
3688 else
3689 let _ = "checkHorizon.else"
3690 in let failExp =
3691 Data.Set.Internal.Bin
3692 1
3693 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3694 ( case inputToken of
3695 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 8
3696 )
3697 )
3698 Data.Set.Internal.Tip
3699 Data.Set.Internal.Tip
3700 in let (#
3701 farInp,
3702 farExp
3703 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
3704 GHC.Types.LT ->
3705 (#
3706 inp,
3707 failExp
3708 #)
3709 GHC.Types.EQ ->
3710 (#
3711 farInp,
3712 failExp GHC.Base.<> farExp
3713 #)
3714 GHC.Types.GT ->
3715 (#
3716 farInp,
3717 farExp
3718 #)
3719 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
3720 )
3721 inp
3722 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
3723 )
3724 inp
3725 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
3726 )
3727 inp
3728 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
3729 )
3730 cs
3731 Data.Map.Internal.Tip
3732 else
3733 let _ = "checkToken.else"
3734 in let failExp =
3735 Data.Set.Internal.Bin
3736 1
3737 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3738 ( case inputToken of
3739 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'n'
3740 )
3741 )
3742 Data.Set.Internal.Tip
3743 Data.Set.Internal.Tip
3744 in let (#
3745 farInp,
3746 farExp
3747 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
3748 GHC.Types.LT ->
3749 (#
3750 cs,
3751 failExp
3752 #)
3753 GHC.Types.EQ ->
3754 (#
3755 farInp,
3756 failExp GHC.Base.<> farExp
3757 #)
3758 GHC.Types.GT ->
3759 (#
3760 farInp,
3761 farExp
3762 #)
3763 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
3764 else
3765 let _ = "checkToken.else"
3766 in let failExp =
3767 Data.Set.Internal.Bin
3768 1
3769 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3770 ( case inputToken of
3771 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'o'
3772 )
3773 )
3774 Data.Set.Internal.Tip
3775 Data.Set.Internal.Tip
3776 in let (#
3777 farInp,
3778 farExp
3779 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
3780 GHC.Types.LT ->
3781 (#
3782 cs,
3783 failExp
3784 #)
3785 GHC.Types.EQ ->
3786 (#
3787 farInp,
3788 failExp GHC.Base.<> farExp
3789 #)
3790 GHC.Types.GT ->
3791 (#
3792 farInp,
3793 farExp
3794 #)
3795 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
3796 else
3797 let _ = "checkToken.else"
3798 in let failExp =
3799 Data.Set.Internal.Bin
3800 1
3801 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3802 ( case inputToken of
3803 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'i'
3804 )
3805 )
3806 Data.Set.Internal.Tip
3807 Data.Set.Internal.Tip
3808 in let (#
3809 farInp,
3810 farExp
3811 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
3812 GHC.Types.LT ->
3813 (#
3814 cs,
3815 failExp
3816 #)
3817 GHC.Types.EQ ->
3818 (#
3819 farInp,
3820 failExp GHC.Base.<> farExp
3821 #)
3822 GHC.Types.GT ->
3823 (#
3824 farInp,
3825 farExp
3826 #)
3827 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
3828 else
3829 let _ = "checkToken.else"
3830 in let failExp =
3831 Data.Set.Internal.Bin
3832 1
3833 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3834 ( case inputToken of
3835 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 't'
3836 )
3837 )
3838 Data.Set.Internal.Tip
3839 Data.Set.Internal.Tip
3840 in let (#
3841 farInp,
3842 farExp
3843 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
3844 GHC.Types.LT ->
3845 (#
3846 cs,
3847 failExp
3848 #)
3849 GHC.Types.EQ ->
3850 (#
3851 farInp,
3852 failExp GHC.Base.<> farExp
3853 #)
3854 GHC.Types.GT ->
3855 (#
3856 farInp,
3857 farExp
3858 #)
3859 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
3860 else
3861 let _ = "checkToken.else"
3862 in let failExp =
3863 Data.Set.Internal.Bin
3864 1
3865 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3866 ( case inputToken of
3867 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'c'
3868 )
3869 )
3870 Data.Set.Internal.Tip
3871 Data.Set.Internal.Tip
3872 in let (#
3873 farInp,
3874 farExp
3875 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
3876 GHC.Types.LT ->
3877 (#
3878 cs,
3879 failExp
3880 #)
3881 GHC.Types.EQ ->
3882 (#
3883 farInp,
3884 failExp GHC.Base.<> farExp
3885 #)
3886 GHC.Types.GT ->
3887 (#
3888 farInp,
3889 farExp
3890 #)
3891 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
3892 else
3893 let _ = "checkToken.else"
3894 in let failExp =
3895 Data.Set.Internal.Bin
3896 1
3897 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3898 ( case inputToken of
3899 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'n'
3900 )
3901 )
3902 Data.Set.Internal.Tip
3903 Data.Set.Internal.Tip
3904 in let (#
3905 farInp,
3906 farExp
3907 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
3908 GHC.Types.LT ->
3909 (#
3910 cs,
3911 failExp
3912 #)
3913 GHC.Types.EQ ->
3914 (#
3915 farInp,
3916 failExp GHC.Base.<> farExp
3917 #)
3918 GHC.Types.GT ->
3919 (#
3920 farInp,
3921 farExp
3922 #)
3923 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
3924 else
3925 let _ = "checkToken.else"
3926 in let failExp =
3927 Data.Set.Internal.Bin
3928 1
3929 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3930 ( case inputToken of
3931 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'u'
3932 )
3933 )
3934 Data.Set.Internal.Tip
3935 Data.Set.Internal.Tip
3936 in let (#
3937 farInp,
3938 farExp
3939 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
3940 GHC.Types.LT ->
3941 (#
3942 cs,
3943 failExp
3944 #)
3945 GHC.Types.EQ ->
3946 (#
3947 farInp,
3948 failExp GHC.Base.<> farExp
3949 #)
3950 GHC.Types.GT ->
3951 (#
3952 farInp,
3953 farExp
3954 #)
3955 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
3956 else
3957 let _ = "checkToken.else"
3958 in let failExp =
3959 Data.Set.Internal.Bin
3960 1
3961 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3962 ( case inputToken of
3963 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'f'
3964 )
3965 )
3966 Data.Set.Internal.Tip
3967 Data.Set.Internal.Tip
3968 in let (#
3969 farInp,
3970 farExp
3971 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp callInput of
3972 GHC.Types.LT ->
3973 (#
3974 callInput,
3975 failExp
3976 #)
3977 GHC.Types.EQ ->
3978 (#
3979 farInp,
3980 failExp GHC.Base.<> farExp
3981 #)
3982 GHC.Types.GT ->
3983 (#
3984 farInp,
3985 farExp
3986 #)
3987 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
3988 else
3989 let _ = "checkHorizon.else"
3990 in let failExp =
3991 Data.Set.Internal.Bin
3992 1
3993 ( Symantic.Parser.Grammar.Combinators.SomeFailure
3994 ( case inputToken of
3995 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 18
3996 )
3997 )
3998 Data.Set.Internal.Tip
3999 Data.Set.Internal.Tip
4000 in let (#
4001 farInp,
4002 farExp
4003 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp callInput of
4004 GHC.Types.LT ->
4005 (#
4006 callInput,
4007 failExp
4008 #)
4009 GHC.Types.EQ ->
4010 (#
4011 farInp,
4012 failExp GHC.Base.<> farExp
4013 #)
4014 GHC.Types.GT ->
4015 (#
4016 farInp,
4017 farExp
4018 #)
4019 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
4020 in let _ = "jump"
4021 in loop finalRet inp Data.Map.Internal.Tip
4022 )
4023 init
4024 Data.Map.Internal.Tip
4025 )