closeParenEvent ::
    (MonadReader env m, Has Dir.Layout env, Functor f) =>
    [Lens.ALens' env Text] -> f Widget.Id -> m (EventMap (f GuiState.Update))
closeParenEvent doc action =
    E.charGroup (Just "Close Paren")
    <$> (Lens.view id <&> (`E.toDoc` doc))
    <*> closeParenChars
    ?? const (action <&> GuiState.updateCursor)
closeParenEvent ::
    (MonadReader env m, Has Dir.Layout env, Functor f) =>
    [Lens.ALens' env Text] -> f Widget.Id -> m (EventMap (f GuiState.Update))
closeParenEvent doc action =
    E.charGroup (Just "Close Paren")
    <$> (Lens.view id <&> (`E.toDoc` doc))
    <*> closeParenChars
    ?? const (action <&> GuiState.updateCursor)
closeParenEvent doc action =
    E.charGroup (Just "Close Paren")
    <$> (Lens.view id <&> (`E.toDoc` doc))
    <*> closeParenChars
    ?? const (action <&> GuiState.updateCursor)