]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G1.expected.txt
change ShowLetName into HideableName
[haskell/symantic-parser.git] / test / Golden / Splice / G1.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
58 in let readFail = finalRaise
59 in if readMore init
60 then
61 let !(# c, cs #) = readNext init
62 in if (GHC.Classes.==) 'a' c
63 then
64 let _ = "resume"
65 in finalRet
66 init
67 Data.Set.Internal.empty
68 ( let _ = "resume.genCode"
69 in GHC.Show.show 'a'
70 )
71 cs
72 else
73 let _ = "checkToken.else"
74 in let failExp =
75 Data.Set.Internal.Bin
76 1
77 ( Symantic.Parser.Grammar.Combinators.SomeFailure
78 ( case inputToken of
79 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
80 )
81 )
82 Data.Set.Internal.Tip
83 Data.Set.Internal.Tip
84 in let (#
85 farInp,
86 farExp
87 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init init of
88 GHC.Types.LT ->
89 (#
90 init,
91 failExp
92 #)
93 GHC.Types.EQ ->
94 (#
95 init,
96 failExp GHC.Base.<> Data.Set.Internal.empty
97 #)
98 GHC.Types.GT ->
99 (#
100 init,
101 Data.Set.Internal.empty
102 #)
103 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure init farInp farExp
104 else
105 let _ = "checkHorizon.else"
106 in let failExp =
107 Data.Set.Internal.Bin
108 1
109 ( Symantic.Parser.Grammar.Combinators.SomeFailure
110 ( case inputToken of
111 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
112 )
113 )
114 Data.Set.Internal.Tip
115 Data.Set.Internal.Tip
116 in let (#
117 farInp,
118 farExp
119 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init init of
120 GHC.Types.LT ->
121 (#
122 init,
123 failExp
124 #)
125 GHC.Types.EQ ->
126 (#
127 init,
128 failExp GHC.Base.<> Data.Set.Internal.empty
129 #)
130 GHC.Types.GT ->
131 (#
132 init,
133 Data.Set.Internal.empty
134 #)
135 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure init farInp farExp
136 )