1 {-# LANGUAGE AllowAmbiguousTypes #-}
2 {-# LANGUAGE ScopedTypeVariables #-}
3 {-# LANGUAGE TemplateHaskell #-}
4 {-# LANGUAGE TypeApplications #-}
5 {-# LANGUAGE ViewPatterns #-}
6 -- for Symantic.Parser's TemplateHaskell
7 {-# LANGUAGE MagicHash #-}
8 {-# LANGUAGE ScopedTypeVariables #-}
9 {-# LANGUAGE RankNTypes #-}
10 {-# LANGUAGE UnboxedTuples #-}
11 {-# OPTIONS_GHC -Wno-unused-matches #-}
12 {-# OPTIONS_GHC -Wno-unused-local-binds #-}
13 module Parsers.Brainfuck.SymanticParser.PprSplice where
15 import Data.Either (Either)
16 import Data.Text (Text)
18 import Text.Show (show)
19 import qualified Data.ByteString as BS
20 import qualified Data.ByteString.Internal
21 import qualified Data.Either
22 import qualified Data.Function
23 import qualified Data.Map.Internal
24 import qualified Data.Map.Strict.Internal
25 import qualified Data.Proxy
26 import qualified Data.Set.Internal
27 import qualified Data.Text.Internal
28 import qualified Data.Text.Unsafe
29 import qualified GHC.Base
30 import qualified GHC.Classes
31 import qualified GHC.ForeignPtr
32 import qualified GHC.Maybe
33 import qualified GHC.Num
34 import qualified GHC.Prim
35 import qualified GHC.Show
36 import qualified GHC.Tuple
37 import qualified GHC.Types
38 import qualified GHC.Word
39 import qualified Language.Haskell.TH as TH
40 import qualified Language.Haskell.TH.Syntax as TH
41 import qualified Prelude
42 import qualified Symantic.Parser as SP
43 import qualified Symantic.Parser.Grammar.Combinators
44 import qualified Symantic.Parser.Haskell
45 import qualified Symantic.Parser.Machine
46 import qualified Symantic.Parser.Machine.Generate
47 import qualified Symantic.Parser.Machine.Input
48 import qualified System.IO as IO
50 import qualified Parsers.Brainfuck.Types
51 import Parsers.Brainfuck.Types (Instruction)
52 import Parsers.Brainfuck.SymanticParser.Grammar (grammar)
54 splice :: IO (TH.TExp (BS.ByteString -> Either (SP.ParsingError BS.ByteString) [Instruction]))
55 splice = TH.runQ (TH.examineCode (SP.runParser grammar))
60 IO.writeFile "parsers/Parsers/Brainfuck/SymanticParser/PprSplice.hs.ppr"
61 (show (TH.ppr ((TH.unType tExp))))
63 -- The splice below has been manually paste with:
64 -- :r parsers/Parsers/Brainfuck/SymanticParser/PprSplice.hs.ppr
65 -- :%s/#\(_[0-9]\+\)/\1# /g
66 -- :%s/GHC.Tuple.()/()/g
67 -- :%s/GHC.Types.\[]/[]/g
68 parserByteString :: BS.ByteString -> Either (SP.ParsingError BS.ByteString) [Instruction]
70 \(input_0 :: inp_6989586621679446738) -> let {!(# init_1,
72 readNext_3 #) = let {!(Data.ByteString.Internal.PS (GHC.ForeignPtr.ForeignPtr addr_4#
76 next_8 (i_9@(GHC.Types.I# i_10# )) = case GHC.Prim.readWord8OffAddr# (addr_4# `GHC.Prim.plusAddr#` i_10# ) 0# GHC.Prim.realWorld# of
78 x_12 #) -> case GHC.Prim.touch# final_5 s'_11 of
79 _ -> (# GHC.Word.W8# x_12,
82 (GHC.Classes.< size_7),
84 finalRet_13 = \_farInp_14 _farExp_15 v_16 _inp_17 -> Data.Either.Right v_16;
85 finalRaise_18 :: forall b_19 .
86 Symantic.Parser.Machine.Generate.Catcher inp_6989586621679446738
87 b_19 = \(!exn_20) _failInp_21 (!farInp_22) (!farExp_23) -> Data.Either.Left Symantic.Parser.Machine.Generate.ParsingErrorStandard{Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp_22,
88 Symantic.Parser.Machine.Generate.parsingErrorException = exn_20,
89 Symantic.Parser.Machine.Generate.parsingErrorUnexpected = if readMore_2 farInp_22
90 then GHC.Maybe.Just (let (# c_24,
91 _ #) = readNext_3 farInp_22
93 else GHC.Maybe.Nothing,
94 Symantic.Parser.Machine.Generate.parsingErrorExpecting = farExp_23}}
95 in let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp_6989586621679446738)
96 in let {name_25 = \(!ok_26) (!inp_27) (!koByLabel_28) -> name_29 (let _ = "suspend"
97 in \farInp_30 farExp_31 v_32 (!inp_33) -> let _ = "resume"
98 in ok_26 farInp_30 farExp_31 (let _ = "resume.genCode"
99 in ()) inp_33) inp_27 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise_18 Symantic.Parser.Grammar.Combinators.ExceptionFailure koByLabel_28) Data.Map.Internal.Tip Data.Map.Internal.Tip);
100 name_34 = \(!ok_35) (!inp_36) (!koByLabel_37) -> name_38 (let _ = "suspend"
101 in \farInp_39 farExp_40 v_41 (!inp_42) -> let _ = "resume"
102 in ok_35 farInp_39 farExp_40 (let _ = "resume.genCode"
103 in v_41 []) inp_42) inp_36 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise_18 Symantic.Parser.Grammar.Combinators.ExceptionFailure koByLabel_37) Data.Map.Internal.Tip Data.Map.Internal.Tip);
104 name_38 = \(!ok_43) (!inp_44) (!koByLabel_45) -> let _ = "catch ExceptionFailure"
105 in let catchHandler_46 (!_exn_47) (!failInp_48) (!farInp_49) (!farExp_50) = let _ = "catch.ko ExceptionFailure"
106 in if (GHC.Classes.==) @GHC.Types.Int inp_44 failInp_48
107 then let _ = "choicesBranch.then"
109 in ok_43 farInp_49 farExp_50 (let _ = "resume.genCode"
110 in \x_51 -> x_51) failInp_48
111 else let _ = "choicesBranch.else"
112 in Data.Map.Strict.Internal.findWithDefault finalRaise_18 Symantic.Parser.Grammar.Combinators.ExceptionFailure koByLabel_45 Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp_48 farInp_49 farExp_50
113 in let join_52 = \farInp_53 farExp_54 v_55 (!inp_56) -> name_25 (let _ = "suspend"
114 in \farInp_57 farExp_58 v_59 (!inp_60) -> name_38 (let _ = "suspend"
115 in \farInp_61 farExp_62 v_63 (!inp_64) -> let _ = "resume"
116 in ok_43 farInp_61 farExp_62 (let _ = "resume.genCode"
117 in \x_65 -> v_55 : v_63 x_65) inp_64) inp_60 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler_46 Data.Map.Internal.Tip Data.Map.Internal.Tip)) inp_56 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler_46 Data.Map.Internal.Tip Data.Map.Internal.Tip)
118 in let readFail_66 = catchHandler_46
119 in if readMore_2 inp_44
121 cs_68 #) = readNext_3 inp_44
122 in if (\x_69 -> GHC.Types.True) c_67
123 then if 60 GHC.Classes.== c_67
124 then let _ = "choicesBranch.then"
125 in let readFail_70 = readFail_66
126 in if readMore_2 inp_44
128 cs_72 #) = readNext_3 inp_44
129 in if (\x_73 -> GHC.Types.True) c_71
130 then let _ = "resume"
131 in join_52 init_1 Data.Set.Internal.empty (let _ = "resume.genCode"
132 in Parsers.Brainfuck.Types.Backward) cs_72
133 else let _ = "checkToken.else"
134 in let failExp_74 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
135 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'_6989586621679198986)) Data.Set.Internal.Tip Data.Set.Internal.Tip
137 farExp_76 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
138 GHC.Types.LT -> (# inp_44,
140 GHC.Types.EQ -> (# init_1,
141 failExp_74 GHC.Base.<> Data.Set.Internal.empty #)
142 GHC.Types.GT -> (# init_1,
143 Data.Set.Internal.empty #)
144 in readFail_70 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_75 farExp_76
145 else let _ = "checkHorizon.else"
146 in let failExp_77 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
147 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679198986 1)) Data.Set.Internal.Tip Data.Set.Internal.Tip
149 farExp_79 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
150 GHC.Types.LT -> (# inp_44,
152 GHC.Types.EQ -> (# init_1,
153 failExp_77 GHC.Base.<> Data.Set.Internal.empty #)
154 GHC.Types.GT -> (# init_1,
155 Data.Set.Internal.empty #)
156 in readFail_70 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_78 farExp_79
157 else let _ = "choicesBranch.else"
158 in if 62 GHC.Classes.== c_67
159 then let _ = "choicesBranch.then"
160 in let readFail_80 = readFail_66
161 in if readMore_2 inp_44
163 cs_82 #) = readNext_3 inp_44
164 in if (\x_83 -> GHC.Types.True) c_81
165 then let _ = "resume"
166 in join_52 init_1 Data.Set.Internal.empty (let _ = "resume.genCode"
167 in Parsers.Brainfuck.Types.Forward) cs_82
168 else let _ = "checkToken.else"
169 in let failExp_84 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
170 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'_6989586621679198986)) Data.Set.Internal.Tip Data.Set.Internal.Tip
172 farExp_86 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
173 GHC.Types.LT -> (# inp_44,
175 GHC.Types.EQ -> (# init_1,
176 failExp_84 GHC.Base.<> Data.Set.Internal.empty #)
177 GHC.Types.GT -> (# init_1,
178 Data.Set.Internal.empty #)
179 in readFail_80 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_85 farExp_86
180 else let _ = "checkHorizon.else"
181 in let failExp_87 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
182 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679198986 1)) Data.Set.Internal.Tip Data.Set.Internal.Tip
184 farExp_89 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
185 GHC.Types.LT -> (# inp_44,
187 GHC.Types.EQ -> (# init_1,
188 failExp_87 GHC.Base.<> Data.Set.Internal.empty #)
189 GHC.Types.GT -> (# init_1,
190 Data.Set.Internal.empty #)
191 in readFail_80 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_88 farExp_89
192 else let _ = "choicesBranch.else"
193 in if 43 GHC.Classes.== c_67
194 then let _ = "choicesBranch.then"
195 in let readFail_90 = readFail_66
196 in if readMore_2 inp_44
198 cs_92 #) = readNext_3 inp_44
199 in if (\x_93 -> GHC.Types.True) c_91
200 then let _ = "resume"
201 in join_52 init_1 Data.Set.Internal.empty (let _ = "resume.genCode"
202 in Parsers.Brainfuck.Types.Increment) cs_92
203 else let _ = "checkToken.else"
204 in let failExp_94 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
205 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'_6989586621679198986)) Data.Set.Internal.Tip Data.Set.Internal.Tip
207 farExp_96 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
208 GHC.Types.LT -> (# inp_44,
210 GHC.Types.EQ -> (# init_1,
211 failExp_94 GHC.Base.<> Data.Set.Internal.empty #)
212 GHC.Types.GT -> (# init_1,
213 Data.Set.Internal.empty #)
214 in readFail_90 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_95 farExp_96
215 else let _ = "checkHorizon.else"
216 in let failExp_97 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
217 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679198986 1)) Data.Set.Internal.Tip Data.Set.Internal.Tip
219 farExp_99 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
220 GHC.Types.LT -> (# inp_44,
222 GHC.Types.EQ -> (# init_1,
223 failExp_97 GHC.Base.<> Data.Set.Internal.empty #)
224 GHC.Types.GT -> (# init_1,
225 Data.Set.Internal.empty #)
226 in readFail_90 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_98 farExp_99
227 else let _ = "choicesBranch.else"
228 in if 45 GHC.Classes.== c_67
229 then let _ = "choicesBranch.then"
230 in let readFail_100 = readFail_66
231 in if readMore_2 inp_44
233 cs_102 #) = readNext_3 inp_44
234 in if (\x_103 -> GHC.Types.True) c_101
235 then let _ = "resume"
236 in join_52 init_1 Data.Set.Internal.empty (let _ = "resume.genCode"
237 in Parsers.Brainfuck.Types.Decrement) cs_102
238 else let _ = "checkToken.else"
239 in let failExp_104 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
240 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'_6989586621679198986)) Data.Set.Internal.Tip Data.Set.Internal.Tip
241 in let (# farInp_105,
242 farExp_106 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
243 GHC.Types.LT -> (# inp_44,
245 GHC.Types.EQ -> (# init_1,
246 failExp_104 GHC.Base.<> Data.Set.Internal.empty #)
247 GHC.Types.GT -> (# init_1,
248 Data.Set.Internal.empty #)
249 in readFail_100 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_105 farExp_106
250 else let _ = "checkHorizon.else"
251 in let failExp_107 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
252 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679198986 1)) Data.Set.Internal.Tip Data.Set.Internal.Tip
253 in let (# farInp_108,
254 farExp_109 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
255 GHC.Types.LT -> (# inp_44,
257 GHC.Types.EQ -> (# init_1,
258 failExp_107 GHC.Base.<> Data.Set.Internal.empty #)
259 GHC.Types.GT -> (# init_1,
260 Data.Set.Internal.empty #)
261 in readFail_100 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_108 farExp_109
262 else let _ = "choicesBranch.else"
263 in if 44 GHC.Classes.== c_67
264 then let _ = "choicesBranch.then"
265 in let readFail_110 = readFail_66
266 in if readMore_2 inp_44
268 cs_112 #) = readNext_3 inp_44
269 in if (\x_113 -> GHC.Types.True) c_111
270 then let _ = "resume"
271 in join_52 init_1 Data.Set.Internal.empty (let _ = "resume.genCode"
272 in Parsers.Brainfuck.Types.Input) cs_112
273 else let _ = "checkToken.else"
274 in let failExp_114 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
275 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'_6989586621679198986)) Data.Set.Internal.Tip Data.Set.Internal.Tip
276 in let (# farInp_115,
277 farExp_116 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
278 GHC.Types.LT -> (# inp_44,
280 GHC.Types.EQ -> (# init_1,
281 failExp_114 GHC.Base.<> Data.Set.Internal.empty #)
282 GHC.Types.GT -> (# init_1,
283 Data.Set.Internal.empty #)
284 in readFail_110 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_115 farExp_116
285 else let _ = "checkHorizon.else"
286 in let failExp_117 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
287 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679198986 1)) Data.Set.Internal.Tip Data.Set.Internal.Tip
288 in let (# farInp_118,
289 farExp_119 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
290 GHC.Types.LT -> (# inp_44,
292 GHC.Types.EQ -> (# init_1,
293 failExp_117 GHC.Base.<> Data.Set.Internal.empty #)
294 GHC.Types.GT -> (# init_1,
295 Data.Set.Internal.empty #)
296 in readFail_110 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_118 farExp_119
297 else let _ = "choicesBranch.else"
298 in if 46 GHC.Classes.== c_67
299 then let _ = "choicesBranch.then"
300 in let readFail_120 = readFail_66
301 in if readMore_2 inp_44
303 cs_122 #) = readNext_3 inp_44
304 in if (\x_123 -> GHC.Types.True) c_121
305 then let _ = "resume"
306 in join_52 init_1 Data.Set.Internal.empty (let _ = "resume.genCode"
307 in Parsers.Brainfuck.Types.Output) cs_122
308 else let _ = "checkToken.else"
309 in let failExp_124 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
310 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'_6989586621679198986)) Data.Set.Internal.Tip Data.Set.Internal.Tip
311 in let (# farInp_125,
312 farExp_126 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
313 GHC.Types.LT -> (# inp_44,
315 GHC.Types.EQ -> (# init_1,
316 failExp_124 GHC.Base.<> Data.Set.Internal.empty #)
317 GHC.Types.GT -> (# init_1,
318 Data.Set.Internal.empty #)
319 in readFail_120 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_125 farExp_126
320 else let _ = "checkHorizon.else"
321 in let failExp_127 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
322 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679198986 1)) Data.Set.Internal.Tip Data.Set.Internal.Tip
323 in let (# farInp_128,
324 farExp_129 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
325 GHC.Types.LT -> (# inp_44,
327 GHC.Types.EQ -> (# init_1,
328 failExp_127 GHC.Base.<> Data.Set.Internal.empty #)
329 GHC.Types.GT -> (# init_1,
330 Data.Set.Internal.empty #)
331 in readFail_120 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_128 farExp_129
332 else let _ = "choicesBranch.else"
333 in if 91 GHC.Classes.== c_67
334 then let _ = "choicesBranch.then"
335 in let readFail_130 = readFail_66
336 in if readMore_2 ((GHC.Num.+) @GHC.Types.Int 1 inp_44)
338 cs_132 #) = readNext_3 inp_44
339 in if (\x_133 -> GHC.Types.True) c_131
340 then name_25 (let _ = "suspend"
341 in \farInp_134 farExp_135 v_136 (!inp_137) -> name_34 (let _ = "suspend"
342 in \farInp_138 farExp_139 v_140 (!inp_141) -> let readFail_142 = readFail_130
343 in if readMore_2 inp_141
345 cs_144 #) = readNext_3 inp_141
346 in if (93 GHC.Classes.==) c_143
347 then let _ = "resume"
348 in join_52 farInp_138 farExp_139 (let _ = "resume.genCode"
349 in Parsers.Brainfuck.Types.Loop v_140) cs_144
350 else let _ = "checkToken.else"
351 in readFail_142 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_141 farInp_138 farExp_139
352 else let _ = "checkHorizon.else"
353 in let failExp_145 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
354 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679198986 1)) Data.Set.Internal.Tip Data.Set.Internal.Tip
355 in let (# farInp_146,
356 farExp_147 #) = case GHC.Classes.compare @GHC.Types.Int farInp_138 inp_141 of
357 GHC.Types.LT -> (# inp_141,
359 GHC.Types.EQ -> (# farInp_138,
360 failExp_145 GHC.Base.<> farExp_139 #)
361 GHC.Types.GT -> (# farInp_138,
363 in readFail_142 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_141 farInp_146 farExp_147) inp_137 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail_130 Data.Map.Internal.Tip Data.Map.Internal.Tip)) cs_132 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail_130 Data.Map.Internal.Tip Data.Map.Internal.Tip)
364 else let _ = "checkToken.else"
365 in let failExp_148 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
366 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'_6989586621679198986)) Data.Set.Internal.Tip Data.Set.Internal.Tip
367 in let (# farInp_149,
368 farExp_150 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
369 GHC.Types.LT -> (# inp_44,
371 GHC.Types.EQ -> (# init_1,
372 failExp_148 GHC.Base.<> Data.Set.Internal.empty #)
373 GHC.Types.GT -> (# init_1,
374 Data.Set.Internal.empty #)
375 in readFail_130 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_149 farExp_150
376 else let _ = "checkHorizon.else"
377 in let failExp_151 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
378 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679198986 2)) Data.Set.Internal.Tip Data.Set.Internal.Tip
379 in let (# farInp_152,
380 farExp_153 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
381 GHC.Types.LT -> (# inp_44,
383 GHC.Types.EQ -> (# init_1,
384 failExp_151 GHC.Base.<> Data.Set.Internal.empty #)
385 GHC.Types.GT -> (# init_1,
386 Data.Set.Internal.empty #)
387 in readFail_130 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_152 farExp_153
388 else let _ = "choicesBranch.else"
389 in let failExp_154 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure Symantic.Parser.Grammar.Combinators.FailureEmpty) Data.Set.Internal.Tip Data.Set.Internal.Tip
390 in let (# farInp_155,
391 farExp_156 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
392 GHC.Types.LT -> (# inp_44,
394 GHC.Types.EQ -> (# init_1,
395 failExp_154 GHC.Base.<> Data.Set.Internal.empty #)
396 GHC.Types.GT -> (# init_1,
397 Data.Set.Internal.empty #)
398 in readFail_66 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_155 farExp_156
399 else let _ = "checkToken.else"
400 in let failExp_157 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
401 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'_6989586621679198986)) Data.Set.Internal.Tip Data.Set.Internal.Tip
402 in let (# farInp_158,
403 farExp_159 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
404 GHC.Types.LT -> (# inp_44,
406 GHC.Types.EQ -> (# init_1,
407 failExp_157 GHC.Base.<> Data.Set.Internal.empty #)
408 GHC.Types.GT -> (# init_1,
409 Data.Set.Internal.empty #)
410 in readFail_66 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_158 farExp_159
411 else let _ = "checkHorizon.else"
412 in let failExp_160 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
413 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679198986 1)) Data.Set.Internal.Tip Data.Set.Internal.Tip
414 in let (# farInp_161,
415 farExp_162 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_44 of
416 GHC.Types.LT -> (# inp_44,
418 GHC.Types.EQ -> (# init_1,
419 failExp_160 GHC.Base.<> Data.Set.Internal.empty #)
420 GHC.Types.GT -> (# init_1,
421 Data.Set.Internal.empty #)
422 in readFail_66 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_44 farInp_161 farExp_162;
423 name_29 = \(!ok_163) (!inp_164) (!koByLabel_165) -> let _ = "catch ExceptionFailure"
424 in let catchHandler_166 (!_exn_167) (!failInp_168) (!farInp_169) (!farExp_170) = let _ = "catch.ko ExceptionFailure"
425 in if (GHC.Classes.==) @GHC.Types.Int inp_164 failInp_168
426 then let _ = "choicesBranch.then"
428 in ok_163 farInp_169 farExp_170 (let _ = "resume.genCode"
429 in \x_171 -> x_171) failInp_168
430 else let _ = "choicesBranch.else"
431 in Data.Map.Strict.Internal.findWithDefault finalRaise_18 Symantic.Parser.Grammar.Combinators.ExceptionFailure koByLabel_165 Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp_168 farInp_169 farExp_170
432 in let readFail_172 = catchHandler_166
433 in if readMore_2 inp_164
435 cs_174 #) = readNext_3 inp_164
436 in if (\c_175 -> GHC.Classes.not ((60 GHC.Classes.== c_175) GHC.Classes.|| ((62 GHC.Classes.== c_175) GHC.Classes.|| ((43 GHC.Classes.== c_175) GHC.Classes.|| ((45 GHC.Classes.== c_175) GHC.Classes.|| ((44 GHC.Classes.== c_175) GHC.Classes.|| ((46 GHC.Classes.== c_175) GHC.Classes.|| ((91 GHC.Classes.== c_175) GHC.Classes.|| ((93 GHC.Classes.== c_175) GHC.Classes.|| GHC.Types.False))))))))) c_173
437 then name_29 (let _ = "suspend"
438 in \farInp_176 farExp_177 v_178 (!inp_179) -> let _ = "resume"
439 in ok_163 farInp_176 farExp_177 (let _ = "resume.genCode"
440 in \x_180 -> v_178 x_180) inp_179) cs_174 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail_172 Data.Map.Internal.Tip Data.Map.Internal.Tip)
441 else let _ = "checkToken.else"
442 in readFail_172 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_164 init_1 Data.Set.Internal.empty
443 else let _ = "checkHorizon.else"
444 in let failExp_181 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure (case inputToken of
445 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679198986) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679198986 1)) Data.Set.Internal.Tip Data.Set.Internal.Tip
446 in let (# farInp_182,
447 farExp_183 #) = case GHC.Classes.compare @GHC.Types.Int init_1 inp_164 of
448 GHC.Types.LT -> (# inp_164,
450 GHC.Types.EQ -> (# init_1,
451 failExp_181 GHC.Base.<> Data.Set.Internal.empty #)
452 GHC.Types.GT -> (# init_1,
453 Data.Set.Internal.empty #)
454 in readFail_172 Symantic.Parser.Grammar.Combinators.ExceptionFailure inp_164 farInp_182 farExp_183}
455 in name_25 (let _ = "suspend"
456 in \farInp_184 farExp_185 v_186 (!inp_187) -> name_34 (let _ = "suspend"
457 in \farInp_188 farExp_189 v_190 (!inp_191) -> let _ = "resume"
458 in finalRet_13 farInp_188 farExp_189 (let _ = "resume.genCode"
459 in v_190) inp_191) inp_187 Data.Map.Internal.Tip) init_1 Data.Map.Internal.Tip