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)))
85 (((((Data.Map.Internal.Bin 1) "fail") readFail)
86 Data.Map.Internal.Tip)
87 Data.Map.Internal.Tip)
89 let _ = "checkToken.else" in
92 = case ((compare `Data.Function.on` P.offset) init) inp of
93 LT -> (# inp, [P.ErrorItemToken 'r'] #)
94 EQ -> (# init, ([] <> [P.ErrorItemToken 'r']) #)
96 in ((readFail inp) farInp) farExp
98 let _ = "checkHorizon.else" in
101 = case ((compare `Data.Function.on` P.offset) init) inp of
102 LT -> (# inp, [P.ErrorItemHorizon 1] #)
103 EQ -> (# init, ([] <> [P.ErrorItemHorizon 1]) #)
105 in ((readFail inp) farInp) farExp in
107 _ = "call exceptionsByName(name_1)=["fail"] catchStackByLabel(ctx)=[]"
111 _ = "suspend raiseException=fromList [(name_1,fromList [("fail",())])]"
113 \ farInp farExp v !inp
116 = \ farInp farExp v !inp
119 (((finalRet farInp) farExp)
120 (let _ = "resume.genCode"
123 (((\ x -> \ x -> x x) (\ x -> \ x -> x [])) v))
126 let _ = "catchException lbl=fail" in
127 let _ = "catchException lbl=fail" in
130 = \ !failInp !farInp !farExp
132 in (((join farInp) farExp) (let _ = "resume.genCode" in ())) inp
135 let !(# c, cs #) = readNext inp
137 if (\ x -> True) c then
140 = case ((compare `Data.Function.on` P.offset) farInp) inp of
142 EQ -> (# farInp, (farExp <> []) #)
143 GT -> (# farInp, farExp #)
145 (((\ !failInp !farInp !farExp
147 (((\ (Data.Text.Internal.Text _ i _)
148 (Data.Text.Internal.Text _ j _)
155 ((compare `Data.Function.on` P.offset)
159 LT -> (# failInp, [P.ErrorItemEnd] #)
162 (farExp <> [P.ErrorItemEnd]) #)
163 GT -> (# farInp, farExp #)
164 in ((finalRaise failInp) farInp) farExp
169 ((compare `Data.Function.on` P.offset)
173 LT -> (# failInp, [] #)
174 EQ -> (# farInp, (farExp <> []) #)
175 GT -> (# farInp, farExp #)
176 in ((finalRaise failInp) farInp) farExp)
181 let _ = "checkToken.else" in
184 = case ((compare `Data.Function.on` P.offset) farInp) inp of
186 EQ -> (# farInp, (farExp <> []) #)
187 GT -> (# farInp, farExp #)
188 in ((readFail inp) farInp) farExp
190 let _ = "checkHorizon.else" in
193 = case ((compare `Data.Function.on` P.offset) farInp) inp of
194 LT -> (# inp, [P.ErrorItemHorizon 1] #)
195 EQ -> (# farInp, (farExp <> [P.ErrorItemHorizon 1]) #)
196 GT -> (# farInp, farExp #)
197 in ((readFail inp) farInp) farExp))
199 Data.Map.Internal.Tip