]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G12.expected.txt
fix: use a global polyfix for defLet and defRef
[haskell/symantic-parser.git] / test / Golden / Splice / G12.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 name_24 = \(!ok_25) (!inp_26) (!koByLabel_27) ->
57 let _ = "catchException lbl=fail"
58 in let catchHandler_28 (!failInp_29) (!farInp_30) (!farExp_31) =
59 let _ = "catchException.ko lbl=fail"
60 in if ( \( Data.Text.Internal.Text
61 _
62 i_32
63 _
64 )
65 ( Data.Text.Internal.Text
66 _
67 j_33
68 _
69 ) -> i_32 GHC.Classes.== j_33
70 )
71 inp_26
72 failInp_29
73 then
74 let _ = "choicesBranch.then"
75 in let _ = "resume"
76 in ok_25
77 farInp_30
78 farExp_31
79 ( let _ = "resume.genCode"
80 in \x_34 -> x_34
81 )
82 failInp_29
83 else
84 let _ = "choicesBranch.else"
85 in let (#
86 farInp_35,
87 farExp_36
88 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_30 failInp_29 of
89 GHC.Types.LT ->
90 (#
91 failInp_29,
92 []
93 #)
94 GHC.Types.EQ ->
95 (#
96 farInp_30,
97 farExp_31 GHC.Base.<> []
98 #)
99 GHC.Types.GT ->
100 (#
101 farInp_30,
102 farExp_31
103 #)
104 in finalRaise_18 failInp_29 farInp_35 farExp_36
105 in let readFail_37 = catchHandler_28
106 in if readMore_2 inp_26
107 then
108 let !(#
109 c_38,
110 cs_39
111 #) = readNext_3 inp_26
112 in if (\t_40 -> ('a' GHC.Classes.== t_40) GHC.Classes.|| (('b' GHC.Classes.== t_40) GHC.Classes.|| (('c' GHC.Classes.== t_40) GHC.Classes.|| (('d' GHC.Classes.== t_40) GHC.Classes.|| GHC.Types.False)))) c_38
113 then
114 name_24
115 ( let _ = "suspend"
116 in \farInp_41 farExp_42 v_43 (!inp_44) ->
117 let _ = "resume"
118 in ok_25
119 farInp_41
120 farExp_42
121 ( let _ = "resume.genCode"
122 in \x_45 -> c_38 GHC.Types.: v_43 x_45
123 )
124 inp_44
125 )
126 cs_39
127 Data.Map.Internal.Tip
128 else
129 let _ = "checkToken.else"
130 in let (#
131 farInp_46,
132 farExp_47
133 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 inp_26 of
134 GHC.Types.LT ->
135 (#
136 inp_26,
137 [Symantic.Parser.Grammar.Combinators.ErrorItemLabel "oneOf"]
138 #)
139 GHC.Types.EQ ->
140 (#
141 init_1,
142 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemLabel "oneOf"]
143 #)
144 GHC.Types.GT ->
145 (#
146 init_1,
147 GHC.Types . []
148 #)
149 in readFail_37 inp_26 farInp_46 farExp_47
150 else
151 let _ = "checkHorizon.else"
152 in let (#
153 farInp_48,
154 farExp_49
155 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 inp_26 of
156 GHC.Types.LT ->
157 (#
158 inp_26,
159 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
160 #)
161 GHC.Types.EQ ->
162 (#
163 init_1,
164 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
165 #)
166 GHC.Types.GT ->
167 (#
168 init_1,
169 GHC.Types . []
170 #)
171 in readFail_37 inp_26 farInp_48 farExp_49
172 in name_24
173 ( let _ = "suspend"
174 in \farInp_50 farExp_51 v_52 (!inp_53) ->
175 let join_54 = \farInp_55 farExp_56 v_57 (!inp_58) ->
176 let _ = "resume"
177 in finalRet_13
178 farInp_55
179 farExp_56
180 ( let _ = "resume.genCode"
181 in v_52 GHC.Types . []
182 )
183 inp_58
184 in let _ = "catchException lbl=fail"
185 in let catchHandler_59 (!failInp_60) (!farInp_61) (!farExp_62) =
186 let _ = "catchException.ko lbl=fail"
187 in if ( \( Data.Text.Internal.Text
188 _
189 i_63
190 _
191 )
192 ( Data.Text.Internal.Text
193 _
194 j_64
195 _
196 ) -> i_63 GHC.Classes.== j_64
197 )
198 inp_53
199 failInp_60
200 then
201 let _ = "choicesBranch.then"
202 in let (#
203 farInp_65,
204 farExp_66
205 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_61 failInp_60 of
206 GHC.Types.LT ->
207 (#
208 failInp_60,
209 [Symantic.Parser.Grammar.Combinators.ErrorItemEnd]
210 #)
211 GHC.Types.EQ ->
212 (#
213 farInp_61,
214 farExp_62 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemEnd]
215 #)
216 GHC.Types.GT ->
217 (#
218 farInp_61,
219 farExp_62
220 #)
221 in finalRaise_18 failInp_60 farInp_65 farExp_66
222 else
223 let _ = "choicesBranch.else"
224 in let (#
225 farInp_67,
226 farExp_68
227 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_61 failInp_60 of
228 GHC.Types.LT ->
229 (#
230 failInp_60,
231 []
232 #)
233 GHC.Types.EQ ->
234 (#
235 farInp_61,
236 farExp_62 GHC.Base.<> []
237 #)
238 GHC.Types.GT ->
239 (#
240 farInp_61,
241 farExp_62
242 #)
243 in finalRaise_18 failInp_60 farInp_67 farExp_68
244 in let _ = "catchException lbl=fail"
245 in let catchHandler_69 (!failInp_70) (!farInp_71) (!farExp_72) =
246 let _ = "catchException.ko lbl=fail"
247 in let _ = "resume"
248 in join_54
249 farInp_71
250 farExp_72
251 ( let _ = "resume.genCode"
252 in GHC.Tuple . ()
253 )
254 inp_53
255 in let readFail_73 = catchHandler_69
256 in if readMore_2 inp_53
257 then
258 let !(#
259 c_74,
260 cs_75
261 #) = readNext_3 inp_53
262 in if (\x_76 -> GHC.Types.True) c_74
263 then
264 let (#
265 farInp_77,
266 farExp_78
267 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_50 inp_53 of
268 GHC.Types.LT ->
269 (#
270 inp_53,
271 []
272 #)
273 GHC.Types.EQ ->
274 (#
275 farInp_50,
276 farExp_51 GHC.Base.<> []
277 #)
278 GHC.Types.GT ->
279 (#
280 farInp_50,
281 farExp_51
282 #)
283 in catchHandler_59 inp_53 farInp_77 farExp_78
284 else
285 let _ = "checkToken.else"
286 in let (#
287 farInp_79,
288 farExp_80
289 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_50 inp_53 of
290 GHC.Types.LT ->
291 (#
292 inp_53,
293 []
294 #)
295 GHC.Types.EQ ->
296 (#
297 farInp_50,
298 farExp_51 GHC.Base.<> []
299 #)
300 GHC.Types.GT ->
301 (#
302 farInp_50,
303 farExp_51
304 #)
305 in readFail_73 inp_53 farInp_79 farExp_80
306 else
307 let _ = "checkHorizon.else"
308 in let (#
309 farInp_81,
310 farExp_82
311 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_50 inp_53 of
312 GHC.Types.LT ->
313 (#
314 inp_53,
315 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
316 #)
317 GHC.Types.EQ ->
318 (#
319 farInp_50,
320 farExp_51 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
321 #)
322 GHC.Types.GT ->
323 (#
324 farInp_50,
325 farExp_51
326 #)
327 in readFail_73 inp_53 farInp_81 farExp_82
328 )
329 init_1
330 Data.Map.Internal.Tip