1 test/Golden/Splice/G8.hs:0:0:: Splicing expression
2 P.runParser @Text Grammar.g8
6 !(# init, readMore, readNext #)
7 = let _ = "cursorOf" in
9 next t@(Data.Text.Internal.Text arr off unconsumed)
10 = let !(Data.Text.Unsafe.Iter c d) = (Data.Text.Unsafe.iter t) 0
12 (# c, ((Data.Text.Internal.Text arr) (off + d)) (unconsumed - d) #)
13 more (Data.Text.Internal.Text _ _ unconsumed) = (unconsumed > 0)
14 in (# input, more, next #) in
15 let finalRet = \ _farInp _farExp v _inp -> Right v in
17 finalRaise :: forall b. P.Catcher inp b
18 = \ _failInp !farInp !farExp
20 P.ParsingErrorStandard
21 {P.parsingErrorOffset = P.offset farInp,
22 P.parsingErrorUnexpected = if readMore farInp then
23 Just (let (# c, _ #) = readNext farInp in c)
26 P.parsingErrorExpecting = Data.Set.Internal.fromList farExp} in
29 = \ !ok !inp !koByLabel
30 -> let _ = ("catchException lbl=" <> "fail") in
33 = \ !failInp !farInp !farExp
35 (((\ (Data.Text.Internal.Text _ i _)
36 (Data.Text.Internal.Text _ j _)
42 (((ok farInp) farExp) (let _ = "resume.genCode" in \ x -> x))
48 ((compare `Data.Function.on` P.offset) farInp) failInp
50 LT -> (# failInp, [] #)
51 EQ -> (# farInp, (farExp <> []) #)
52 GT -> (# farInp, farExp #)
54 (((((Data.Map.Strict.Internal.findWithDefault finalRaise)
62 let !(# c, cs #) = readNext inp
66 _ = "call exceptionsByName(name_1)=[] catchStackByLabel(ctx)=["fail"]"
70 _ = "suspend raiseException=fromList [(name_1,fromList [])]"
72 \ farInp farExp v !inp
76 (let _ = "resume.genCode"
80 (\ x -> \ x -> \ x -> ('r' : x x)))
87 let _ = "checkToken.else" in
90 = case ((compare `Data.Function.on` P.offset) init) inp of
91 LT -> (# inp, [P.ErrorItemToken 'r'] #)
92 EQ -> (# init, ([] <> [P.ErrorItemToken 'r']) #)
94 in ((readFail inp) farInp) farExp
96 let _ = "checkHorizon.else" in
99 = case ((compare `Data.Function.on` P.offset) init) inp of
100 LT -> (# inp, [P.ErrorItemHorizon 1] #)
101 EQ -> (# init, ([] <> [P.ErrorItemHorizon 1]) #)
103 in ((readFail inp) farInp) farExp in
105 _ = "call exceptionsByName(name_1)=["fail"] catchStackByLabel(ctx)=[]"
109 _ = "suspend raiseException=fromList [(name_1,fromList [("fail",())])]"
111 \ farInp farExp v !inp
114 = \ farInp farExp v !inp
117 (((finalRet farInp) farExp)
118 (let _ = "resume.genCode"
121 (((\ x -> \ x -> x x) (\ x -> \ x -> x [])) v))
124 let _ = ("catchException lbl=" <> "fail") in
125 let _ = ("catchException lbl=" <> "fail") in
128 = \ !failInp !farInp !farExp
130 in (((join farInp) farExp) (let _ = "resume.genCode" in ())) inp
133 let !(# c, cs #) = readNext inp
135 if (\ x -> True) c then
138 = case ((compare `Data.Function.on` P.offset) farInp) inp of
140 EQ -> (# farInp, (farExp <> []) #)
141 GT -> (# farInp, farExp #)
143 (((\ !failInp !farInp !farExp
145 (((\ (Data.Text.Internal.Text _ i _)
146 (Data.Text.Internal.Text _ j _)
153 ((compare `Data.Function.on` P.offset)
157 LT -> (# failInp, [P.ErrorItemEnd] #)
160 (farExp <> [P.ErrorItemEnd]) #)
161 GT -> (# farInp, farExp #)
162 in ((finalRaise failInp) farInp) farExp
167 ((compare `Data.Function.on` P.offset)
171 LT -> (# failInp, [] #)
172 EQ -> (# farInp, (farExp <> []) #)
173 GT -> (# farInp, farExp #)
174 in ((finalRaise failInp) farInp) farExp)
179 let _ = "checkToken.else" in
182 = case ((compare `Data.Function.on` P.offset) farInp) inp of
184 EQ -> (# farInp, (farExp <> []) #)
185 GT -> (# farInp, farExp #)
186 in ((readFail inp) farInp) farExp
188 let _ = "checkHorizon.else" in
191 = case ((compare `Data.Function.on` P.offset) farInp) inp of
192 LT -> (# inp, [P.ErrorItemHorizon 1] #)
193 EQ -> (# farInp, (farExp <> [P.ErrorItemHorizon 1]) #)
194 GT -> (# farInp, farExp #)
195 in ((readFail inp) farInp) farExp))
197 Data.Map.Internal.Tip