]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G1.expected.txt
test: add goldens for TH splices
[haskell/symantic-parser.git] / test / Golden / Splice / G1.expected.txt
1 test/Golden/Splice/G1.hs:0:0:: Splicing expression
2 P.runParser @Text Grammar.g1
3 ======>
4 \ (input :: inp)
5 -> let
6 !(# init, readMore, readNext #)
7 = let _ = "cursorOf" in
8 let
9 next t@(Data.Text.Internal.Text arr off unconsumed)
10 = let !(Data.Text.Unsafe.Iter c d) = (Data.Text.Unsafe.iter t) 0
11 in
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
16 let
17 finalRaise :: forall b. P.Catcher inp b
18 = \ _failInp !farInp !farExp
19 -> Left
20 P.ParsingErrorStandard
21 {P.parsingErrorOffset = P.offset farInp,
22 P.parsingErrorUnexpected = if readMore farInp then
23 Just (let (# c, _ #) = readNext farInp in c)
24 else
25 Nothing,
26 P.parsingErrorExpecting = Data.Set.Internal.fromList farExp} in
27 let readFail = finalRaise
28 in
29 if readMore init then
30 let !(# c, cs #) = readNext init
31 in
32 if ('a' ==) c then
33 let _ = "resume"
34 in
35 (((finalRet init) [])
36 (let _ = "resume.genCode" in ((\ x -> \ x -> x x) (\ x -> 'a')) c))
37 cs
38 else
39 let _ = "checkToken.else" in
40 let
41 (# farInp, farExp #)
42 = case ((compare `Data.Function.on` P.offset) init) init of
43 LT -> (# init, [P.ErrorItemToken 'a'] #)
44 EQ -> (# init, ([] <> [P.ErrorItemToken 'a']) #)
45 GT -> (# init, [] #)
46 in ((finalRaise init) farInp) farExp
47 else
48 let _ = "checkHorizon.else" in
49 let
50 (# farInp, farExp #)
51 = case ((compare `Data.Function.on` P.offset) init) init of
52 LT -> (# init, [P.ErrorItemHorizon 1] #)
53 EQ -> (# init, ([] <> [P.ErrorItemHorizon 1]) #)
54 GT -> (# init, [] #)
55 in ((finalRaise init) farInp) farExp