]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G9.expected.txt
change ShowLetName into HideableName
[haskell/symantic-parser.git] / test / Golden / Splice / G9.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 finalRet = \_farInp _farExp v _inp -> Symantic.Parser.Machine.Generate.returnST GHC.Base.$ Data.Either.Right v
31 finalRaise ::
32 forall st b.
33 Symantic.Parser.Machine.Generate.Catcher
34 st
35 inp
36 b = \(!exn) _failInp (!farInp) (!farExp) ->
37 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
38 Data.Either.Left
39 Symantic.Parser.Machine.Generate.ParsingError
40 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp,
41 Symantic.Parser.Machine.Generate.parsingErrorException = exn,
42 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
43 if readMore farInp
44 then
45 GHC.Maybe.Just
46 ( let (#
47 c,
48 _
49 #) = readNext farInp
50 in c
51 )
52 else GHC.Maybe.Nothing,
53 Symantic.Parser.Machine.Generate.parsingErrorExpecting = farExp
54 }
55 in GHC.ST.runST
56 ( let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp)
57 in let
58 in let join = \farInp farExp v (!inp) ->
59 let _ = "resume"
60 in finalRet
61 farInp
62 farExp
63 ( let _ = "resume.genCode"
64 in GHC.Show.show v
65 )
66 inp
67 in let _ = "catch ExceptionFailure"
68 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
69 let _ = "catch.ko ExceptionFailure"
70 in if ( \( Data.Text.Internal.Text
71 _
72 i
73 _
74 )
75 ( Data.Text.Internal.Text
76 _
77 j
78 _
79 ) -> i GHC.Classes.== j
80 )
81 init
82 failInp
83 then
84 let _ = "choicesBranch.then"
85 in let failExp = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure Symantic.Parser.Grammar.Combinators.FailureEnd) Data.Set.Internal.Tip Data.Set.Internal.Tip
86 in let (#
87 farInp,
88 farExp
89 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
90 GHC.Types.LT ->
91 (#
92 failInp,
93 failExp
94 #)
95 GHC.Types.EQ ->
96 (#
97 farInp,
98 failExp GHC.Base.<> farExp
99 #)
100 GHC.Types.GT ->
101 (#
102 farInp,
103 farExp
104 #)
105 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
106 else
107 let _ = "choicesBranch.else"
108 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
109 in let _ = "catch ExceptionFailure"
110 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
111 let _ = "catch.ko ExceptionFailure"
112 in let _ = "resume"
113 in join
114 farInp
115 farExp
116 ( let _ = "resume.genCode"
117 in GHC.Tuple . ()
118 )
119 init
120 in let readFail = catchHandler
121 in if readMore init
122 then
123 let !(#
124 c,
125 cs
126 #) = readNext init
127 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure init init Data.Set.Internal.empty
128 else
129 let _ = "checkHorizon.else"
130 in let failExp =
131 Data.Set.Internal.Bin
132 1
133 ( Symantic.Parser.Grammar.Combinators.SomeFailure
134 ( case inputToken of
135 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
136 )
137 )
138 Data.Set.Internal.Tip
139 Data.Set.Internal.Tip
140 in let (#
141 farInp,
142 farExp
143 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init init of
144 GHC.Types.LT ->
145 (#
146 init,
147 failExp
148 #)
149 GHC.Types.EQ ->
150 (#
151 init,
152 failExp GHC.Base.<> Data.Set.Internal.empty
153 #)
154 GHC.Types.GT ->
155 (#
156 init,
157 Data.Set.Internal.empty
158 #)
159 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure init farInp farExp
160 )