]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G10.expected.txt
test: add goldens for TH splices
[haskell/symantic-parser.git] / test / Golden / Splice / G10.expected.txt
1 test/Golden/Splice/G10.hs:0:0:: Splicing expression
2 P.runParser @Text Grammar.g10
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 _ = ("catchException lbl=" <> "fail") in
28 let
29 readFail
30 = \ !failInp !farInp !farExp
31 -> if (\ x -> x)
32 (((\ (Data.Text.Internal.Text _ i _)
33 (Data.Text.Internal.Text _ j _)
34 -> (i == j))
35 init)
36 failInp) then
37 let readFail = finalRaise
38 in
39 if readMore failInp then
40 let !(# c, cs #) = readNext failInp
41 in
42 if ('b' ==) c then
43 let _ = "resume"
44 in
45 (((finalRet farInp) farExp)
46 (let _ = "resume.genCode"
47 in ((\ x -> \ x -> x x) (\ x -> 'b')) c))
48 cs
49 else
50 let _ = "checkToken.else" in
51 let
52 (# farInp, farExp #)
53 = case
54 ((compare `Data.Function.on` P.offset) farInp) failInp
55 of
56 LT -> (# failInp, [P.ErrorItemToken 'b'] #)
57 EQ -> (# farInp, (farExp <> [P.ErrorItemToken 'b']) #)
58 GT -> (# farInp, farExp #)
59 in ((finalRaise failInp) farInp) farExp
60 else
61 let _ = "checkHorizon.else" in
62 let
63 (# farInp, farExp #)
64 = case ((compare `Data.Function.on` P.offset) farInp) failInp of
65 LT -> (# failInp, [P.ErrorItemHorizon 1] #)
66 EQ -> (# farInp, (farExp <> [P.ErrorItemHorizon 1]) #)
67 GT -> (# farInp, farExp #)
68 in ((finalRaise failInp) farInp) farExp
69 else
70 let
71 (# farInp, farExp #)
72 = case ((compare `Data.Function.on` P.offset) farInp) failInp of
73 LT -> (# failInp, [] #)
74 EQ -> (# farInp, (farExp <> []) #)
75 GT -> (# farInp, farExp #)
76 in ((finalRaise failInp) farInp) farExp
77 in
78 if readMore init then
79 let !(# c, cs #) = readNext init
80 in
81 if ('a' ==) c then
82 let _ = "resume"
83 in
84 (((finalRet init) [])
85 (let _ = "resume.genCode" in ((\ x -> \ x -> x x) (\ x -> 'a')) c))
86 cs
87 else
88 let _ = "checkToken.else" in
89 let
90 (# farInp, farExp #)
91 = case ((compare `Data.Function.on` P.offset) init) init of
92 LT -> (# init, [P.ErrorItemToken 'a'] #)
93 EQ -> (# init, ([] <> [P.ErrorItemToken 'a']) #)
94 GT -> (# init, [] #)
95 in ((readFail init) farInp) farExp
96 else
97 let _ = "checkHorizon.else" in
98 let
99 (# farInp, farExp #)
100 = case ((compare `Data.Function.on` P.offset) init) init of
101 LT -> (# init, [P.ErrorItemHorizon 1] #)
102 EQ -> (# init, ([] <> [P.ErrorItemHorizon 1]) #)
103 GT -> (# init, [] #)
104 in ((readFail init) farInp) farExp