]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G1.expected.txt
test: dump splices using TH.runQ instead of calling ghc
[haskell/symantic-parser.git] / test / Golden / Splice / G1.expected.txt
1 \(input :: inp) ->
2 let !(#
3 init,
4 readMore,
5 readNext
6 #) =
7 let _ = "cursorOf"
8 in let next
9 ( t@( Data.Text.Internal.Text
10 arr
11 off
12 unconsumed
13 )
14 ) =
15 let !( Data.Text.Unsafe.Iter
16 c
17 d
18 ) = Data.Text.Unsafe.iter t 0
19 in (#
20 c,
21 Data.Text.Internal.Text arr (off GHC.Num.+ d) (unconsumed GHC.Num.- d)
22 #)
23 more
24 ( Data.Text.Internal.Text
25 _
26 _
27 unconsumed
28 ) = unconsumed GHC.Classes.> 0
29 in (# input, more, next #)
30 in let finalRet = \_farInp _farExp v _inp -> Data.Either.Right v
31 in let finalRaise ::
32 forall b.
33 Symantic.Parser.Machine.Generate.Catcher
34 inp
35 b = \_failInp (!farInp) (!farExp) ->
36 Data.Either.Left
37 Symantic.Parser.Machine.Generate.ParsingErrorStandard
38 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp,
39 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
40 if readMore farInp
41 then
42 GHC.Maybe.Just
43 ( let (#
44 c,
45 _
46 #) = readNext farInp
47 in c
48 )
49 else GHC.Maybe.Nothing,
50 Symantic.Parser.Machine.Generate.parsingErrorExpecting = Data.Set.Internal.fromList farExp
51 }
52 in let
53 in let readFail = finalRaise
54 in if readMore init
55 then
56 let !(# c, cs #) = readNext init
57 in if ('a' GHC.Classes.==) c
58 then
59 let _ = "resume"
60 in finalRet init GHC.Types
61 . []
62 ( let _ = "resume.genCode"
63 in GHC.Show.show 'a'
64 )
65 cs
66 else
67 let _ = "checkToken.else"
68 in let (#
69 farInp,
70 farExp
71 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init init of
72 GHC.Types.LT ->
73 (#
74 init,
75 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
76 #)
77 GHC.Types.EQ ->
78 (#
79 init,
80 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
81 #)
82 GHC.Types.GT ->
83 (#
84 init,
85 GHC.Types . []
86 #)
87 in finalRaise init farInp farExp
88 else
89 let _ = "checkHorizon.else"
90 in let (#
91 farInp,
92 farExp
93 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init init of
94 GHC.Types.LT ->
95 (#
96 init,
97 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
98 #)
99 GHC.Types.EQ ->
100 (#
101 init,
102 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
103 #)
104 GHC.Types.GT ->
105 (#
106 init,
107 GHC.Types . []
108 #)
109 in finalRaise init farInp farExp