]> Git — Sourcephile - haskell/symantic-parser.git/blob - tests/Golden/Splice/G19.expected.txt
iface: add `HideName` instances
[haskell/symantic-parser.git] / tests / Golden / Splice / G19.expected.txt
1 \(input :: inp) ->
2 let !(#
3 initBuffer,
4 initPos,
5 readMore,
6 readNext,
7 append
8 #) =
9 let next buf pos =
10 let !( Data.Text.Unsafe.Iter
11 c
12 d
13 ) = Symantic.Parser.Machine.Input.Text.Buffer.iter buf pos
14 in (# c, pos GHC.Num.+ d #)
15 more buf pos = pos GHC.Classes.< Symantic.Parser.Machine.Input.Text.Buffer.length buf
16 append = Symantic.Parser.Machine.Input.Text.Buffer.pappend
17 in (#
18 Symantic.Parser.Machine.Input.Text.Buffer.buffer input,
19 0,
20 more,
21 next,
22 append
23 #)
24 finalRet = \_farInp _farExp v _inp _buf _end -> Symantic.Parser.Machine.Generate.returnST GHC.Base.$ Symantic.Parser.Machine.Generate.ResultDone v
25 finalRaise :: Symantic.Parser.Machine.Generate.ForallOnException inp =
26 Symantic.Parser.Machine.Generate.ForallOnException GHC.Base.$
27 ( \(!exn) _failInp (!farInp) (!farExp) buf end ->
28 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
29 Symantic.Parser.Machine.Generate.ResultError
30 Symantic.Parser.Machine.Generate.ParsingError
31 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.position farInp,
32 Symantic.Parser.Machine.Generate.parsingErrorException = exn,
33 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
34 if readMore buf farInp
35 then
36 GHC.Maybe.Just
37 ( let (#
38 c,
39 _
40 #) = readNext buf farInp
41 in c
42 )
43 else GHC.Maybe.Nothing,
44 Symantic.Parser.Machine.Generate.parsingErrorExpecting =
45 let ( minHoriz,
46 res
47 ) =
48 Data.Set.Internal.foldr
49 ( \f
50 ( minH,
51 acc
52 ) -> case Symantic.Parser.Grammar.Combinators.unSomeFailure f of
53 GHC.Maybe.Just (Symantic.Parser.Grammar.Combinators.FailureHorizon h :: Symantic.Parser.Grammar.Combinators.Failure (Symantic.Parser.Grammar.Combinators.CombSatisfiable (Symantic.Parser.Machine.Input.InputToken inp)))
54 | GHC.Maybe.Just old <- minH ->
55 ( GHC.Maybe.Just (GHC.Classes.min old h),
56 acc
57 )
58 | GHC.Base.otherwise ->
59 ( GHC.Maybe.Just h,
60 acc
61 )
62 _ ->
63 ( minH,
64 f GHC.Types.: acc
65 )
66 )
67 ( GHC.Maybe.Nothing,
68 GHC.Types . []
69 )
70 farExp
71 in Data.Set.Internal.fromList GHC.Base.$
72 ( case minHoriz of
73 GHC.Maybe.Just h -> Symantic.Parser.Grammar.Combinators.SomeFailure (Symantic.Parser.Grammar.Combinators.FailureHorizon @(Symantic.Parser.Machine.Input.InputToken inp) h) GHC.Types.: res
74 GHC.Maybe.Nothing -> res
75 )
76 }
77 )
78 in let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp)
79 in let partialCont buf =
80 let readFail = Symantic.Parser.Machine.Generate.unForallOnException finalRaise
81 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=2"
82 in if readMore buf ((GHC.Num.+) @GHC.Types.Int 1 initPos)
83 then
84 let
85 in let _ = "pushValue"
86 in let join = \farInp farExp v (!inp) buf end ->
87 let _ = "lift2Value checkedHorizon=0"
88 in let _ = "resume"
89 in finalRet
90 farInp
91 farExp
92 ( let _ = "resume.genCode"
93 in GHC.Show.show v
94 )
95 inp
96 buf
97 end
98 in let _ = "catch ExceptionFailure checkedHorizon=2"
99 in let onException =
100 let _ = "onException"
101 in \(!_exn) (!failInp) (!farInp) (!farExp) buf end ->
102 let _ = "comment: raiseAgainIfConsumed"
103 in let _ = "saveInput checkedHorizon=0"
104 in let _ = "lift2Value checkedHorizon=0"
105 in if (GHC.Classes.==) @GHC.Types.Int initPos failInp
106 then
107 let _ = "choicesBranch checkedHorizon=0"
108 in let _ = "catch ExceptionFailure checkedHorizon=0"
109 in let onException =
110 let _ = "onException"
111 in \(!_exn) (!failInp) (!farInp) (!farExp) buf end ->
112 let _ = "comment: raiseAgainIfConsumed"
113 in let _ = "saveInput checkedHorizon=0"
114 in let _ = "lift2Value checkedHorizon=0"
115 in if (GHC.Classes.==) @GHC.Types.Int failInp failInp
116 then
117 let _ = "choicesBranch checkedHorizon=0"
118 in let _ = "catch ExceptionFailure checkedHorizon=0"
119 in let onException =
120 let _ = "onException"
121 in \(!_exn) (!failInp) (!farInp) (!farExp) buf end ->
122 let _ = "loadInput checkedHorizon=0"
123 in let _ = "checkHorizon.noCheck"
124 in Symantic.Parser.Machine.Generate.unForallOnException finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp buf end
125 in let _ = "pushValue"
126 in let _ = "comment: satisfy ((GHC.Classes.==) 'f')"
127 in let partialCont buf =
128 let readFail = onException
129 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=4"
130 in if readMore buf ((GHC.Num.+) @GHC.Types.Int 3 failInp)
131 then
132 let _ = "checkToken"
133 in let !(#
134 c,
135 cs
136 #) = readNext buf failInp
137 in if (GHC.Classes.==) 'f' c
138 then
139 let _ = "lift2Value checkedHorizon=4"
140 in let _ = "comment: satisfy ((GHC.Classes.==) 'g')"
141 in let _ = "checkHorizon.oldCheck: checkedHorizon=4"
142 in let _ = "checkToken"
143 in let !(#
144 c,
145 cs
146 #) = readNext buf cs
147 in if (GHC.Classes.==) 'g' c
148 then
149 let _ = "lift2Value checkedHorizon=3"
150 in let _ = "comment: satisfy ((GHC.Classes.==) 'h')"
151 in let _ = "checkHorizon.oldCheck: checkedHorizon=3"
152 in let _ = "checkToken"
153 in let !(#
154 c,
155 cs
156 #) = readNext buf cs
157 in if (GHC.Classes.==) 'h' c
158 then
159 let _ = "lift2Value checkedHorizon=2"
160 in let _ = "comment: satisfy ((GHC.Classes.==) 'i')"
161 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
162 in let _ = "checkToken"
163 in let !(#
164 c,
165 cs
166 #) = readNext buf cs
167 in if (GHC.Classes.==) 'i' c
168 then
169 let _ = "lift2Value checkedHorizon=1"
170 in let _ = "commit"
171 in let _ = "resume"
172 in join
173 farInp
174 farExp
175 ( let _ = "resume.genCode"
176 in (GHC.Types.:) 'f' ((GHC.Types.:) 'g' ((GHC.Types.:) 'h' ((GHC.Types.:) 'i' GHC.Types . [])))
177 )
178 cs
179 buf
180 end
181 else
182 let _ = "checkToken.fail"
183 in let failExp =
184 Data.Set.Internal.Bin
185 1
186 ( Symantic.Parser.Grammar.Combinators.SomeFailure
187 ( case inputToken of
188 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'i'
189 )
190 )
191 Data.Set.Internal.Tip
192 Data.Set.Internal.Tip
193 in let (#
194 farInp,
195 farExp
196 #) = case GHC.Classes.compare @GHC.Types.Int farInp cs of
197 GHC.Types.LT ->
198 (#
199 cs,
200 failExp
201 #)
202 GHC.Types.EQ ->
203 (#
204 farInp,
205 failExp GHC.Base.<> farExp
206 #)
207 GHC.Types.GT ->
208 (#
209 farInp,
210 farExp
211 #)
212 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp buf end
213 else
214 let _ = "checkToken.fail"
215 in let failExp =
216 Data.Set.Internal.Bin
217 1
218 ( Symantic.Parser.Grammar.Combinators.SomeFailure
219 ( case inputToken of
220 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'h'
221 )
222 )
223 Data.Set.Internal.Tip
224 Data.Set.Internal.Tip
225 in let (#
226 farInp,
227 farExp
228 #) = case GHC.Classes.compare @GHC.Types.Int farInp cs of
229 GHC.Types.LT ->
230 (#
231 cs,
232 failExp
233 #)
234 GHC.Types.EQ ->
235 (#
236 farInp,
237 failExp GHC.Base.<> farExp
238 #)
239 GHC.Types.GT ->
240 (#
241 farInp,
242 farExp
243 #)
244 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp buf end
245 else
246 let _ = "checkToken.fail"
247 in let failExp =
248 Data.Set.Internal.Bin
249 1
250 ( Symantic.Parser.Grammar.Combinators.SomeFailure
251 ( case inputToken of
252 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'g'
253 )
254 )
255 Data.Set.Internal.Tip
256 Data.Set.Internal.Tip
257 in let (#
258 farInp,
259 farExp
260 #) = case GHC.Classes.compare @GHC.Types.Int farInp cs of
261 GHC.Types.LT ->
262 (#
263 cs,
264 failExp
265 #)
266 GHC.Types.EQ ->
267 (#
268 farInp,
269 failExp GHC.Base.<> farExp
270 #)
271 GHC.Types.GT ->
272 (#
273 farInp,
274 farExp
275 #)
276 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp buf end
277 else
278 let _ = "checkToken.fail"
279 in let failExp =
280 Data.Set.Internal.Bin
281 1
282 ( Symantic.Parser.Grammar.Combinators.SomeFailure
283 ( case inputToken of
284 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'f'
285 )
286 )
287 Data.Set.Internal.Tip
288 Data.Set.Internal.Tip
289 in let (#
290 farInp,
291 farExp
292 #) = case GHC.Classes.compare @GHC.Types.Int farInp failInp of
293 GHC.Types.LT ->
294 (#
295 failInp,
296 failExp
297 #)
298 GHC.Types.EQ ->
299 (#
300 farInp,
301 failExp GHC.Base.<> farExp
302 #)
303 GHC.Types.GT ->
304 (#
305 farInp,
306 farExp
307 #)
308 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp buf end
309 else
310 let _ = "checkHorizon.newCheck.fail"
311 in let noMoreInput =
312 let failExp =
313 Data.Set.Internal.Bin
314 1
315 ( Symantic.Parser.Grammar.Combinators.SomeFailure
316 ( case inputToken of
317 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
318 )
319 )
320 Data.Set.Internal.Tip
321 Data.Set.Internal.Tip
322 in let (#
323 farInp,
324 farExp
325 #) = case GHC.Classes.compare @GHC.Types.Int farInp failInp of
326 GHC.Types.LT ->
327 (#
328 failInp,
329 failExp
330 #)
331 GHC.Types.EQ ->
332 (#
333 farInp,
334 failExp GHC.Base.<> farExp
335 #)
336 GHC.Types.GT ->
337 (#
338 farInp,
339 farExp
340 #)
341 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp buf GHC.Types.True
342 in if end
343 then noMoreInput
344 else
345 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
346 ( Symantic.Parser.Machine.Generate.ResultPartial GHC.Base.$
347 ( \newInput ->
348 if Symantic.Parser.Machine.Input.nullInput newInput
349 then noMoreInput
350 else partialCont (append buf newInput)
351 )
352 )
353 in partialCont buf
354 else
355 let _ = "choicesBranch.else"
356 in Symantic.Parser.Machine.Generate.unForallOnException finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp buf end
357 in let _ = "catch ExceptionFailure checkedHorizon=0"
358 in let onException =
359 let _ = "onException"
360 in \(!_exn) (!failInp) (!farInp) (!farExp) buf end ->
361 let _ = "loadInput checkedHorizon=0"
362 in let _ = "checkHorizon.noCheck"
363 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp buf end
364 in let _ = "pushValue"
365 in let _ = "comment: satisfy ((GHC.Classes.==) 'd')"
366 in let partialCont buf =
367 let readFail = onException
368 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=2"
369 in if readMore buf ((GHC.Num.+) @GHC.Types.Int 1 failInp)
370 then
371 let _ = "checkToken"
372 in let !(#
373 c,
374 cs
375 #) = readNext buf failInp
376 in if (GHC.Classes.==) 'd' c
377 then
378 let _ = "lift2Value checkedHorizon=2"
379 in let _ = "comment: satisfy ((GHC.Classes.==) 'e')"
380 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
381 in let _ = "checkToken"
382 in let !(#
383 c,
384 cs
385 #) = readNext buf cs
386 in if (GHC.Classes.==) 'e' c
387 then
388 let _ = "lift2Value checkedHorizon=1"
389 in let _ = "commit"
390 in let _ = "commit"
391 in let _ = "resume"
392 in join
393 farInp
394 farExp
395 ( let _ = "resume.genCode"
396 in (GHC.Types.:) 'd' ((GHC.Types.:) 'e' GHC.Types . [])
397 )
398 cs
399 buf
400 end
401 else
402 let _ = "checkToken.fail"
403 in let failExp =
404 Data.Set.Internal.Bin
405 1
406 ( Symantic.Parser.Grammar.Combinators.SomeFailure
407 ( case inputToken of
408 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'e'
409 )
410 )
411 Data.Set.Internal.Tip
412 Data.Set.Internal.Tip
413 in let (#
414 farInp,
415 farExp
416 #) = case GHC.Classes.compare @GHC.Types.Int farInp cs of
417 GHC.Types.LT ->
418 (#
419 cs,
420 failExp
421 #)
422 GHC.Types.EQ ->
423 (#
424 farInp,
425 failExp GHC.Base.<> farExp
426 #)
427 GHC.Types.GT ->
428 (#
429 farInp,
430 farExp
431 #)
432 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp buf end
433 else
434 let _ = "checkToken.fail"
435 in let failExp =
436 Data.Set.Internal.Bin
437 1
438 ( Symantic.Parser.Grammar.Combinators.SomeFailure
439 ( case inputToken of
440 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'd'
441 )
442 )
443 Data.Set.Internal.Tip
444 Data.Set.Internal.Tip
445 in let (#
446 farInp,
447 farExp
448 #) = case GHC.Classes.compare @GHC.Types.Int farInp failInp of
449 GHC.Types.LT ->
450 (#
451 failInp,
452 failExp
453 #)
454 GHC.Types.EQ ->
455 (#
456 farInp,
457 failExp GHC.Base.<> farExp
458 #)
459 GHC.Types.GT ->
460 (#
461 farInp,
462 farExp
463 #)
464 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp buf end
465 else
466 let _ = "checkHorizon.newCheck.fail"
467 in let noMoreInput =
468 let failExp =
469 Data.Set.Internal.Bin
470 1
471 ( Symantic.Parser.Grammar.Combinators.SomeFailure
472 ( case inputToken of
473 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
474 )
475 )
476 Data.Set.Internal.Tip
477 Data.Set.Internal.Tip
478 in let (#
479 farInp,
480 farExp
481 #) = case GHC.Classes.compare @GHC.Types.Int farInp failInp of
482 GHC.Types.LT ->
483 (#
484 failInp,
485 failExp
486 #)
487 GHC.Types.EQ ->
488 (#
489 farInp,
490 failExp GHC.Base.<> farExp
491 #)
492 GHC.Types.GT ->
493 (#
494 farInp,
495 farExp
496 #)
497 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp buf GHC.Types.True
498 in if end
499 then noMoreInput
500 else
501 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
502 ( Symantic.Parser.Machine.Generate.ResultPartial GHC.Base.$
503 ( \newInput ->
504 if Symantic.Parser.Machine.Input.nullInput newInput
505 then noMoreInput
506 else partialCont (append buf newInput)
507 )
508 )
509 in partialCont buf
510 else
511 let _ = "choicesBranch.else"
512 in Symantic.Parser.Machine.Generate.unForallOnException finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp buf end
513 in let _ = "catch ExceptionFailure checkedHorizon=2"
514 in let onException =
515 let _ = "onException"
516 in \(!_exn) (!failInp) (!farInp) (!farExp) buf end ->
517 let _ = "loadInput checkedHorizon=2"
518 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
519 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure initPos farInp farExp buf end
520 in let _ = "pushValue"
521 in let _ = "comment: satisfy ((GHC.Classes.==) 'a')"
522 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
523 in let _ = "checkToken"
524 in let !(#
525 c,
526 cs
527 #) = readNext buf initPos
528 in if (GHC.Classes.==) 'a' c
529 then
530 let _ = "lift2Value checkedHorizon=1"
531 in let _ = "comment: satisfy ((GHC.Classes.==) 'b')"
532 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
533 in let _ = "checkToken"
534 in let !(#
535 c,
536 cs
537 #) = readNext buf cs
538 in if (GHC.Classes.==) 'b' c
539 then
540 let _ = "lift2Value checkedHorizon=0"
541 in let _ = "comment: satisfy ((GHC.Classes.==) 'c')"
542 in let partialCont buf =
543 let readFail = onException
544 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
545 in if readMore buf cs
546 then
547 let _ = "checkToken"
548 in let !(#
549 c,
550 cs
551 #) = readNext buf cs
552 in if (GHC.Classes.==) 'c' c
553 then
554 let _ = "lift2Value checkedHorizon=1"
555 in let _ = "commit"
556 in let _ = "commit"
557 in let _ = "resume"
558 in join
559 initPos
560 Data.Set.Internal.empty
561 ( let _ = "resume.genCode"
562 in (GHC.Types.:) 'a' ((GHC.Types.:) 'b' ((GHC.Types.:) 'c' GHC.Types . []))
563 )
564 cs
565 buf
566 GHC.Types.False
567 else
568 let _ = "checkToken.fail"
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 'c'
575 )
576 )
577 Data.Set.Internal.Tip
578 Data.Set.Internal.Tip
579 in let (#
580 farInp,
581 farExp
582 #) = case GHC.Classes.compare @GHC.Types.Int initPos cs of
583 GHC.Types.LT ->
584 (#
585 cs,
586 failExp
587 #)
588 GHC.Types.EQ ->
589 (#
590 initPos,
591 failExp GHC.Base.<> Data.Set.Internal.empty
592 #)
593 GHC.Types.GT ->
594 (#
595 initPos,
596 Data.Set.Internal.empty
597 #)
598 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp buf GHC.Types.False
599 else
600 let _ = "checkHorizon.newCheck.fail"
601 in let noMoreInput =
602 let failExp =
603 Data.Set.Internal.Bin
604 1
605 ( Symantic.Parser.Grammar.Combinators.SomeFailure
606 ( case inputToken of
607 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
608 )
609 )
610 Data.Set.Internal.Tip
611 Data.Set.Internal.Tip
612 in let (#
613 farInp,
614 farExp
615 #) = case GHC.Classes.compare @GHC.Types.Int initPos cs of
616 GHC.Types.LT ->
617 (#
618 cs,
619 failExp
620 #)
621 GHC.Types.EQ ->
622 (#
623 initPos,
624 failExp GHC.Base.<> Data.Set.Internal.empty
625 #)
626 GHC.Types.GT ->
627 (#
628 initPos,
629 Data.Set.Internal.empty
630 #)
631 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp buf GHC.Types.True
632 in if GHC.Types.False
633 then noMoreInput
634 else
635 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
636 ( Symantic.Parser.Machine.Generate.ResultPartial GHC.Base.$
637 ( \newInput ->
638 if Symantic.Parser.Machine.Input.nullInput newInput
639 then noMoreInput
640 else partialCont (append buf newInput)
641 )
642 )
643 in partialCont buf
644 else
645 let _ = "checkToken.fail"
646 in let failExp =
647 Data.Set.Internal.Bin
648 1
649 ( Symantic.Parser.Grammar.Combinators.SomeFailure
650 ( case inputToken of
651 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
652 )
653 )
654 Data.Set.Internal.Tip
655 Data.Set.Internal.Tip
656 in let (#
657 farInp,
658 farExp
659 #) = case GHC.Classes.compare @GHC.Types.Int initPos cs of
660 GHC.Types.LT ->
661 (#
662 cs,
663 failExp
664 #)
665 GHC.Types.EQ ->
666 (#
667 initPos,
668 failExp GHC.Base.<> Data.Set.Internal.empty
669 #)
670 GHC.Types.GT ->
671 (#
672 initPos,
673 Data.Set.Internal.empty
674 #)
675 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp buf GHC.Types.False
676 else
677 let _ = "checkToken.fail"
678 in let failExp =
679 Data.Set.Internal.Bin
680 1
681 ( Symantic.Parser.Grammar.Combinators.SomeFailure
682 ( case inputToken of
683 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
684 )
685 )
686 Data.Set.Internal.Tip
687 Data.Set.Internal.Tip
688 in let (#
689 farInp,
690 farExp
691 #) = case GHC.Classes.compare @GHC.Types.Int initPos initPos of
692 GHC.Types.LT ->
693 (#
694 initPos,
695 failExp
696 #)
697 GHC.Types.EQ ->
698 (#
699 initPos,
700 failExp GHC.Base.<> Data.Set.Internal.empty
701 #)
702 GHC.Types.GT ->
703 (#
704 initPos,
705 Data.Set.Internal.empty
706 #)
707 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure initPos farInp farExp buf GHC.Types.False
708 else
709 let _ = "checkHorizon.newCheck.fail"
710 in let noMoreInput =
711 let failExp =
712 Data.Set.Internal.Bin
713 1
714 ( Symantic.Parser.Grammar.Combinators.SomeFailure
715 ( case inputToken of
716 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
717 )
718 )
719 Data.Set.Internal.Tip
720 Data.Set.Internal.Tip
721 in let (#
722 farInp,
723 farExp
724 #) = case GHC.Classes.compare @GHC.Types.Int initPos initPos of
725 GHC.Types.LT ->
726 (#
727 initPos,
728 failExp
729 #)
730 GHC.Types.EQ ->
731 (#
732 initPos,
733 failExp GHC.Base.<> Data.Set.Internal.empty
734 #)
735 GHC.Types.GT ->
736 (#
737 initPos,
738 Data.Set.Internal.empty
739 #)
740 in Symantic.Parser.Machine.Generate.unForallOnException finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure initPos farInp farExp buf GHC.Types.True
741 in if GHC.Types.False
742 then noMoreInput
743 else
744 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
745 ( Symantic.Parser.Machine.Generate.ResultPartial GHC.Base.$
746 ( \newInput ->
747 if Symantic.Parser.Machine.Input.nullInput newInput
748 then noMoreInput
749 else partialCont (append buf newInput)
750 )
751 )
752 in partialCont initBuffer