appEvent :: St -> BrickEvent EditorName (E.TokenizedEvent [GHC.Located GHC.Token]) -> EventM EditorName (Next St)
appEvent st e =
    case e of
        VtyEvent (V.EvKey V.KEsc [])   -> M.halt st

        appEvt@(AppEvent (E.Tokens _)) -> handleInEditor st appEvt

        vtyEv@(VtyEvent (V.EvKey _ _)) -> handleInEditor st vtyEv

        _                              -> M.continue st
appEvent :: St -> BrickEvent EditorName (E.TokenizedEvent [GHC.Located GHC.Token]) -> EventM EditorName (Next St)
appEvent st e =
    case e of
        VtyEvent (V.EvKey V.KEsc [])   -> M.halt st

        appEvt@(AppEvent (E.Tokens _)) -> handleInEditor st appEvt

        vtyEv@(VtyEvent (V.EvKey _ _)) -> handleInEditor st vtyEv

        _                              -> M.continue st
appEvent st e =
    case e of
        VtyEvent (V.EvKey V.KEsc [])   -> M.halt st

        appEvt@(AppEvent (E.Tokens _)) -> handleInEditor st appEvt

        vtyEv@(VtyEvent (V.EvKey _ _)) -> handleInEditor st vtyEv

        _                              -> M.continue st