change ShowLetName into HideableName
[haskell/symantic-parser.git] / test / Golden / Splice / G5.expected.txt
index 7aed34c9236f985c6c04352f8a04e18df773698d..7b91d4cbab0ab3376e8a7201fbd84beb0d3e5af3 100644 (file)
-test/Golden/Splice/G5.hs:0:0:: Splicing expression
-    P.runParser @Text Grammar.g5
-  ======>
-    \ (input :: inp)
-      -> let
-           !(# init, readMore, readNext #)
-             = let _ = "cursorOf" in
-               let
-                 next t@(Data.Text.Internal.Text arr off unconsumed)
-                   = let !(Data.Text.Unsafe.Iter c d) = (Data.Text.Unsafe.iter t) 0
-                     in
-                       (# c, ((Data.Text.Internal.Text arr) (off + d)) (unconsumed - d) #)
-                 more (Data.Text.Internal.Text _ _ unconsumed) = (unconsumed > 0)
-               in (# input, more, next #) in
-         let finalRet = \ _farInp _farExp v _inp -> Right v in
-         let
-           finalRaise :: forall b. P.Catcher inp b
-             = \ _failInp !farInp !farExp
-                 -> Left
-                      P.ParsingErrorStandard
-                        {P.parsingErrorOffset = P.offset farInp,
-                         P.parsingErrorUnexpected = if readMore farInp then
-                                                        Just (let (# c, _ #) = readNext farInp in c)
-                                                    else
-                                                        Nothing,
-                         P.parsingErrorExpecting = Data.Set.Internal.fromList farExp} in
-         let
-           name
-             = \ !ok !inp !koByLabel
-                 -> let _ = "catchException lbl=fail" in
-                    let
-                      readFail
-                        = \ !failInp !farInp !farExp
-                            -> let
-                                 (# farInp, farExp #)
-                                   = case ((compare `Data.Function.on` P.offset) farInp) inp of
-                                       LT -> (# inp, [] #)
-                                       EQ -> (# farInp, (farExp <> []) #)
-                                       GT -> (# farInp, farExp #)
-                               in
-                                 (((((Data.Map.Strict.Internal.findWithDefault finalRaise) "fail")
-                                      koByLabel)
-                                     inp)
-                                    farInp)
-                                   farExp
-                    in
-                      if readMore ((P.shiftRightText 3) inp) then
-                          let !(# c, cs #) = readNext inp
-                          in
-                            if ('a' ==) c then
-                                let readFail = readFail in
-                                let !(# c, cs #) = readNext cs
-                                in
-                                  if ('b' ==) c then
-                                      let readFail = readFail in
-                                      let !(# c, cs #) = readNext cs
-                                      in
-                                        if ('c' ==) c then
-                                            let readFail = readFail in
-                                            let !(# c, cs #) = readNext cs
-                                            in
-                                              if ('d' ==) c then
-                                                  let _ = "resume"
-                                                  in
-                                                    (((ok init) [])
-                                                       (let _ = "resume.genCode"
-                                                        in
-                                                          ((\ x -> \ x -> x x)
-                                                             (((\ x -> \ x -> x x)
-                                                                 (((\ x -> \ x -> x x)
-                                                                     (((\ x -> \ x -> x x)
-                                                                         (\ x
-                                                                            -> \ x
-                                                                                 -> \ x
-                                                                                      -> \ x
-                                                                                           -> ('a'
-                                                                                                 : ('b'
-                                                                                                      : ('c'
-                                                                                                           : ('d'
-                                                                                                                : []))))))
-                                                                        c))
-                                                                    c))
-                                                                c))
-                                                            c))
-                                                      cs
-                                              else
-                                                  let _ = "checkToken.else" in
-                                                  let
-                                                    (# farInp, farExp #)
-                                                      = case
-                                                            ((compare `Data.Function.on` P.offset)
-                                                               init)
-                                                              cs
-                                                        of
-                                                          LT -> (# cs, [P.ErrorItemToken 'd'] #)
-                                                          EQ
-                                                            -> (# init, 
-                                                                  ([] <> [P.ErrorItemToken 'd']) #)
-                                                          GT -> (# init, [] #)
-                                                  in ((readFail cs) farInp) farExp
-                                        else
-                                            let _ = "checkToken.else" in
-                                            let
-                                              (# farInp, farExp #)
-                                                = case
-                                                      ((compare `Data.Function.on` P.offset) init)
-                                                        cs
-                                                  of
-                                                    LT -> (# cs, [P.ErrorItemToken 'c'] #)
-                                                    EQ -> (# init, ([] <> [P.ErrorItemToken 'c']) #)
-                                                    GT -> (# init, [] #)
-                                            in ((readFail cs) farInp) farExp
+\(input :: inp) ->
+  let !(#
+         init,
+         readMore,
+         readNext
+         #) =
+          let _ = "cursorOf"
+           in let next
+                    ( t@( Data.Text.Internal.Text
+                            arr
+                            off
+                            unconsumed
+                          )
+                      ) =
+                      let !( Data.Text.Unsafe.Iter
+                               c
+                               d
+                             ) = Data.Text.Unsafe.iter t 0
+                       in (#
+                            c,
+                            Data.Text.Internal.Text arr (off GHC.Num.+ d) (unconsumed GHC.Num.- d)
+                          #)
+                  more
+                    ( Data.Text.Internal.Text
+                        _
+                        _
+                        unconsumed
+                      ) = unconsumed GHC.Classes.> 0
+               in (# input, more, next #)
+      finalRet = \_farInp _farExp v _inp -> Symantic.Parser.Machine.Generate.returnST GHC.Base.$ Data.Either.Right v
+      finalRaise ::
+        forall st b.
+        Symantic.Parser.Machine.Generate.Catcher
+          st
+          inp
+          b = \(!exn) _failInp (!farInp) (!farExp) ->
+          Symantic.Parser.Machine.Generate.returnST GHC.Base.$
+            Data.Either.Left
+              Symantic.Parser.Machine.Generate.ParsingError
+                { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp,
+                  Symantic.Parser.Machine.Generate.parsingErrorException = exn,
+                  Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
+                    if readMore farInp
+                      then
+                        GHC.Maybe.Just
+                          ( let (#
+                                  c,
+                                  _
+                                  #) = readNext farInp
+                             in c
+                          )
+                      else GHC.Maybe.Nothing,
+                  Symantic.Parser.Machine.Generate.parsingErrorExpecting = farExp
+                }
+   in GHC.ST.runST
+        ( let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp)
+           in let name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
+                    let _ = "catch ExceptionFailure"
+                     in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
+                              let _ = "catch.ko ExceptionFailure"
+                               in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
+                         in let readFail = catchHandler
+                             in if readMore (Symantic.Parser.Machine.Input.shiftRightText 3 callInput)
+                                  then
+                                    let !(#
+                                           c,
+                                           cs
+                                           #) = readNext callInput
+                                     in if (GHC.Classes.==) 'a' c
+                                          then
+                                            let readFail = readFail
+                                             in let !(#
+                                                       c,
+                                                       cs
+                                                       #) = readNext cs
+                                                 in if (GHC.Classes.==) 'b' c
+                                                      then
+                                                        let readFail = readFail
+                                                         in let !(#
+                                                                   c,
+                                                                   cs
+                                                                   #) = readNext cs
+                                                             in if (GHC.Classes.==) 'c' c
+                                                                  then
+                                                                    let readFail = readFail
+                                                                     in let !(#
+                                                                               c,
+                                                                               cs
+                                                                               #) = readNext cs
+                                                                         in if (GHC.Classes.==) 'd' c
+                                                                              then
+                                                                                let _ = "resume"
+                                                                                 in callReturn
+                                                                                      init
+                                                                                      Data.Set.Internal.empty
+                                                                                      ( let _ = "resume.genCode"
+                                                                                         in (GHC.Types.:) 'a' ((GHC.Types.:) 'b' ((GHC.Types.:) 'c' ((GHC.Types.:) 'd' GHC.Types . [])))
+                                                                                      )
+                                                                                      cs
+                                                                              else
+                                                                                let _ = "checkToken.else"
+                                                                                 in let failExp =
+                                                                                          Data.Set.Internal.Bin
+                                                                                            1
+                                                                                            ( Symantic.Parser.Grammar.Combinators.SomeFailure
+                                                                                                ( case inputToken of
+                                                                                                    (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'd'
+                                                                                                )
+                                                                                            )
+                                                                                            Data.Set.Internal.Tip
+                                                                                            Data.Set.Internal.Tip
+                                                                                     in let (#
+                                                                                              farInp,
+                                                                                              farExp
+                                                                                              #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
+                                                                                                GHC.Types.LT ->
+                                                                                                  (#
+                                                                                                    cs,
+                                                                                                    failExp
+                                                                                                  #)
+                                                                                                GHC.Types.EQ ->
+                                                                                                  (#
+                                                                                                    init,
+                                                                                                    failExp GHC.Base.<> Data.Set.Internal.empty
+                                                                                                  #)
+                                                                                                GHC.Types.GT ->
+                                                                                                  (#
+                                                                                                    init,
+                                                                                                    Data.Set.Internal.empty
+                                                                                                  #)
+                                                                                         in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
+                                                                  else
+                                                                    let _ = "checkToken.else"
+                                                                     in let failExp =
+                                                                              Data.Set.Internal.Bin
+                                                                                1
+                                                                                ( Symantic.Parser.Grammar.Combinators.SomeFailure
+                                                                                    ( case inputToken of
+                                                                                        (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'c'
+                                                                                    )
+                                                                                )
+                                                                                Data.Set.Internal.Tip
+                                                                                Data.Set.Internal.Tip
+                                                                         in let (#
+                                                                                  farInp,
+                                                                                  farExp
+                                                                                  #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
+                                                                                    GHC.Types.LT ->
+                                                                                      (#
+                                                                                        cs,
+                                                                                        failExp
+                                                                                      #)
+                                                                                    GHC.Types.EQ ->
+                                                                                      (#
+                                                                                        init,
+                                                                                        failExp GHC.Base.<> Data.Set.Internal.empty
+                                                                                      #)
+                                                                                    GHC.Types.GT ->
+                                                                                      (#
+                                                                                        init,
+                                                                                        Data.Set.Internal.empty
+                                                                                      #)
+                                                                             in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
+                                                      else
+                                                        let _ = "checkToken.else"
+                                                         in let failExp =
+                                                                  Data.Set.Internal.Bin
+                                                                    1
+                                                                    ( Symantic.Parser.Grammar.Combinators.SomeFailure
+                                                                        ( case inputToken of
+                                                                            (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
+                                                                        )
+                                                                    )
+                                                                    Data.Set.Internal.Tip
+                                                                    Data.Set.Internal.Tip
+                                                             in let (#
+                                                                      farInp,
+                                                                      farExp
+                                                                      #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
+                                                                        GHC.Types.LT ->
+                                                                          (#
+                                                                            cs,
+                                                                            failExp
+                                                                          #)
+                                                                        GHC.Types.EQ ->
+                                                                          (#
+                                                                            init,
+                                                                            failExp GHC.Base.<> Data.Set.Internal.empty
+                                                                          #)
+                                                                        GHC.Types.GT ->
+                                                                          (#
+                                                                            init,
+                                                                            Data.Set.Internal.empty
+                                                                          #)
+                                                                 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
+                                          else
+                                            let _ = "checkToken.else"
+                                             in let failExp =
+                                                      Data.Set.Internal.Bin
+                                                        1
+                                                        ( Symantic.Parser.Grammar.Combinators.SomeFailure
+                                                            ( case inputToken of
+                                                                (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
+                                                            )
+                                                        )
+                                                        Data.Set.Internal.Tip
+                                                        Data.Set.Internal.Tip
+                                                 in let (#
+                                                          farInp,
+                                                          farExp
+                                                          #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
+                                                            GHC.Types.LT ->
+                                                              (#
+                                                                callInput,
+                                                                failExp
+                                                              #)
+                                                            GHC.Types.EQ ->
+                                                              (#
+                                                                init,
+                                                                failExp GHC.Base.<> Data.Set.Internal.empty
+                                                              #)
+                                                            GHC.Types.GT ->
+                                                              (#
+                                                                init,
+                                                                Data.Set.Internal.empty
+                                                              #)
+                                                     in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
                                   else
-                                      let _ = "checkToken.else" in
-                                      let
-                                        (# farInp, farExp #)
-                                          = case ((compare `Data.Function.on` P.offset) init) cs of
-                                              LT -> (# cs, [P.ErrorItemToken 'b'] #)
-                                              EQ -> (# init, ([] <> [P.ErrorItemToken 'b']) #)
-                                              GT -> (# init, [] #)
-                                      in ((readFail cs) farInp) farExp
-                            else
-                                let _ = "checkToken.else" in
-                                let
-                                  (# farInp, farExp #)
-                                    = case ((compare `Data.Function.on` P.offset) init) inp of
-                                        LT -> (# inp, [P.ErrorItemToken 'a'] #)
-                                        EQ -> (# init, ([] <> [P.ErrorItemToken 'a']) #)
-                                        GT -> (# init, [] #)
-                                in ((readFail inp) farInp) farExp
-                      else
-                          let _ = "checkHorizon.else" in
-                          let
-                            (# farInp, farExp #)
-                              = case ((compare `Data.Function.on` P.offset) init) inp of
-                                  LT -> (# inp, [P.ErrorItemHorizon 4] #)
-                                  EQ -> (# init, ([] <> [P.ErrorItemHorizon 4]) #)
-                                  GT -> (# init, [] #)
-                          in ((readFail inp) farInp) farExp in
-         let
-           _ = "call exceptionsByName(name_1)=["fail"] catchStackByLabel(ctx)=[]"
-         in
-           ((name
-               (let
-                  _ = "suspend raiseException=fromList [(name_1,fromList [("fail",())])]"
-                in
-                  \ farInp farExp v !inp
-                    -> let
-                         name
-                           = \ !ok !inp !koByLabel
-                               -> let _ = "catchException lbl=fail" in
-                                  let
-                                    _ = "call exceptionsByName(name_1)=["fail"] catchStackByLabel(ctx)=["fail"]"
-                                  in
-                                    ((name
-                                        (let
-                                           _ = "suspend raiseException=fromList [(name_1,fromList [("fail",())]),(name_2,fromList [])]"
-                                         in
-                                           \ farInp farExp v !inp
-                                             -> let
-                                                  _ = "call exceptionsByName(name_2)=[] catchStackByLabel(ctx)=["fail"]"
-                                                in
-                                                  ((name
-                                                      (let
-                                                         _ = "suspend raiseException=fromList [(name_1,fromList [("fail",())]),(name_2,fromList [])]"
-                                                       in
-                                                         \ farInp farExp v !inp
-                                                           -> let _ = "resume"
-                                                              in
-                                                                (((ok farInp) farExp)
-                                                                   (let _ = "resume.genCode"
-                                                                    in
-                                                                      ((\ x -> \ x -> x x)
-                                                                         (((\ x -> \ x -> x x)
-                                                                             (\ x
-                                                                                -> \ x
-                                                                                     -> \ x
-                                                                                          -> (x : x x)))
-                                                                            v))
-                                                                        v))
-                                                                  inp))
-                                                     inp)
-                                                    (((((Data.Map.Internal.Bin 1) "fail")
-                                                         (\ !failInp !farInp !farExp
-                                                            -> if (\ x -> x)
-                                                                    (((\ (Data.Text.Internal.Text _
-                                                                                                  i
-                                                                                                  _)
-                                                                         (Data.Text.Internal.Text _
-                                                                                                  j
-                                                                                                  _)
-                                                                         -> (i == j))
-                                                                        inp)
-                                                                       failInp) then
-                                                                   let _ = "resume"
-                                                                   in
-                                                                     (((ok farInp) farExp)
-                                                                        (let _ = "resume.genCode"
-                                                                         in \ x -> x))
-                                                                       failInp
-                                                               else
-                                                                   let
-                                                                     (# farInp, farExp #)
-                                                                       = case
-                                                                             ((compare
-                                                                                 `Data.Function.on`
-                                                                                   P.offset)
-                                                                                farInp)
-                                                                               failInp
-                                                                         of
-                                                                           LT -> (# failInp, [] #)
-                                                                           EQ
-                                                                             -> (# farInp, 
-                                                                                   (farExp <> []) #)
-                                                                           GT
-                                                                             -> (# farInp, farExp #)
-                                                                   in
-                                                                     (((((Data.Map.Strict.Internal.findWithDefault
-                                                                            finalRaise)
-                                                                           "fail")
-                                                                          koByLabel)
-                                                                         failInp)
-                                                                        farInp)
-                                                                       farExp))
-                                                        Data.Map.Internal.Tip)
-                                                       Data.Map.Internal.Tip)))
-                                       inp)
-                                      (((((Data.Map.Internal.Bin 1) "fail")
-                                           (\ !failInp !farInp !farExp
-                                              -> if (\ x -> x)
-                                                      (((\ (Data.Text.Internal.Text _ i _)
-                                                           (Data.Text.Internal.Text _ j _)
-                                                           -> (i == j))
-                                                          inp)
-                                                         failInp) then
-                                                     let _ = "resume"
-                                                     in
-                                                       (((ok farInp) farExp)
-                                                          (let _ = "resume.genCode" in \ x -> x))
-                                                         failInp
-                                                 else
-                                                     let
-                                                       (# farInp, farExp #)
-                                                         = case
-                                                               ((compare
-                                                                   `Data.Function.on` P.offset)
-                                                                  farInp)
-                                                                 failInp
-                                                           of
-                                                             LT -> (# failInp, [] #)
-                                                             EQ -> (# farInp, (farExp <> []) #)
-                                                             GT -> (# farInp, farExp #)
-                                                     in
-                                                       (((((Data.Map.Strict.Internal.findWithDefault
-                                                              finalRaise)
-                                                             "fail")
-                                                            koByLabel)
-                                                           failInp)
-                                                          farInp)
-                                                         farExp))
-                                          Data.Map.Internal.Tip)
-                                         Data.Map.Internal.Tip) in
-                       let
-                         _ = "call exceptionsByName(name_2)=["fail"] catchStackByLabel(ctx)=[]"
-                       in
-                         ((name
-                             (let
-                                _ = "suspend raiseException=fromList [(name_1,fromList [("fail",())]),(name_2,fromList [("fail",())])]"
-                              in
-                                \ farInp farExp v !inp
-                                  -> let
-                                       join
-                                         = \ farInp farExp v !inp
-                                             -> let _ = "resume"
-                                                in
-                                                  (((finalRet farInp) farExp)
-                                                     (let _ = "resume.genCode"
-                                                      in
-                                                        ((\ x -> \ x -> x x)
-                                                           (((\ x -> \ x -> x x)
-                                                               (((\ x -> \ x -> x x)
-                                                                   (\ x
-                                                                      -> \ x -> \ x -> (x : x [])))
-                                                                  v))
-                                                              v))
-                                                          v))
-                                                    inp in
-                                     let _ = "catchException lbl=fail" in
-                                     let _ = "catchException lbl=fail" in
-                                     let
-                                       readFail
-                                         = \ !failInp !farInp !farExp
-                                             -> let _ = "resume"
-                                                in
-                                                  (((join farInp) farExp)
-                                                     (let _ = "resume.genCode" in ()))
-                                                    inp
-                                     in
-                                       if readMore inp then
-                                           let !(# c, cs #) = readNext inp
-                                           in
-                                             if (\ x -> True) c then
-                                                 let
-                                                   (# farInp, farExp #)
-                                                     = case
-                                                           ((compare `Data.Function.on` P.offset)
-                                                              farInp)
-                                                             inp
-                                                       of
-                                                         LT -> (# inp, [] #)
-                                                         EQ -> (# farInp, (farExp <> []) #)
-                                                         GT -> (# farInp, farExp #)
-                                                 in
-                                                   (((\ !failInp !farInp !farExp
-                                                        -> if (\ x -> x)
-                                                                (((\ (Data.Text.Internal.Text _ i _)
-                                                                     (Data.Text.Internal.Text _ j _)
-                                                                     -> (i == j))
-                                                                    inp)
-                                                                   failInp) then
-                                                               let
-                                                                 (# farInp, farExp #)
-                                                                   = case
-                                                                         ((compare
-                                                                             `Data.Function.on`
-                                                                               P.offset)
-                                                                            farInp)
-                                                                           failInp
-                                                                     of
-                                                                       LT
-                                                                         -> (# failInp, 
-                                                                               [P.ErrorItemEnd] #)
-                                                                       EQ
-                                                                         -> (# farInp, 
-                                                                               (farExp
-                                                                                  <>
-                                                                                    [P.ErrorItemEnd]) #)
-                                                                       GT -> (# farInp, farExp #)
-                                                               in
-                                                                 ((finalRaise failInp) farInp)
-                                                                   farExp
-                                                           else
-                                                               let
-                                                                 (# farInp, farExp #)
-                                                                   = case
-                                                                         ((compare
-                                                                             `Data.Function.on`
-                                                                               P.offset)
-                                                                            farInp)
-                                                                           failInp
-                                                                     of
-                                                                       LT -> (# failInp, [] #)
-                                                                       EQ
-                                                                         -> (# farInp, 
-                                                                               (farExp <> []) #)
-                                                                       GT -> (# farInp, farExp #)
-                                                               in
-                                                                 ((finalRaise failInp) farInp)
-                                                                   farExp)
-                                                       inp)
-                                                      farInp)
-                                                     farExp
-                                             else
-                                                 let _ = "checkToken.else" in
-                                                 let
-                                                   (# farInp, farExp #)
-                                                     = case
-                                                           ((compare `Data.Function.on` P.offset)
-                                                              farInp)
-                                                             inp
-                                                       of
-                                                         LT -> (# inp, [] #)
-                                                         EQ -> (# farInp, (farExp <> []) #)
-                                                         GT -> (# farInp, farExp #)
-                                                 in ((readFail inp) farInp) farExp
-                                       else
-                                           let _ = "checkHorizon.else" in
-                                           let
-                                             (# farInp, farExp #)
-                                               = case
-                                                     ((compare `Data.Function.on` P.offset) farInp)
-                                                       inp
-                                                 of
-                                                   LT -> (# inp, [P.ErrorItemHorizon 1] #)
-                                                   EQ
-                                                     -> (# farInp, 
-                                                           (farExp <> [P.ErrorItemHorizon 1]) #)
-                                                   GT -> (# farInp, farExp #)
-                                           in ((readFail inp) farInp) farExp))
-                            inp)
-                           Data.Map.Internal.Tip))
-              init)
-             Data.Map.Internal.Tip
+                                    let _ = "checkHorizon.else"
+                                     in let failExp =
+                                              Data.Set.Internal.Bin
+                                                1
+                                                ( Symantic.Parser.Grammar.Combinators.SomeFailure
+                                                    ( case inputToken of
+                                                        (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
+                                                    )
+                                                )
+                                                Data.Set.Internal.Tip
+                                                Data.Set.Internal.Tip
+                                         in let (#
+                                                  farInp,
+                                                  farExp
+                                                  #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
+                                                    GHC.Types.LT ->
+                                                      (#
+                                                        callInput,
+                                                        failExp
+                                                      #)
+                                                    GHC.Types.EQ ->
+                                                      (#
+                                                        init,
+                                                        failExp GHC.Base.<> Data.Set.Internal.empty
+                                                      #)
+                                                    GHC.Types.GT ->
+                                                      (#
+                                                        init,
+                                                        Data.Set.Internal.empty
+                                                      #)
+                                             in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
+               in name
+                    ( let _ = "suspend"
+                       in \farInp farExp v (!inp) -> do
+                            let dupv = \x -> x
+                            reg <- GHC.STRef.newSTRef dupv
+                            let _ = "iter"
+                             in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
+                                      if ( \( Data.Text.Internal.Text
+                                                _
+                                                i
+                                                _
+                                              )
+                                            ( Data.Text.Internal.Text
+                                                _
+                                                j
+                                                _
+                                              ) -> i GHC.Classes.== j
+                                         )
+                                        loopInput
+                                        failInp
+                                        then
+                                          let _ = "choicesBranch.then"
+                                           in do
+                                                sr <- GHC.STRef.readSTRef reg
+                                                let join = \farInp farExp v (!inp) ->
+                                                      let _ = "resume"
+                                                       in finalRet
+                                                            farInp
+                                                            farExp
+                                                            ( let _ = "resume.genCode"
+                                                               in GHC.Show.show ((GHC.Types.:) v (sr GHC.Types . []))
+                                                            )
+                                                            inp
+                                                 in let _ = "catch ExceptionFailure"
+                                                     in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
+                                                              let _ = "catch.ko ExceptionFailure"
+                                                               in if ( \( Data.Text.Internal.Text
+                                                                            _
+                                                                            i
+                                                                            _
+                                                                          )
+                                                                        ( Data.Text.Internal.Text
+                                                                            _
+                                                                            j
+                                                                            _
+                                                                          ) -> i GHC.Classes.== j
+                                                                     )
+                                                                    failInp
+                                                                    failInp
+                                                                    then
+                                                                      let _ = "choicesBranch.then"
+                                                                       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
+                                                                           in let (#
+                                                                                    farInp,
+                                                                                    farExp
+                                                                                    #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
+                                                                                      GHC.Types.LT ->
+                                                                                        (#
+                                                                                          failInp,
+                                                                                          failExp
+                                                                                        #)
+                                                                                      GHC.Types.EQ ->
+                                                                                        (#
+                                                                                          farInp,
+                                                                                          failExp GHC.Base.<> farExp
+                                                                                        #)
+                                                                                      GHC.Types.GT ->
+                                                                                        (#
+                                                                                          farInp,
+                                                                                          farExp
+                                                                                        #)
+                                                                               in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
+                                                                    else
+                                                                      let _ = "choicesBranch.else"
+                                                                       in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
+                                                         in let _ = "catch ExceptionFailure"
+                                                             in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
+                                                                      let _ = "catch.ko ExceptionFailure"
+                                                                       in let _ = "resume"
+                                                                           in join
+                                                                                farInp
+                                                                                farExp
+                                                                                ( let _ = "resume.genCode"
+                                                                                   in GHC.Tuple . ()
+                                                                                )
+                                                                                failInp
+                                                                 in let readFail = catchHandler
+                                                                     in if readMore failInp
+                                                                          then
+                                                                            let !(#
+                                                                                   c,
+                                                                                   cs
+                                                                                   #) = readNext failInp
+                                                                             in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
+                                                                          else
+                                                                            let _ = "checkHorizon.else"
+                                                                             in let failExp =
+                                                                                      Data.Set.Internal.Bin
+                                                                                        1
+                                                                                        ( Symantic.Parser.Grammar.Combinators.SomeFailure
+                                                                                            ( case inputToken of
+                                                                                                (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
+                                                                                            )
+                                                                                        )
+                                                                                        Data.Set.Internal.Tip
+                                                                                        Data.Set.Internal.Tip
+                                                                                 in let (#
+                                                                                          farInp,
+                                                                                          farExp
+                                                                                          #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
+                                                                                            GHC.Types.LT ->
+                                                                                              (#
+                                                                                                failInp,
+                                                                                                failExp
+                                                                                              #)
+                                                                                            GHC.Types.EQ ->
+                                                                                              (#
+                                                                                                farInp,
+                                                                                                failExp GHC.Base.<> farExp
+                                                                                              #)
+                                                                                            GHC.Types.GT ->
+                                                                                              (#
+                                                                                                farInp,
+                                                                                                farExp
+                                                                                              #)
+                                                                                     in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
+                                        else
+                                          let _ = "choicesBranch.else"
+                                           in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
+                                    loop = \_callReturn callInput callCatchStackByLabel ->
+                                      name
+                                        ( let _ = "suspend"
+                                           in \farInp farExp v (!inp) -> do
+                                                sr <- GHC.STRef.readSTRef reg
+                                                do
+                                                  let dupv = \x -> sr ((GHC.Types.:) v x)
+                                                  GHC.STRef.writeSTRef reg dupv
+                                                  let _ = "jump"
+                                                   in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
+                                        )
+                                        callInput
+                                        (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
+                                 in let _ = "jump"
+                                     in loop finalRet inp Data.Map.Internal.Tip
+                    )
+                    init
+                    Data.Map.Internal.Tip
+        )