]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G4.expected.txt
fix: use a global polyfix for defLet and defRef
[haskell/symantic-parser.git] / test / Golden / Splice / G4.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 name_37
106 ( let _ = "suspend"
107 in \farInp_38 farExp_39 v_40 (!inp_41) ->
108 name_24
109 ( let _ = "suspend"
110 in \farInp_42 farExp_43 v_44 (!inp_45) ->
111 let _ = "resume"
112 in ok_25
113 farInp_42
114 farExp_43
115 ( let _ = "resume.genCode"
116 in \x_46 -> v_40 GHC.Types.: v_44 x_46
117 )
118 inp_45
119 )
120 inp_41
121 Data.Map.Internal.Tip
122 )
123 inp_26
124 Data.Map.Internal.Tip
125 name_37 = \(!ok_47) (!inp_48) (!koByLabel_49) ->
126 let _ = "catchException lbl=fail"
127 in let catchHandler_50 (!failInp_51) (!farInp_52) (!farExp_53) =
128 let _ = "catchException.ko lbl=fail"
129 in let (#
130 farInp_54,
131 farExp_55
132 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_52 inp_48 of
133 GHC.Types.LT ->
134 (#
135 inp_48,
136 []
137 #)
138 GHC.Types.EQ ->
139 (#
140 farInp_52,
141 farExp_53 GHC.Base.<> []
142 #)
143 GHC.Types.GT ->
144 (#
145 farInp_52,
146 farExp_53
147 #)
148 in finalRaise_18 inp_48 farInp_54 farExp_55
149 in let readFail_56 = catchHandler_50
150 in if readMore_2 (Symantic.Parser.Machine.Input.shiftRightText 3 inp_48)
151 then
152 let !(#
153 c_57,
154 cs_58
155 #) = readNext_3 inp_48
156 in if ('a' GHC.Classes.==) c_57
157 then
158 let readFail_59 = readFail_56
159 in let !(#
160 c_60,
161 cs_61
162 #) = readNext_3 cs_58
163 in if ('b' GHC.Classes.==) c_60
164 then
165 let readFail_62 = readFail_56
166 in let !(#
167 c_63,
168 cs_64
169 #) = readNext_3 cs_61
170 in if ('c' GHC.Classes.==) c_63
171 then
172 let readFail_65 = readFail_56
173 in let !(#
174 c_66,
175 cs_67
176 #) = readNext_3 cs_64
177 in if ('d' GHC.Classes.==) c_66
178 then
179 let _ = "resume"
180 in ok_47 init_1 GHC.Types
181 . []
182 ( let _ = "resume.genCode"
183 in 'a' GHC.Types.: ('b' GHC.Types.: ('c' GHC.Types.: ('d' GHC.Types.: GHC.Types . [])))
184 )
185 cs_67
186 else
187 let _ = "checkToken.else"
188 in let (#
189 farInp_68,
190 farExp_69
191 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 cs_64 of
192 GHC.Types.LT ->
193 (#
194 cs_64,
195 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'd']
196 #)
197 GHC.Types.EQ ->
198 (#
199 init_1,
200 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'd']
201 #)
202 GHC.Types.GT ->
203 (#
204 init_1,
205 GHC.Types . []
206 #)
207 in readFail_56 cs_64 farInp_68 farExp_69
208 else
209 let _ = "checkToken.else"
210 in let (#
211 farInp_70,
212 farExp_71
213 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 cs_61 of
214 GHC.Types.LT ->
215 (#
216 cs_61,
217 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'c']
218 #)
219 GHC.Types.EQ ->
220 (#
221 init_1,
222 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'c']
223 #)
224 GHC.Types.GT ->
225 (#
226 init_1,
227 GHC.Types . []
228 #)
229 in readFail_56 cs_61 farInp_70 farExp_71
230 else
231 let _ = "checkToken.else"
232 in let (#
233 farInp_72,
234 farExp_73
235 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 cs_58 of
236 GHC.Types.LT ->
237 (#
238 cs_58,
239 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
240 #)
241 GHC.Types.EQ ->
242 (#
243 init_1,
244 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
245 #)
246 GHC.Types.GT ->
247 (#
248 init_1,
249 GHC.Types . []
250 #)
251 in readFail_56 cs_58 farInp_72 farExp_73
252 else
253 let _ = "checkToken.else"
254 in let (#
255 farInp_74,
256 farExp_75
257 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 inp_48 of
258 GHC.Types.LT ->
259 (#
260 inp_48,
261 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
262 #)
263 GHC.Types.EQ ->
264 (#
265 init_1,
266 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
267 #)
268 GHC.Types.GT ->
269 (#
270 init_1,
271 GHC.Types . []
272 #)
273 in readFail_56 inp_48 farInp_74 farExp_75
274 else
275 let _ = "checkHorizon.else"
276 in let (#
277 farInp_76,
278 farExp_77
279 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 inp_48 of
280 GHC.Types.LT ->
281 (#
282 inp_48,
283 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 4]
284 #)
285 GHC.Types.EQ ->
286 (#
287 init_1,
288 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 4]
289 #)
290 GHC.Types.GT ->
291 (#
292 init_1,
293 GHC.Types . []
294 #)
295 in readFail_56 inp_48 farInp_76 farExp_77
296 in name_37
297 ( let _ = "suspend"
298 in \farInp_78 farExp_79 v_80 (!inp_81) ->
299 name_24
300 ( let _ = "suspend"
301 in \farInp_82 farExp_83 v_84 (!inp_85) ->
302 let _ = "resume"
303 in finalRet_13
304 farInp_82
305 farExp_83
306 ( let _ = "resume.genCode"
307 in v_80 GHC.Types.: v_84 GHC.Types . []
308 )
309 inp_85
310 )
311 inp_81
312 Data.Map.Internal.Tip
313 )
314 init_1
315 Data.Map.Internal.Tip