]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G10.expected.txt
fix: use a global polyfix for defLet and defRef
[haskell/symantic-parser.git] / test / Golden / Splice / G10.expected.txt
1 \(input_0 :: inp_6989586621679059048) ->
2 let !(#
3 init_1,
4 readMore_2,
5 readNext_3
6 #) =
7 let _ = "cursorOf"
8 in let next_4
9 ( t_5@( Data.Text.Internal.Text
10 arr_6
11 off_7
12 unconsumed_8
13 )
14 ) =
15 let !( Data.Text.Unsafe.Iter
16 c_9
17 d_10
18 ) = Data.Text.Unsafe.iter t_5 0
19 in (#
20 c_9,
21 Data.Text.Internal.Text arr_6 (off_7 GHC.Num.+ d_10) (unconsumed_8 GHC.Num.- d_10)
22 #)
23 more_11
24 ( Data.Text.Internal.Text
25 _
26 _
27 unconsumed_12
28 ) = unconsumed_12 GHC.Classes.> 0
29 in (#
30 input_0,
31 more_11,
32 next_4
33 #)
34 in let finalRet_13 = \_farInp_14 _farExp_15 v_16 _inp_17 -> Data.Either.Right v_16
35 in let finalRaise_18 ::
36 forall b_19.
37 Symantic.Parser.Machine.Generate.Catcher
38 inp_6989586621679059048
39 b_19 = \_failInp_20 (!farInp_21) (!farExp_22) ->
40 Data.Either.Left
41 Symantic.Parser.Machine.Generate.ParsingErrorStandard
42 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp_21,
43 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
44 if readMore_2 farInp_21
45 then
46 GHC.Maybe.Just
47 ( let (#
48 c_23,
49 _
50 #) = readNext_3 farInp_21
51 in c_23
52 )
53 else GHC.Maybe.Nothing,
54 Symantic.Parser.Machine.Generate.parsingErrorExpecting = Data.Set.Internal.fromList farExp_22
55 }
56 in let
57 in let _ = "catchException lbl=fail"
58 in let catchHandler_24 (!failInp_25) (!farInp_26) (!farExp_27) =
59 let _ = "catchException.ko lbl=fail"
60 in if ( \( Data.Text.Internal.Text
61 _
62 i_28
63 _
64 )
65 ( Data.Text.Internal.Text
66 _
67 j_29
68 _
69 ) -> i_28 GHC.Classes.== j_29
70 )
71 init_1
72 failInp_25
73 then
74 let _ = "choicesBranch.then"
75 in let readFail_30 = finalRaise_18
76 in if readMore_2 failInp_25
77 then
78 let !(#
79 c_31,
80 cs_32
81 #) = readNext_3 failInp_25
82 in if ('b' GHC.Classes.==) c_31
83 then
84 let _ = "resume"
85 in finalRet_13
86 farInp_26
87 farExp_27
88 ( let _ = "resume.genCode"
89 in 'b'
90 )
91 cs_32
92 else
93 let _ = "checkToken.else"
94 in let (#
95 farInp_33,
96 farExp_34
97 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 failInp_25 of
98 GHC.Types.LT ->
99 (#
100 failInp_25,
101 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
102 #)
103 GHC.Types.EQ ->
104 (#
105 farInp_26,
106 farExp_27 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
107 #)
108 GHC.Types.GT ->
109 (#
110 farInp_26,
111 farExp_27
112 #)
113 in finalRaise_18 failInp_25 farInp_33 farExp_34
114 else
115 let _ = "checkHorizon.else"
116 in let (#
117 farInp_35,
118 farExp_36
119 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 failInp_25 of
120 GHC.Types.LT ->
121 (#
122 failInp_25,
123 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
124 #)
125 GHC.Types.EQ ->
126 (#
127 farInp_26,
128 farExp_27 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
129 #)
130 GHC.Types.GT ->
131 (#
132 farInp_26,
133 farExp_27
134 #)
135 in finalRaise_18 failInp_25 farInp_35 farExp_36
136 else
137 let _ = "choicesBranch.else"
138 in let (#
139 farInp_37,
140 farExp_38
141 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 failInp_25 of
142 GHC.Types.LT ->
143 (#
144 failInp_25,
145 []
146 #)
147 GHC.Types.EQ ->
148 (#
149 farInp_26,
150 farExp_27 GHC.Base.<> []
151 #)
152 GHC.Types.GT ->
153 (#
154 farInp_26,
155 farExp_27
156 #)
157 in finalRaise_18 failInp_25 farInp_37 farExp_38
158 in let readFail_39 = catchHandler_24
159 in if readMore_2 init_1
160 then
161 let !(#
162 c_40,
163 cs_41
164 #) = readNext_3 init_1
165 in if ('a' GHC.Classes.==) c_40
166 then
167 let _ = "resume"
168 in finalRet_13 init_1 GHC.Types
169 . []
170 ( let _ = "resume.genCode"
171 in 'a'
172 )
173 cs_41
174 else
175 let _ = "checkToken.else"
176 in let (#
177 farInp_42,
178 farExp_43
179 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
180 GHC.Types.LT ->
181 (#
182 init_1,
183 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
184 #)
185 GHC.Types.EQ ->
186 (#
187 init_1,
188 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
189 #)
190 GHC.Types.GT ->
191 (#
192 init_1,
193 GHC.Types . []
194 #)
195 in readFail_39 init_1 farInp_42 farExp_43
196 else
197 let _ = "checkHorizon.else"
198 in let (#
199 farInp_44,
200 farExp_45
201 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
202 GHC.Types.LT ->
203 (#
204 init_1,
205 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
206 #)
207 GHC.Types.EQ ->
208 (#
209 init_1,
210 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
211 #)
212 GHC.Types.GT ->
213 (#
214 init_1,
215 GHC.Types . []
216 #)
217 in readFail_39 init_1 farInp_44 farExp_45