]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G8.expected.txt
fix: use a global polyfix for defLet and defRef
[haskell/symantic-parser.git] / test / Golden / Splice / G8.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 ('r' GHC.Classes.==) c_38
113 then
114 name_24
115 ( let _ = "suspend"
116 in \farInp_40 farExp_41 v_42 (!inp_43) ->
117 let _ = "resume"
118 in ok_25
119 farInp_40
120 farExp_41
121 ( let _ = "resume.genCode"
122 in \x_44 -> 'r' GHC.Types.: v_42 x_44
123 )
124 inp_43
125 )
126 cs_39
127 Data.Map.Internal.Tip
128 else
129 let _ = "checkToken.else"
130 in let (#
131 farInp_45,
132 farExp_46
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.ErrorItemToken 'r']
138 #)
139 GHC.Types.EQ ->
140 (#
141 init_1,
142 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'r']
143 #)
144 GHC.Types.GT ->
145 (#
146 init_1,
147 GHC.Types . []
148 #)
149 in readFail_37 inp_26 farInp_45 farExp_46
150 else
151 let _ = "checkHorizon.else"
152 in let (#
153 farInp_47,
154 farExp_48
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_47 farExp_48
172 in name_24
173 ( let _ = "suspend"
174 in \farInp_49 farExp_50 v_51 (!inp_52) ->
175 let join_53 = \farInp_54 farExp_55 v_56 (!inp_57) ->
176 let _ = "resume"
177 in finalRet_13
178 farInp_54
179 farExp_55
180 ( let _ = "resume.genCode"
181 in v_51 GHC.Types . []
182 )
183 inp_57
184 in let _ = "catchException lbl=fail"
185 in let catchHandler_58 (!failInp_59) (!farInp_60) (!farExp_61) =
186 let _ = "catchException.ko lbl=fail"
187 in if ( \( Data.Text.Internal.Text
188 _
189 i_62
190 _
191 )
192 ( Data.Text.Internal.Text
193 _
194 j_63
195 _
196 ) -> i_62 GHC.Classes.== j_63
197 )
198 inp_52
199 failInp_59
200 then
201 let _ = "choicesBranch.then"
202 in let (#
203 farInp_64,
204 farExp_65
205 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_60 failInp_59 of
206 GHC.Types.LT ->
207 (#
208 failInp_59,
209 [Symantic.Parser.Grammar.Combinators.ErrorItemEnd]
210 #)
211 GHC.Types.EQ ->
212 (#
213 farInp_60,
214 farExp_61 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemEnd]
215 #)
216 GHC.Types.GT ->
217 (#
218 farInp_60,
219 farExp_61
220 #)
221 in finalRaise_18 failInp_59 farInp_64 farExp_65
222 else
223 let _ = "choicesBranch.else"
224 in let (#
225 farInp_66,
226 farExp_67
227 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_60 failInp_59 of
228 GHC.Types.LT ->
229 (#
230 failInp_59,
231 []
232 #)
233 GHC.Types.EQ ->
234 (#
235 farInp_60,
236 farExp_61 GHC.Base.<> []
237 #)
238 GHC.Types.GT ->
239 (#
240 farInp_60,
241 farExp_61
242 #)
243 in finalRaise_18 failInp_59 farInp_66 farExp_67
244 in let _ = "catchException lbl=fail"
245 in let catchHandler_68 (!failInp_69) (!farInp_70) (!farExp_71) =
246 let _ = "catchException.ko lbl=fail"
247 in let _ = "resume"
248 in join_53
249 farInp_70
250 farExp_71
251 ( let _ = "resume.genCode"
252 in GHC.Tuple . ()
253 )
254 inp_52
255 in let readFail_72 = catchHandler_68
256 in if readMore_2 inp_52
257 then
258 let !(#
259 c_73,
260 cs_74
261 #) = readNext_3 inp_52
262 in if (\x_75 -> GHC.Types.True) c_73
263 then
264 let (#
265 farInp_76,
266 farExp_77
267 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_49 inp_52 of
268 GHC.Types.LT ->
269 (#
270 inp_52,
271 []
272 #)
273 GHC.Types.EQ ->
274 (#
275 farInp_49,
276 farExp_50 GHC.Base.<> []
277 #)
278 GHC.Types.GT ->
279 (#
280 farInp_49,
281 farExp_50
282 #)
283 in catchHandler_58 inp_52 farInp_76 farExp_77
284 else
285 let _ = "checkToken.else"
286 in let (#
287 farInp_78,
288 farExp_79
289 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_49 inp_52 of
290 GHC.Types.LT ->
291 (#
292 inp_52,
293 []
294 #)
295 GHC.Types.EQ ->
296 (#
297 farInp_49,
298 farExp_50 GHC.Base.<> []
299 #)
300 GHC.Types.GT ->
301 (#
302 farInp_49,
303 farExp_50
304 #)
305 in readFail_72 inp_52 farInp_78 farExp_79
306 else
307 let _ = "checkHorizon.else"
308 in let (#
309 farInp_80,
310 farExp_81
311 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_49 inp_52 of
312 GHC.Types.LT ->
313 (#
314 inp_52,
315 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
316 #)
317 GHC.Types.EQ ->
318 (#
319 farInp_49,
320 farExp_50 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
321 #)
322 GHC.Types.GT ->
323 (#
324 farInp_49,
325 farExp_50
326 #)
327 in readFail_72 inp_52 farInp_80 farExp_81
328 )
329 init_1
330 Data.Map.Internal.Tip