]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G3.expected.txt
fix: use a global polyfix for defLet and defRef
[haskell/symantic-parser.git] / test / Golden / Splice / G3.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 ('a' 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 -> 'a' 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 'a']
138 #)
139 GHC.Types.EQ ->
140 (#
141 init_1,
142 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
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 _ = "resume"
176 in finalRet_13
177 farInp_49
178 farExp_50
179 ( let _ = "resume.genCode"
180 in v_51 GHC.Types . []
181 )
182 inp_52
183 )
184 init_1
185 Data.Map.Internal.Tip