kmonad 0.4.1 → 0.4.2
raw patch · 56 files changed
+3695/−2677 lines, 56 filesdep +hspecdep +template-haskelldep ~Win32dep ~basedep ~cerealnew-uploaderPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: hspec, template-haskell
Dependency ranges changed: Win32, base, cereal, lens, megaparsec, mtl, optparse-applicative, resourcet, rio, time, unix, unliftio
API changes (from Hackage documentation)
- Data.LayerStack: LayerDoesNotExist :: l -> LayerStackError l
- Data.LayerStack: LayerNotOnStack :: l -> LayerStackError l
- Data.LayerStack: _LayerDoesNotExist :: AsLayerStackError r_a1tMK l_a1tET => Prism' r_a1tMK l_a1tET
- Data.LayerStack: _LayerNotOnStack :: AsLayerStackError r_a1tMK l_a1tET => Prism' r_a1tMK l_a1tET
- Data.LayerStack: _LayerStackError :: AsLayerStackError r_a1tMK l_a1tET => Prism' r_a1tMK (LayerStackError l_a1tET)
- Data.LayerStack: atKey :: (CanKey l, CanKey k) => k -> Fold (LayerStack l k a) a
- Data.LayerStack: class AsLayerStackError r_a1tMK l_a1tET | r_a1tMK -> l_a1tET
- Data.LayerStack: data Layer k a
- Data.LayerStack: data LayerStack l k a
- Data.LayerStack: data LayerStackError l
- Data.LayerStack: inLayer :: (CanKey l, CanKey k) => l -> k -> Fold (LayerStack l k a) a
- Data.LayerStack: instance (Data.Typeable.Internal.Typeable l, GHC.Show.Show l) => GHC.Exception.Type.Exception (Data.LayerStack.LayerStackError l)
- Data.LayerStack: instance (GHC.Classes.Eq k, GHC.Classes.Eq a) => GHC.Classes.Eq (Data.LayerStack.Layer k a)
- Data.LayerStack: instance (GHC.Classes.Eq l, GHC.Classes.Eq k, GHC.Classes.Eq a) => GHC.Classes.Eq (Data.LayerStack.LayerStack l k a)
- Data.LayerStack: instance (GHC.Classes.Ord k, GHC.Classes.Ord a) => GHC.Classes.Ord (Data.LayerStack.Layer k a)
- Data.LayerStack: instance (GHC.Show.Show k, GHC.Show.Show a) => GHC.Show.Show (Data.LayerStack.Layer k a)
- Data.LayerStack: instance (GHC.Show.Show l, GHC.Show.Show k, GHC.Show.Show a) => GHC.Show.Show (Data.LayerStack.LayerStack l k a)
- Data.LayerStack: instance Data.Foldable.Foldable (Data.LayerStack.Layer k)
- Data.LayerStack: instance Data.LayerStack.AsLayerStackError (Data.LayerStack.LayerStackError l) l
- Data.LayerStack: instance Data.Traversable.Traversable (Data.LayerStack.Layer k)
- Data.LayerStack: instance GHC.Base.Functor (Data.LayerStack.Layer k)
- Data.LayerStack: instance GHC.Base.Functor (Data.LayerStack.LayerStack l k)
- Data.LayerStack: instance GHC.Show.Show l => GHC.Show.Show (Data.LayerStack.LayerStackError l)
- Data.LayerStack: items :: forall l_a1tN5 k_a1tN6 a_a1tN7 k_a1uJh a_a1uJi. Lens (LayerStack l_a1tN5 k_a1tN6 a_a1tN7) (LayerStack l_a1tN5 k_a1uJh a_a1uJi) (HashMap (l_a1tN5, k_a1tN6) a_a1tN7) (HashMap (l_a1tN5, k_a1uJh) a_a1uJi)
- Data.LayerStack: maps :: forall l_a1tN5 k_a1tN6 a_a1tN7. Lens' (LayerStack l_a1tN5 k_a1tN6 a_a1tN7) (HashSet l_a1tN5)
- Data.LayerStack: mkLayer :: (Foldable t, CanKey k) => t (k, a) -> Layer k a
- Data.LayerStack: mkLayerStack :: (Foldable t1, Foldable t2, CanKey k, CanKey l) => t1 (l, t2 (k, a)) -> LayerStack l k a
- Data.LayerStack: popLayer :: (CanKey l, CanKey k) => l -> LayerStack l k a -> Either (LayerStackError l) (LayerStack l k a)
- Data.LayerStack: pushLayer :: (CanKey l, CanKey k) => l -> LayerStack l k a -> Either (LayerStackError l) (LayerStack l k a)
- Data.LayerStack: stack :: forall l_a1tN5 k_a1tN6 a_a1tN7. Lens' (LayerStack l_a1tN5 k_a1tN6 a_a1tN7) [l_a1tN5]
- Data.MultiMap: data MultiMap k v
- Data.MultiMap: fromSingletons :: (Foldable t, CanMM k v) => t (k, v) -> MultiMap k v
- Data.MultiMap: instance (GHC.Show.Show k, GHC.Show.Show v) => GHC.Show.Show (Data.MultiMap.MultiMap k v)
- Data.MultiMap: instance Data.MultiMap.CanMM k v => Control.Lens.At.At (Data.MultiMap.MultiMap k v)
- Data.MultiMap: instance Data.MultiMap.CanMM k v => Control.Lens.At.Ixed (Data.MultiMap.MultiMap k v)
- Data.MultiMap: instance Data.MultiMap.CanMM k v => GHC.Base.Monoid (Data.MultiMap.MultiMap k v)
- Data.MultiMap: instance Data.MultiMap.CanMM k v => GHC.Base.Semigroup (Data.MultiMap.MultiMap k v)
- Data.MultiMap: itemed :: CanMM k v => Fold (MultiMap k v) (k, v)
- Data.MultiMap: mkMultiMap :: (Foldable t1, Foldable t2, CanMM k v) => t1 (k, t2 v) -> MultiMap k v
- Data.MultiMap: reverse :: (CanMM k v, CanMM v k) => MultiMap k v -> MultiMap v k
- KMonad.Action: Action :: AnyK () -> Action
- KMonad.Action: Catch :: Catch
- KMonad.Action: Hook :: Maybe (Timeout m) -> (Trigger -> m Catch) -> Hook m
- KMonad.Action: InputHook :: HookLocation
- KMonad.Action: NoCatch :: Catch
- KMonad.Action: OutputHook :: HookLocation
- KMonad.Action: PopLayer :: LayerTag -> LayerOp
- KMonad.Action: PushLayer :: LayerTag -> LayerOp
- KMonad.Action: SetBaseLayer :: LayerTag -> LayerOp
- KMonad.Action: Timeout :: Milliseconds -> m () -> Timeout m
- KMonad.Action: Trigger :: Milliseconds -> KeyEvent -> Trigger
- KMonad.Action: [_action] :: Timeout m -> m ()
- KMonad.Action: [_delay] :: Timeout m -> Milliseconds
- KMonad.Action: [_elapsed] :: Trigger -> Milliseconds
- KMonad.Action: [_event] :: Trigger -> KeyEvent
- KMonad.Action: [_hTimeout] :: Hook m -> Maybe (Timeout m)
- KMonad.Action: [_keyH] :: Hook m -> Trigger -> m Catch
- KMonad.Action: [runAction] :: Action -> AnyK ()
- KMonad.Action: action :: HasTimeout c_a1M62 m_a1M2a => Lens' c_a1M62 (m_a1M2a ())
- KMonad.Action: after :: MonadK m => Milliseconds -> m () -> m ()
- KMonad.Action: await :: MonadKIO m => KeyPred -> (KeyEvent -> m Catch) -> m ()
- KMonad.Action: awaitMy :: MonadK m => Switch -> m Catch -> m ()
- KMonad.Action: class HasHook c_a1M9r m_a1M6j | c_a1M9r -> m_a1M6j
- KMonad.Action: class HasTimeout c_a1M62 m_a1M2a | c_a1M62 -> m_a1M2a
- KMonad.Action: class HasTrigger c_a1M1Q
- KMonad.Action: class MonadKIO m => MonadK m
- KMonad.Action: class Monad m => MonadKIO m
- KMonad.Action: data Catch
- KMonad.Action: data Hook m
- KMonad.Action: data HookLocation
- KMonad.Action: data LayerOp
- KMonad.Action: data Timeout m
- KMonad.Action: data Trigger
- KMonad.Action: delay :: HasTimeout c_a1M62 m_a1M2a => Lens' c_a1M62 Milliseconds
- KMonad.Action: elapsed :: HasTrigger c_a1M1Q => Lens' c_a1M1Q Milliseconds
- KMonad.Action: emit :: MonadKIO m => KeyEvent -> m ()
- KMonad.Action: event :: HasTrigger c_a1M1Q => Lens' c_a1M1Q KeyEvent
- KMonad.Action: hTimeout :: HasHook c_a1M9r m_a1M6j => Lens' c_a1M9r (Maybe (Timeout m_a1M6j))
- KMonad.Action: hold :: MonadKIO m => Bool -> m ()
- KMonad.Action: hook :: HasHook c_a1M9r m_a1M6j => Lens' c_a1M9r (Hook m_a1M6j)
- KMonad.Action: hookF :: MonadKIO m => HookLocation -> (KeyEvent -> m Catch) -> m ()
- KMonad.Action: inject :: MonadKIO m => KeyEvent -> m ()
- KMonad.Action: instance GHC.Base.Monoid KMonad.Action.Catch
- KMonad.Action: instance GHC.Base.Semigroup KMonad.Action.Catch
- KMonad.Action: instance GHC.Classes.Eq KMonad.Action.Catch
- KMonad.Action: instance GHC.Classes.Eq KMonad.Action.HookLocation
- KMonad.Action: instance GHC.Show.Show KMonad.Action.Catch
- KMonad.Action: instance GHC.Show.Show KMonad.Action.HookLocation
- KMonad.Action: instance KMonad.Action.HasHook (KMonad.Action.Hook m) m
- KMonad.Action: instance KMonad.Action.HasTimeout (KMonad.Action.Timeout m) m
- KMonad.Action: instance KMonad.Action.HasTrigger KMonad.Action.Trigger
- KMonad.Action: keyH :: HasHook c_a1M9r m_a1M6j => Lens' c_a1M9r (Trigger -> m_a1M6j Catch)
- KMonad.Action: layerOp :: MonadKIO m => LayerOp -> m ()
- KMonad.Action: matchMy :: MonadK m => Switch -> m KeyPred
- KMonad.Action: my :: MonadK m => Switch -> m KeyEvent
- KMonad.Action: myBinding :: MonadK m => m Keycode
- KMonad.Action: newtype Action
- KMonad.Action: pause :: MonadKIO m => Milliseconds -> m ()
- KMonad.Action: register :: MonadKIO m => HookLocation -> Hook m -> m ()
- KMonad.Action: shellCmd :: MonadKIO m => Text -> m ()
- KMonad.Action: tHookF :: MonadK m => HookLocation -> Milliseconds -> m () -> (Trigger -> m Catch) -> m ()
- KMonad.Action: timeout :: HasTimeout c_a1M62 m_a1M2a => Lens' c_a1M62 (Timeout m_a1M2a)
- KMonad.Action: trigger :: HasTrigger c_a1M1Q => Lens' c_a1M1Q Trigger
- KMonad.Action: type KeyPred = KeyEvent -> Bool
- KMonad.Action: type AnyK a = forall m. MonadK m => m a
- KMonad.Action: whenDone :: MonadK m => m () -> m ()
- KMonad.Action: within :: MonadK m => Milliseconds -> m KeyPred -> m () -> (Trigger -> m Catch) -> m ()
- KMonad.Action: withinHeld :: MonadK m => Milliseconds -> m KeyPred -> m () -> (Trigger -> m Catch) -> m ()
- KMonad.App: AppCfg :: Acquire KeySink -> Acquire KeySource -> LMap Button -> LayerTag -> Bool -> Bool -> AppCfg
- KMonad.App: [_allowCmd] :: AppCfg -> Bool
- KMonad.App: [_fallThrough] :: AppCfg -> Bool
- KMonad.App: [_firstLayer] :: AppCfg -> LayerTag
- KMonad.App: [_keySinkDev] :: AppCfg -> Acquire KeySink
- KMonad.App: [_keySourceDev] :: AppCfg -> Acquire KeySource
- KMonad.App: [_keymapCfg] :: AppCfg -> LMap Button
- KMonad.App: allowCmd :: HasAppCfg c_a29RE => Lens' c_a29RE Bool
- KMonad.App: appCfg :: HasAppCfg c_a29RE => Lens' c_a29RE AppCfg
- KMonad.App: class HasAppCfg c_a29RE
- KMonad.App: data AppCfg
- KMonad.App: fallThrough :: HasAppCfg c_a29RE => Lens' c_a29RE Bool
- KMonad.App: firstLayer :: HasAppCfg c_a29RE => Lens' c_a29RE LayerTag
- KMonad.App: instance (KMonad.App.HasAppEnv e, KMonad.App.HasAppCfg e, RIO.Prelude.Logger.HasLogFunc e) => KMonad.Action.MonadKIO (RIO.Prelude.RIO.RIO e)
- KMonad.App: instance KMonad.Action.MonadK (RIO.Prelude.RIO.RIO KMonad.App.KEnv)
- KMonad.App: instance KMonad.App.BEnv.HasBEnv KMonad.App.KEnv
- KMonad.App: instance KMonad.App.HasAppCfg KMonad.App.AppCfg
- KMonad.App: instance KMonad.App.HasAppCfg KMonad.App.AppEnv
- KMonad.App: instance KMonad.App.HasAppCfg KMonad.App.KEnv
- KMonad.App: instance KMonad.App.HasAppEnv KMonad.App.AppEnv
- KMonad.App: instance KMonad.App.HasAppEnv KMonad.App.KEnv
- KMonad.App: instance KMonad.App.HasKEnv KMonad.App.KEnv
- KMonad.App: instance RIO.Prelude.Logger.HasLogFunc KMonad.App.AppEnv
- KMonad.App: instance RIO.Prelude.Logger.HasLogFunc KMonad.App.KEnv
- KMonad.App: keySinkDev :: HasAppCfg c_a29RE => Lens' c_a29RE (Acquire KeySink)
- KMonad.App: keySourceDev :: HasAppCfg c_a29RE => Lens' c_a29RE (Acquire KeySource)
- KMonad.App: keymapCfg :: HasAppCfg c_a29RE => Lens' c_a29RE (LMap Button)
- KMonad.App: startApp :: HasLogFunc e => AppCfg -> RIO e ()
- KMonad.App.BEnv: BEnv :: !Button -> !Keycode -> !MVar Switch -> BEnv
- KMonad.App.BEnv: [_beButton] :: BEnv -> !Button
- KMonad.App.BEnv: [_binding] :: BEnv -> !Keycode
- KMonad.App.BEnv: [_lastSwitch] :: BEnv -> !MVar Switch
- KMonad.App.BEnv: bEnv :: HasBEnv c_a27L5 => Lens' c_a27L5 BEnv
- KMonad.App.BEnv: beButton :: HasBEnv c_a27L5 => Lens' c_a27L5 Button
- KMonad.App.BEnv: binding :: HasBEnv c_a27L5 => Lens' c_a27L5 Keycode
- KMonad.App.BEnv: class HasBEnv c_a27L5
- KMonad.App.BEnv: data BEnv
- KMonad.App.BEnv: initBEnv :: MonadIO m => Button -> Keycode -> m BEnv
- KMonad.App.BEnv: instance KMonad.App.BEnv.HasBEnv KMonad.App.BEnv.BEnv
- KMonad.App.BEnv: instance KMonad.Button.HasButton KMonad.App.BEnv.BEnv
- KMonad.App.BEnv: lastSwitch :: HasBEnv c_a27L5 => Lens' c_a27L5 (MVar Switch)
- KMonad.App.BEnv: runBEnv :: MonadUnliftIO m => BEnv -> Switch -> m (Maybe Action)
- KMonad.App.Dispatch: data Dispatch
- KMonad.App.Dispatch: mkDispatch :: MonadUnliftIO m => m KeyEvent -> ContT r m Dispatch
- KMonad.App.Dispatch: pull :: HasLogFunc e => Dispatch -> RIO e KeyEvent
- KMonad.App.Dispatch: rerun :: HasLogFunc e => Dispatch -> [KeyEvent] -> RIO e ()
- KMonad.App.Hooks: data Hooks
- KMonad.App.Hooks: instance KMonad.Action.HasHook KMonad.App.Hooks.Entry GHC.Types.IO
- KMonad.App.Hooks: mkHooks :: MonadUnliftIO m => m KeyEvent -> ContT r m Hooks
- KMonad.App.Hooks: pull :: HasLogFunc e => Hooks -> RIO e KeyEvent
- KMonad.App.Hooks: register :: HasLogFunc e => Hooks -> Hook (RIO e) -> RIO e ()
- KMonad.App.Keymap: data Keymap
- KMonad.App.Keymap: instance KMonad.App.Keymap.HasKeymap KMonad.App.Keymap.Keymap
- KMonad.App.Keymap: layerOp :: HasLogFunc e => Keymap -> LayerOp -> RIO e ()
- KMonad.App.Keymap: lookupKey :: MonadIO m => Keymap -> Keycode -> m (Maybe BEnv)
- KMonad.App.Keymap: mkKeymap :: MonadUnliftIO m => LayerTag -> LMap Button -> ContT r m Keymap
- KMonad.App.Sluice: block :: HasLogFunc e => Sluice -> RIO e ()
- KMonad.App.Sluice: data Sluice
- KMonad.App.Sluice: mkSluice :: MonadUnliftIO m => m KeyEvent -> ContT r m Sluice
- KMonad.App.Sluice: pull :: HasLogFunc e => Sluice -> RIO e KeyEvent
- KMonad.App.Sluice: unblock :: HasLogFunc e => Sluice -> RIO e [KeyEvent]
- KMonad.Args: run :: IO ()
- KMonad.Args.Types: PErrors :: ParseErrorBundle Text Void -> PErrors
- KMonad.Args.Types: instance GHC.Exception.Type.Exception KMonad.Args.Types.PErrors
- KMonad.Args.Types: instance GHC.Show.Show KMonad.Args.Types.PErrors
- KMonad.Args.Types: newtype PErrors
- KMonad.Args.Types: type Parser = Parsec Void Text
- KMonad.Button: around :: Button -> Button -> Button
- KMonad.Button: aroundNext :: Button -> Button
- KMonad.Button: button :: HasButton c_a1O2Q => Lens' c_a1O2Q Button
- KMonad.Button: class HasButton c_a1O2Q
- KMonad.Button: cmdButton :: Text -> Button
- KMonad.Button: data Button
- KMonad.Button: emitB :: Keycode -> Button
- KMonad.Button: instance KMonad.Button.HasButton KMonad.Button.Button
- KMonad.Button: layerAdd :: LayerTag -> Button
- KMonad.Button: layerDelay :: Milliseconds -> LayerTag -> Button
- KMonad.Button: layerNext :: LayerTag -> Button
- KMonad.Button: layerRem :: LayerTag -> Button
- KMonad.Button: layerSwitch :: LayerTag -> Button
- KMonad.Button: layerToggle :: LayerTag -> Button
- KMonad.Button: mkButton :: AnyK () -> AnyK () -> Button
- KMonad.Button: modded :: Keycode -> Button -> Button
- KMonad.Button: multiTap :: Button -> [(Milliseconds, Button)] -> Button
- KMonad.Button: onPress :: AnyK () -> Button
- KMonad.Button: pass :: Button
- KMonad.Button: pressAction :: HasButton c_a1O2Q => Lens' c_a1O2Q Action
- KMonad.Button: releaseAction :: HasButton c_a1O2Q => Lens' c_a1O2Q Action
- KMonad.Button: tapHold :: Milliseconds -> Button -> Button -> Button
- KMonad.Button: tapHoldNext :: Milliseconds -> Button -> Button -> Button
- KMonad.Button: tapHoldNextRelease :: Milliseconds -> Button -> Button -> Button
- KMonad.Button: tapMacro :: [Button] -> Button
- KMonad.Button: tapNext :: Button -> Button -> Button
- KMonad.Button: tapNextRelease :: Button -> Button -> Button
- KMonad.Button: tapOn :: Switch -> Button -> Button
- KMonad.Keyboard: Press :: Switch
- KMonad.Keyboard: Release :: Switch
- KMonad.Keyboard: data KeyEvent
- KMonad.Keyboard: data Switch
- KMonad.Keyboard: instance Data.Hashable.Class.Hashable KMonad.Keyboard.KeyEvent
- KMonad.Keyboard: instance Data.Hashable.Class.Hashable KMonad.Keyboard.Switch
- KMonad.Keyboard: instance GHC.Classes.Eq KMonad.Keyboard.KeyEvent
- KMonad.Keyboard: instance GHC.Classes.Eq KMonad.Keyboard.Switch
- KMonad.Keyboard: instance GHC.Classes.Ord KMonad.Keyboard.KeyEvent
- KMonad.Keyboard: instance GHC.Classes.Ord KMonad.Keyboard.Switch
- KMonad.Keyboard: instance GHC.Enum.Enum KMonad.Keyboard.Switch
- KMonad.Keyboard: instance GHC.Generics.Generic KMonad.Keyboard.KeyEvent
- KMonad.Keyboard: instance GHC.Generics.Generic KMonad.Keyboard.Switch
- KMonad.Keyboard: instance GHC.Show.Show KMonad.Keyboard.KeyEvent
- KMonad.Keyboard: instance GHC.Show.Show KMonad.Keyboard.Switch
- KMonad.Keyboard: instance RIO.Prelude.Display.Display KMonad.Keyboard.KeyEvent
- KMonad.Keyboard: isKeycode :: Keycode -> KeyPred
- KMonad.Keyboard: isPress :: KeyPred
- KMonad.Keyboard: isPressOf :: Keycode -> KeyPred
- KMonad.Keyboard: isRelease :: KeyPred
- KMonad.Keyboard: isReleaseOf :: Keycode -> KeyPred
- KMonad.Keyboard: keycode :: Lens' KeyEvent Keycode
- KMonad.Keyboard: mkKeyEvent :: Switch -> Keycode -> KeyEvent
- KMonad.Keyboard: mkPress :: Keycode -> KeyEvent
- KMonad.Keyboard: mkRelease :: Keycode -> KeyEvent
- KMonad.Keyboard: switch :: Lens' KeyEvent Switch
- KMonad.Keyboard: type KeyPred = KeyEvent -> Bool
- KMonad.Keyboard: type LMap a = LayerStack LayerTag Keycode a
- KMonad.Keyboard: type LayerTag = Text
- KMonad.Prelude: (#%%=) :: MonadState s m => ALens s s a b -> (a -> (r, b)) -> m r
- KMonad.Prelude: (#%%~) :: Functor f => ALens s t a b -> (a -> f b) -> s -> f t
- KMonad.Prelude: (#%=) :: MonadState s m => ALens s s a b -> (a -> b) -> m ()
- KMonad.Prelude: (#%~) :: ALens s t a b -> (a -> b) -> s -> t
- KMonad.Prelude: (#) :: AReview t b -> b -> t
- KMonad.Prelude: (#=) :: MonadState s m => ALens s s a b -> b -> m ()
- KMonad.Prelude: (#~) :: ALens s t a b -> b -> s -> t
- KMonad.Prelude: ($!!) :: NFData a => (a -> b) -> a -> b
- KMonad.Prelude: ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- KMonad.Prelude: ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- KMonad.Prelude: ($>) :: Functor f => f a -> b -> f b
- KMonad.Prelude: (%%=) :: forall k s m p r (a :: k) b. MonadState s m => Over p ((,) r) s s a b -> p a (r, b) -> m r
- KMonad.Prelude: (%%@=) :: MonadState s m => Over (Indexed i) ((,) r) s s a b -> (i -> a -> (r, b)) -> m r
- KMonad.Prelude: (%%@~) :: forall k i f s (t :: k) a (b :: k). Over (Indexed i) f s t a b -> (i -> a -> f b) -> s -> f t
- KMonad.Prelude: (%%~) :: forall k f s (t :: k) a (b :: k). LensLike f s t a b -> (a -> f b) -> s -> f t
- KMonad.Prelude: (%=) :: MonadState s m => ASetter s s a b -> (a -> b) -> m ()
- KMonad.Prelude: (%@=) :: MonadState s m => AnIndexedSetter i s s a b -> (i -> a -> b) -> m ()
- KMonad.Prelude: (%@~) :: AnIndexedSetter i s t a b -> (i -> a -> b) -> s -> t
- KMonad.Prelude: (%~) :: ASetter s t a b -> (a -> b) -> s -> t
- KMonad.Prelude: (&&&) :: Arrow a => a b c -> a b c' -> a b (c, c')
- KMonad.Prelude: (&&) :: Bool -> Bool -> Bool
- KMonad.Prelude: (&&=) :: MonadState s m => ASetter' s Bool -> Bool -> m ()
- KMonad.Prelude: (&&~) :: ASetter s t Bool Bool -> Bool -> s -> t
- KMonad.Prelude: (&) :: a -> (a -> b) -> b
- KMonad.Prelude: (&~) :: s -> State s a -> s
- KMonad.Prelude: (*) :: Num a => a -> a -> a
- KMonad.Prelude: (**) :: Floating a => a -> a -> a
- KMonad.Prelude: (***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c')
- KMonad.Prelude: (**=) :: (MonadState s m, Floating a) => ASetter' s a -> a -> m ()
- KMonad.Prelude: (**~) :: Floating a => ASetter s t a a -> a -> s -> t
- KMonad.Prelude: (*=) :: (MonadState s m, Num a) => ASetter' s a -> a -> m ()
- KMonad.Prelude: (*>) :: Applicative f => f a -> f b -> f b
- KMonad.Prelude: (*~) :: Num a => ASetter s t a a -> a -> s -> t
- KMonad.Prelude: (+) :: Num a => a -> a -> a
- KMonad.Prelude: (++) :: [a] -> [a] -> [a]
- KMonad.Prelude: (+=) :: (MonadState s m, Num a) => ASetter' s a -> a -> m ()
- KMonad.Prelude: (+~) :: Num a => ASetter s t a a -> a -> s -> t
- KMonad.Prelude: (-) :: Num a => a -> a -> a
- KMonad.Prelude: (-=) :: (MonadState s m, Num a) => ASetter' s a -> a -> m ()
- KMonad.Prelude: (-~) :: Num a => ASetter s t a a -> a -> s -> t
- KMonad.Prelude: (.) :: (b -> c) -> (a -> b) -> a -> c
- KMonad.Prelude: (...) :: forall k f c s t p (a :: k) b. (Applicative f, Plated c) => LensLike f s t c c -> Over p f c c a b -> Over p f s t a b
- KMonad.Prelude: (.=) :: MonadState s m => ASetter s s a b -> b -> m ()
- KMonad.Prelude: (.>) :: (st -> r) -> (kab -> st) -> kab -> r
- KMonad.Prelude: (.@=) :: MonadState s m => AnIndexedSetter i s s a b -> (i -> b) -> m ()
- KMonad.Prelude: (.@~) :: AnIndexedSetter i s t a b -> (i -> b) -> s -> t
- KMonad.Prelude: (.~) :: ASetter s t a b -> b -> s -> t
- KMonad.Prelude: (/) :: Fractional a => a -> a -> a
- KMonad.Prelude: (//=) :: (MonadState s m, Fractional a) => ASetter' s a -> a -> m ()
- KMonad.Prelude: (//~) :: Fractional a => ASetter s t a a -> a -> s -> t
- KMonad.Prelude: (/=) :: Eq a => a -> a -> Bool
- KMonad.Prelude: (:|) :: a -> [a] -> NonEmpty a
- KMonad.Prelude: (<#%=) :: MonadState s m => ALens s s a b -> (a -> b) -> m b
- KMonad.Prelude: (<#%~) :: ALens s t a b -> (a -> b) -> s -> (b, t)
- KMonad.Prelude: (<#=) :: MonadState s m => ALens s s a b -> b -> m b
- KMonad.Prelude: (<#~) :: ALens s t a b -> b -> s -> (b, t)
- KMonad.Prelude: (<$!>) :: Monad m => (a -> b) -> m a -> m b
- KMonad.Prelude: (<$) :: Functor f => a -> f b -> f a
- KMonad.Prelude: (<$>) :: Functor f => (a -> b) -> f a -> f b
- KMonad.Prelude: (<%=) :: MonadState s m => LensLike ((,) b) s s a b -> (a -> b) -> m b
- KMonad.Prelude: (<%@=) :: MonadState s m => Over (Indexed i) ((,) b) s s a b -> (i -> a -> b) -> m b
- KMonad.Prelude: (<%@~) :: Over (Indexed i) ((,) b) s t a b -> (i -> a -> b) -> s -> (b, t)
- KMonad.Prelude: (<%~) :: LensLike ((,) b) s t a b -> (a -> b) -> s -> (b, t)
- KMonad.Prelude: (<&&=) :: MonadState s m => LensLike' ((,) Bool) s Bool -> Bool -> m Bool
- KMonad.Prelude: (<&&~) :: LensLike ((,) Bool) s t Bool Bool -> Bool -> s -> (Bool, t)
- KMonad.Prelude: (<&>) :: Functor f => f a -> (a -> b) -> f b
- KMonad.Prelude: (<) :: Ord a => a -> a -> Bool
- KMonad.Prelude: (<*) :: Applicative f => f a -> f b -> f a
- KMonad.Prelude: (<**=) :: (MonadState s m, Floating a) => LensLike' ((,) a) s a -> a -> m a
- KMonad.Prelude: (<**~) :: Floating a => LensLike ((,) a) s t a a -> a -> s -> (a, t)
- KMonad.Prelude: (<*=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
- KMonad.Prelude: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
- KMonad.Prelude: (<*~) :: Num a => LensLike ((,) a) s t a a -> a -> s -> (a, t)
- KMonad.Prelude: (<+=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
- KMonad.Prelude: (<+~) :: Num a => LensLike ((,) a) s t a a -> a -> s -> (a, t)
- KMonad.Prelude: (<-=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
- KMonad.Prelude: (<-~) :: Num a => LensLike ((,) a) s t a a -> a -> s -> (a, t)
- KMonad.Prelude: (<.) :: Indexable i p => (Indexed i s t -> r) -> ((a -> b) -> s -> t) -> p a b -> r
- KMonad.Prelude: (<.=) :: MonadState s m => ASetter s s a b -> b -> m b
- KMonad.Prelude: (<.>) :: Indexable (i, j) p => (Indexed i s t -> r) -> (Indexed j a b -> s -> t) -> p a b -> r
- KMonad.Prelude: (<.~) :: ASetter s t a b -> b -> s -> (b, t)
- KMonad.Prelude: (<//=) :: (MonadState s m, Fractional a) => LensLike' ((,) a) s a -> a -> m a
- KMonad.Prelude: (<//~) :: Fractional a => LensLike ((,) a) s t a a -> a -> s -> (a, t)
- KMonad.Prelude: (<<%=) :: (Strong p, MonadState s m) => Over p ((,) a) s s a b -> p a b -> m a
- KMonad.Prelude: (<<%@=) :: MonadState s m => Over (Indexed i) ((,) a) s s a b -> (i -> a -> b) -> m a
- KMonad.Prelude: (<<%@~) :: Over (Indexed i) ((,) a) s t a b -> (i -> a -> b) -> s -> (a, t)
- KMonad.Prelude: (<<%~) :: LensLike ((,) a) s t a b -> (a -> b) -> s -> (a, t)
- KMonad.Prelude: (<<&&=) :: MonadState s m => LensLike' ((,) Bool) s Bool -> Bool -> m Bool
- KMonad.Prelude: (<<&&~) :: LensLike' ((,) Bool) s Bool -> Bool -> s -> (Bool, s)
- KMonad.Prelude: (<<**=) :: (MonadState s m, Floating a) => LensLike' ((,) a) s a -> a -> m a
- KMonad.Prelude: (<<**~) :: Floating a => LensLike' ((,) a) s a -> a -> s -> (a, s)
- KMonad.Prelude: (<<*=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
- KMonad.Prelude: (<<*~) :: Num a => LensLike' ((,) a) s a -> a -> s -> (a, s)
- KMonad.Prelude: (<<+=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
- KMonad.Prelude: (<<+~) :: Num a => LensLike' ((,) a) s a -> a -> s -> (a, s)
- KMonad.Prelude: (<<-=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
- KMonad.Prelude: (<<-~) :: Num a => LensLike' ((,) a) s a -> a -> s -> (a, s)
- KMonad.Prelude: (<<.=) :: MonadState s m => LensLike ((,) a) s s a b -> b -> m a
- KMonad.Prelude: (<<.~) :: LensLike ((,) a) s t a b -> b -> s -> (a, t)
- KMonad.Prelude: (<<//=) :: (MonadState s m, Fractional a) => LensLike' ((,) a) s a -> a -> m a
- KMonad.Prelude: (<<//~) :: Fractional a => LensLike' ((,) a) s a -> a -> s -> (a, s)
- KMonad.Prelude: (<<<>=) :: (MonadState s m, Monoid r) => LensLike' ((,) r) s r -> r -> m r
- KMonad.Prelude: (<<<>~) :: Monoid r => LensLike' ((,) r) s r -> r -> s -> (r, s)
- KMonad.Prelude: (<<>=) :: (MonadState s m, Monoid r) => LensLike' ((,) r) s r -> r -> m r
- KMonad.Prelude: (<<>~) :: Monoid m => LensLike ((,) m) s t m m -> m -> s -> (m, t)
- KMonad.Prelude: (<<?=) :: MonadState s m => LensLike ((,) a) s s a (Maybe b) -> b -> m a
- KMonad.Prelude: (<<?~) :: LensLike ((,) a) s t a (Maybe b) -> b -> s -> (a, t)
- KMonad.Prelude: (<<^=) :: (MonadState s m, Num a, Integral e) => LensLike' ((,) a) s a -> e -> m a
- KMonad.Prelude: (<<^^=) :: (MonadState s m, Fractional a, Integral e) => LensLike' ((,) a) s a -> e -> m a
- KMonad.Prelude: (<<^^~) :: (Fractional a, Integral e) => LensLike' ((,) a) s a -> e -> s -> (a, s)
- KMonad.Prelude: (<<^~) :: (Num a, Integral e) => LensLike' ((,) a) s a -> e -> s -> (a, s)
- KMonad.Prelude: (<<||=) :: MonadState s m => LensLike' ((,) Bool) s Bool -> Bool -> m Bool
- KMonad.Prelude: (<<||~) :: LensLike' ((,) Bool) s Bool -> Bool -> s -> (Bool, s)
- KMonad.Prelude: (<<~) :: MonadState s m => ALens s s a b -> m b -> m b
- KMonad.Prelude: (<=) :: Ord a => a -> a -> Bool
- KMonad.Prelude: (<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
- KMonad.Prelude: (<>) :: Semigroup a => a -> a -> a
- KMonad.Prelude: (<>=) :: (MonadState s m, Monoid a) => ASetter' s a -> a -> m ()
- KMonad.Prelude: (<>~) :: Monoid a => ASetter s t a a -> a -> s -> t
- KMonad.Prelude: (<?=) :: MonadState s m => ASetter s s a (Maybe b) -> b -> m b
- KMonad.Prelude: (<?~) :: ASetter s t a (Maybe b) -> b -> s -> (b, t)
- KMonad.Prelude: (<^=) :: (MonadState s m, Num a, Integral e) => LensLike' ((,) a) s a -> e -> m a
- KMonad.Prelude: (<^^=) :: (MonadState s m, Fractional a, Integral e) => LensLike' ((,) a) s a -> e -> m a
- KMonad.Prelude: (<^^~) :: (Fractional a, Integral e) => LensLike ((,) a) s t a a -> e -> s -> (a, t)
- KMonad.Prelude: (<^~) :: (Num a, Integral e) => LensLike ((,) a) s t a a -> e -> s -> (a, t)
- KMonad.Prelude: (<|) :: Cons s s a a => a -> s -> s
- KMonad.Prelude: (<|>) :: Alternative f => f a -> f a -> f a
- KMonad.Prelude: (<||=) :: MonadState s m => LensLike' ((,) Bool) s Bool -> Bool -> m Bool
- KMonad.Prelude: (<||~) :: LensLike ((,) Bool) s t Bool Bool -> Bool -> s -> (Bool, t)
- KMonad.Prelude: (<~) :: MonadState s m => ASetter s s a b -> m b -> m ()
- KMonad.Prelude: (=<<) :: Monad m => (a -> m b) -> m a -> m b
- KMonad.Prelude: (==) :: Eq a => a -> a -> Bool
- KMonad.Prelude: (>$) :: Contravariant f => b -> f b -> f a
- KMonad.Prelude: (>) :: Ord a => a -> a -> Bool
- KMonad.Prelude: (>=) :: Ord a => a -> a -> Bool
- KMonad.Prelude: (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
- KMonad.Prelude: (>>) :: Monad m => m a -> m b -> m b
- KMonad.Prelude: (>>=) :: Monad m => m a -> (a -> m b) -> m b
- KMonad.Prelude: (>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c
- KMonad.Prelude: (?=) :: MonadState s m => ASetter s s a (Maybe b) -> b -> m ()
- KMonad.Prelude: (??) :: Functor f => f (a -> b) -> a -> f b
- KMonad.Prelude: (?~) :: ASetter s t a (Maybe b) -> b -> s -> t
- KMonad.Prelude: (^#) :: s -> ALens s t a b -> a
- KMonad.Prelude: (^) :: (Num a, Integral b) => a -> b -> a
- KMonad.Prelude: (^.) :: s -> Getting a s a -> a
- KMonad.Prelude: (^..) :: s -> Getting (Endo [a]) s a -> [a]
- KMonad.Prelude: (^=) :: (MonadState s m, Num a, Integral e) => ASetter' s a -> e -> m ()
- KMonad.Prelude: (^?!) :: HasCallStack => s -> Getting (Endo a) s a -> a
- KMonad.Prelude: (^?) :: s -> Getting (First a) s a -> Maybe a
- KMonad.Prelude: (^@.) :: s -> IndexedGetting i (i, a) s a -> (i, a)
- KMonad.Prelude: (^@..) :: s -> IndexedGetting i (Endo [(i, a)]) s a -> [(i, a)]
- KMonad.Prelude: (^@?!) :: HasCallStack => s -> IndexedGetting i (Endo (i, a)) s a -> (i, a)
- KMonad.Prelude: (^@?) :: s -> IndexedGetting i (Endo (Maybe (i, a))) s a -> Maybe (i, a)
- KMonad.Prelude: (^^) :: (Fractional a, Integral b) => a -> b -> a
- KMonad.Prelude: (^^=) :: (MonadState s m, Fractional a, Integral e) => ASetter' s a -> e -> m ()
- KMonad.Prelude: (^^~) :: (Fractional a, Integral e) => ASetter s t a a -> e -> s -> t
- KMonad.Prelude: (^~) :: (Num a, Integral e) => ASetter s t a a -> e -> s -> t
- KMonad.Prelude: (|>) :: Snoc s s a a => s -> a -> s
- KMonad.Prelude: (||) :: Bool -> Bool -> Bool
- KMonad.Prelude: (||=) :: MonadState s m => ASetter' s Bool -> Bool -> m ()
- KMonad.Prelude: (||~) :: ASetter s t Bool Bool -> Bool -> s -> t
- KMonad.Prelude: -- | State token type
- KMonad.Prelude: AppendMode :: IOMode
- KMonad.Prelude: AsyncExceptionWrapper :: e -> AsyncExceptionWrapper
- KMonad.Prelude: Bazaar :: (forall (f :: Type -> Type). Applicative f => p a (f b) -> f t) -> Bazaar (p :: Type -> Type -> Type) a b t
- KMonad.Prelude: Bazaar1 :: (forall (f :: Type -> Type). Apply f => p a (f b) -> f t) -> Bazaar1 (p :: Type -> Type -> Type) a b t
- KMonad.Prelude: BlockBuffering :: Maybe Int -> BufferMode
- KMonad.Prelude: Concurrently :: m a -> Concurrently (m :: Type -> Type) a
- KMonad.Prelude: Const :: a -> Const a (b :: k)
- KMonad.Prelude: ContT :: ((a -> m r) -> m r) -> ContT (r :: k) (m :: k -> Type) a
- KMonad.Prelude: Context :: (b -> t) -> a -> Context a b t
- KMonad.Prelude: DecodeError :: String -> Maybe Word8 -> UnicodeException
- KMonad.Prelude: Down :: a -> Down a
- KMonad.Prelude: EQ :: Ordering
- KMonad.Prelude: EmptyWithNoAlternative :: ConcException
- KMonad.Prelude: EncodeError :: String -> Maybe Char -> UnicodeException
- KMonad.Prelude: ExitFailure :: Int -> ExitCode
- KMonad.Prelude: ExitSuccess :: ExitCode
- KMonad.Prelude: False :: Bool
- KMonad.Prelude: Fold :: Fold s a -> ReifiedFold s a
- KMonad.Prelude: GT :: Ordering
- KMonad.Prelude: Getter :: Getter s a -> ReifiedGetter s a
- KMonad.Prelude: Handler :: (e -> m a) -> Handler (m :: Type -> Type) a
- KMonad.Prelude: Identity :: a -> Identity a
- KMonad.Prelude: Indexed :: (i -> a -> b) -> Indexed i a b
- KMonad.Prelude: IndexedFold :: IndexedFold i s a -> ReifiedIndexedFold i s a
- KMonad.Prelude: IndexedGetter :: IndexedGetter i s a -> ReifiedIndexedGetter i s a
- KMonad.Prelude: IndexedLens :: IndexedLens i s t a b -> ReifiedIndexedLens i s t a b
- KMonad.Prelude: IndexedSetter :: IndexedSetter i s t a b -> ReifiedIndexedSetter i s t a b
- KMonad.Prelude: IndexedTraversal :: IndexedTraversal i s t a b -> ReifiedIndexedTraversal i s t a b
- KMonad.Prelude: Iso :: Iso s t a b -> ReifiedIso s t a b
- KMonad.Prelude: Just :: a -> Maybe a
- KMonad.Prelude: LT :: Ordering
- KMonad.Prelude: Left :: a -> Either a b
- KMonad.Prelude: Lens :: Lens s t a b -> ReifiedLens s t a b
- KMonad.Prelude: LevelDebug :: LogLevel
- KMonad.Prelude: LevelError :: LogLevel
- KMonad.Prelude: LevelInfo :: LogLevel
- KMonad.Prelude: LevelOther :: !Text -> LogLevel
- KMonad.Prelude: LevelWarn :: LogLevel
- KMonad.Prelude: LineBuffering :: BufferMode
- KMonad.Prelude: MethodName :: Name -> Name -> DefName
- KMonad.Prelude: NoBuffering :: BufferMode
- KMonad.Prelude: Nothing :: Maybe a
- KMonad.Prelude: Prism :: Prism s t a b -> ReifiedPrism s t a b
- KMonad.Prelude: Proxy :: Proxy (t :: k)
- KMonad.Prelude: RIO :: ReaderT env IO a -> RIO env a
- KMonad.Prelude: ReadMode :: IOMode
- KMonad.Prelude: ReadWriteMode :: IOMode
- KMonad.Prelude: ReaderT :: (r -> m a) -> ReaderT r (m :: Type -> Type) a
- KMonad.Prelude: ReleaseEarly :: ReleaseType
- KMonad.Prelude: ReleaseException :: ReleaseType
- KMonad.Prelude: ReleaseNormal :: ReleaseType
- KMonad.Prelude: Right :: b -> Either a b
- KMonad.Prelude: Setter :: Setter s t a b -> ReifiedSetter s t a b
- KMonad.Prelude: SomeAsyncException :: e -> SomeAsyncException
- KMonad.Prelude: SomeException :: e -> SomeException
- KMonad.Prelude: StringException :: String -> CallStack -> StringException
- KMonad.Prelude: SyncExceptionWrapper :: e -> SyncExceptionWrapper
- KMonad.Prelude: TopName :: Name -> DefName
- KMonad.Prelude: Traversal :: Traversal s t a b -> ReifiedTraversal s t a b
- KMonad.Prelude: True :: Bool
- KMonad.Prelude: UnliftIO :: (forall a. () => m a -> IO a) -> UnliftIO (m :: Type -> Type)
- KMonad.Prelude: Utf8Builder :: Builder -> Utf8Builder
- KMonad.Prelude: WriteMode :: IOMode
- KMonad.Prelude: [Identical] :: forall k k1 (a :: k) (b :: k1). Identical a b a b
- KMonad.Prelude: [Refl] :: forall k (a :: k). a :~: a
- KMonad.Prelude: [getConst] :: Const a (b :: k) -> a
- KMonad.Prelude: [getUtf8Builder] :: Utf8Builder -> Builder
- KMonad.Prelude: [runBazaar1] :: Bazaar1 (p :: Type -> Type -> Type) a b t -> forall (f :: Type -> Type). Apply f => p a (f b) -> f t
- KMonad.Prelude: [runBazaar] :: Bazaar (p :: Type -> Type -> Type) a b t -> forall (f :: Type -> Type). Applicative f => p a (f b) -> f t
- KMonad.Prelude: [runConcurrently] :: Concurrently (m :: Type -> Type) a -> m a
- KMonad.Prelude: [runContT] :: ContT (r :: k) (m :: k -> Type) a -> (a -> m r) -> m r
- KMonad.Prelude: [runFold] :: ReifiedFold s a -> Fold s a
- KMonad.Prelude: [runGetter] :: ReifiedGetter s a -> Getter s a
- KMonad.Prelude: [runIdentity] :: Identity a -> a
- KMonad.Prelude: [runIndexedFold] :: ReifiedIndexedFold i s a -> IndexedFold i s a
- KMonad.Prelude: [runIndexedGetter] :: ReifiedIndexedGetter i s a -> IndexedGetter i s a
- KMonad.Prelude: [runIndexedLens] :: ReifiedIndexedLens i s t a b -> IndexedLens i s t a b
- KMonad.Prelude: [runIndexedSetter] :: ReifiedIndexedSetter i s t a b -> IndexedSetter i s t a b
- KMonad.Prelude: [runIndexedTraversal] :: ReifiedIndexedTraversal i s t a b -> IndexedTraversal i s t a b
- KMonad.Prelude: [runIndexed] :: Indexed i a b -> i -> a -> b
- KMonad.Prelude: [runIso] :: ReifiedIso s t a b -> Iso s t a b
- KMonad.Prelude: [runLens] :: ReifiedLens s t a b -> Lens s t a b
- KMonad.Prelude: [runPrism] :: ReifiedPrism s t a b -> Prism s t a b
- KMonad.Prelude: [runReaderT] :: ReaderT r (m :: Type -> Type) a -> r -> m a
- KMonad.Prelude: [runSetter] :: ReifiedSetter s t a b -> Setter s t a b
- KMonad.Prelude: [runTraversal] :: ReifiedTraversal s t a b -> Traversal s t a b
- KMonad.Prelude: [unRIO] :: RIO env a -> ReaderT env IO a
- KMonad.Prelude: [unliftIO] :: UnliftIO (m :: Type -> Type) -> forall a. () => m a -> IO a
- KMonad.Prelude: _1 :: Field1 s t a b => Lens s t a b
- KMonad.Prelude: _1' :: Field1 s t a b => Lens s t a b
- KMonad.Prelude: _10 :: Field10 s t a b => Lens s t a b
- KMonad.Prelude: _10' :: Field10 s t a b => Lens s t a b
- KMonad.Prelude: _11 :: Field11 s t a b => Lens s t a b
- KMonad.Prelude: _11' :: Field11 s t a b => Lens s t a b
- KMonad.Prelude: _12 :: Field12 s t a b => Lens s t a b
- KMonad.Prelude: _12' :: Field12 s t a b => Lens s t a b
- KMonad.Prelude: _13 :: Field13 s t a b => Lens s t a b
- KMonad.Prelude: _13' :: Field13 s t a b => Lens s t a b
- KMonad.Prelude: _14 :: Field14 s t a b => Lens s t a b
- KMonad.Prelude: _14' :: Field14 s t a b => Lens s t a b
- KMonad.Prelude: _15 :: Field15 s t a b => Lens s t a b
- KMonad.Prelude: _15' :: Field15 s t a b => Lens s t a b
- KMonad.Prelude: _16 :: Field16 s t a b => Lens s t a b
- KMonad.Prelude: _16' :: Field16 s t a b => Lens s t a b
- KMonad.Prelude: _17 :: Field17 s t a b => Lens s t a b
- KMonad.Prelude: _17' :: Field17 s t a b => Lens s t a b
- KMonad.Prelude: _18 :: Field18 s t a b => Lens s t a b
- KMonad.Prelude: _18' :: Field18 s t a b => Lens s t a b
- KMonad.Prelude: _19 :: Field19 s t a b => Lens s t a b
- KMonad.Prelude: _19' :: Field19 s t a b => Lens s t a b
- KMonad.Prelude: _2 :: Field2 s t a b => Lens s t a b
- KMonad.Prelude: _2' :: Field2 s t a b => Lens s t a b
- KMonad.Prelude: _3 :: Field3 s t a b => Lens s t a b
- KMonad.Prelude: _3' :: Field3 s t a b => Lens s t a b
- KMonad.Prelude: _4 :: Field4 s t a b => Lens s t a b
- KMonad.Prelude: _4' :: Field4 s t a b => Lens s t a b
- KMonad.Prelude: _5 :: Field5 s t a b => Lens s t a b
- KMonad.Prelude: _5' :: Field5 s t a b => Lens s t a b
- KMonad.Prelude: _6 :: Field6 s t a b => Lens s t a b
- KMonad.Prelude: _6' :: Field6 s t a b => Lens s t a b
- KMonad.Prelude: _7 :: Field7 s t a b => Lens s t a b
- KMonad.Prelude: _7' :: Field7 s t a b => Lens s t a b
- KMonad.Prelude: _8 :: Field8 s t a b => Lens s t a b
- KMonad.Prelude: _8' :: Field8 s t a b => Lens s t a b
- KMonad.Prelude: _9 :: Field9 s t a b => Lens s t a b
- KMonad.Prelude: _9' :: Field9 s t a b => Lens s t a b
- KMonad.Prelude: _Cons :: Cons s t a b => Prism s t (a, s) (b, t)
- KMonad.Prelude: _Empty :: AsEmpty a => Prism' a ()
- KMonad.Prelude: _GWrapped' :: forall s (d :: Meta) (c :: Meta) (s' :: Meta) a. (Generic s, D1 d (C1 c (S1 s' (Rec0 a))) ~ Rep s, Unwrapped s ~ GUnwrapped (Rep s)) => Iso' s (Unwrapped s)
- KMonad.Prelude: _Just :: Prism (Maybe a) (Maybe b) a b
- KMonad.Prelude: _Left :: Prism (Either a c) (Either b c) a b
- KMonad.Prelude: _Nothing :: Prism' (Maybe a) ()
- KMonad.Prelude: _Right :: Prism (Either c a) (Either c b) a b
- KMonad.Prelude: _Show :: (Read a, Show a) => Prism' String a
- KMonad.Prelude: _Snoc :: Snoc s t a b => Prism s t (s, a) (t, b)
- KMonad.Prelude: _Unwrapped :: Rewrapping s t => Iso (Unwrapped t) (Unwrapped s) t s
- KMonad.Prelude: _Unwrapped' :: Wrapped s => Iso' (Unwrapped s) s
- KMonad.Prelude: _Unwrapping :: Rewrapping s t => (Unwrapped s -> s) -> Iso (Unwrapped t) (Unwrapped s) t s
- KMonad.Prelude: _Unwrapping' :: Wrapped s => (Unwrapped s -> s) -> Iso' (Unwrapped s) s
- KMonad.Prelude: _Void :: Prism s s a Void
- KMonad.Prelude: _Wrapped :: Rewrapping s t => Iso s t (Unwrapped s) (Unwrapped t)
- KMonad.Prelude: _Wrapped' :: Wrapped s => Iso' s (Unwrapped s)
- KMonad.Prelude: _Wrapping :: Rewrapping s t => (Unwrapped s -> s) -> Iso s t (Unwrapped s) (Unwrapped t)
- KMonad.Prelude: _Wrapping' :: Wrapped s => (Unwrapped s -> s) -> Iso' s (Unwrapped s)
- KMonad.Prelude: _head :: Cons s s a a => Traversal' s a
- KMonad.Prelude: _init :: Snoc s s a a => Traversal' s s
- KMonad.Prelude: _last :: Snoc s s a a => Traversal' s a
- KMonad.Prelude: _tail :: Cons s s a a => Traversal' s s
- KMonad.Prelude: abbreviatedFields :: LensRules
- KMonad.Prelude: abbreviatedNamer :: FieldNamer
- KMonad.Prelude: abs :: Num a => a -> a
- KMonad.Prelude: absurd :: Void -> a
- KMonad.Prelude: acos :: Floating a => a -> a
- KMonad.Prelude: acosh :: Floating a => a -> a
- KMonad.Prelude: ala :: (Functor f, Rewrapping s t) => (Unwrapped s -> s) -> ((Unwrapped t -> t) -> f s) -> f (Unwrapped s)
- KMonad.Prelude: alaf :: (Functor f, Functor g, Rewrapping s t) => (Unwrapped s -> s) -> (f t -> g s) -> f (Unwrapped t) -> g (Unwrapped s)
- KMonad.Prelude: all :: Foldable t => (a -> Bool) -> t a -> Bool
- KMonad.Prelude: allOf :: Getting All s a -> (a -> Bool) -> s -> Bool
- KMonad.Prelude: allocateAcquire :: MonadResource m => Acquire a -> m (ReleaseKey, a)
- KMonad.Prelude: alongside :: LensLike (AlongsideLeft f b') s t a b -> LensLike (AlongsideRight f t) s' t' a' b' -> LensLike f (s, s') (t, t') (a, a') (b, b')
- KMonad.Prelude: and :: Foldable t => t Bool -> Bool
- KMonad.Prelude: andOf :: Getting All s Bool -> s -> Bool
- KMonad.Prelude: anon :: a -> (a -> Bool) -> Iso' (Maybe a) a
- KMonad.Prelude: any :: Foldable t => (a -> Bool) -> t a -> Bool
- KMonad.Prelude: anyOf :: Getting Any s a -> (a -> Bool) -> s -> Bool
- KMonad.Prelude: ap :: Monad m => m (a -> b) -> m a -> m b
- KMonad.Prelude: argument :: forall (p :: Type -> Type -> Type) b r a. Profunctor p => Setter (p b r) (p a r) a b
- KMonad.Prelude: asBDeque :: BDeque s a -> BDeque s a
- KMonad.Prelude: asIO :: IO a -> IO a
- KMonad.Prelude: asIndex :: (Indexable i p, Contravariant f, Functor f) => p i (f i) -> Indexed i s (f s)
- KMonad.Prelude: asSDeque :: SDeque s a -> SDeque s a
- KMonad.Prelude: asTypeOf :: a -> a -> a
- KMonad.Prelude: asUDeque :: UDeque s a -> UDeque s a
- KMonad.Prelude: aside :: APrism s t a b -> Prism (e, s) (e, t) (e, a) (e, b)
- KMonad.Prelude: asin :: Floating a => a -> a
- KMonad.Prelude: asinh :: Floating a => a -> a
- KMonad.Prelude: ask :: MonadReader r m => m r
- KMonad.Prelude: askRunInIO :: MonadUnliftIO m => m (m a -> IO a)
- KMonad.Prelude: askUnliftIO :: MonadUnliftIO m => m (UnliftIO m)
- KMonad.Prelude: asks :: MonadReader r m => (r -> a) -> m a
- KMonad.Prelude: assert :: Bool -> a -> a
- KMonad.Prelude: assign :: MonadState s m => ASetter s s a b -> b -> m ()
- KMonad.Prelude: assignA :: Arrow p => ASetter s t a b -> p s b -> p s t
- KMonad.Prelude: asum :: (Foldable t, Alternative f) => t (f a) -> f a
- KMonad.Prelude: asumOf :: Alternative f => Getting (Endo (f a)) s (f a) -> s -> f a
- KMonad.Prelude: async :: MonadUnliftIO m => m a -> m (Async a)
- KMonad.Prelude: asyncBound :: MonadUnliftIO m => m a -> m (Async a)
- KMonad.Prelude: asyncOn :: MonadUnliftIO m => Int -> m a -> m (Async a)
- KMonad.Prelude: asyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall b. () => m b -> m b) -> m a) -> m (Async a)
- KMonad.Prelude: asyncWithUnmask :: MonadUnliftIO m => ((forall b. () => m b -> m b) -> m a) -> m (Async a)
- KMonad.Prelude: at :: At m => Index m -> Lens' m (Maybe (IxValue m))
- KMonad.Prelude: atan :: Floating a => a -> a
- KMonad.Prelude: atan2 :: RealFloat a => a -> a -> a
- KMonad.Prelude: atanh :: Floating a => a -> a
- KMonad.Prelude: atomicModifyIORef :: MonadIO m => IORef a -> (a -> (a, b)) -> m b
- KMonad.Prelude: atomicModifyIORef' :: MonadIO m => IORef a -> (a -> (a, b)) -> m b
- KMonad.Prelude: atomicWriteIORef :: MonadIO m => IORef a -> a -> m ()
- KMonad.Prelude: atomically :: MonadIO m => STM a -> m a
- KMonad.Prelude: au :: Functor f => AnIso s t a b -> ((b -> t) -> f s) -> f a
- KMonad.Prelude: auf :: (Functor f, Functor g) => AnIso s t a b -> (f t -> g s) -> f b -> g a
- KMonad.Prelude: backwards :: (Profunctor p, Profunctor q) => Optical p q (Backwards f) s t a b -> Optical p q f s t a b
- KMonad.Prelude: below :: forall (f :: Type -> Type) s a. Traversable f => APrism' s a -> Prism' (f s) (f a)
- KMonad.Prelude: beside :: (Representable q, Applicative (Rep q), Applicative f, Bitraversable r) => Optical p q f s t a b -> Optical p q f s' t' a b -> Optical p q f (r s s') (r t t') a b
- KMonad.Prelude: bimap :: Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d
- KMonad.Prelude: bimapping :: forall (f :: Type -> Type -> Type) (g :: Type -> Type -> Type) s t a b s' t' a' b'. (Bifunctor f, Bifunctor g) => AnIso s t a b -> AnIso s' t' a' b' -> Iso (f s s') (g t t') (f a a') (g b b')
- KMonad.Prelude: bool :: a -> a -> Bool -> a
- KMonad.Prelude: both :: forall (r :: Type -> Type -> Type) a b. Bitraversable r => Traversal (r a a) (r b b) a b
- KMonad.Prelude: both1 :: forall (r :: Type -> Type -> Type) a b. Bitraversable1 r => Traversal1 (r a a) (r b b) a b
- KMonad.Prelude: bracket :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c
- KMonad.Prelude: bracketOnError :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c
- KMonad.Prelude: bracketOnError_ :: MonadUnliftIO m => m a -> m b -> m c -> m c
- KMonad.Prelude: bracket_ :: MonadUnliftIO m => m a -> m b -> m c -> m c
- KMonad.Prelude: break :: (a -> Bool) -> [a] -> ([a], [a])
- KMonad.Prelude: byteSwap16 :: Word16 -> Word16
- KMonad.Prelude: byteSwap32 :: Word32 -> Word32
- KMonad.Prelude: byteSwap64 :: Word64 -> Word64
- KMonad.Prelude: callCC :: MonadCont m => ((a -> m b) -> m a) -> m a
- KMonad.Prelude: camelCaseFields :: LensRules
- KMonad.Prelude: camelCaseNamer :: FieldNamer
- KMonad.Prelude: cancel :: MonadIO m => Async a -> m ()
- KMonad.Prelude: cancelWith :: (Exception e, MonadIO m) => Async a -> e -> m ()
- KMonad.Prelude: catMaybes :: [Maybe a] -> [a]
- KMonad.Prelude: catch :: (MonadUnliftIO m, Exception e) => m a -> (e -> m a) -> m a
- KMonad.Prelude: catchAny :: MonadUnliftIO m => m a -> (SomeException -> m a) -> m a
- KMonad.Prelude: catchAnyDeep :: (NFData a, MonadUnliftIO m) => m a -> (SomeException -> m a) -> m a
- KMonad.Prelude: catchDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> (e -> m a) -> m a
- KMonad.Prelude: catchIO :: MonadUnliftIO m => m a -> (IOException -> m a) -> m a
- KMonad.Prelude: catchJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m a
- KMonad.Prelude: catches :: MonadUnliftIO m => m a -> [Handler m a] -> m a
- KMonad.Prelude: catchesDeep :: (MonadUnliftIO m, NFData a) => m a -> [Handler m a] -> m a
- KMonad.Prelude: ceiling :: (RealFrac a, Integral b) => a -> b
- KMonad.Prelude: censoring :: MonadWriter w m => Setter w w u v -> (u -> v) -> m a -> m a
- KMonad.Prelude: checkSTM :: Bool -> STM ()
- KMonad.Prelude: children :: Plated a => a -> [a]
- KMonad.Prelude: choosing :: Functor f => LensLike f s t a b -> LensLike f s' t' a b -> LensLike f (Either s s') (Either t t') a b
- KMonad.Prelude: chosen :: IndexPreservingLens (Either a a) (Either b b) a b
- KMonad.Prelude: class Applicative f => Alternative (f :: Type -> Type)
- KMonad.Prelude: class Functor f => Applicative (f :: Type -> Type)
- KMonad.Prelude: class Category a => Arrow (a :: Type -> Type -> Type)
- KMonad.Prelude: class AsEmpty a
- KMonad.Prelude: class Ixed m => At m
- KMonad.Prelude: class Bifunctor (p :: Type -> Type -> Type)
- KMonad.Prelude: class Bounded a
- KMonad.Prelude: class Category (cat :: k -> k -> Type)
- KMonad.Prelude: class Profunctor p => Choice (p :: Type -> Type -> Type)
- KMonad.Prelude: class (Choice p, Corepresentable p, Comonad Corep p, Traversable Corep p, Strong p, Representable p, Monad Rep p, MonadFix Rep p, Distributive Rep p, Costrong p, ArrowLoop p, ArrowApply p, ArrowChoice p, Closed p) => Conjoined (p :: Type -> Type -> Type)
- KMonad.Prelude: class Cons s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Contains m
- KMonad.Prelude: class Contravariant (f :: Type -> Type)
- KMonad.Prelude: class Typeable a => Data a
- KMonad.Prelude: class Display a
- KMonad.Prelude: class Each s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Enum a
- KMonad.Prelude: class Eq a
- KMonad.Prelude: class (Typeable e, Show e) => Exception e
- KMonad.Prelude: class Field1 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field10 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field11 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field12 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field13 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field14 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field15 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field16 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field17 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field18 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field19 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field2 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field3 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field4 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field5 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field6 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field7 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field8 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Field9 s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Fractional a => Floating a
- KMonad.Prelude: class Foldable (t :: Type -> Type)
- KMonad.Prelude: class Foldable f => FoldableWithIndex i (f :: Type -> Type) | f -> i
- KMonad.Prelude: class Num a => Fractional a
- KMonad.Prelude: class Functor (f :: Type -> Type)
- KMonad.Prelude: class Functor f => FunctorWithIndex i (f :: Type -> Type) | f -> i
- KMonad.Prelude: class GPlated a (g :: k -> Type)
- KMonad.Prelude: class GPlated1 (f :: k -> Type) (g :: k -> Type)
- KMonad.Prelude: class Generic a
- KMonad.Prelude: class HasGLogFunc env where {
- KMonad.Prelude: class HasLogFunc env
- KMonad.Prelude: class HasLogLevel msg
- KMonad.Prelude: class HasLogSource msg
- KMonad.Prelude: class HasStateRef s env | env -> s
- KMonad.Prelude: class HasWriteRef w env | env -> w
- KMonad.Prelude: class Hashable a
- KMonad.Prelude: class Conjoined p => Indexable i (p :: Type -> Type -> Type)
- KMonad.Prelude: class (Real a, Enum a) => Integral a
- KMonad.Prelude: class IsString a
- KMonad.Prelude: class Ixed m
- KMonad.Prelude: class (Magnified m ~ Magnified n, MonadReader b m, MonadReader a n) => Magnify (m :: Type -> Type) (n :: Type -> Type) b a | m -> b, n -> a, m a -> n, n b -> m
- KMonad.Prelude: class Applicative m => Monad (m :: Type -> Type)
- KMonad.Prelude: class Monad m => MonadCont (m :: Type -> Type)
- KMonad.Prelude: class Monad m => MonadFail (m :: Type -> Type)
- KMonad.Prelude: class Monad m => MonadIO (m :: Type -> Type)
- KMonad.Prelude: class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type)
- KMonad.Prelude: class Monad m => MonadReader r (m :: Type -> Type) | m -> r
- KMonad.Prelude: class Monad m => MonadThrow (m :: Type -> Type)
- KMonad.Prelude: class MonadTrans (t :: Type -> Type -> Type -> Type)
- KMonad.Prelude: class MonadIO m => MonadUnliftIO (m :: Type -> Type)
- KMonad.Prelude: class Semigroup a => Monoid a
- KMonad.Prelude: class NFData a
- KMonad.Prelude: class Num a
- KMonad.Prelude: class Eq a => Ord a
- KMonad.Prelude: class Plated a
- KMonad.Prelude: class Monad m => PrimMonad (m :: Type -> Type) where {
- KMonad.Prelude: class Profunctor (p :: Type -> Type -> Type)
- KMonad.Prelude: class Read a
- KMonad.Prelude: class (Num a, Ord a) => Real a
- KMonad.Prelude: class (RealFrac a, Floating a) => RealFloat a
- KMonad.Prelude: class (Real a, Fractional a) => RealFrac a
- KMonad.Prelude: class Reversing t
- KMonad.Prelude: class (Profunctor p, Bifunctor p) => Reviewable (p :: Type -> Type -> Type)
- KMonad.Prelude: class Wrapped s => Rewrapped s t
- KMonad.Prelude: class (Rewrapped s t, Rewrapped t s) => Rewrapping s t
- KMonad.Prelude: class Semigroup a
- KMonad.Prelude: class (Applicative f, Distributive f, Traversable f) => Settable (f :: Type -> Type)
- KMonad.Prelude: class Show a
- KMonad.Prelude: class Snoc s t a b | s -> a, t -> b, s b -> t, t a -> s
- KMonad.Prelude: class Storable a
- KMonad.Prelude: class Strict lazy strict | lazy -> strict, strict -> lazy
- KMonad.Prelude: class Bifunctor p => Swapped (p :: Type -> Type -> Type)
- KMonad.Prelude: class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
- KMonad.Prelude: class (Foldable1 t, Traversable t) => Traversable1 (t :: Type -> Type)
- KMonad.Prelude: class (FunctorWithIndex i t, FoldableWithIndex i t, Traversable t) => TraversableWithIndex i (t :: Type -> Type) | t -> i
- KMonad.Prelude: class Ord k => TraverseMax k (m :: Type -> Type) | m -> k
- KMonad.Prelude: class Ord k => TraverseMin k (m :: Type -> Type) | m -> k
- KMonad.Prelude: class Typeable (a :: k)
- KMonad.Prelude: class (Vector Vector a, MVector MVector a) => Unbox a
- KMonad.Prelude: class Wrapped s where {
- KMonad.Prelude: class (MonadState s m, MonadState t n) => Zoom (m :: Type -> Type) (n :: Type -> Type) s t | m -> s, n -> t, m t -> n, n s -> m
- KMonad.Prelude: classUnderscoreNoPrefixFields :: LensRules
- KMonad.Prelude: classUnderscoreNoPrefixNamer :: FieldNamer
- KMonad.Prelude: classyRules :: LensRules
- KMonad.Prelude: classyRules_ :: LensRules
- KMonad.Prelude: cloneEquality :: forall k1 k2 (s :: k1) (t :: k2) (a :: k1) (b :: k2). AnEquality s t a b -> Equality s t a b
- KMonad.Prelude: cloneIndexPreservingLens :: ALens s t a b -> IndexPreservingLens s t a b
- KMonad.Prelude: cloneIndexPreservingSetter :: ASetter s t a b -> IndexPreservingSetter s t a b
- KMonad.Prelude: cloneIndexPreservingTraversal :: ATraversal s t a b -> IndexPreservingTraversal s t a b
- KMonad.Prelude: cloneIndexPreservingTraversal1 :: ATraversal1 s t a b -> IndexPreservingTraversal1 s t a b
- KMonad.Prelude: cloneIndexedLens :: AnIndexedLens i s t a b -> IndexedLens i s t a b
- KMonad.Prelude: cloneIndexedSetter :: AnIndexedSetter i s t a b -> IndexedSetter i s t a b
- KMonad.Prelude: cloneIndexedTraversal :: AnIndexedTraversal i s t a b -> IndexedTraversal i s t a b
- KMonad.Prelude: cloneIndexedTraversal1 :: AnIndexedTraversal1 i s t a b -> IndexedTraversal1 i s t a b
- KMonad.Prelude: cloneIso :: AnIso s t a b -> Iso s t a b
- KMonad.Prelude: cloneLens :: ALens s t a b -> Lens s t a b
- KMonad.Prelude: clonePrism :: APrism s t a b -> Prism s t a b
- KMonad.Prelude: cloneSetter :: ASetter s t a b -> Setter s t a b
- KMonad.Prelude: cloneTChan :: TChan a -> STM (TChan a)
- KMonad.Prelude: cloneTraversal :: ATraversal s t a b -> Traversal s t a b
- KMonad.Prelude: cloneTraversal1 :: ATraversal1 s t a b -> Traversal1 s t a b
- KMonad.Prelude: coerced :: forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
- KMonad.Prelude: compare :: Ord a => a -> a -> Ordering
- KMonad.Prelude: comparing :: Ord a => (b -> a) -> b -> b -> Ordering
- KMonad.Prelude: composOpFold :: Plated a => b -> (b -> b -> b) -> (a -> b) -> a -> b
- KMonad.Prelude: conc :: m a -> Conc m a
- KMonad.Prelude: concat :: Foldable t => t [a] -> [a]
- KMonad.Prelude: concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- KMonad.Prelude: concatMapOf :: Getting [r] s a -> (a -> [r]) -> s -> [r]
- KMonad.Prelude: concatOf :: Getting [r] s [r] -> s -> [r]
- KMonad.Prelude: concurrently :: MonadUnliftIO m => m a -> m b -> m (a, b)
- KMonad.Prelude: concurrently_ :: MonadUnliftIO m => m a -> m b -> m ()
- KMonad.Prelude: confusing :: Applicative f => LensLike (Curried (Yoneda f) (Yoneda f)) s t a b -> LensLike f s t a b
- KMonad.Prelude: conjoined :: Conjoined p => (p ~ ((->) :: Type -> Type -> Type) => q (a -> b) r) -> q (p a b) r -> q (p a b) r
- KMonad.Prelude: cons :: Cons s s a a => a -> s -> s
- KMonad.Prelude: const :: a -> b -> a
- KMonad.Prelude: cont :: ((a -> r) -> r) -> Cont r a
- KMonad.Prelude: contains :: Contains m => Index m -> Lens' m Bool
- KMonad.Prelude: contexts :: Plated a => a -> [Context a a a]
- KMonad.Prelude: contextsOf :: ATraversal' a a -> a -> [Context a a a]
- KMonad.Prelude: contextsOn :: Plated a => ATraversal s t a a -> s -> [Context a a t]
- KMonad.Prelude: contextsOnOf :: ATraversal s t a a -> ATraversal' a a -> s -> [Context a a t]
- KMonad.Prelude: contramap :: Contravariant f => (a -> b) -> f b -> f a
- KMonad.Prelude: contramapGLogFunc :: (a -> b) -> GLogFunc b -> GLogFunc a
- KMonad.Prelude: contramapMaybeGLogFunc :: (a -> Maybe b) -> GLogFunc b -> GLogFunc a
- KMonad.Prelude: contramapped :: forall (f :: Type -> Type) b a. Contravariant f => Setter (f b) (f a) a b
- KMonad.Prelude: contramapping :: forall (f :: Type -> Type) s t a b. Contravariant f => AnIso s t a b -> Iso (f a) (f b) (f s) (f t)
- KMonad.Prelude: cos :: Floating a => a -> a
- KMonad.Prelude: cosh :: Floating a => a -> a
- KMonad.Prelude: cosmos :: Plated a => Fold a a
- KMonad.Prelude: cosmosOf :: (Applicative f, Contravariant f) => LensLike' f a a -> LensLike' f a a
- KMonad.Prelude: cosmosOn :: (Applicative f, Contravariant f, Plated a) => LensLike' f s a -> LensLike' f s a
- KMonad.Prelude: cosmosOnOf :: (Applicative f, Contravariant f) => LensLike' f s a -> LensLike' f a a -> LensLike' f s a
- KMonad.Prelude: createClass :: Lens' LensRules Bool
- KMonad.Prelude: curried :: Iso ((a, b) -> c) ((d, e) -> f) (a -> b -> c) (d -> e -> f)
- KMonad.Prelude: curry :: ((a, b) -> c) -> a -> b -> c
- KMonad.Prelude: cycled :: Apply f => LensLike f s t a b -> LensLike f s t a b
- KMonad.Prelude: data (a :: k) :~: (b :: k)
- KMonad.Prelude: data Acquire a
- KMonad.Prelude: data Async a
- KMonad.Prelude: data AsyncExceptionWrapper
- KMonad.Prelude: data Bool
- KMonad.Prelude: data BufferMode
- KMonad.Prelude: data Builder
- KMonad.Prelude: data ByteString
- KMonad.Prelude: data CallStack
- KMonad.Prelude: data Chan a
- KMonad.Prelude: data Char
- KMonad.Prelude: data Conc (m :: Type -> Type) a
- KMonad.Prelude: data ConcException
- KMonad.Prelude: data Context a b t
- KMonad.Prelude: data DefName
- KMonad.Prelude: data Deque (v :: Type -> Type -> Type) s a
- KMonad.Prelude: data Double
- KMonad.Prelude: data Either a b
- KMonad.Prelude: data ExitCode
- KMonad.Prelude: data Float
- KMonad.Prelude: data GLogFunc msg
- KMonad.Prelude: data Handle
- KMonad.Prelude: data Handler (m :: Type -> Type) a
- KMonad.Prelude: data HashMap k v
- KMonad.Prelude: data HashSet a
- KMonad.Prelude: data IO a
- KMonad.Prelude: data IOException
- KMonad.Prelude: data IOMode
- KMonad.Prelude: data IORef a
- KMonad.Prelude: data Identical (a :: k) (b :: k1) (s :: k) (t :: k1)
- KMonad.Prelude: data Int
- KMonad.Prelude: data Int16
- KMonad.Prelude: data Int32
- KMonad.Prelude: data Int64
- KMonad.Prelude: data Int8
- KMonad.Prelude: data IntMap a
- KMonad.Prelude: data IntSet
- KMonad.Prelude: data Integer
- KMonad.Prelude: data Leftmost a
- KMonad.Prelude: data LensRules
- KMonad.Prelude: data Level i a
- KMonad.Prelude: data LogFunc
- KMonad.Prelude: data LogLevel
- KMonad.Prelude: data LogOptions
- KMonad.Prelude: data MVar a
- KMonad.Prelude: data Magma i t b a
- KMonad.Prelude: data Map k a
- KMonad.Prelude: data Maybe a
- KMonad.Prelude: data Memoized a
- KMonad.Prelude: data Natural
- KMonad.Prelude: data NonEmpty a
- KMonad.Prelude: data Ordering
- KMonad.Prelude: data Proxy (t :: k)
- KMonad.Prelude: data ReleaseType
- KMonad.Prelude: data Rightmost a
- KMonad.Prelude: data ST s a
- KMonad.Prelude: data STM a
- KMonad.Prelude: data SeekMode
- KMonad.Prelude: data Seq a
- KMonad.Prelude: data Sequenced a (m :: Type -> Type)
- KMonad.Prelude: data Set a
- KMonad.Prelude: data ShortByteString
- KMonad.Prelude: data SimpleApp
- KMonad.Prelude: data SomeAsyncException
- KMonad.Prelude: data SomeException
- KMonad.Prelude: data SomeRef a
- KMonad.Prelude: data StringException
- KMonad.Prelude: data SyncExceptionWrapper
- KMonad.Prelude: data TBQueue a
- KMonad.Prelude: data TChan a
- KMonad.Prelude: data TMVar a
- KMonad.Prelude: data TQueue a
- KMonad.Prelude: data TVar a
- KMonad.Prelude: data Text
- KMonad.Prelude: data ThreadId
- KMonad.Prelude: data Traversed a (f :: Type -> Type)
- KMonad.Prelude: data URef s a
- KMonad.Prelude: data UnicodeException
- KMonad.Prelude: data Vector a
- KMonad.Prelude: data Void
- KMonad.Prelude: data Word
- KMonad.Prelude: data Word16
- KMonad.Prelude: data Word32
- KMonad.Prelude: data Word64
- KMonad.Prelude: data Word8
- KMonad.Prelude: dataCast1 :: (Data a, Typeable t) => (forall d. Data d => c (t d)) -> Maybe (c a)
- KMonad.Prelude: dataCast2 :: (Data a, Typeable t) => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)
- KMonad.Prelude: dataTypeOf :: Data a => a -> DataType
- KMonad.Prelude: declareClassy :: DecsQ -> DecsQ
- KMonad.Prelude: declareClassyFor :: [(String, (String, String))] -> [(String, String)] -> DecsQ -> DecsQ
- KMonad.Prelude: declareFields :: DecsQ -> DecsQ
- KMonad.Prelude: declareLenses :: DecsQ -> DecsQ
- KMonad.Prelude: declareLensesFor :: [(String, String)] -> DecsQ -> DecsQ
- KMonad.Prelude: declareLensesWith :: LensRules -> DecsQ -> DecsQ
- KMonad.Prelude: declarePrisms :: DecsQ -> DecsQ
- KMonad.Prelude: declareWrapped :: DecsQ -> DecsQ
- KMonad.Prelude: decodeFloat :: RealFloat a => a -> (Integer, Int)
- KMonad.Prelude: decodeUtf8' :: ByteString -> Either UnicodeException Text
- KMonad.Prelude: decodeUtf8Lenient :: ByteString -> Text
- KMonad.Prelude: decodeUtf8With :: OnDecodeError -> ByteString -> Text
- KMonad.Prelude: deep :: (Conjoined p, Applicative f, Plated s) => Traversing p f s s a b -> Over p f s s a b
- KMonad.Prelude: deepOf :: (Conjoined p, Applicative f) => LensLike f s t s t -> Traversing p f s t a b -> Over p f s t a b
- KMonad.Prelude: deepseq :: NFData a => a -> b -> b
- KMonad.Prelude: defaultFieldRules :: LensRules
- KMonad.Prelude: dequeToList :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m [a]
- KMonad.Prelude: dequeToVector :: forall v' a (v :: Type -> Type -> Type) m. (Vector v' a, MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (v' a)
- KMonad.Prelude: devoid :: forall k p f (a :: k) b. Over p f Void Void a b
- KMonad.Prelude: dimap :: Profunctor p => (a -> b) -> (c -> d) -> p b c -> p a d
- KMonad.Prelude: dimapping :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) s t a b s' t' a' b'. (Profunctor p, Profunctor q) => AnIso s t a b -> AnIso s' t' a' b' -> Iso (p a s') (q b t') (p s a') (q t b')
- KMonad.Prelude: display :: Display a => a -> Utf8Builder
- KMonad.Prelude: displayBytesUtf8 :: ByteString -> Utf8Builder
- KMonad.Prelude: displayCallStack :: CallStack -> Utf8Builder
- KMonad.Prelude: displayException :: Exception e => e -> String
- KMonad.Prelude: displayShow :: Show a => a -> Utf8Builder
- KMonad.Prelude: distrib :: (Conjoined p, Functor f) => p a b -> p (f a) (f b)
- KMonad.Prelude: div :: Integral a => a -> a -> a
- KMonad.Prelude: divMod :: Integral a => a -> a -> (a, a)
- KMonad.Prelude: drop :: Int -> [a] -> [a]
- KMonad.Prelude: dropWhile :: (a -> Bool) -> [a] -> [a]
- KMonad.Prelude: dropping :: (Conjoined p, Applicative f) => Int -> Over p (Indexing f) s t a a -> Over p f s t a a
- KMonad.Prelude: droppingWhile :: (Conjoined p, Profunctor q, Applicative f) => (a -> Bool) -> Optical p q (Compose (State Bool) f) s t a a -> Optical p q f s t a a
- KMonad.Prelude: dupChan :: MonadIO m => Chan a -> m (Chan a)
- KMonad.Prelude: dupTChan :: TChan a -> STM (TChan a)
- KMonad.Prelude: each :: Each s t a b => Traversal s t a b
- KMonad.Prelude: either :: (a -> c) -> (b -> c) -> Either a b -> c
- KMonad.Prelude: elem :: (Foldable t, Eq a) => a -> t a -> Bool
- KMonad.Prelude: elemIndexOf :: Eq a => IndexedGetting i (First i) s a -> a -> s -> Maybe i
- KMonad.Prelude: elemIndicesOf :: Eq a => IndexedGetting i (Endo [i]) s a -> a -> s -> [i]
- KMonad.Prelude: elemOf :: Eq a => Getting Any s a -> a -> s -> Bool
- KMonad.Prelude: element :: forall (t :: Type -> Type) a. Traversable t => Int -> IndexedTraversal' Int (t a) a
- KMonad.Prelude: elementOf :: forall (f :: Type -> Type) s t a. Applicative f => LensLike (Indexing f) s t a a -> Int -> IndexedLensLike Int f s t a a
- KMonad.Prelude: elements :: forall (t :: Type -> Type) a. Traversable t => (Int -> Bool) -> IndexedTraversal' Int (t a) a
- KMonad.Prelude: elementsOf :: forall (f :: Type -> Type) s t a. Applicative f => LensLike (Indexing f) s t a a -> (Int -> Bool) -> IndexedLensLike Int f s t a a
- KMonad.Prelude: encodeFloat :: RealFloat a => Integer -> Int -> a
- KMonad.Prelude: encodeUtf8 :: Text -> ByteString
- KMonad.Prelude: encodeUtf8Builder :: Text -> Builder
- KMonad.Prelude: enum :: Enum a => Iso' Int a
- KMonad.Prelude: equality :: forall k1 k2 (s :: k1) (a :: k1) (b :: k2) (t :: k2). (s :~: a) -> (b :~: t) -> Equality s t a b
- KMonad.Prelude: equality' :: forall k2 (a :: k2) (b :: k2). (a :~: b) -> Equality' a b
- KMonad.Prelude: error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
- KMonad.Prelude: evaluate :: MonadIO m => a -> m a
- KMonad.Prelude: evaluateDeep :: (MonadIO m, NFData a) => a -> m a
- KMonad.Prelude: even :: Integral a => a -> Bool
- KMonad.Prelude: exitFailure :: MonadIO m => m a
- KMonad.Prelude: exitSuccess :: MonadIO m => m a
- KMonad.Prelude: exitWith :: MonadIO m => ExitCode -> m a
- KMonad.Prelude: exp :: Floating a => a -> a
- KMonad.Prelude: exponent :: RealFloat a => a -> Int
- KMonad.Prelude: fail :: MonadFail m => String -> m a
- KMonad.Prelude: failing :: (Conjoined p, Applicative f) => Traversing p f s t a b -> Over p f s t a b -> Over p f s t a b
- KMonad.Prelude: failover :: Alternative m => LensLike ((,) Any) s t a b -> (a -> b) -> s -> m t
- KMonad.Prelude: filter :: (a -> Bool) -> [a] -> [a]
- KMonad.Prelude: filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
- KMonad.Prelude: filtered :: (Choice p, Applicative f) => (a -> Bool) -> Optic' p f a a
- KMonad.Prelude: filteredBy :: (Indexable i p, Applicative f) => Getting (First i) a i -> p a (f a) -> a -> f a
- KMonad.Prelude: finally :: MonadUnliftIO m => m a -> m b -> m a
- KMonad.Prelude: findIndexOf :: IndexedGetting i (First i) s a -> (a -> Bool) -> s -> Maybe i
- KMonad.Prelude: findIndicesOf :: IndexedGetting i (Endo [i]) s a -> (a -> Bool) -> s -> [i]
- KMonad.Prelude: findMOf :: Monad m => Getting (Endo (m (Maybe a))) s a -> (a -> m Bool) -> s -> m (Maybe a)
- KMonad.Prelude: findOf :: Getting (Endo (Maybe a)) s a -> (a -> Bool) -> s -> Maybe a
- KMonad.Prelude: first :: Arrow a => a b c -> a (b, d) (c, d)
- KMonad.Prelude: first1Of :: Getting (First a) s a -> s -> a
- KMonad.Prelude: firstOf :: Getting (Leftmost a) s a -> s -> Maybe a
- KMonad.Prelude: firsting :: forall (f :: Type -> Type -> Type) (g :: Type -> Type -> Type) s t a b x y. (Bifunctor f, Bifunctor g) => AnIso s t a b -> Iso (f s x) (g t y) (f a x) (g b y)
- KMonad.Prelude: fix :: (a -> a) -> a
- KMonad.Prelude: flip :: (a -> b -> c) -> b -> a -> c
- KMonad.Prelude: flipped :: Iso (a -> b -> c) (a' -> b' -> c') (b -> a -> c) (b' -> a' -> c')
- KMonad.Prelude: floatDigits :: RealFloat a => a -> Int
- KMonad.Prelude: floatRadix :: RealFloat a => a -> Integer
- KMonad.Prelude: floatRange :: RealFloat a => a -> (Int, Int)
- KMonad.Prelude: floor :: (RealFrac a, Integral b) => a -> b
- KMonad.Prelude: fmap :: Functor f => (a -> b) -> f a -> f b
- KMonad.Prelude: fold :: (Foldable t, Monoid m) => t m -> m
- KMonad.Prelude: foldBy :: Foldable t => (a -> a -> a) -> a -> t a -> a
- KMonad.Prelude: foldByOf :: Fold s a -> (a -> a -> a) -> a -> s -> a
- KMonad.Prelude: foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- KMonad.Prelude: foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m ()
- KMonad.Prelude: foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
- KMonad.Prelude: foldMapBy :: Foldable t => (r -> r -> r) -> r -> (a -> r) -> t a -> r
- KMonad.Prelude: foldMapByOf :: Fold s a -> (r -> r -> r) -> r -> (a -> r) -> s -> r
- KMonad.Prelude: foldMapM :: (Monad m, Monoid w, Foldable t) => (a -> m w) -> t a -> m w
- KMonad.Prelude: foldMapOf :: Getting r s a -> (a -> r) -> s -> r
- KMonad.Prelude: foldOf :: Getting a s a -> s -> a
- KMonad.Prelude: folded :: forall (f :: Type -> Type) a. Foldable f => IndexedFold Int (f a) a
- KMonad.Prelude: folded64 :: forall (f :: Type -> Type) a. Foldable f => IndexedFold Int64 (f a) a
- KMonad.Prelude: folding :: Foldable f => (s -> f a) -> Fold s a
- KMonad.Prelude: foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b
- KMonad.Prelude: foldl1Of :: HasCallStack => Getting (Dual (Endo (Maybe a))) s a -> (a -> a -> a) -> s -> a
- KMonad.Prelude: foldl1Of' :: HasCallStack => Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> a) -> s -> a
- KMonad.Prelude: foldlDeque :: forall (v :: Type -> Type -> Type) a m acc. (MVector v a, PrimMonad m) => (acc -> a -> m acc) -> acc -> Deque v (PrimState m) a -> m acc
- KMonad.Prelude: foldlMOf :: Monad m => Getting (Endo (r -> m r)) s a -> (r -> a -> m r) -> r -> s -> m r
- KMonad.Prelude: foldlOf :: Getting (Dual (Endo r)) s a -> (r -> a -> r) -> r -> s -> r
- KMonad.Prelude: foldlOf' :: Getting (Endo (Endo r)) s a -> (r -> a -> r) -> r -> s -> r
- KMonad.Prelude: foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
- KMonad.Prelude: foldr1Of :: HasCallStack => Getting (Endo (Maybe a)) s a -> (a -> a -> a) -> s -> a
- KMonad.Prelude: foldr1Of' :: HasCallStack => Getting (Dual (Endo (Endo (Maybe a)))) s a -> (a -> a -> a) -> s -> a
- KMonad.Prelude: foldrDeque :: forall (v :: Type -> Type -> Type) a m acc. (MVector v a, PrimMonad m) => (a -> acc -> m acc) -> acc -> Deque v (PrimState m) a -> m acc
- KMonad.Prelude: foldrMOf :: Monad m => Getting (Dual (Endo (r -> m r))) s a -> (a -> r -> m r) -> r -> s -> m r
- KMonad.Prelude: foldrOf :: Getting (Endo r) s a -> (a -> r -> r) -> r -> s -> r
- KMonad.Prelude: foldrOf' :: Getting (Dual (Endo (Endo r))) s a -> (a -> r -> r) -> r -> s -> r
- KMonad.Prelude: foldring :: (Contravariant f, Applicative f) => ((a -> f a -> f a) -> f a -> s -> f a) -> LensLike f s t a b
- KMonad.Prelude: for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b)
- KMonad.Prelude: for1Of_ :: Functor f => Getting (TraversedF r f) s a -> s -> (a -> f r) -> f ()
- KMonad.Prelude: forConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b)
- KMonad.Prelude: forConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m ()
- KMonad.Prelude: forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)
- KMonad.Prelude: forMOf :: LensLike (WrappedMonad m) s t a b -> s -> (a -> m b) -> m t
- KMonad.Prelude: forMOf_ :: Monad m => Getting (Sequenced r m) s a -> s -> (a -> m r) -> m ()
- KMonad.Prelude: forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m ()
- KMonad.Prelude: forMaybeA :: Applicative f => [a] -> (a -> f (Maybe b)) -> f [b]
- KMonad.Prelude: forMaybeM :: Monad m => [a] -> (a -> m (Maybe b)) -> m [b]
- KMonad.Prelude: forOf :: LensLike f s t a b -> s -> (a -> f b) -> f t
- KMonad.Prelude: forOf_ :: Functor f => Getting (Traversed r f) s a -> s -> (a -> f r) -> f ()
- KMonad.Prelude: for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
- KMonad.Prelude: force :: NFData a => a -> a
- KMonad.Prelude: forever :: Applicative f => f a -> f b
- KMonad.Prelude: freezeDeque :: (Vector v a, PrimMonad m) => Deque (Mutable v) (PrimState m) a -> m (v a)
- KMonad.Prelude: from :: AnIso s t a b -> Iso b a t s
- KMonad.Prelude: fromEither :: (Exception e, MonadIO m) => Either e a -> m a
- KMonad.Prelude: fromEitherIO :: (Exception e, MonadIO m) => IO (Either e a) -> m a
- KMonad.Prelude: fromEitherM :: (Exception e, MonadIO m) => m (Either e a) -> m a
- KMonad.Prelude: fromEnum :: Enum a => a -> Int
- KMonad.Prelude: fromEq :: forall k2 k1 (s :: k2) (t :: k1) (a :: k2) (b :: k1). AnEquality s t a b -> Equality b a t s
- KMonad.Prelude: fromException :: Exception e => SomeException -> Maybe e
- KMonad.Prelude: fromFirst :: a -> First a -> a
- KMonad.Prelude: fromInteger :: Num a => Integer -> a
- KMonad.Prelude: fromIntegral :: (Integral a, Num b) => a -> b
- KMonad.Prelude: fromLeibniz :: forall k1 k2 (a :: k1) (b :: k2) (s :: k1) (t :: k2). (Identical a b a b -> Identical a b s t) -> Equality s t a b
- KMonad.Prelude: fromLeibniz' :: forall k2 (s :: k2) (a :: k2). ((s :~: s) -> s :~: a) -> Equality' s a
- KMonad.Prelude: fromMaybe :: a -> Maybe a -> a
- KMonad.Prelude: fromRational :: Fractional a => Rational -> a
- KMonad.Prelude: fromShort :: ShortByteString -> ByteString
- KMonad.Prelude: fromStrictBytes :: ByteString -> LByteString
- KMonad.Prelude: fromString :: IsString a => String -> a
- KMonad.Prelude: fst :: (a, b) -> a
- KMonad.Prelude: fusing :: Functor f => LensLike (Yoneda f) s t a b -> LensLike f s t a b
- KMonad.Prelude: gLogFuncClassic :: (HasLogLevel msg, HasLogSource msg, Display msg) => LogFunc -> GLogFunc msg
- KMonad.Prelude: gLogFuncL :: HasGLogFunc env => Lens' env (GLogFunc (GMsg env))
- KMonad.Prelude: gcd :: Integral a => a -> a -> a
- KMonad.Prelude: generateLazyPatterns :: Lens' LensRules Bool
- KMonad.Prelude: generateSignatures :: Lens' LensRules Bool
- KMonad.Prelude: generateUpdateableOptics :: Lens' LensRules Bool
- KMonad.Prelude: getChanContents :: MonadIO m => Chan a -> m [a]
- KMonad.Prelude: getDequeSize :: forall m (v :: Type -> Type -> Type) a. PrimMonad m => Deque v (PrimState m) a -> m Int
- KMonad.Prelude: getLogLevel :: HasLogLevel msg => msg -> LogLevel
- KMonad.Prelude: getLogSource :: HasLogSource msg => msg -> LogSource
- KMonad.Prelude: getMonotonicTime :: MonadIO m => m Double
- KMonad.Prelude: getting :: (Profunctor p, Profunctor q, Functor f, Contravariant f) => Optical p q f s t a b -> Optical' p q f s a
- KMonad.Prelude: gfoldl :: Data a => (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. () => g -> c g) -> a -> c a
- KMonad.Prelude: glog :: (MonadIO m, HasCallStack, HasGLogFunc env, MonadReader env m) => GMsg env -> m ()
- KMonad.Prelude: gmapM :: (Data a, Monad m) => (forall d. Data d => d -> m d) -> a -> m a
- KMonad.Prelude: gmapMo :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
- KMonad.Prelude: gmapMp :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
- KMonad.Prelude: gmapQ :: Data a => (forall d. Data d => d -> u) -> a -> [u]
- KMonad.Prelude: gmapQi :: Data a => Int -> (forall d. Data d => d -> u) -> a -> u
- KMonad.Prelude: gmapQl :: Data a => (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
- KMonad.Prelude: gmapQr :: forall r r'. Data a => (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
- KMonad.Prelude: gmapT :: Data a => (forall b. Data b => b -> b) -> a -> a
- KMonad.Prelude: gplate :: (Generic a, GPlated a (Rep a)) => Traversal' a a
- KMonad.Prelude: gplate1 :: forall k (f :: k -> Type) (a :: k). (Generic1 f, GPlated1 f (Rep1 f)) => Traversal' (f a) (f a)
- KMonad.Prelude: guard :: Alternative f => Bool -> f ()
- KMonad.Prelude: gunfold :: Data a => (forall b r. Data b => c (b -> r) -> c r) -> (forall r. () => r -> c r) -> Constr -> c a
- KMonad.Prelude: hClose :: MonadIO m => Handle -> m ()
- KMonad.Prelude: hFileSize :: MonadIO m => Handle -> m Integer
- KMonad.Prelude: hFlush :: MonadIO m => Handle -> m ()
- KMonad.Prelude: hGetBuffering :: MonadIO m => Handle -> m BufferMode
- KMonad.Prelude: hGetEcho :: MonadIO m => Handle -> m Bool
- KMonad.Prelude: hIsClosed :: MonadIO m => Handle -> m Bool
- KMonad.Prelude: hIsEOF :: MonadIO m => Handle -> m Bool
- KMonad.Prelude: hIsOpen :: MonadIO m => Handle -> m Bool
- KMonad.Prelude: hIsReadable :: MonadIO m => Handle -> m Bool
- KMonad.Prelude: hIsSeekable :: MonadIO m => Handle -> m Bool
- KMonad.Prelude: hIsTerminalDevice :: MonadIO m => Handle -> m Bool
- KMonad.Prelude: hIsWritable :: MonadIO m => Handle -> m Bool
- KMonad.Prelude: hPutBuilder :: MonadIO m => Handle -> Builder -> m ()
- KMonad.Prelude: hReady :: MonadIO m => Handle -> m Bool
- KMonad.Prelude: hSeek :: MonadIO m => Handle -> SeekMode -> Integer -> m ()
- KMonad.Prelude: hSetBuffering :: MonadIO m => Handle -> BufferMode -> m ()
- KMonad.Prelude: hSetEcho :: MonadIO m => Handle -> Bool -> m ()
- KMonad.Prelude: hSetFileSize :: MonadIO m => Handle -> Integer -> m ()
- KMonad.Prelude: hTell :: MonadIO m => Handle -> m Integer
- KMonad.Prelude: hWaitForInput :: MonadIO m => Handle -> Int -> m Bool
- KMonad.Prelude: handle :: (MonadUnliftIO m, Exception e) => (e -> m a) -> m a -> m a
- KMonad.Prelude: handleAny :: MonadUnliftIO m => (SomeException -> m a) -> m a -> m a
- KMonad.Prelude: handleAnyDeep :: (MonadUnliftIO m, NFData a) => (SomeException -> m a) -> m a -> m a
- KMonad.Prelude: handleDeep :: (MonadUnliftIO m, Exception e, NFData a) => (e -> m a) -> m a -> m a
- KMonad.Prelude: handleIO :: MonadUnliftIO m => (IOException -> m a) -> m a -> m a
- KMonad.Prelude: handleJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> (b -> m a) -> m a -> m a
- KMonad.Prelude: has :: Getting Any s a -> s -> Bool
- KMonad.Prelude: hasn't :: Getting All s a -> s -> Bool
- KMonad.Prelude: head1 :: forall (t :: Type -> Type) a. Traversable1 t => Lens' (t a) a
- KMonad.Prelude: holes :: Plated a => a -> [Pretext ((->) :: Type -> Type -> Type) a a a]
- KMonad.Prelude: holes1Of :: Conjoined p => Over p (Bazaar1 p a a) s t a a -> s -> NonEmpty (Pretext p a a t)
- KMonad.Prelude: holesOf :: Conjoined p => Over p (Bazaar p a a) s t a a -> s -> [Pretext p a a t]
- KMonad.Prelude: holesOn :: Conjoined p => Over p (Bazaar p a a) s t a a -> s -> [Pretext p a a t]
- KMonad.Prelude: holesOnOf :: Conjoined p => LensLike (Bazaar p r r) s t a b -> Over p (Bazaar p r r) a b r r -> s -> [Pretext p r r t]
- KMonad.Prelude: iall :: FoldableWithIndex i f => (i -> a -> Bool) -> f a -> Bool
- KMonad.Prelude: iallOf :: IndexedGetting i All s a -> (i -> a -> Bool) -> s -> Bool
- KMonad.Prelude: iany :: FoldableWithIndex i f => (i -> a -> Bool) -> f a -> Bool
- KMonad.Prelude: ianyOf :: IndexedGetting i Any s a -> (i -> a -> Bool) -> s -> Bool
- KMonad.Prelude: iat :: At m => Index m -> IndexedLens' (Index m) m (Maybe (IxValue m))
- KMonad.Prelude: icensoring :: MonadWriter w m => IndexedSetter i w w u v -> (i -> u -> v) -> m a -> m a
- KMonad.Prelude: icompose :: Indexable p c => (i -> j -> p) -> (Indexed i s t -> r) -> (Indexed j a b -> s -> t) -> c a b -> r
- KMonad.Prelude: iconcatMap :: FoldableWithIndex i f => (i -> a -> [b]) -> f a -> [b]
- KMonad.Prelude: iconcatMapOf :: IndexedGetting i [r] s a -> (i -> a -> [r]) -> s -> [r]
- KMonad.Prelude: icontains :: Contains m => Index m -> IndexedLens' (Index m) m Bool
- KMonad.Prelude: id :: a -> a
- KMonad.Prelude: idroppingWhile :: (Indexable i p, Profunctor q, Applicative f) => (i -> a -> Bool) -> Optical (Indexed i) q (Compose (State Bool) f) s t a a -> Optical p q f s t a a
- KMonad.Prelude: ifailover :: Alternative m => Over (Indexed i) ((,) Any) s t a b -> (i -> a -> b) -> s -> m t
- KMonad.Prelude: ifiltered :: (Indexable i p, Applicative f) => (i -> a -> Bool) -> Optical' p (Indexed i) f a a
- KMonad.Prelude: ifind :: FoldableWithIndex i f => (i -> a -> Bool) -> f a -> Maybe (i, a)
- KMonad.Prelude: ifindMOf :: Monad m => IndexedGetting i (Endo (m (Maybe a))) s a -> (i -> a -> m Bool) -> s -> m (Maybe a)
- KMonad.Prelude: ifindOf :: IndexedGetting i (Endo (Maybe a)) s a -> (i -> a -> Bool) -> s -> Maybe a
- KMonad.Prelude: ifoldMap :: (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m
- KMonad.Prelude: ifoldMapBy :: FoldableWithIndex i t => (r -> r -> r) -> r -> (i -> a -> r) -> t a -> r
- KMonad.Prelude: ifoldMapByOf :: IndexedFold i t a -> (r -> r -> r) -> r -> (i -> a -> r) -> t -> r
- KMonad.Prelude: ifoldMapOf :: IndexedGetting i m s a -> (i -> a -> m) -> s -> m
- KMonad.Prelude: ifolded :: FoldableWithIndex i f => IndexedFold i (f a) a
- KMonad.Prelude: ifolding :: (Foldable f, Indexable i p, Contravariant g, Applicative g) => (s -> f (i, a)) -> Over p g s t a b
- KMonad.Prelude: ifoldl :: FoldableWithIndex i f => (i -> b -> a -> b) -> b -> f a -> b
- KMonad.Prelude: ifoldl' :: FoldableWithIndex i f => (i -> b -> a -> b) -> b -> f a -> b
- KMonad.Prelude: ifoldlM :: (FoldableWithIndex i f, Monad m) => (i -> b -> a -> m b) -> b -> f a -> m b
- KMonad.Prelude: ifoldlMOf :: Monad m => IndexedGetting i (Endo (r -> m r)) s a -> (i -> r -> a -> m r) -> r -> s -> m r
- KMonad.Prelude: ifoldlOf :: IndexedGetting i (Dual (Endo r)) s a -> (i -> r -> a -> r) -> r -> s -> r
- KMonad.Prelude: ifoldlOf' :: IndexedGetting i (Endo (r -> r)) s a -> (i -> r -> a -> r) -> r -> s -> r
- KMonad.Prelude: ifoldr :: FoldableWithIndex i f => (i -> a -> b -> b) -> b -> f a -> b
- KMonad.Prelude: ifoldr' :: FoldableWithIndex i f => (i -> a -> b -> b) -> b -> f a -> b
- KMonad.Prelude: ifoldrM :: (FoldableWithIndex i f, Monad m) => (i -> a -> b -> m b) -> b -> f a -> m b
- KMonad.Prelude: ifoldrMOf :: Monad m => IndexedGetting i (Dual (Endo (r -> m r))) s a -> (i -> a -> r -> m r) -> r -> s -> m r
- KMonad.Prelude: ifoldrOf :: IndexedGetting i (Endo r) s a -> (i -> a -> r -> r) -> r -> s -> r
- KMonad.Prelude: ifoldrOf' :: IndexedGetting i (Dual (Endo (r -> r))) s a -> (i -> a -> r -> r) -> r -> s -> r
- KMonad.Prelude: ifoldring :: (Indexable i p, Contravariant f, Applicative f) => ((i -> a -> f a -> f a) -> f a -> s -> f a) -> Over p f s t a b
- KMonad.Prelude: ifor :: (TraversableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f (t b)
- KMonad.Prelude: iforM :: (TraversableWithIndex i t, Monad m) => t a -> (i -> a -> m b) -> m (t b)
- KMonad.Prelude: iforMOf :: (Indexed i a (WrappedMonad m b) -> s -> WrappedMonad m t) -> s -> (i -> a -> m b) -> m t
- KMonad.Prelude: iforMOf_ :: Monad m => IndexedGetting i (Sequenced r m) s a -> s -> (i -> a -> m r) -> m ()
- KMonad.Prelude: iforM_ :: (FoldableWithIndex i t, Monad m) => t a -> (i -> a -> m b) -> m ()
- KMonad.Prelude: iforOf :: (Indexed i a (f b) -> s -> f t) -> s -> (i -> a -> f b) -> f t
- KMonad.Prelude: iforOf_ :: Functor f => IndexedGetting i (Traversed r f) s a -> s -> (i -> a -> f r) -> f ()
- KMonad.Prelude: ifor_ :: (FoldableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f ()
- KMonad.Prelude: ignored :: Applicative f => pafb -> s -> f s
- KMonad.Prelude: iix :: Ixed m => Index m -> IndexedTraversal' (Index m) m (IxValue m)
- KMonad.Prelude: ilens :: (s -> (i, a)) -> (s -> b -> t) -> IndexedLens i s t a b
- KMonad.Prelude: ilevels :: forall (f :: Type -> Type) i s t a b j. Applicative f => Traversing (Indexed i) f s t a b -> IndexedLensLike Int f s t (Level i a) (Level j b)
- KMonad.Prelude: ilike :: (Indexable i p, Contravariant f, Functor f) => i -> a -> Over' p f s a
- KMonad.Prelude: ilistening :: MonadWriter w m => IndexedGetting i (i, u) w u -> m a -> m (a, (i, u))
- KMonad.Prelude: ilistenings :: MonadWriter w m => IndexedGetting i v w u -> (i -> u -> v) -> m a -> m (a, v)
- KMonad.Prelude: ilocally :: MonadReader s m => AnIndexedSetter i s s a b -> (i -> a -> b) -> m r -> m r
- KMonad.Prelude: iloci :: IndexedTraversal i (Bazaar (Indexed i) a c s) (Bazaar (Indexed i) b c s) a b
- KMonad.Prelude: imagma :: Over (Indexed i) (Molten i a b) s t a b -> Iso s t' (Magma i t b a) (Magma j t' c c)
- KMonad.Prelude: imap :: FunctorWithIndex i f => (i -> a -> b) -> f a -> f b
- KMonad.Prelude: imapAccumL :: TraversableWithIndex i t => (i -> s -> a -> (s, b)) -> s -> t a -> (s, t b)
- KMonad.Prelude: imapAccumLOf :: Over (Indexed i) (State acc) s t a b -> (i -> acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
- KMonad.Prelude: imapAccumR :: TraversableWithIndex i t => (i -> s -> a -> (s, b)) -> s -> t a -> (s, t b)
- KMonad.Prelude: imapAccumROf :: Over (Indexed i) (Backwards (State acc)) s t a b -> (i -> acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
- KMonad.Prelude: imapM :: (TraversableWithIndex i t, Monad m) => (i -> a -> m b) -> t a -> m (t b)
- KMonad.Prelude: imapMOf :: Over (Indexed i) (WrappedMonad m) s t a b -> (i -> a -> m b) -> s -> m t
- KMonad.Prelude: imapMOf_ :: Monad m => IndexedGetting i (Sequenced r m) s a -> (i -> a -> m r) -> s -> m ()
- KMonad.Prelude: imapM_ :: (FoldableWithIndex i t, Monad m) => (i -> a -> m b) -> t a -> m ()
- KMonad.Prelude: imapOf :: AnIndexedSetter i s t a b -> (i -> a -> b) -> s -> t
- KMonad.Prelude: imapped :: FunctorWithIndex i f => IndexedSetter i (f a) (f b) a b
- KMonad.Prelude: imodifying :: MonadState s m => AnIndexedSetter i s s a b -> (i -> a -> b) -> m ()
- KMonad.Prelude: impureThrow :: Exception e => e -> a
- KMonad.Prelude: index :: (Indexable i p, Eq i, Applicative f) => i -> Optical' p (Indexed i) f a a
- KMonad.Prelude: indexed :: Indexable i p => p a b -> i -> a -> b
- KMonad.Prelude: indexing :: Indexable Int p => ((a -> Indexing f b) -> s -> Indexing f t) -> p a (f b) -> s -> f t
- KMonad.Prelude: indexing64 :: Indexable Int64 p => ((a -> Indexing64 f b) -> s -> Indexing64 f t) -> p a (f b) -> s -> f t
- KMonad.Prelude: indices :: (Indexable i p, Applicative f) => (i -> Bool) -> Optical' p (Indexed i) f a a
- KMonad.Prelude: infix 4 .=
- KMonad.Prelude: infixl 0 `on`
- KMonad.Prelude: infixl 1 &~
- KMonad.Prelude: infixl 3 <|>
- KMonad.Prelude: infixl 4 <$>
- KMonad.Prelude: infixl 5 `failing`
- KMonad.Prelude: infixl 6 -
- KMonad.Prelude: infixl 7 *
- KMonad.Prelude: infixl 8 ^#
- KMonad.Prelude: infixr 0 $!!
- KMonad.Prelude: infixr 1 =<<
- KMonad.Prelude: infixr 2 <~
- KMonad.Prelude: infixr 3 &&
- KMonad.Prelude: infixr 4 %~
- KMonad.Prelude: infixr 5 :<
- KMonad.Prelude: infixr 6 <>
- KMonad.Prelude: infixr 8 #
- KMonad.Prelude: infixr 9 <.
- KMonad.Prelude: inone :: FoldableWithIndex i f => (i -> a -> Bool) -> f a -> Bool
- KMonad.Prelude: inoneOf :: IndexedGetting i Any s a -> (i -> a -> Bool) -> s -> Bool
- KMonad.Prelude: inside :: forall (p :: Type -> Type -> Type) s t a b e. Corepresentable p => ALens s t a b -> Lens (p e s) (p e t) (p e a) (p e b)
- KMonad.Prelude: involuted :: (a -> a) -> Iso' a a
- KMonad.Prelude: iover :: AnIndexedSetter i s t a b -> (i -> a -> b) -> s -> t
- KMonad.Prelude: ipartsOf :: (Indexable [i] p, Functor f) => Traversing (Indexed i) f s t a a -> Over p f s t [a] [a]
- KMonad.Prelude: ipartsOf' :: forall i p f s t a. (Indexable [i] p, Functor f) => Over (Indexed i) (Bazaar' (Indexed i) a) s t a a -> Over p f s t [a] [a]
- KMonad.Prelude: ipassing :: MonadWriter w m => IndexedSetter i w w u v -> m (a, i -> u -> v) -> m a
- KMonad.Prelude: iplens :: (s -> a) -> (s -> b -> t) -> IndexPreservingLens s t a b
- KMonad.Prelude: ipre :: IndexedGetting i (First (i, a)) s a -> IndexPreservingGetter s (Maybe (i, a))
- KMonad.Prelude: ipreuse :: MonadState s m => IndexedGetting i (First (i, a)) s a -> m (Maybe (i, a))
- KMonad.Prelude: ipreuses :: MonadState s m => IndexedGetting i (First r) s a -> (i -> a -> r) -> m (Maybe r)
- KMonad.Prelude: ipreview :: MonadReader s m => IndexedGetting i (First (i, a)) s a -> m (Maybe (i, a))
- KMonad.Prelude: ipreviews :: MonadReader s m => IndexedGetting i (First r) s a -> (i -> a -> r) -> m (Maybe r)
- KMonad.Prelude: isAsyncException :: Exception e => e -> Bool
- KMonad.Prelude: isCurrentThreadBound :: MonadIO m => m Bool
- KMonad.Prelude: isDenormalized :: RealFloat a => a -> Bool
- KMonad.Prelude: isEmptyMVar :: MonadIO m => MVar a -> m Bool
- KMonad.Prelude: isEmptyTBQueue :: TBQueue a -> STM Bool
- KMonad.Prelude: isEmptyTChan :: TChan a -> STM Bool
- KMonad.Prelude: isEmptyTMVar :: TMVar a -> STM Bool
- KMonad.Prelude: isEmptyTQueue :: TQueue a -> STM Bool
- KMonad.Prelude: isFullTBQueue :: TBQueue a -> STM Bool
- KMonad.Prelude: isIEEE :: RealFloat a => a -> Bool
- KMonad.Prelude: isInfinite :: RealFloat a => a -> Bool
- KMonad.Prelude: isJust :: Maybe a -> Bool
- KMonad.Prelude: isLeft :: Either a b -> Bool
- KMonad.Prelude: isNaN :: RealFloat a => a -> Bool
- KMonad.Prelude: isNegativeZero :: RealFloat a => a -> Bool
- KMonad.Prelude: isNothing :: Maybe a -> Bool
- KMonad.Prelude: isRight :: Either a b -> Bool
- KMonad.Prelude: isSyncException :: Exception e => e -> Bool
- KMonad.Prelude: iset :: AnIndexedSetter i s t a b -> (i -> b) -> s -> t
- KMonad.Prelude: isets :: ((i -> a -> b) -> s -> t) -> IndexedSetter i s t a b
- KMonad.Prelude: isn't :: APrism s t a b -> s -> Bool
- KMonad.Prelude: iso :: (s -> a) -> (b -> t) -> Iso s t a b
- KMonad.Prelude: itakingWhile :: (Indexable i p, Profunctor q, Contravariant f, Applicative f) => (i -> a -> Bool) -> Optical' (Indexed i) q (Const (Endo (f s)) :: Type -> Type) s a -> Optical' p q f s a
- KMonad.Prelude: iterated :: Apply f => (a -> a) -> LensLike' f a a
- KMonad.Prelude: ito :: (Indexable i p, Contravariant f) => (s -> (i, a)) -> Over' p f s a
- KMonad.Prelude: itoList :: FoldableWithIndex i f => f a -> [(i, a)]
- KMonad.Prelude: itoListOf :: IndexedGetting i (Endo [(i, a)]) s a -> s -> [(i, a)]
- KMonad.Prelude: itraverse :: (TraversableWithIndex i t, Applicative f) => (i -> a -> f b) -> t a -> f (t b)
- KMonad.Prelude: itraverseBy :: TraversableWithIndex i t => (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> (i -> a -> f b) -> t a -> f (t b)
- KMonad.Prelude: itraverseByOf :: IndexedTraversal i s t a b -> (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> (i -> a -> f b) -> s -> f t
- KMonad.Prelude: itraverseOf :: (Indexed i a (f b) -> s -> f t) -> (i -> a -> f b) -> s -> f t
- KMonad.Prelude: itraverseOf_ :: Functor f => IndexedGetting i (Traversed r f) s a -> (i -> a -> f r) -> s -> f ()
- KMonad.Prelude: itraverse_ :: (FoldableWithIndex i t, Applicative f) => (i -> a -> f b) -> t a -> f ()
- KMonad.Prelude: itraversed :: TraversableWithIndex i t => IndexedTraversal i (t a) (t b) a b
- KMonad.Prelude: iunsafePartsOf :: (Indexable [i] p, Functor f) => Traversing (Indexed i) f s t a b -> Over p f s t [a] [b]
- KMonad.Prelude: iunsafePartsOf' :: forall i s t a b. Over (Indexed i) (Bazaar (Indexed i) a b) s t a b -> IndexedLens [i] s t [a] [b]
- KMonad.Prelude: iuse :: MonadState s m => IndexedGetting i (i, a) s a -> m (i, a)
- KMonad.Prelude: iuses :: MonadState s m => IndexedGetting i r s a -> (i -> a -> r) -> m r
- KMonad.Prelude: iview :: MonadReader s m => IndexedGetting i (i, a) s a -> m (i, a)
- KMonad.Prelude: iviews :: MonadReader s m => IndexedGetting i r s a -> (i -> a -> r) -> m r
- KMonad.Prelude: ix :: Ixed m => Index m -> Traversal' m (IxValue m)
- KMonad.Prelude: ixAt :: At m => Index m -> Traversal' m (IxValue m)
- KMonad.Prelude: join :: Monad m => m (m a) -> m a
- KMonad.Prelude: last1 :: forall (t :: Type -> Type) a. Traversable1 t => Lens' (t a) a
- KMonad.Prelude: last1Of :: Getting (Last a) s a -> s -> a
- KMonad.Prelude: lastOf :: Getting (Rightmost a) s a -> s -> Maybe a
- KMonad.Prelude: lazy :: Strict lazy strict => Iso' strict lazy
- KMonad.Prelude: lcm :: Integral a => a -> a -> a
- KMonad.Prelude: left' :: Choice p => p a b -> p (Either a c) (Either b c)
- KMonad.Prelude: lefts :: [Either a b] -> [a]
- KMonad.Prelude: length :: Foldable t => t a -> Int
- KMonad.Prelude: lengthOf :: Getting (Endo (Endo Int)) s a -> s -> Int
- KMonad.Prelude: lenientDecode :: OnDecodeError
- KMonad.Prelude: lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b
- KMonad.Prelude: lensClass :: Lens' LensRules ClassyNamer
- KMonad.Prelude: lensField :: Lens' LensRules FieldNamer
- KMonad.Prelude: lensRules :: LensRules
- KMonad.Prelude: lensRulesFor :: [(String, String)] -> LensRules
- KMonad.Prelude: levels :: forall (f :: Type -> Type) s t a b. Applicative f => Traversing ((->) :: Type -> Type -> Type) f s t a b -> IndexedLensLike Int f s t (Level () a) (Level () b)
- KMonad.Prelude: lift :: (MonadTrans t, Monad m) => m a -> t m a
- KMonad.Prelude: liftA :: Applicative f => (a -> b) -> f a -> f b
- KMonad.Prelude: liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- KMonad.Prelude: liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- KMonad.Prelude: liftIO :: MonadIO m => IO a -> m a
- KMonad.Prelude: liftM :: Monad m => (a1 -> r) -> m a1 -> m r
- KMonad.Prelude: liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
- KMonad.Prelude: liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r
- KMonad.Prelude: liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r
- KMonad.Prelude: liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r
- KMonad.Prelude: liftRIO :: (MonadIO m, MonadReader env m) => RIO env a -> m a
- KMonad.Prelude: lifted :: forall (m :: Type -> Type) a b. Monad m => Setter (m a) (m b) a b
- KMonad.Prelude: like :: (Profunctor p, Contravariant f, Functor f) => a -> Optic' p f s a
- KMonad.Prelude: lined :: forall (f :: Type -> Type). Applicative f => IndexedLensLike' Int f String String
- KMonad.Prelude: lines :: Text -> [Text]
- KMonad.Prelude: link :: MonadIO m => Async a -> m ()
- KMonad.Prelude: link2 :: MonadIO m => Async a -> Async b -> m ()
- KMonad.Prelude: listToMaybe :: [a] -> Maybe a
- KMonad.Prelude: listening :: MonadWriter w m => Getting u w u -> m a -> m (a, u)
- KMonad.Prelude: listenings :: MonadWriter w m => Getting v w u -> (u -> v) -> m a -> m (a, v)
- KMonad.Prelude: lmap :: Profunctor p => (a -> b) -> p b c -> p a c
- KMonad.Prelude: lmapping :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) s t a b x y. (Profunctor p, Profunctor q) => AnIso s t a b -> Iso (p a x) (q b y) (p s x) (q t y)
- KMonad.Prelude: local :: MonadReader r m => (r -> r) -> m a -> m a
- KMonad.Prelude: locally :: MonadReader s m => ASetter s s a b -> (a -> b) -> m r -> m r
- KMonad.Prelude: loci :: Traversal (Bazaar ((->) :: Type -> Type -> Type) a c s) (Bazaar ((->) :: Type -> Type -> Type) b c s) a b
- KMonad.Prelude: locus :: forall (p :: Type -> Type -> Type -> Type) a c s b. IndexedComonadStore p => Lens (p a c s) (p b c s) a b
- KMonad.Prelude: log :: Floating a => a -> a
- KMonad.Prelude: logBase :: Floating a => a -> a -> a
- KMonad.Prelude: logDebug :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
- KMonad.Prelude: logDebugS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
- KMonad.Prelude: logError :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
- KMonad.Prelude: logErrorS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
- KMonad.Prelude: logFuncL :: HasLogFunc env => Lens' env LogFunc
- KMonad.Prelude: logFuncUseColorL :: HasLogFunc env => SimpleGetter env Bool
- KMonad.Prelude: logGeneric :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> LogLevel -> Utf8Builder -> m ()
- KMonad.Prelude: logInfo :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
- KMonad.Prelude: logInfoS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
- KMonad.Prelude: logOptionsHandle :: MonadIO m => Handle -> Bool -> m LogOptions
- KMonad.Prelude: logOptionsMemory :: MonadIO m => m (IORef Builder, LogOptions)
- KMonad.Prelude: logOther :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Text -> Utf8Builder -> m ()
- KMonad.Prelude: logOtherS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Text -> LogSource -> Utf8Builder -> m ()
- KMonad.Prelude: logSticky :: (MonadIO m, HasCallStack, MonadReader env m, HasLogFunc env) => Utf8Builder -> m ()
- KMonad.Prelude: logStickyDone :: (MonadIO m, HasCallStack, MonadReader env m, HasLogFunc env) => Utf8Builder -> m ()
- KMonad.Prelude: logWarn :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
- KMonad.Prelude: logWarnS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
- KMonad.Prelude: lookingupNamer :: [(String, String)] -> FieldNamer
- KMonad.Prelude: lookup :: Eq a => a -> [(a, b)] -> Maybe b
- KMonad.Prelude: lookupOf :: Eq k => Getting (Endo (Maybe v)) s (k, v) -> k -> s -> Maybe v
- KMonad.Prelude: magma :: LensLike (Mafic a b) s t a b -> Iso s u (Magma Int t b a) (Magma j u c c)
- KMonad.Prelude: magnify :: Magnify m n b a => ((Functor (Magnified m c), Contravariant (Magnified m c)) => LensLike' (Magnified m c) a b) -> m c -> n c
- KMonad.Prelude: makeClassy :: Name -> DecsQ
- KMonad.Prelude: makeClassyFor :: String -> String -> [(String, String)] -> Name -> DecsQ
- KMonad.Prelude: makeClassyPrisms :: Name -> DecsQ
- KMonad.Prelude: makeClassy_ :: Name -> DecsQ
- KMonad.Prelude: makeFields :: Name -> DecsQ
- KMonad.Prelude: makeFieldsNoPrefix :: Name -> DecsQ
- KMonad.Prelude: makeLenses :: Name -> DecsQ
- KMonad.Prelude: makeLensesFor :: [(String, String)] -> Name -> DecsQ
- KMonad.Prelude: makeLensesWith :: LensRules -> Name -> DecsQ
- KMonad.Prelude: makePrisms :: Name -> DecsQ
- KMonad.Prelude: makeWrapped :: Name -> DecsQ
- KMonad.Prelude: map :: (a -> b) -> [a] -> [b]
- KMonad.Prelude: mapAccumLOf :: LensLike (State acc) s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
- KMonad.Prelude: mapAccumROf :: LensLike (Backwards (State acc)) s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
- KMonad.Prelude: mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
- KMonad.Prelude: mapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b)
- KMonad.Prelude: mapConcurrently_ :: (MonadUnliftIO m, Foldable f) => (a -> m b) -> f a -> m ()
- KMonad.Prelude: mapCont :: (r -> r) -> Cont r a -> Cont r a
- KMonad.Prelude: mapContT :: forall k m (r :: k) a. (m r -> m r) -> ContT r m a -> ContT r m a
- KMonad.Prelude: mapEq :: forall k1 k2 (s :: k1) (t :: k2) (a :: k1) (b :: k2) f. AnEquality s t a b -> f s -> f a
- KMonad.Prelude: mapLeft :: (a1 -> a2) -> Either a1 b -> Either a2 b
- KMonad.Prelude: mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
- KMonad.Prelude: mapMOf :: LensLike (WrappedMonad m) s t a b -> (a -> m b) -> s -> m t
- KMonad.Prelude: mapMOf_ :: Monad m => Getting (Sequenced r m) s a -> (a -> m r) -> s -> m ()
- KMonad.Prelude: mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
- KMonad.Prelude: mapMaybe :: (a -> Maybe b) -> [a] -> [b]
- KMonad.Prelude: mapMaybeA :: Applicative f => (a -> f (Maybe b)) -> [a] -> f [b]
- KMonad.Prelude: mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]
- KMonad.Prelude: mapOf :: ASetter s t a b -> (a -> b) -> s -> t
- KMonad.Prelude: mapRIO :: (outer -> inner) -> RIO inner a -> RIO outer a
- KMonad.Prelude: mapped :: forall (f :: Type -> Type) a b. Functor f => Setter (f a) (f b) a b
- KMonad.Prelude: mappend :: Monoid a => a -> a -> a
- KMonad.Prelude: mapping :: forall (f :: Type -> Type) (g :: Type -> Type) s t a b. (Functor f, Functor g) => AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
- KMonad.Prelude: mappingNamer :: (String -> [String]) -> FieldNamer
- KMonad.Prelude: mask :: MonadUnliftIO m => ((forall a. () => m a -> m a) -> m b) -> m b
- KMonad.Prelude: mask_ :: MonadUnliftIO m => m a -> m a
- KMonad.Prelude: matching :: APrism s t a b -> s -> Either t a
- KMonad.Prelude: max :: Ord a => a -> a -> a
- KMonad.Prelude: maxBound :: Bounded a => a
- KMonad.Prelude: maximum1Of :: Ord a => Getting (Max a) s a -> s -> a
- KMonad.Prelude: maximumByOf :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> Maybe a
- KMonad.Prelude: maximumOf :: Ord a => Getting (Endo (Endo (Maybe a))) s a -> s -> Maybe a
- KMonad.Prelude: maybe :: b -> (a -> b) -> Maybe a -> b
- KMonad.Prelude: maybeToList :: Maybe a -> [a]
- KMonad.Prelude: mconcat :: Monoid a => [a] -> a
- KMonad.Prelude: memoizeMVar :: MonadUnliftIO m => m a -> m (Memoized a)
- KMonad.Prelude: memoizeRef :: MonadUnliftIO m => m a -> m (Memoized a)
- KMonad.Prelude: mempty :: Monoid a => a
- KMonad.Prelude: mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
- KMonad.Prelude: min :: Ord a => a -> a -> a
- KMonad.Prelude: minBound :: Bounded a => a
- KMonad.Prelude: minimum1Of :: Ord a => Getting (Min a) s a -> s -> a
- KMonad.Prelude: minimumByOf :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> Maybe a
- KMonad.Prelude: minimumOf :: Ord a => Getting (Endo (Endo (Maybe a))) s a -> s -> Maybe a
- KMonad.Prelude: mkAcquire :: IO a -> (a -> IO ()) -> Acquire a
- KMonad.Prelude: mkAcquireType :: IO a -> (a -> ReleaseType -> IO ()) -> Acquire a
- KMonad.Prelude: mkGLogFunc :: (CallStack -> msg -> IO ()) -> GLogFunc msg
- KMonad.Prelude: mkLogFunc :: (CallStack -> LogSource -> LogLevel -> Utf8Builder -> IO ()) -> LogFunc
- KMonad.Prelude: mkSimpleApp :: MonadIO m => LogFunc -> Maybe ProcessContext -> m SimpleApp
- KMonad.Prelude: mkWeakIORef :: MonadUnliftIO m => IORef a -> m () -> m (Weak (IORef a))
- KMonad.Prelude: mkWeakMVar :: MonadUnliftIO m => MVar a -> m () -> m (Weak (MVar a))
- KMonad.Prelude: mkWeakTMVar :: MonadUnliftIO m => TMVar a -> m () -> m (Weak (TMVar a))
- KMonad.Prelude: mkWeakTVar :: MonadUnliftIO m => TVar a -> m () -> m (Weak (TVar a))
- KMonad.Prelude: mod :: Integral a => a -> a -> a
- KMonad.Prelude: modifyIORef :: MonadIO m => IORef a -> (a -> a) -> m ()
- KMonad.Prelude: modifyIORef' :: MonadIO m => IORef a -> (a -> a) -> m ()
- KMonad.Prelude: modifyMVar :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b
- KMonad.Prelude: modifyMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b
- KMonad.Prelude: modifyMVarMasked_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m ()
- KMonad.Prelude: modifyMVar_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m ()
- KMonad.Prelude: modifySomeRef :: MonadIO m => SomeRef a -> (a -> a) -> m ()
- KMonad.Prelude: modifyTVar :: TVar a -> (a -> a) -> STM ()
- KMonad.Prelude: modifyTVar' :: TVar a -> (a -> a) -> STM ()
- KMonad.Prelude: modifyURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> (a -> a) -> m ()
- KMonad.Prelude: modifying :: MonadState s m => ASetter s s a b -> (a -> b) -> m ()
- KMonad.Prelude: mplus :: MonadPlus m => m a -> m a -> m a
- KMonad.Prelude: msum :: (Foldable t, MonadPlus m) => t (m a) -> m a
- KMonad.Prelude: msumOf :: MonadPlus m => Getting (Endo (m a)) s (m a) -> s -> m a
- KMonad.Prelude: myThreadId :: MonadIO m => m ThreadId
- KMonad.Prelude: mzero :: MonadPlus m => m a
- KMonad.Prelude: nearly :: a -> (a -> Bool) -> Prism' a ()
- KMonad.Prelude: negate :: Num a => a -> a
- KMonad.Prelude: newBroadcastTChan :: STM (TChan a)
- KMonad.Prelude: newBroadcastTChanIO :: MonadIO m => m (TChan a)
- KMonad.Prelude: newChan :: MonadIO m => m (Chan a)
- KMonad.Prelude: newDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => m (Deque v (PrimState m) a)
- KMonad.Prelude: newEmptyMVar :: MonadIO m => m (MVar a)
- KMonad.Prelude: newEmptyTMVar :: STM (TMVar a)
- KMonad.Prelude: newEmptyTMVarIO :: MonadIO m => m (TMVar a)
- KMonad.Prelude: newIORef :: MonadIO m => a -> m (IORef a)
- KMonad.Prelude: newLogFunc :: (MonadIO n, MonadIO m) => LogOptions -> n (LogFunc, m ())
- KMonad.Prelude: newMVar :: MonadIO m => a -> m (MVar a)
- KMonad.Prelude: newSomeRef :: MonadIO m => a -> m (SomeRef a)
- KMonad.Prelude: newTBQueue :: Natural -> STM (TBQueue a)
- KMonad.Prelude: newTBQueueIO :: MonadIO m => Natural -> m (TBQueue a)
- KMonad.Prelude: newTChan :: STM (TChan a)
- KMonad.Prelude: newTChanIO :: MonadIO m => m (TChan a)
- KMonad.Prelude: newTMVar :: a -> STM (TMVar a)
- KMonad.Prelude: newTMVarIO :: MonadIO m => a -> m (TMVar a)
- KMonad.Prelude: newTQueue :: STM (TQueue a)
- KMonad.Prelude: newTQueueIO :: MonadIO m => m (TQueue a)
- KMonad.Prelude: newTVar :: a -> STM (TVar a)
- KMonad.Prelude: newTVarIO :: MonadIO m => a -> m (TVar a)
- KMonad.Prelude: newURef :: (PrimMonad m, Unbox a) => a -> m (URef (PrimState m) a)
- KMonad.Prelude: newUnboxedSomeRef :: (MonadIO m, Unbox a) => a -> m (SomeRef a)
- KMonad.Prelude: newtype Bazaar (p :: Type -> Type -> Type) a b t
- KMonad.Prelude: newtype Bazaar1 (p :: Type -> Type -> Type) a b t
- KMonad.Prelude: newtype Concurrently (m :: Type -> Type) a
- KMonad.Prelude: newtype Const a (b :: k)
- KMonad.Prelude: newtype ContT (r :: k) (m :: k -> Type) a
- KMonad.Prelude: newtype Down a
- KMonad.Prelude: newtype Identity a
- KMonad.Prelude: newtype Indexed i a b
- KMonad.Prelude: newtype RIO env a
- KMonad.Prelude: newtype ReaderT r (m :: Type -> Type) a
- KMonad.Prelude: newtype ReifiedFold s a
- KMonad.Prelude: newtype ReifiedGetter s a
- KMonad.Prelude: newtype ReifiedIndexedFold i s a
- KMonad.Prelude: newtype ReifiedIndexedGetter i s a
- KMonad.Prelude: newtype ReifiedIndexedLens i s t a b
- KMonad.Prelude: newtype ReifiedIndexedSetter i s t a b
- KMonad.Prelude: newtype ReifiedIndexedTraversal i s t a b
- KMonad.Prelude: newtype ReifiedIso s t a b
- KMonad.Prelude: newtype ReifiedLens s t a b
- KMonad.Prelude: newtype ReifiedPrism s t a b
- KMonad.Prelude: newtype ReifiedSetter s t a b
- KMonad.Prelude: newtype ReifiedTraversal s t a b
- KMonad.Prelude: newtype UnliftIO (m :: Type -> Type)
- KMonad.Prelude: newtype Utf8Builder
- KMonad.Prelude: noLogging :: (HasLogFunc env, MonadReader env m) => m a -> m a
- KMonad.Prelude: non :: Eq a => a -> Iso' (Maybe a) a
- KMonad.Prelude: non' :: APrism' a () -> Iso' (Maybe a) a
- KMonad.Prelude: none :: Foldable f => (a -> Bool) -> f a -> Bool
- KMonad.Prelude: noneOf :: Getting Any s a -> (a -> Bool) -> s -> Bool
- KMonad.Prelude: not :: Bool -> Bool
- KMonad.Prelude: notElem :: (Foldable t, Eq a) => a -> t a -> Bool
- KMonad.Prelude: notElemOf :: Eq a => Getting All s a -> a -> s -> Bool
- KMonad.Prelude: notNullOf :: Getting Any s a -> s -> Bool
- KMonad.Prelude: nubOrd :: Ord a => [a] -> [a]
- KMonad.Prelude: null :: Foldable t => t a -> Bool
- KMonad.Prelude: nullOf :: Getting All s a -> s -> Bool
- KMonad.Prelude: odd :: Integral a => a -> Bool
- KMonad.Prelude: on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
- KMonad.Prelude: onException :: MonadUnliftIO m => m a -> m b -> m a
- KMonad.Prelude: only :: Eq a => a -> Prism' a ()
- KMonad.Prelude: op :: Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
- KMonad.Prelude: optional :: Alternative f => f a -> f (Maybe a)
- KMonad.Prelude: or :: Foldable t => t Bool -> Bool
- KMonad.Prelude: orElse :: STM a -> STM a -> STM a
- KMonad.Prelude: orOf :: Getting Any s Bool -> s -> Bool
- KMonad.Prelude: otherwise :: Bool
- KMonad.Prelude: outside :: forall (p :: Type -> Type -> Type) s t a b r. Representable p => APrism s t a b -> Lens (p t r) (p s r) (p b r) (p a r)
- KMonad.Prelude: over :: ASetter s t a b -> (a -> b) -> s -> t
- KMonad.Prelude: overA :: Arrow ar => LensLike (Context a b) s t a b -> ar a b -> ar s t
- KMonad.Prelude: overEquality :: forall k1 k2 (s :: k1) (t :: k2) (a :: k1) (b :: k2) p. AnEquality s t a b -> p a b -> p s t
- KMonad.Prelude: para :: Plated a => (a -> [r] -> r) -> a -> r
- KMonad.Prelude: paraOf :: Getting (Endo [a]) a a -> (a -> [r] -> r) -> a -> r
- KMonad.Prelude: partitionEithers :: [Either a b] -> ([a], [b])
- KMonad.Prelude: parts :: Plated a => Lens' a [a]
- KMonad.Prelude: partsOf :: Functor f => Traversing ((->) :: Type -> Type -> Type) f s t a a -> LensLike f s t [a] [a]
- KMonad.Prelude: partsOf' :: ATraversal s t a a -> Lens s t [a] [a]
- KMonad.Prelude: passing :: MonadWriter w m => Setter w w u v -> m (a, u -> v) -> m a
- KMonad.Prelude: pattern Wrapped :: Rewrapped s s => Unwrapped s -> s
- KMonad.Prelude: pattern List :: IsList l => [Item l] -> l
- KMonad.Prelude: pattern (:>) :: Snoc a a b b => a -> b -> a
- KMonad.Prelude: pattern Swapped :: forall p c d. Swapped p => p d c -> p c d
- KMonad.Prelude: pattern Empty :: AsEmpty s => s
- KMonad.Prelude: pattern Reversed :: Reversing t => t -> t
- KMonad.Prelude: peekTBQueue :: TBQueue a -> STM a
- KMonad.Prelude: peekTChan :: TChan a -> STM a
- KMonad.Prelude: peekTQueue :: TQueue a -> STM a
- KMonad.Prelude: pi :: Floating a => a
- KMonad.Prelude: plate :: Plated a => Traversal' a a
- KMonad.Prelude: poll :: MonadIO m => Async a -> m (Maybe (Either SomeException a))
- KMonad.Prelude: pollSTM :: Async a -> STM (Maybe (Either SomeException a))
- KMonad.Prelude: pooledForConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b)
- KMonad.Prelude: pooledForConcurrentlyN :: (MonadUnliftIO m, Traversable t) => Int -> t a -> (a -> m b) -> m (t b)
- KMonad.Prelude: pooledForConcurrentlyN_ :: (MonadUnliftIO m, Foldable t) => Int -> t a -> (a -> m b) -> m ()
- KMonad.Prelude: pooledForConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m ()
- KMonad.Prelude: pooledMapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b)
- KMonad.Prelude: pooledMapConcurrentlyN :: (MonadUnliftIO m, Traversable t) => Int -> (a -> m b) -> t a -> m (t b)
- KMonad.Prelude: pooledMapConcurrentlyN_ :: (MonadUnliftIO m, Foldable f) => Int -> (a -> m b) -> f a -> m ()
- KMonad.Prelude: pooledMapConcurrently_ :: (MonadUnliftIO m, Foldable f) => (a -> m b) -> f a -> m ()
- KMonad.Prelude: pooledReplicateConcurrently :: MonadUnliftIO m => Int -> m a -> m [a]
- KMonad.Prelude: pooledReplicateConcurrentlyN :: MonadUnliftIO m => Int -> Int -> m a -> m [a]
- KMonad.Prelude: pooledReplicateConcurrentlyN_ :: MonadUnliftIO m => Int -> Int -> m a -> m ()
- KMonad.Prelude: pooledReplicateConcurrently_ :: MonadUnliftIO m => Int -> m a -> m ()
- KMonad.Prelude: popBackDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (Maybe a)
- KMonad.Prelude: popFrontDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (Maybe a)
- KMonad.Prelude: pre :: Getting (First a) s a -> IndexPreservingGetter s (Maybe a)
- KMonad.Prelude: preuse :: MonadState s m => Getting (First a) s a -> m (Maybe a)
- KMonad.Prelude: preuses :: MonadState s m => Getting (First r) s a -> (a -> r) -> m (Maybe r)
- KMonad.Prelude: preview :: MonadReader s m => Getting (First a) s a -> m (Maybe a)
- KMonad.Prelude: previews :: MonadReader s m => Getting (First r) s a -> (a -> r) -> m (Maybe r)
- KMonad.Prelude: primitive :: PrimMonad m => (State# (PrimState m) -> (# State# (PrimState m), a #)) -> m a
- KMonad.Prelude: prism :: (b -> t) -> (s -> Either t a) -> Prism s t a b
- KMonad.Prelude: prism' :: (b -> s) -> (s -> Maybe a) -> Prism s s a b
- KMonad.Prelude: product :: (Foldable t, Num a) => t a -> a
- KMonad.Prelude: productOf :: Num a => Getting (Endo (Endo a)) s a -> s -> a
- KMonad.Prelude: properFraction :: (RealFrac a, Integral b) => a -> (b, a)
- KMonad.Prelude: pure :: Applicative f => a -> f a
- KMonad.Prelude: pureTry :: a -> Either SomeException a
- KMonad.Prelude: pureTryDeep :: NFData a => a -> Either SomeException a
- KMonad.Prelude: pushBackDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> a -> m ()
- KMonad.Prelude: pushFrontDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> a -> m ()
- KMonad.Prelude: putMVar :: MonadIO m => MVar a -> a -> m ()
- KMonad.Prelude: putTMVar :: TMVar a -> a -> STM ()
- KMonad.Prelude: quot :: Integral a => a -> a -> a
- KMonad.Prelude: quotRem :: Integral a => a -> a -> (a, a)
- KMonad.Prelude: race :: MonadUnliftIO m => m a -> m b -> m (Either a b)
- KMonad.Prelude: race_ :: MonadUnliftIO m => m a -> m b -> m ()
- KMonad.Prelude: re :: AReview t b -> Getter b t
- KMonad.Prelude: readChan :: MonadIO m => Chan a -> m a
- KMonad.Prelude: readFileBinary :: MonadIO m => FilePath -> m ByteString
- KMonad.Prelude: readFileUtf8 :: MonadIO m => FilePath -> m Text
- KMonad.Prelude: readIORef :: MonadIO m => IORef a -> m a
- KMonad.Prelude: readMVar :: MonadIO m => MVar a -> m a
- KMonad.Prelude: readMaybe :: Read a => String -> Maybe a
- KMonad.Prelude: readSomeRef :: MonadIO m => SomeRef a -> m a
- KMonad.Prelude: readTBQueue :: TBQueue a -> STM a
- KMonad.Prelude: readTChan :: TChan a -> STM a
- KMonad.Prelude: readTMVar :: TMVar a -> STM a
- KMonad.Prelude: readTQueue :: TQueue a -> STM a
- KMonad.Prelude: readTVar :: TVar a -> STM a
- KMonad.Prelude: readTVarIO :: MonadIO m => TVar a -> m a
- KMonad.Prelude: readURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> m a
- KMonad.Prelude: realToFrac :: (Real a, Fractional b) => a -> b
- KMonad.Prelude: recip :: Fractional a => a -> a
- KMonad.Prelude: registerDelay :: MonadIO m => Int -> m (TVar Bool)
- KMonad.Prelude: reindexed :: Indexable j p => (i -> j) -> (Indexed i a b -> r) -> p a b -> r
- KMonad.Prelude: rem :: Integral a => a -> a -> a
- KMonad.Prelude: repeated :: Apply f => LensLike' f a a
- KMonad.Prelude: replicate :: Int -> a -> [a]
- KMonad.Prelude: replicateConcurrently :: MonadUnliftIO m => Int -> m b -> m [b]
- KMonad.Prelude: replicateConcurrently_ :: (Applicative m, MonadUnliftIO m) => Int -> m a -> m ()
- KMonad.Prelude: replicateM :: Applicative m => Int -> m a -> m [a]
- KMonad.Prelude: replicateM_ :: Applicative m => Int -> m a -> m ()
- KMonad.Prelude: replicated :: Int -> Fold a a
- KMonad.Prelude: retagged :: (Profunctor p, Bifunctor p) => p a b -> p s b
- KMonad.Prelude: retrySTM :: STM a
- KMonad.Prelude: return :: Monad m => a -> m a
- KMonad.Prelude: reuse :: MonadState b m => AReview t b -> m t
- KMonad.Prelude: reuses :: MonadState b m => AReview t b -> (t -> r) -> m r
- KMonad.Prelude: reverse :: [a] -> [a]
- KMonad.Prelude: reversed :: Reversing a => Iso' a a
- KMonad.Prelude: reversing :: Reversing t => t -> t
- KMonad.Prelude: review :: MonadReader b m => AReview t b -> m t
- KMonad.Prelude: reviews :: MonadReader b m => AReview t b -> (t -> r) -> m r
- KMonad.Prelude: rewrite :: Plated a => (a -> Maybe a) -> a -> a
- KMonad.Prelude: rewriteM :: (Monad m, Plated a) => (a -> m (Maybe a)) -> a -> m a
- KMonad.Prelude: rewriteMOf :: Monad m => LensLike (WrappedMonad m) a b a b -> (b -> m (Maybe a)) -> a -> m b
- KMonad.Prelude: rewriteMOn :: (Monad m, Plated a) => LensLike (WrappedMonad m) s t a a -> (a -> m (Maybe a)) -> s -> m t
- KMonad.Prelude: rewriteMOnOf :: Monad m => LensLike (WrappedMonad m) s t a b -> LensLike (WrappedMonad m) a b a b -> (b -> m (Maybe a)) -> s -> m t
- KMonad.Prelude: rewriteOf :: ASetter a b a b -> (b -> Maybe a) -> a -> b
- KMonad.Prelude: rewriteOn :: Plated a => ASetter s t a a -> (a -> Maybe a) -> s -> t
- KMonad.Prelude: rewriteOnOf :: ASetter s t a b -> ASetter a b a b -> (b -> Maybe a) -> s -> t
- KMonad.Prelude: right' :: Choice p => p a b -> p (Either c a) (Either c b)
- KMonad.Prelude: rights :: [Either a b] -> [b]
- KMonad.Prelude: rmap :: Profunctor p => (b -> c) -> p a b -> p a c
- KMonad.Prelude: rmapping :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) s t a b x y. (Profunctor p, Profunctor q) => AnIso s t a b -> Iso (p x s) (q y t) (p x a) (q y b)
- KMonad.Prelude: rnf :: NFData a => a -> ()
- KMonad.Prelude: round :: (RealFrac a, Integral b) => a -> b
- KMonad.Prelude: runConc :: MonadUnliftIO m => Conc m a -> m a
- KMonad.Prelude: runCont :: Cont r a -> (a -> r) -> r
- KMonad.Prelude: runEq :: forall k1 k2 (s :: k1) (t :: k2) (a :: k1) (b :: k2). AnEquality s t a b -> Identical s t a b
- KMonad.Prelude: runMemoized :: MonadIO m => Memoized a -> m a
- KMonad.Prelude: runRIO :: MonadIO m => env -> RIO env a -> m a
- KMonad.Prelude: runReader :: Reader r a -> r -> a
- KMonad.Prelude: runST :: (forall s. () => ST s a) -> a
- KMonad.Prelude: runSimpleApp :: MonadIO m => RIO SimpleApp a -> m a
- KMonad.Prelude: sans :: At m => Index m -> m -> m
- KMonad.Prelude: sappend :: Semigroup s => s -> s -> s
- KMonad.Prelude: scaleFloat :: RealFloat a => Int -> a -> a
- KMonad.Prelude: scanl1Of :: LensLike (State (Maybe a)) s t a a -> (a -> a -> a) -> s -> t
- KMonad.Prelude: scanr1Of :: LensLike (Backwards (State (Maybe a))) s t a a -> (a -> a -> a) -> s -> t
- KMonad.Prelude: scribe :: (MonadWriter t m, Monoid s) => ASetter s t a b -> b -> m ()
- KMonad.Prelude: second :: Arrow a => a b c -> a (d, b) (d, c)
- KMonad.Prelude: seconding :: forall (f :: Type -> Type -> Type) (g :: Type -> Type -> Type) s t a b x y. (Bifunctor f, Bifunctor g) => AnIso s t a b -> Iso (f x s) (g y t) (f x a) (g y b)
- KMonad.Prelude: selfIndex :: Indexable a p => p a fb -> a -> fb
- KMonad.Prelude: seq :: a -> b -> b
- KMonad.Prelude: sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
- KMonad.Prelude: sequence1Of_ :: Functor f => Getting (TraversedF a f) s (f a) -> s -> f ()
- KMonad.Prelude: sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
- KMonad.Prelude: sequenceAOf :: LensLike f s t (f b) b -> s -> f t
- KMonad.Prelude: sequenceAOf_ :: Functor f => Getting (Traversed a f) s (f a) -> s -> f ()
- KMonad.Prelude: sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f ()
- KMonad.Prelude: sequenceBy :: Traversable t => (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> t (f a) -> f (t a)
- KMonad.Prelude: sequenceByOf :: Traversal s t (f b) b -> (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> s -> f t
- KMonad.Prelude: sequenceOf :: LensLike (WrappedMonad m) s t (m b) b -> s -> m t
- KMonad.Prelude: sequenceOf_ :: Monad m => Getting (Sequenced a m) s (m a) -> s -> m ()
- KMonad.Prelude: sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
- KMonad.Prelude: set :: ASetter s t a b -> b -> s -> t
- KMonad.Prelude: set' :: ASetter' s a -> a -> s -> s
- KMonad.Prelude: setLogFormat :: (Utf8Builder -> Utf8Builder) -> LogOptions -> LogOptions
- KMonad.Prelude: setLogMinLevel :: LogLevel -> LogOptions -> LogOptions
- KMonad.Prelude: setLogMinLevelIO :: IO LogLevel -> LogOptions -> LogOptions
- KMonad.Prelude: setLogTerminal :: Bool -> LogOptions -> LogOptions
- KMonad.Prelude: setLogUseColor :: Bool -> LogOptions -> LogOptions
- KMonad.Prelude: setLogUseLoc :: Bool -> LogOptions -> LogOptions
- KMonad.Prelude: setLogUseTime :: Bool -> LogOptions -> LogOptions
- KMonad.Prelude: setLogVerboseFormat :: Bool -> LogOptions -> LogOptions
- KMonad.Prelude: setLogVerboseFormatIO :: IO Bool -> LogOptions -> LogOptions
- KMonad.Prelude: sets :: (Profunctor p, Profunctor q, Settable f) => (p a b -> q s t) -> Optical p q f s t a b
- KMonad.Prelude: setting :: ((a -> b) -> s -> t) -> IndexPreservingSetter s t a b
- KMonad.Prelude: show :: Show a => a -> String
- KMonad.Prelude: significand :: RealFloat a => a -> a
- KMonad.Prelude: signum :: Num a => a -> a
- KMonad.Prelude: simple :: forall k2 (a :: k2). Equality' a a
- KMonad.Prelude: simpleLenses :: Lens' LensRules Bool
- KMonad.Prelude: simply :: forall k1 k2 p (f :: k1 -> k2) (s :: k1) (a :: k1) (rep :: RuntimeRep) (r :: TYPE rep). (Optic' p f s a -> r) -> Optic' p f s a -> r
- KMonad.Prelude: sin :: Floating a => a -> a
- KMonad.Prelude: singular :: (HasCallStack, Conjoined p, Functor f) => Traversing p f s t a a -> Over p f s t a a
- KMonad.Prelude: sinh :: Floating a => a -> a
- KMonad.Prelude: snd :: (a, b) -> b
- KMonad.Prelude: snoc :: Snoc s s a a => s -> a -> s
- KMonad.Prelude: span :: (a -> Bool) -> [a] -> ([a], [a])
- KMonad.Prelude: sqrt :: Floating a => a -> a
- KMonad.Prelude: stateRefL :: HasStateRef s env => Lens' env (SomeRef s)
- KMonad.Prelude: stderr :: Handle
- KMonad.Prelude: stdin :: Handle
- KMonad.Prelude: stdout :: Handle
- KMonad.Prelude: storing :: ALens s t a b -> b -> s -> t
- KMonad.Prelude: strict :: Strict lazy strict => Iso' lazy strict
- KMonad.Prelude: stringException :: HasCallStack => String -> StringException
- KMonad.Prelude: substEq :: forall k1 k2 (s :: k1) (t :: k2) (a :: k1) (b :: k2) (rep :: RuntimeRep) (r :: TYPE rep). AnEquality s t a b -> ((s ~ a, t ~ b) => r) -> r
- KMonad.Prelude: subtract :: Num a => a -> a -> a
- KMonad.Prelude: sum :: (Foldable t, Num a) => t a -> a
- KMonad.Prelude: sumOf :: Num a => Getting (Endo (Endo a)) s a -> s -> a
- KMonad.Prelude: swapMVar :: MonadIO m => MVar a -> a -> m a
- KMonad.Prelude: swapTMVar :: TMVar a -> a -> STM a
- KMonad.Prelude: swapTVar :: TVar a -> a -> STM a
- KMonad.Prelude: swapped :: Swapped p => Iso (p a b) (p c d) (p b a) (p d c)
- KMonad.Prelude: take :: Int -> [a] -> [a]
- KMonad.Prelude: takeMVar :: MonadIO m => MVar a -> m a
- KMonad.Prelude: takeTMVar :: TMVar a -> STM a
- KMonad.Prelude: takeWhile :: (a -> Bool) -> [a] -> [a]
- KMonad.Prelude: taking :: (Conjoined p, Applicative f) => Int -> Traversing p f s t a a -> Over p f s t a a
- KMonad.Prelude: takingWhile :: (Conjoined p, Applicative f) => (a -> Bool) -> Over p (TakingWhile p f a a) s t a a -> Over p f s t a a
- KMonad.Prelude: tan :: Floating a => a -> a
- KMonad.Prelude: tanh :: Floating a => a -> a
- KMonad.Prelude: textDisplay :: Display a => a -> Text
- KMonad.Prelude: threadDelay :: MonadIO m => Int -> m ()
- KMonad.Prelude: threadWaitRead :: MonadIO m => Fd -> m ()
- KMonad.Prelude: threadWaitWrite :: MonadIO m => Fd -> m ()
- KMonad.Prelude: throwIO :: (MonadIO m, Exception e) => e -> m a
- KMonad.Prelude: throwM :: (MonadThrow m, Exception e) => e -> m a
- KMonad.Prelude: throwString :: (MonadIO m, HasCallStack) => String -> m a
- KMonad.Prelude: throwTo :: (Exception e, MonadIO m) => ThreadId -> e -> m ()
- KMonad.Prelude: timeout :: MonadUnliftIO m => Int -> m a -> m (Maybe a)
- KMonad.Prelude: to :: (Profunctor p, Contravariant f) => (s -> a) -> Optic' p f s a
- KMonad.Prelude: toAsyncException :: Exception e => e -> SomeException
- KMonad.Prelude: toConstr :: Data a => a -> Constr
- KMonad.Prelude: toException :: Exception e => e -> SomeException
- KMonad.Prelude: toIO :: MonadUnliftIO m => m a -> m (IO a)
- KMonad.Prelude: toInteger :: Integral a => a -> Integer
- KMonad.Prelude: toList :: Foldable t => t a -> [a]
- KMonad.Prelude: toListOf :: Getting (Endo [a]) s a -> s -> [a]
- KMonad.Prelude: toNonEmptyOf :: Getting (NonEmptyDList a) s a -> s -> NonEmpty a
- KMonad.Prelude: toRational :: Real a => a -> Rational
- KMonad.Prelude: toShort :: ByteString -> ShortByteString
- KMonad.Prelude: toStrictBytes :: LByteString -> ByteString
- KMonad.Prelude: toSyncException :: Exception e => e -> SomeException
- KMonad.Prelude: trace :: Text -> a -> a
- KMonad.Prelude: traceDisplay :: Display a => a -> b -> b
- KMonad.Prelude: traceDisplayEvent :: Display a => a -> b -> b
- KMonad.Prelude: traceDisplayEventIO :: (Display a, MonadIO m) => a -> m ()
- KMonad.Prelude: traceDisplayIO :: (Display a, MonadIO m) => a -> m ()
- KMonad.Prelude: traceDisplayId :: Display a => a -> a
- KMonad.Prelude: traceDisplayM :: (Display a, Applicative f) => a -> f ()
- KMonad.Prelude: traceDisplayMarker :: Display a => a -> b -> b
- KMonad.Prelude: traceDisplayMarkerIO :: (Display a, MonadIO m) => a -> m ()
- KMonad.Prelude: traceDisplayStack :: Display a => a -> b -> b
- KMonad.Prelude: traceEvent :: Text -> a -> a
- KMonad.Prelude: traceEventIO :: MonadIO m => Text -> m ()
- KMonad.Prelude: traceIO :: MonadIO m => Text -> m ()
- KMonad.Prelude: traceId :: Text -> Text
- KMonad.Prelude: traceM :: Applicative f => Text -> f ()
- KMonad.Prelude: traceMarker :: Text -> a -> a
- KMonad.Prelude: traceMarkerIO :: MonadIO m => Text -> m ()
- KMonad.Prelude: traceShow :: Show a => a -> b -> b
- KMonad.Prelude: traceShowEvent :: Show a => a -> b -> b
- KMonad.Prelude: traceShowEventIO :: (Show a, MonadIO m) => a -> m ()
- KMonad.Prelude: traceShowIO :: (Show a, MonadIO m) => a -> m ()
- KMonad.Prelude: traceShowId :: Show a => a -> a
- KMonad.Prelude: traceShowM :: (Show a, Applicative f) => a -> f ()
- KMonad.Prelude: traceShowMarker :: Show a => a -> b -> b
- KMonad.Prelude: traceShowMarkerIO :: (Show a, MonadIO m) => a -> m ()
- KMonad.Prelude: traceShowStack :: Show a => a -> b -> b
- KMonad.Prelude: traceStack :: Text -> a -> a
- KMonad.Prelude: transform :: Plated a => (a -> a) -> a -> a
- KMonad.Prelude: transformM :: (Monad m, Plated a) => (a -> m a) -> a -> m a
- KMonad.Prelude: transformMOf :: Monad m => LensLike (WrappedMonad m) a b a b -> (b -> m b) -> a -> m b
- KMonad.Prelude: transformMOn :: (Monad m, Plated a) => LensLike (WrappedMonad m) s t a a -> (a -> m a) -> s -> m t
- KMonad.Prelude: transformMOnOf :: Monad m => LensLike (WrappedMonad m) s t a b -> LensLike (WrappedMonad m) a b a b -> (b -> m b) -> s -> m t
- KMonad.Prelude: transformOf :: ASetter a b a b -> (b -> b) -> a -> b
- KMonad.Prelude: transformOn :: Plated a => ASetter s t a a -> (a -> a) -> s -> t
- KMonad.Prelude: transformOnOf :: ASetter s t a b -> ASetter a b a b -> (b -> b) -> s -> t
- KMonad.Prelude: transposeOf :: LensLike ZipList s t [a] a -> s -> [t]
- KMonad.Prelude: traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
- KMonad.Prelude: traverse1 :: (Traversable1 t, Apply f) => (a -> f b) -> t a -> f (t b)
- KMonad.Prelude: traverse1Of_ :: Functor f => Getting (TraversedF r f) s a -> (a -> f r) -> s -> f ()
- KMonad.Prelude: traverseBy :: Traversable t => (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> (a -> f b) -> t a -> f (t b)
- KMonad.Prelude: traverseByOf :: Traversal s t a b -> (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> (a -> f b) -> s -> f t
- KMonad.Prelude: traverseMax :: TraverseMax k m => IndexedTraversal' k (m v) v
- KMonad.Prelude: traverseMin :: TraverseMin k m => IndexedTraversal' k (m v) v
- KMonad.Prelude: traverseOf :: LensLike f s t a b -> (a -> f b) -> s -> f t
- KMonad.Prelude: traverseOf_ :: Functor f => Getting (Traversed r f) s a -> (a -> f r) -> s -> f ()
- KMonad.Prelude: traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
- KMonad.Prelude: traversed :: forall (f :: Type -> Type) a b. Traversable f => IndexedTraversal Int (f a) (f b) a b
- KMonad.Prelude: traversed1 :: forall (f :: Type -> Type) a b. Traversable1 f => IndexedTraversal1 Int (f a) (f b) a b
- KMonad.Prelude: traversed64 :: forall (f :: Type -> Type) a b. Traversable f => IndexedTraversal Int64 (f a) (f b) a b
- KMonad.Prelude: truncate :: (RealFrac a, Integral b) => a -> b
- KMonad.Prelude: try :: (MonadUnliftIO m, Exception e) => m a -> m (Either e a)
- KMonad.Prelude: tryAny :: MonadUnliftIO m => m a -> m (Either SomeException a)
- KMonad.Prelude: tryAnyDeep :: (MonadUnliftIO m, NFData a) => m a -> m (Either SomeException a)
- KMonad.Prelude: tryDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> m (Either e a)
- KMonad.Prelude: tryIO :: MonadUnliftIO m => m a -> m (Either IOException a)
- KMonad.Prelude: tryJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a)
- KMonad.Prelude: tryPeekTBQueue :: TBQueue a -> STM (Maybe a)
- KMonad.Prelude: tryPeekTChan :: TChan a -> STM (Maybe a)
- KMonad.Prelude: tryPeekTQueue :: TQueue a -> STM (Maybe a)
- KMonad.Prelude: tryPutMVar :: MonadIO m => MVar a -> a -> m Bool
- KMonad.Prelude: tryPutTMVar :: TMVar a -> a -> STM Bool
- KMonad.Prelude: tryReadMVar :: MonadIO m => MVar a -> m (Maybe a)
- KMonad.Prelude: tryReadTBQueue :: TBQueue a -> STM (Maybe a)
- KMonad.Prelude: tryReadTChan :: TChan a -> STM (Maybe a)
- KMonad.Prelude: tryReadTMVar :: TMVar a -> STM (Maybe a)
- KMonad.Prelude: tryReadTQueue :: TQueue a -> STM (Maybe a)
- KMonad.Prelude: tryTakeMVar :: MonadIO m => MVar a -> m (Maybe a)
- KMonad.Prelude: tryTakeTMVar :: TMVar a -> STM (Maybe a)
- KMonad.Prelude: tshow :: Show a => a -> Text
- KMonad.Prelude: type ALens s t a b = LensLike Pretext (->) :: Type -> Type -> Type a b s t a b
- KMonad.Prelude: type ALens' s a = ALens s s a a
- KMonad.Prelude: type APrism s t a b = Market a b a Identity b -> Market a b s Identity t
- KMonad.Prelude: type APrism' s a = APrism s s a a
- KMonad.Prelude: type AReview t b = Optic' Tagged :: Type -> Type -> Type Identity t b
- KMonad.Prelude: type ASetter s t a b = a -> Identity b -> s -> Identity t
- KMonad.Prelude: type ASetter' s a = ASetter s s a a
- KMonad.Prelude: type ATraversal s t a b = LensLike Bazaar (->) :: Type -> Type -> Type a b s t a b
- KMonad.Prelude: type ATraversal' s a = ATraversal s s a a
- KMonad.Prelude: type ATraversal1 s t a b = LensLike Bazaar1 (->) :: Type -> Type -> Type a b s t a b
- KMonad.Prelude: type ATraversal1' s a = ATraversal1 s s a a
- KMonad.Prelude: type Accessing (p :: Type -> Type -> Type) m s a = p a Const m a -> s -> Const m s
- KMonad.Prelude: type AnEquality (s :: k1) (t :: k2) (a :: k1) (b :: k2) = Identical a Proxy b a Proxy b -> Identical a Proxy b s Proxy t
- KMonad.Prelude: type AnEquality' (s :: k2) (a :: k2) = AnEquality s s a a
- KMonad.Prelude: type AnIndexedLens i s t a b = Optical Indexed i (->) :: Type -> Type -> Type Pretext Indexed i a b s t a b
- KMonad.Prelude: type AnIndexedLens' i s a = AnIndexedLens i s s a a
- KMonad.Prelude: type AnIndexedSetter i s t a b = Indexed i a Identity b -> s -> Identity t
- KMonad.Prelude: type AnIndexedSetter' i s a = AnIndexedSetter i s s a a
- KMonad.Prelude: type AnIndexedTraversal i s t a b = Over Indexed i Bazaar Indexed i a b s t a b
- KMonad.Prelude: type AnIndexedTraversal' i s a = AnIndexedTraversal i s s a a
- KMonad.Prelude: type AnIndexedTraversal1 i s t a b = Over Indexed i Bazaar1 Indexed i a b s t a b
- KMonad.Prelude: type AnIndexedTraversal1' i s a = AnIndexedTraversal1 i s s a a
- KMonad.Prelude: type AnIso s t a b = Exchange a b a Identity b -> Exchange a b s Identity t
- KMonad.Prelude: type AnIso' s a = AnIso s s a a
- KMonad.Prelude: type As (a :: k2) = Equality' a a
- KMonad.Prelude: type BDeque = Deque MVector
- KMonad.Prelude: type Bazaar' (p :: Type -> Type -> Type) a = Bazaar p a a
- KMonad.Prelude: type Bazaar1' (p :: Type -> Type -> Type) a = Bazaar1 p a a
- KMonad.Prelude: type ClassyNamer = Name -> Maybe (Name, Name)
- KMonad.Prelude: type Cont r = ContT r Identity
- KMonad.Prelude: type Context' a = Context a a
- KMonad.Prelude: type Equality' (s :: k2) (a :: k2) = Equality s s a a
- KMonad.Prelude: type FieldNamer = Name -> [Name] -> Name -> [DefName]
- KMonad.Prelude: type FilePath = String
- KMonad.Prelude: type GVector = Vector
- KMonad.Prelude: type Getting r s a = a -> Const r a -> s -> Const r s
- KMonad.Prelude: type HasCallStack = ?callStack :: CallStack
- KMonad.Prelude: type IOURef = URef PrimState IO
- KMonad.Prelude: type IndexPreservingLens' s a = IndexPreservingLens s s a a
- KMonad.Prelude: type IndexPreservingSetter' s a = IndexPreservingSetter s s a a
- KMonad.Prelude: type IndexPreservingTraversal' s a = IndexPreservingTraversal s s a a
- KMonad.Prelude: type IndexPreservingTraversal1' s a = IndexPreservingTraversal1 s s a a
- KMonad.Prelude: type IndexedGetting i m s a = Indexed i a Const m a -> s -> Const m s
- KMonad.Prelude: type IndexedLens' i s a = IndexedLens i s s a a
- KMonad.Prelude: type IndexedLensLike' i (f :: Type -> Type) s a = IndexedLensLike i f s s a a
- KMonad.Prelude: type IndexedSetter' i s a = IndexedSetter i s s a a
- KMonad.Prelude: type IndexedTraversal' i s a = IndexedTraversal i s s a a
- KMonad.Prelude: type IndexedTraversal1' i s a = IndexedTraversal1 i s s a a
- KMonad.Prelude: type Iso' s a = Iso s s a a
- KMonad.Prelude: type LByteString = ByteString
- KMonad.Prelude: type LText = Text
- KMonad.Prelude: type Lens' s a = Lens s s a a
- KMonad.Prelude: type LensLike (f :: k -> Type) s (t :: k) a (b :: k) = a -> f b -> s -> f t
- KMonad.Prelude: type LensLike' (f :: Type -> Type) s a = LensLike f s s a a
- KMonad.Prelude: type LogSource = Text
- KMonad.Prelude: type Optic (p :: k -> k1 -> Type) (f :: k2 -> k1) (s :: k) (t :: k2) (a :: k) (b :: k2) = p a f b -> p s f t
- KMonad.Prelude: type Optic' (p :: k -> k1 -> Type) (f :: k -> k1) (s :: k) (a :: k) = Optic p f s s a a
- KMonad.Prelude: type Optical (p :: k -> k1 -> Type) (q :: k2 -> k1 -> Type) (f :: k3 -> k1) (s :: k2) (t :: k3) (a :: k) (b :: k3) = p a f b -> q s f t
- KMonad.Prelude: type Optical' (p :: k -> k1 -> Type) (q :: k -> k1 -> Type) (f :: k -> k1) (s :: k) (a :: k) = Optical p q f s s a a
- KMonad.Prelude: type Over (p :: k -> Type -> Type) (f :: k1 -> Type) s (t :: k1) (a :: k) (b :: k1) = p a f b -> s -> f t
- KMonad.Prelude: type Over' (p :: Type -> Type -> Type) (f :: Type -> Type) s a = Over p f s s a a
- KMonad.Prelude: type Prism' s a = Prism s s a a
- KMonad.Prelude: type Rational = Ratio Integer
- KMonad.Prelude: type Reader r = ReaderT r Identity
- KMonad.Prelude: type ReifiedIndexedLens' i s a = ReifiedIndexedLens i s s a a
- KMonad.Prelude: type ReifiedIndexedSetter' i s a = ReifiedIndexedSetter i s s a a
- KMonad.Prelude: type ReifiedIndexedTraversal' i s a = ReifiedIndexedTraversal i s s a a
- KMonad.Prelude: type ReifiedIso' s a = ReifiedIso s s a a
- KMonad.Prelude: type ReifiedLens' s a = ReifiedLens s s a a
- KMonad.Prelude: type ReifiedPrism' s a = ReifiedPrism s s a a
- KMonad.Prelude: type ReifiedSetter' s a = ReifiedSetter s s a a
- KMonad.Prelude: type ReifiedTraversal' s a = ReifiedTraversal s s a a
- KMonad.Prelude: type SDeque = Deque MVector
- KMonad.Prelude: type SVector = Vector
- KMonad.Prelude: type Setter' s a = Setter s s a a
- KMonad.Prelude: type Setting (p :: Type -> Type -> Type) s t a b = p a Identity b -> s -> Identity t
- KMonad.Prelude: type Setting' (p :: Type -> Type -> Type) s a = Setting p s s a a
- KMonad.Prelude: type Simple (f :: k1 -> k1 -> k2 -> k2 -> k) (s :: k1) (a :: k2) = f s s a a
- KMonad.Prelude: type String = [Char]
- KMonad.Prelude: type Traversal' s a = Traversal s s a a
- KMonad.Prelude: type Traversal1' s a = Traversal1 s s a a
- KMonad.Prelude: type Traversing (p :: Type -> Type -> Type) (f :: Type -> Type) s t a b = Over p BazaarT p f a b s t a b
- KMonad.Prelude: type Traversing' (p :: Type -> Type -> Type) (f :: Type -> Type) s a = Traversing p f s s a a
- KMonad.Prelude: type Traversing1 (p :: Type -> Type -> Type) (f :: Type -> Type) s t a b = Over p BazaarT1 p f a b s t a b
- KMonad.Prelude: type Traversing1' (p :: Type -> Type -> Type) (f :: Type -> Type) s a = Traversing1 p f s s a a
- KMonad.Prelude: type UDeque = Deque MVector
- KMonad.Prelude: type UVector = Vector
- KMonad.Prelude: type Unwrapped s = GUnwrapped Rep s;
- KMonad.Prelude: type Fold1 s a = forall (f :: Type -> Type). (Contravariant f, Apply f) => a -> f a -> s -> f s
- KMonad.Prelude: type family GMsg env;
- KMonad.Prelude: type IndexedLensLike i (f :: k -> Type) s (t :: k) a (b :: k) = forall (p :: Type -> Type -> Type). Indexable i p => p a f b -> s -> f t
- KMonad.Prelude: un :: (Profunctor p, Bifunctor p, Functor f) => Getting a s a -> Optic' p f a s
- KMonad.Prelude: unGetTBQueue :: TBQueue a -> a -> STM ()
- KMonad.Prelude: unGetTChan :: TChan a -> a -> STM ()
- KMonad.Prelude: unGetTQueue :: TQueue a -> a -> STM ()
- KMonad.Prelude: uncons :: Cons s s a a => s -> Maybe (a, s)
- KMonad.Prelude: uncurried :: Iso (a -> b -> c) (d -> e -> f) ((a, b) -> c) ((d, e) -> f)
- KMonad.Prelude: uncurry :: (a -> b -> c) -> (a, b) -> c
- KMonad.Prelude: undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
- KMonad.Prelude: under :: AnIso s t a b -> (t -> s) -> b -> a
- KMonad.Prelude: underEquality :: forall k1 k2 (s :: k1) (t :: k2) (a :: k1) (b :: k2) p. AnEquality s t a b -> p t s -> p b a
- KMonad.Prelude: underscoreFields :: LensRules
- KMonad.Prelude: underscoreNamer :: FieldNamer
- KMonad.Prelude: underscoreNoPrefixNamer :: FieldNamer
- KMonad.Prelude: unfolded :: (b -> Maybe (a, b)) -> Fold b a
- KMonad.Prelude: uninterruptibleCancel :: MonadIO m => Async a -> m ()
- KMonad.Prelude: uninterruptibleMask :: MonadUnliftIO m => ((forall a. () => m a -> m a) -> m b) -> m b
- KMonad.Prelude: uninterruptibleMask_ :: MonadUnliftIO m => m a -> m a
- KMonad.Prelude: united :: Lens' a ()
- KMonad.Prelude: universe :: Plated a => a -> [a]
- KMonad.Prelude: universeOf :: Getting [a] a a -> a -> [a]
- KMonad.Prelude: universeOn :: Plated a => Getting [a] s a -> s -> [a]
- KMonad.Prelude: universeOnOf :: Getting [a] s a -> Getting [a] a a -> s -> [a]
- KMonad.Prelude: unless :: Applicative f => Bool -> f () -> f ()
- KMonad.Prelude: unlessM :: Monad m => m Bool -> m () -> m ()
- KMonad.Prelude: unlines :: [Text] -> Text
- KMonad.Prelude: unsafePartsOf :: Functor f => Traversing ((->) :: Type -> Type -> Type) f s t a b -> LensLike f s t [a] [b]
- KMonad.Prelude: unsafePartsOf' :: ATraversal s t a b -> Lens s t [a] [b]
- KMonad.Prelude: unsafeSingular :: (HasCallStack, Conjoined p, Functor f) => Traversing p f s t a b -> Over p f s t a b
- KMonad.Prelude: unsnoc :: Snoc s s a a => s -> Maybe (s, a)
- KMonad.Prelude: unto :: (Profunctor p, Bifunctor p, Functor f) => (b -> t) -> Optic p f s t a b
- KMonad.Prelude: unwords :: [String] -> String
- KMonad.Prelude: use :: MonadState s m => Getting a s a -> m a
- KMonad.Prelude: uses :: MonadState s m => LensLike' (Const r :: Type -> Type) s a -> (a -> r) -> m r
- KMonad.Prelude: utf8BuilderToLazyText :: Utf8Builder -> Text
- KMonad.Prelude: utf8BuilderToText :: Utf8Builder -> Text
- KMonad.Prelude: view :: MonadReader s m => Getting a s a -> m a
- KMonad.Prelude: views :: MonadReader s m => LensLike' (Const r :: Type -> Type) s a -> (a -> r) -> m r
- KMonad.Prelude: void :: Functor f => f a -> f ()
- KMonad.Prelude: wait :: MonadIO m => Async a -> m a
- KMonad.Prelude: waitAny :: MonadIO m => [Async a] -> m (Async a, a)
- KMonad.Prelude: waitAnyCancel :: MonadIO m => [Async a] -> m (Async a, a)
- KMonad.Prelude: waitAnyCatch :: MonadIO m => [Async a] -> m (Async a, Either SomeException a)
- KMonad.Prelude: waitAnyCatchCancel :: MonadIO m => [Async a] -> m (Async a, Either SomeException a)
- KMonad.Prelude: waitAnyCatchSTM :: [Async a] -> STM (Async a, Either SomeException a)
- KMonad.Prelude: waitAnySTM :: [Async a] -> STM (Async a, a)
- KMonad.Prelude: waitBoth :: MonadIO m => Async a -> Async b -> m (a, b)
- KMonad.Prelude: waitBothSTM :: Async a -> Async b -> STM (a, b)
- KMonad.Prelude: waitCatch :: MonadIO m => Async a -> m (Either SomeException a)
- KMonad.Prelude: waitCatchSTM :: Async a -> STM (Either SomeException a)
- KMonad.Prelude: waitEither :: MonadIO m => Async a -> Async b -> m (Either a b)
- KMonad.Prelude: waitEitherCancel :: MonadIO m => Async a -> Async b -> m (Either a b)
- KMonad.Prelude: waitEitherCatch :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
- KMonad.Prelude: waitEitherCatchCancel :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
- KMonad.Prelude: waitEitherCatchSTM :: Async a -> Async b -> STM (Either (Either SomeException a) (Either SomeException b))
- KMonad.Prelude: waitEitherSTM :: Async a -> Async b -> STM (Either a b)
- KMonad.Prelude: waitEitherSTM_ :: Async a -> Async b -> STM ()
- KMonad.Prelude: waitEither_ :: MonadIO m => Async a -> Async b -> m ()
- KMonad.Prelude: waitSTM :: Async a -> STM a
- KMonad.Prelude: when :: Applicative f => Bool -> f () -> f ()
- KMonad.Prelude: whenM :: Monad m => m Bool -> m () -> m ()
- KMonad.Prelude: with :: MonadUnliftIO m => Acquire a -> (a -> m b) -> m b
- KMonad.Prelude: withAcquire :: MonadUnliftIO m => Acquire a -> (a -> m b) -> m b
- KMonad.Prelude: withAsync :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b
- KMonad.Prelude: withAsyncBound :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b
- KMonad.Prelude: withAsyncOn :: MonadUnliftIO m => Int -> m a -> (Async a -> m b) -> m b
- KMonad.Prelude: withAsyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall c. () => m c -> m c) -> m a) -> (Async a -> m b) -> m b
- KMonad.Prelude: withAsyncWithUnmask :: MonadUnliftIO m => ((forall c. () => m c -> m c) -> m a) -> (Async a -> m b) -> m b
- KMonad.Prelude: withBinaryFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a
- KMonad.Prelude: withCont :: ((b -> r) -> a -> r) -> Cont r a -> Cont r b
- KMonad.Prelude: withContT :: forall k b m (r :: k) a. ((b -> m r) -> a -> m r) -> ContT r m a -> ContT r m b
- KMonad.Prelude: withEquality :: forall k1 k2 (s :: k1) (t :: k2) (a :: k1) (b :: k2) (rep :: RuntimeRep) (r :: TYPE rep). AnEquality s t a b -> ((s :~: a) -> (b :~: t) -> r) -> r
- KMonad.Prelude: withException :: (MonadUnliftIO m, Exception e) => m a -> (e -> m b) -> m a
- KMonad.Prelude: withFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a
- KMonad.Prelude: withIndex :: (Indexable i p, Functor f) => p (i, s) (f (j, t)) -> Indexed i s (f t)
- KMonad.Prelude: withIso :: forall s t a b (rep :: RuntimeRep) (r :: TYPE rep). AnIso s t a b -> ((s -> a) -> (b -> t) -> r) -> r
- KMonad.Prelude: withLazyFile :: MonadUnliftIO m => FilePath -> (ByteString -> m a) -> m a
- KMonad.Prelude: withLazyFileUtf8 :: MonadUnliftIO m => FilePath -> (Text -> m a) -> m a
- KMonad.Prelude: withLens :: forall s t a b (rep :: RuntimeRep) (r :: TYPE rep). ALens s t a b -> ((s -> a) -> (s -> b -> t) -> r) -> r
- KMonad.Prelude: withLogFunc :: MonadUnliftIO m => LogOptions -> (LogFunc -> m a) -> m a
- KMonad.Prelude: withMVar :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b
- KMonad.Prelude: withMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b
- KMonad.Prelude: withPrism :: APrism s t a b -> ((b -> t) -> (s -> Either t a) -> r) -> r
- KMonad.Prelude: withRunInIO :: MonadUnliftIO m => ((forall a. () => m a -> IO a) -> IO b) -> m b
- KMonad.Prelude: withSystemTempDirectory :: MonadUnliftIO m => String -> (FilePath -> m a) -> m a
- KMonad.Prelude: withSystemTempFile :: MonadUnliftIO m => String -> (FilePath -> Handle -> m a) -> m a
- KMonad.Prelude: withTempDirectory :: MonadUnliftIO m => FilePath -> String -> (FilePath -> m a) -> m a
- KMonad.Prelude: withTempFile :: MonadUnliftIO m => FilePath -> String -> (FilePath -> Handle -> m a) -> m a
- KMonad.Prelude: withUnliftIO :: MonadUnliftIO m => (UnliftIO m -> IO a) -> m a
- KMonad.Prelude: without :: APrism s t a b -> APrism u v c d -> Prism (Either s u) (Either t v) (Either a c) (Either b d)
- KMonad.Prelude: worded :: forall (f :: Type -> Type). Applicative f => IndexedLensLike' Int f String String
- KMonad.Prelude: words :: String -> [String]
- KMonad.Prelude: wrappedWithRunInIO :: MonadUnliftIO n => (n b -> m b) -> (forall a. () => m a -> n a) -> ((forall a. () => m a -> IO a) -> IO b) -> m b
- KMonad.Prelude: writeChan :: MonadIO m => Chan a -> a -> m ()
- KMonad.Prelude: writeFileBinary :: MonadIO m => FilePath -> ByteString -> m ()
- KMonad.Prelude: writeFileUtf8 :: MonadIO m => FilePath -> Text -> m ()
- KMonad.Prelude: writeFileUtf8Builder :: MonadIO m => FilePath -> Utf8Builder -> m ()
- KMonad.Prelude: writeIORef :: MonadIO m => IORef a -> a -> m ()
- KMonad.Prelude: writeList2Chan :: MonadIO m => Chan a -> [a] -> m ()
- KMonad.Prelude: writeRefL :: HasWriteRef w env => Lens' env (SomeRef w)
- KMonad.Prelude: writeSomeRef :: MonadIO m => SomeRef a -> a -> m ()
- KMonad.Prelude: writeTBQueue :: TBQueue a -> a -> STM ()
- KMonad.Prelude: writeTChan :: TChan a -> a -> STM ()
- KMonad.Prelude: writeTQueue :: TQueue a -> a -> STM ()
- KMonad.Prelude: writeTVar :: TVar a -> a -> STM ()
- KMonad.Prelude: writeURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> a -> m ()
- KMonad.Prelude: xplat :: forall k s g (t :: k) a (b :: k). Optic (Costar ((->) s :: Type -> Type)) g s t a b -> ((s -> a) -> g b) -> g t
- KMonad.Prelude: xplatf :: forall k f g s (t :: k) a (b :: k). Optic (Costar f) g s t a b -> (f a -> g b) -> f s -> g t
- KMonad.Prelude: yieldThread :: MonadIO m => m ()
- KMonad.Prelude: zip :: [a] -> [b] -> [(a, b)]
- KMonad.Prelude: zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- KMonad.Prelude: zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c]
- KMonad.Prelude: zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m ()
- KMonad.Prelude: zoom :: Zoom m n s t => LensLike' (Zoomed m c) t s -> m c -> n c
- KMonad.Prelude: }
+ KMonad.App: main :: IO ()
+ KMonad.App.Main: main :: IO ()
+ KMonad.App.Types: AppCfg :: Acquire KeySink -> Acquire KeySource -> LMap Button -> LayerTag -> Bool -> Bool -> Milliseconds -> AppCfg
+ KMonad.App.Types: AppEnv :: AppCfg -> LogFunc -> KeySink -> KeySource -> Dispatch -> Hooks -> Sluice -> Keymap -> Hooks -> TMVar KeyEvent -> AppEnv
+ KMonad.App.Types: KEnv :: AppEnv -> BEnv -> KEnv
+ KMonad.App.Types: [_allowCmd] :: AppCfg -> Bool
+ KMonad.App.Types: [_dispatch] :: AppEnv -> Dispatch
+ KMonad.App.Types: [_fallThrough] :: AppCfg -> Bool
+ KMonad.App.Types: [_firstLayer] :: AppCfg -> LayerTag
+ KMonad.App.Types: [_inHooks] :: AppEnv -> Hooks
+ KMonad.App.Types: [_kAppEnv] :: KEnv -> AppEnv
+ KMonad.App.Types: [_kBEnv] :: KEnv -> BEnv
+ KMonad.App.Types: [_keAppCfg] :: AppEnv -> AppCfg
+ KMonad.App.Types: [_keLogFunc] :: AppEnv -> LogFunc
+ KMonad.App.Types: [_keySinkDev] :: AppCfg -> Acquire KeySink
+ KMonad.App.Types: [_keySink] :: AppEnv -> KeySink
+ KMonad.App.Types: [_keySourceDev] :: AppCfg -> Acquire KeySource
+ KMonad.App.Types: [_keySource] :: AppEnv -> KeySource
+ KMonad.App.Types: [_keymapCfg] :: AppCfg -> LMap Button
+ KMonad.App.Types: [_keymap] :: AppEnv -> Keymap
+ KMonad.App.Types: [_outHooks] :: AppEnv -> Hooks
+ KMonad.App.Types: [_outVar] :: AppEnv -> TMVar KeyEvent
+ KMonad.App.Types: [_sluice] :: AppEnv -> Sluice
+ KMonad.App.Types: [_startDelay] :: AppCfg -> Milliseconds
+ KMonad.App.Types: allowCmd :: HasAppCfg c_a1Y4V => Lens' c_a1Y4V Bool
+ KMonad.App.Types: appCfg :: HasAppCfg c_a1Y4V => Lens' c_a1Y4V AppCfg
+ KMonad.App.Types: appEnv :: HasAppEnv c_a1Yed => Lens' c_a1Yed AppEnv
+ KMonad.App.Types: class HasAppCfg c_a1Y4V
+ KMonad.App.Types: class HasAppEnv c_a1Yed
+ KMonad.App.Types: class HasKEnv c_a1YsL
+ KMonad.App.Types: data AppCfg
+ KMonad.App.Types: data AppEnv
+ KMonad.App.Types: data KEnv
+ KMonad.App.Types: dispatch :: HasAppEnv c_a1Yed => Lens' c_a1Yed Dispatch
+ KMonad.App.Types: fallThrough :: HasAppCfg c_a1Y4V => Lens' c_a1Y4V Bool
+ KMonad.App.Types: firstLayer :: HasAppCfg c_a1Y4V => Lens' c_a1Y4V LayerTag
+ KMonad.App.Types: inHooks :: HasAppEnv c_a1Yed => Lens' c_a1Yed Hooks
+ KMonad.App.Types: instance (KMonad.App.Types.HasAppEnv e, KMonad.App.Types.HasAppCfg e, RIO.Prelude.Logger.HasLogFunc e) => KMonad.Model.Action.MonadKIO (RIO.Prelude.RIO.RIO e)
+ KMonad.App.Types: instance KMonad.App.Types.HasAppCfg KMonad.App.Types.AppCfg
+ KMonad.App.Types: instance KMonad.App.Types.HasAppCfg KMonad.App.Types.AppEnv
+ KMonad.App.Types: instance KMonad.App.Types.HasAppCfg KMonad.App.Types.KEnv
+ KMonad.App.Types: instance KMonad.App.Types.HasAppEnv KMonad.App.Types.AppEnv
+ KMonad.App.Types: instance KMonad.App.Types.HasAppEnv KMonad.App.Types.KEnv
+ KMonad.App.Types: instance KMonad.App.Types.HasKEnv KMonad.App.Types.KEnv
+ KMonad.App.Types: instance KMonad.Model.Action.MonadK (RIO.Prelude.RIO.RIO KMonad.App.Types.KEnv)
+ KMonad.App.Types: instance KMonad.Model.BEnv.HasBEnv KMonad.App.Types.KEnv
+ KMonad.App.Types: instance RIO.Prelude.Logger.HasLogFunc KMonad.App.Types.AppEnv
+ KMonad.App.Types: instance RIO.Prelude.Logger.HasLogFunc KMonad.App.Types.KEnv
+ KMonad.App.Types: kAppEnv :: HasKEnv c_a1YsL => Lens' c_a1YsL AppEnv
+ KMonad.App.Types: kBEnv :: HasKEnv c_a1YsL => Lens' c_a1YsL BEnv
+ KMonad.App.Types: kEnv :: HasKEnv c_a1YsL => Lens' c_a1YsL KEnv
+ KMonad.App.Types: keAppCfg :: HasAppEnv c_a1Yed => Lens' c_a1Yed AppCfg
+ KMonad.App.Types: keLogFunc :: HasAppEnv c_a1Yed => Lens' c_a1Yed LogFunc
+ KMonad.App.Types: keySink :: HasAppEnv c_a1Yed => Lens' c_a1Yed KeySink
+ KMonad.App.Types: keySinkDev :: HasAppCfg c_a1Y4V => Lens' c_a1Y4V (Acquire KeySink)
+ KMonad.App.Types: keySource :: HasAppEnv c_a1Yed => Lens' c_a1Yed KeySource
+ KMonad.App.Types: keySourceDev :: HasAppCfg c_a1Y4V => Lens' c_a1Y4V (Acquire KeySource)
+ KMonad.App.Types: keymap :: HasAppEnv c_a1Yed => Lens' c_a1Yed Keymap
+ KMonad.App.Types: keymapCfg :: HasAppCfg c_a1Y4V => Lens' c_a1Y4V (LMap Button)
+ KMonad.App.Types: outHooks :: HasAppEnv c_a1Yed => Lens' c_a1Yed Hooks
+ KMonad.App.Types: outVar :: HasAppEnv c_a1Yed => Lens' c_a1Yed (TMVar KeyEvent)
+ KMonad.App.Types: sluice :: HasAppEnv c_a1Yed => Lens' c_a1Yed Sluice
+ KMonad.App.Types: startDelay :: HasAppCfg c_a1Y4V => Lens' c_a1Y4V Milliseconds
+ KMonad.Args: cfgFile :: HasCmd c_a28ii => Lens' c_a28ii FilePath
+ KMonad.Args: class HasCmd c_a28ii
+ KMonad.Args: cmd :: HasCmd c_a28ii => Lens' c_a28ii Cmd
+ KMonad.Args: cmdAllow :: HasCmd c_a28ii => Lens' c_a28ii DefSetting
+ KMonad.Args: cmpSeq :: HasCmd c_a28ii => Lens' c_a28ii (Maybe DefSetting)
+ KMonad.Args: data Cmd
+ KMonad.Args: dryRun :: HasCmd c_a28ii => Lens' c_a28ii Bool
+ KMonad.Args: fallThrgh :: HasCmd c_a28ii => Lens' c_a28ii DefSetting
+ KMonad.Args: getCmd :: IO Cmd
+ KMonad.Args: iToken :: HasCmd c_a28ii => Lens' c_a28ii (Maybe DefSetting)
+ KMonad.Args: initStr :: HasCmd c_a28ii => Lens' c_a28ii (Maybe DefSetting)
+ KMonad.Args: loadConfig :: HasLogFunc e => Cmd -> RIO e AppCfg
+ KMonad.Args: logLvl :: HasCmd c_a28ii => Lens' c_a28ii LogLevel
+ KMonad.Args: oToken :: HasCmd c_a28ii => Lens' c_a28ii (Maybe DefSetting)
+ KMonad.Args: strtDel :: HasCmd c_a28ii => Lens' c_a28ii Milliseconds
+ KMonad.Args.Cmd: [_cmdAllow] :: Cmd -> DefSetting
+ KMonad.Args.Cmd: [_cmpSeq] :: Cmd -> Maybe DefSetting
+ KMonad.Args.Cmd: [_fallThrgh] :: Cmd -> DefSetting
+ KMonad.Args.Cmd: [_iToken] :: Cmd -> Maybe DefSetting
+ KMonad.Args.Cmd: [_initStr] :: Cmd -> Maybe DefSetting
+ KMonad.Args.Cmd: [_oToken] :: Cmd -> Maybe DefSetting
+ KMonad.Args.Cmd: [_strtDel] :: Cmd -> Milliseconds
+ KMonad.Args.Cmd: cmdAllow :: HasCmd c_a28ii => Lens' c_a28ii DefSetting
+ KMonad.Args.Cmd: cmpSeq :: HasCmd c_a28ii => Lens' c_a28ii (Maybe DefSetting)
+ KMonad.Args.Cmd: fallThrgh :: HasCmd c_a28ii => Lens' c_a28ii DefSetting
+ KMonad.Args.Cmd: iToken :: HasCmd c_a28ii => Lens' c_a28ii (Maybe DefSetting)
+ KMonad.Args.Cmd: initStr :: HasCmd c_a28ii => Lens' c_a28ii (Maybe DefSetting)
+ KMonad.Args.Cmd: oToken :: HasCmd c_a28ii => Lens' c_a28ii (Maybe DefSetting)
+ KMonad.Args.Cmd: strtDel :: HasCmd c_a28ii => Lens' c_a28ii Milliseconds
+ KMonad.Args.Parser: itokens :: [(Text, Parser IToken)]
+ KMonad.Args.Parser: keywordButtons :: [(Text, Parser DefButton)]
+ KMonad.Args.Parser: noKeywordButtons :: [Parser DefButton]
+ KMonad.Args.Parser: numP :: Parser Int
+ KMonad.Args.Parser: otokens :: [(Text, Parser OToken)]
+ KMonad.Args.Parser: symbol :: Text -> Parser ()
+ KMonad.Args.TH: gitHash :: Q Exp
+ KMonad.Args.Types: KAroundNextSingle :: DefButton -> DefButton
+ KMonad.Args.Types: KAroundNextTimeout :: Int -> DefButton -> DefButton -> DefButton
+ KMonad.Args.Types: KBeforeAfterNext :: DefButton -> DefButton -> DefButton
+ KMonad.Args.Types: KPressOnly :: Keycode -> DefButton
+ KMonad.Args.Types: KReleaseOnly :: Keycode -> DefButton
+ KMonad.Args.Types: KStickyKey :: Int -> DefButton -> DefButton
+ KMonad.Args.Types: KTapMacroRelease :: [DefButton] -> Maybe Int -> DefButton
+ KMonad.Args.Types: KTapNextPress :: DefButton -> DefButton -> DefButton
+ KMonad.Args.Types: SCmpSeqDelay :: Int -> DefSetting
+ KMonad.Args.Types: _SCmpSeqDelay :: AsDefSetting r_a1NS7 => Prism' r_a1NS7 Int
+ KMonad.Args.Types: instance GHC.Classes.Eq KMonad.Args.Types.DefSetting
+ KMonad.Gesture: Gesture :: Seq (Toggle a) -> Gesture a
+ KMonad.Gesture: GestureParseError :: ParseError -> GestureReadError
+ KMonad.Gesture: GestureValidateError :: GestureError Text -> GestureReadError
+ KMonad.Gesture: Off :: a -> Toggle a
+ KMonad.Gesture: OffWithoutOn :: a -> GestureError a
+ KMonad.Gesture: On :: a -> Toggle a
+ KMonad.Gesture: OnWithoutOff :: a -> GestureError a
+ KMonad.Gesture: [_gesture] :: Gesture a -> Seq (Toggle a)
+ KMonad.Gesture: around :: Ord a => a -> Gesture a -> Either (GestureError a) (Gesture a)
+ KMonad.Gesture: around_ :: Parser Gest
+ KMonad.Gesture: closeTag :: Parser Gest
+ KMonad.Gesture: data GestureError a
+ KMonad.Gesture: data GestureReadError
+ KMonad.Gesture: data Toggle a
+ KMonad.Gesture: fromList :: Ord a => [Toggle a] -> Either (GestureError a) (Gesture a)
+ KMonad.Gesture: gest :: Parser Gest
+ KMonad.Gesture: instance GHC.Base.Functor KMonad.Gesture.Gesture
+ KMonad.Gesture: instance GHC.Base.Functor KMonad.Gesture.Toggle
+ KMonad.Gesture: instance GHC.Base.Monoid (KMonad.Gesture.Gesture a)
+ KMonad.Gesture: instance GHC.Base.Semigroup (KMonad.Gesture.Gesture a)
+ KMonad.Gesture: instance GHC.Classes.Eq KMonad.Gesture.GestureReadError
+ KMonad.Gesture: instance GHC.Classes.Eq a => GHC.Classes.Eq (KMonad.Gesture.Gesture a)
+ KMonad.Gesture: instance GHC.Classes.Eq a => GHC.Classes.Eq (KMonad.Gesture.GestureError a)
+ KMonad.Gesture: instance GHC.Classes.Eq a => GHC.Classes.Eq (KMonad.Gesture.Toggle a)
+ KMonad.Gesture: instance GHC.Exception.Type.Exception KMonad.Gesture.GestureReadError
+ KMonad.Gesture: instance GHC.Show.Show KMonad.Gesture.GestureReadError
+ KMonad.Gesture: instance GHC.Show.Show a => GHC.Show.Show (KMonad.Gesture.Gesture a)
+ KMonad.Gesture: instance GHC.Show.Show a => GHC.Show.Show (KMonad.Gesture.GestureError a)
+ KMonad.Gesture: instance GHC.Show.Show a => GHC.Show.Show (KMonad.Gesture.Toggle a)
+ KMonad.Gesture: newtype Gesture a
+ KMonad.Gesture: openTag :: Parser Gest
+ KMonad.Gesture: prsGesture :: Text -> Either GestureReadError (Gesture Text)
+ KMonad.Gesture: reserved :: [Char]
+ KMonad.Gesture: subg :: Parser Gest
+ KMonad.Gesture: tag :: Lens' (Toggle a) a
+ KMonad.Gesture: tag_ :: Parser Text
+ KMonad.Gesture: tags :: Ord a => Fold (Gesture a) a
+ KMonad.Gesture: tap :: a -> Gesture a
+ KMonad.Gesture: tap_ :: Parser Gest
+ KMonad.Gesture: type Gest = Seq (Toggle Text)
+ KMonad.Keyboard.Ops: isKeycode :: Keycode -> KeyPred
+ KMonad.Keyboard.Ops: isPress :: KeyPred
+ KMonad.Keyboard.Ops: isPressOf :: Keycode -> KeyPred
+ KMonad.Keyboard.Ops: isRelease :: KeyPred
+ KMonad.Keyboard.Ops: isReleaseOf :: Keycode -> KeyPred
+ KMonad.Keyboard.Ops: keycode :: HasKeyEvent c_a1prS => Lens' c_a1prS Keycode
+ KMonad.Keyboard.Ops: mkKeyEvent :: Switch -> Keycode -> KeyEvent
+ KMonad.Keyboard.Ops: mkPress :: Keycode -> KeyEvent
+ KMonad.Keyboard.Ops: mkRelease :: Keycode -> KeyEvent
+ KMonad.Keyboard.Ops: switch :: HasKeyEvent c_a1prS => Lens' c_a1prS Switch
+ KMonad.Keyboard.Types: Press :: Switch
+ KMonad.Keyboard.Types: Release :: Switch
+ KMonad.Keyboard.Types: class HasKeyEvent c_a1prS
+ KMonad.Keyboard.Types: data KeyEvent
+ KMonad.Keyboard.Types: data Switch
+ KMonad.Keyboard.Types: instance Data.Hashable.Class.Hashable KMonad.Keyboard.Types.KeyEvent
+ KMonad.Keyboard.Types: instance Data.Hashable.Class.Hashable KMonad.Keyboard.Types.Switch
+ KMonad.Keyboard.Types: instance GHC.Classes.Eq KMonad.Keyboard.Types.KeyEvent
+ KMonad.Keyboard.Types: instance GHC.Classes.Eq KMonad.Keyboard.Types.Switch
+ KMonad.Keyboard.Types: instance GHC.Classes.Ord KMonad.Keyboard.Types.KeyEvent
+ KMonad.Keyboard.Types: instance GHC.Classes.Ord KMonad.Keyboard.Types.Switch
+ KMonad.Keyboard.Types: instance GHC.Enum.Enum KMonad.Keyboard.Types.Switch
+ KMonad.Keyboard.Types: instance GHC.Generics.Generic KMonad.Keyboard.Types.KeyEvent
+ KMonad.Keyboard.Types: instance GHC.Generics.Generic KMonad.Keyboard.Types.Switch
+ KMonad.Keyboard.Types: instance GHC.Show.Show KMonad.Keyboard.Types.KeyEvent
+ KMonad.Keyboard.Types: instance GHC.Show.Show KMonad.Keyboard.Types.Switch
+ KMonad.Keyboard.Types: instance KMonad.Keyboard.Types.HasKeyEvent KMonad.Keyboard.Types.KeyEvent
+ KMonad.Keyboard.Types: instance RIO.Prelude.Display.Display KMonad.Keyboard.Types.KeyEvent
+ KMonad.Keyboard.Types: keyEvent :: HasKeyEvent c_a1prS => Lens' c_a1prS KeyEvent
+ KMonad.Keyboard.Types: keycode :: HasKeyEvent c_a1prS => Lens' c_a1prS Keycode
+ KMonad.Keyboard.Types: mkKeyEvent :: Switch -> Keycode -> KeyEvent
+ KMonad.Keyboard.Types: switch :: HasKeyEvent c_a1prS => Lens' c_a1prS Switch
+ KMonad.Keyboard.Types: type KeyPred = KeyEvent -> Bool
+ KMonad.Keyboard.Types: type LMap a = LayerStack LayerTag Keycode a
+ KMonad.Keyboard.Types: type LayerTag = Text
+ KMonad.Model.Action: Action :: AnyK () -> Action
+ KMonad.Model.Action: Catch :: Catch
+ KMonad.Model.Action: Hook :: Maybe (Timeout m) -> (Trigger -> m Catch) -> Hook m
+ KMonad.Model.Action: InputHook :: HookLocation
+ KMonad.Model.Action: NoCatch :: Catch
+ KMonad.Model.Action: OutputHook :: HookLocation
+ KMonad.Model.Action: PopLayer :: LayerTag -> LayerOp
+ KMonad.Model.Action: PushLayer :: LayerTag -> LayerOp
+ KMonad.Model.Action: SetBaseLayer :: LayerTag -> LayerOp
+ KMonad.Model.Action: Timeout :: Milliseconds -> m () -> Timeout m
+ KMonad.Model.Action: Trigger :: Milliseconds -> KeyEvent -> Trigger
+ KMonad.Model.Action: [_action] :: Timeout m -> m ()
+ KMonad.Model.Action: [_delay] :: Timeout m -> Milliseconds
+ KMonad.Model.Action: [_elapsed] :: Trigger -> Milliseconds
+ KMonad.Model.Action: [_event] :: Trigger -> KeyEvent
+ KMonad.Model.Action: [_hTimeout] :: Hook m -> Maybe (Timeout m)
+ KMonad.Model.Action: [_keyH] :: Hook m -> Trigger -> m Catch
+ KMonad.Model.Action: [runAction] :: Action -> AnyK ()
+ KMonad.Model.Action: action :: HasTimeout c_a1vhD m_a1vdl => Lens' c_a1vhD (m_a1vdl ())
+ KMonad.Model.Action: after :: MonadK m => Milliseconds -> m () -> m ()
+ KMonad.Model.Action: await :: MonadKIO m => KeyPred -> (KeyEvent -> m Catch) -> m ()
+ KMonad.Model.Action: awaitMy :: MonadK m => Switch -> m Catch -> m ()
+ KMonad.Model.Action: class HasHook c_a1vlg m_a1vhU | c_a1vlg -> m_a1vhU
+ KMonad.Model.Action: class HasTimeout c_a1vhD m_a1vdl | c_a1vhD -> m_a1vdl
+ KMonad.Model.Action: class HasTrigger c_a1vd1
+ KMonad.Model.Action: class MonadKIO m => MonadK m
+ KMonad.Model.Action: class Monad m => MonadKIO m
+ KMonad.Model.Action: data Catch
+ KMonad.Model.Action: data Hook m
+ KMonad.Model.Action: data HookLocation
+ KMonad.Model.Action: data LayerOp
+ KMonad.Model.Action: data Timeout m
+ KMonad.Model.Action: data Trigger
+ KMonad.Model.Action: delay :: HasTimeout c_a1vhD m_a1vdl => Lens' c_a1vhD Milliseconds
+ KMonad.Model.Action: elapsed :: HasTrigger c_a1vd1 => Lens' c_a1vd1 Milliseconds
+ KMonad.Model.Action: emit :: MonadKIO m => KeyEvent -> m ()
+ KMonad.Model.Action: event :: HasTrigger c_a1vd1 => Lens' c_a1vd1 KeyEvent
+ KMonad.Model.Action: hTimeout :: HasHook c_a1vlg m_a1vhU => Lens' c_a1vlg (Maybe (Timeout m_a1vhU))
+ KMonad.Model.Action: hold :: MonadKIO m => Bool -> m ()
+ KMonad.Model.Action: hook :: HasHook c_a1vlg m_a1vhU => Lens' c_a1vlg (Hook m_a1vhU)
+ KMonad.Model.Action: hookF :: MonadKIO m => HookLocation -> (KeyEvent -> m Catch) -> m ()
+ KMonad.Model.Action: inject :: MonadKIO m => KeyEvent -> m ()
+ KMonad.Model.Action: instance GHC.Base.Monoid KMonad.Model.Action.Catch
+ KMonad.Model.Action: instance GHC.Base.Semigroup KMonad.Model.Action.Catch
+ KMonad.Model.Action: instance GHC.Classes.Eq KMonad.Model.Action.Catch
+ KMonad.Model.Action: instance GHC.Classes.Eq KMonad.Model.Action.HookLocation
+ KMonad.Model.Action: instance GHC.Show.Show KMonad.Model.Action.Catch
+ KMonad.Model.Action: instance GHC.Show.Show KMonad.Model.Action.HookLocation
+ KMonad.Model.Action: instance KMonad.Model.Action.HasHook (KMonad.Model.Action.Hook m) m
+ KMonad.Model.Action: instance KMonad.Model.Action.HasTimeout (KMonad.Model.Action.Timeout m) m
+ KMonad.Model.Action: instance KMonad.Model.Action.HasTrigger KMonad.Model.Action.Trigger
+ KMonad.Model.Action: keyH :: HasHook c_a1vlg m_a1vhU => Lens' c_a1vlg (Trigger -> m_a1vhU Catch)
+ KMonad.Model.Action: layerOp :: MonadKIO m => LayerOp -> m ()
+ KMonad.Model.Action: matchMy :: MonadK m => Switch -> m KeyPred
+ KMonad.Model.Action: my :: MonadK m => Switch -> m KeyEvent
+ KMonad.Model.Action: myBinding :: MonadK m => m Keycode
+ KMonad.Model.Action: newtype Action
+ KMonad.Model.Action: pause :: MonadKIO m => Milliseconds -> m ()
+ KMonad.Model.Action: register :: MonadKIO m => HookLocation -> Hook m -> m ()
+ KMonad.Model.Action: shellCmd :: MonadKIO m => Text -> m ()
+ KMonad.Model.Action: tHookF :: MonadK m => HookLocation -> Milliseconds -> m () -> (Trigger -> m Catch) -> m ()
+ KMonad.Model.Action: timeout :: HasTimeout c_a1vhD m_a1vdl => Lens' c_a1vhD (Timeout m_a1vdl)
+ KMonad.Model.Action: trigger :: HasTrigger c_a1vd1 => Lens' c_a1vd1 Trigger
+ KMonad.Model.Action: type KeyPred = KeyEvent -> Bool
+ KMonad.Model.Action: type AnyK a = forall m. MonadK m => m a
+ KMonad.Model.Action: whenDone :: MonadK m => m () -> m ()
+ KMonad.Model.Action: within :: MonadK m => Milliseconds -> m KeyPred -> m () -> (Trigger -> m Catch) -> m ()
+ KMonad.Model.Action: withinHeld :: MonadK m => Milliseconds -> m KeyPred -> m () -> (Trigger -> m Catch) -> m ()
+ KMonad.Model.BEnv: BEnv :: !Button -> !Keycode -> !MVar Switch -> BEnv
+ KMonad.Model.BEnv: [_beButton] :: BEnv -> !Button
+ KMonad.Model.BEnv: [_binding] :: BEnv -> !Keycode
+ KMonad.Model.BEnv: [_lastSwitch] :: BEnv -> !MVar Switch
+ KMonad.Model.BEnv: bEnv :: HasBEnv c_a1Ehn => Lens' c_a1Ehn BEnv
+ KMonad.Model.BEnv: beButton :: HasBEnv c_a1Ehn => Lens' c_a1Ehn Button
+ KMonad.Model.BEnv: binding :: HasBEnv c_a1Ehn => Lens' c_a1Ehn Keycode
+ KMonad.Model.BEnv: class HasBEnv c_a1Ehn
+ KMonad.Model.BEnv: data BEnv
+ KMonad.Model.BEnv: initBEnv :: MonadIO m => Button -> Keycode -> m BEnv
+ KMonad.Model.BEnv: instance KMonad.Model.BEnv.HasBEnv KMonad.Model.BEnv.BEnv
+ KMonad.Model.BEnv: instance KMonad.Model.Button.HasButton KMonad.Model.BEnv.BEnv
+ KMonad.Model.BEnv: lastSwitch :: HasBEnv c_a1Ehn => Lens' c_a1Ehn (MVar Switch)
+ KMonad.Model.BEnv: runBEnv :: MonadUnliftIO m => BEnv -> Switch -> m (Maybe Action)
+ KMonad.Model.Button: around :: Button -> Button -> Button
+ KMonad.Model.Button: aroundNext :: Button -> Button
+ KMonad.Model.Button: aroundNextSingle :: Button -> Button
+ KMonad.Model.Button: aroundNextTimeout :: Milliseconds -> Button -> Button -> Button
+ KMonad.Model.Button: beforeAfterNext :: Button -> Button -> Button
+ KMonad.Model.Button: button :: HasButton c_a1zNb => Lens' c_a1zNb Button
+ KMonad.Model.Button: class HasButton c_a1zNb
+ KMonad.Model.Button: cmdButton :: Text -> Maybe Text -> Button
+ KMonad.Model.Button: data Button
+ KMonad.Model.Button: emitB :: Keycode -> Button
+ KMonad.Model.Button: instance KMonad.Model.Button.HasButton KMonad.Model.Button.Button
+ KMonad.Model.Button: layerAdd :: LayerTag -> Button
+ KMonad.Model.Button: layerDelay :: Milliseconds -> LayerTag -> Button
+ KMonad.Model.Button: layerNext :: LayerTag -> Button
+ KMonad.Model.Button: layerRem :: LayerTag -> Button
+ KMonad.Model.Button: layerSwitch :: LayerTag -> Button
+ KMonad.Model.Button: layerToggle :: LayerTag -> Button
+ KMonad.Model.Button: mkButton :: AnyK () -> AnyK () -> Button
+ KMonad.Model.Button: modded :: Keycode -> Button -> Button
+ KMonad.Model.Button: multiTap :: Button -> [(Milliseconds, Button)] -> Button
+ KMonad.Model.Button: onPress :: AnyK () -> Button
+ KMonad.Model.Button: onRelease :: AnyK () -> Button
+ KMonad.Model.Button: pass :: Button
+ KMonad.Model.Button: pressAction :: HasButton c_a1zNb => Lens' c_a1zNb Action
+ KMonad.Model.Button: pressOnly :: Keycode -> Button
+ KMonad.Model.Button: releaseAction :: HasButton c_a1zNb => Lens' c_a1zNb Action
+ KMonad.Model.Button: releaseOnly :: Keycode -> Button
+ KMonad.Model.Button: stickyKey :: Milliseconds -> Button -> Button
+ KMonad.Model.Button: tapHold :: Milliseconds -> Button -> Button -> Button
+ KMonad.Model.Button: tapHoldNext :: Milliseconds -> Button -> Button -> Maybe Button -> Button
+ KMonad.Model.Button: tapHoldNextRelease :: Milliseconds -> Button -> Button -> Maybe Button -> Button
+ KMonad.Model.Button: tapMacro :: [Button] -> Button
+ KMonad.Model.Button: tapMacroRelease :: [Button] -> Button
+ KMonad.Model.Button: tapNext :: Button -> Button -> Button
+ KMonad.Model.Button: tapNextPress :: Button -> Button -> Button
+ KMonad.Model.Button: tapNextRelease :: Button -> Button -> Button
+ KMonad.Model.Button: tapOn :: Switch -> Button -> Button
+ KMonad.Model.Dispatch: data Dispatch
+ KMonad.Model.Dispatch: mkDispatch :: MonadUnliftIO m => m KeyEvent -> ContT r m Dispatch
+ KMonad.Model.Dispatch: pull :: HasLogFunc e => Dispatch -> RIO e KeyEvent
+ KMonad.Model.Dispatch: rerun :: HasLogFunc e => Dispatch -> [KeyEvent] -> RIO e ()
+ KMonad.Model.Hooks: data Hooks
+ KMonad.Model.Hooks: instance KMonad.Model.Action.HasHook KMonad.Model.Hooks.Entry GHC.Types.IO
+ KMonad.Model.Hooks: mkHooks :: MonadUnliftIO m => m KeyEvent -> ContT r m Hooks
+ KMonad.Model.Hooks: pull :: HasLogFunc e => Hooks -> RIO e KeyEvent
+ KMonad.Model.Hooks: register :: HasLogFunc e => Hooks -> Hook (RIO e) -> RIO e ()
+ KMonad.Model.Keymap: data Keymap
+ KMonad.Model.Keymap: instance KMonad.Model.Keymap.HasKeymap KMonad.Model.Keymap.Keymap
+ KMonad.Model.Keymap: layerOp :: HasLogFunc e => Keymap -> LayerOp -> RIO e ()
+ KMonad.Model.Keymap: lookupKey :: MonadIO m => Keymap -> Keycode -> m (Maybe BEnv)
+ KMonad.Model.Keymap: mkKeymap :: MonadUnliftIO m => LayerTag -> LMap Button -> ContT r m Keymap
+ KMonad.Model.Sluice: block :: HasLogFunc e => Sluice -> RIO e ()
+ KMonad.Model.Sluice: data Sluice
+ KMonad.Model.Sluice: mkSluice :: MonadUnliftIO m => m KeyEvent -> ContT r m Sluice
+ KMonad.Model.Sluice: pull :: HasLogFunc e => Sluice -> RIO e KeyEvent
+ KMonad.Model.Sluice: unblock :: HasLogFunc e => Sluice -> RIO e [KeyEvent]
+ KMonad.Parsing: (<?>) :: MonadParsec e s m => m a -> String -> m a
+ KMonad.Parsing: (<|>) :: Alternative f => f a -> f a -> f a
+ KMonad.Parsing: -- | Type of “chunk” of the stream.
+ KMonad.Parsing: EndOfInput :: ErrorItem t
+ KMonad.Parsing: ErrorCustom :: e -> ErrorFancy e
+ KMonad.Parsing: ErrorFail :: String -> ErrorFancy e
+ KMonad.Parsing: ErrorIndentation :: Ordering -> Pos -> Pos -> ErrorFancy e
+ KMonad.Parsing: InvalidPosException :: Int -> InvalidPosException
+ KMonad.Parsing: Label :: NonEmpty Char -> ErrorItem t
+ KMonad.Parsing: NoShareInput :: a -> NoShareInput a
+ KMonad.Parsing: ParseError :: ParseErrorBundle Text Void -> ParseError
+ KMonad.Parsing: ParseErrorBundle :: NonEmpty (ParseError s e) -> PosState s -> ParseErrorBundle s e
+ KMonad.Parsing: PosState :: s -> !Int -> !SourcePos -> Pos -> String -> PosState s
+ KMonad.Parsing: ShareInput :: a -> ShareInput a
+ KMonad.Parsing: SourcePos :: FilePath -> !Pos -> !Pos -> SourcePos
+ KMonad.Parsing: State :: s -> {-# UNPACK #-} !Int -> PosState s -> [ParseError s e] -> State s e
+ KMonad.Parsing: Tokens :: NonEmpty t -> ErrorItem t
+ KMonad.Parsing: [_parseError] :: ParseError -> ParseErrorBundle Text Void
+ KMonad.Parsing: [bundleErrors] :: ParseErrorBundle s e -> NonEmpty (ParseError s e)
+ KMonad.Parsing: [bundlePosState] :: ParseErrorBundle s e -> PosState s
+ KMonad.Parsing: [pstateInput] :: PosState s -> s
+ KMonad.Parsing: [pstateLinePrefix] :: PosState s -> String
+ KMonad.Parsing: [pstateOffset] :: PosState s -> !Int
+ KMonad.Parsing: [pstateSourcePos] :: PosState s -> !SourcePos
+ KMonad.Parsing: [pstateTabWidth] :: PosState s -> Pos
+ KMonad.Parsing: [sourceColumn] :: SourcePos -> !Pos
+ KMonad.Parsing: [sourceLine] :: SourcePos -> !Pos
+ KMonad.Parsing: [sourceName] :: SourcePos -> FilePath
+ KMonad.Parsing: [stateInput] :: State s e -> s
+ KMonad.Parsing: [stateOffset] :: State s e -> {-# UNPACK #-} !Int
+ KMonad.Parsing: [stateParseErrors] :: State s e -> [ParseError s e]
+ KMonad.Parsing: [statePosState] :: State s e -> PosState s
+ KMonad.Parsing: [unNoShareInput] :: NoShareInput a -> a
+ KMonad.Parsing: [unShareInput] :: ShareInput a -> a
+ KMonad.Parsing: anySingle :: MonadParsec e s m => m (Token s)
+ KMonad.Parsing: anySingleBut :: MonadParsec e s m => Token s -> m (Token s)
+ KMonad.Parsing: atEnd :: MonadParsec e s m => m Bool
+ KMonad.Parsing: attachSourcePos :: (Traversable t, TraversableStream s) => (a -> Int) -> t a -> PosState s -> (t (a, SourcePos), PosState s)
+ KMonad.Parsing: between :: Applicative m => m open -> m close -> m a -> m a
+ KMonad.Parsing: choice :: (Foldable f, Alternative m) => f (m a) -> m a
+ KMonad.Parsing: chunk :: MonadParsec e s m => Tokens s -> m (Tokens s)
+ KMonad.Parsing: chunkEmpty :: Stream s => Proxy s -> Tokens s -> Bool
+ KMonad.Parsing: chunkLength :: Stream s => Proxy s -> Tokens s -> Int
+ KMonad.Parsing: chunkToTokens :: Stream s => Proxy s -> Tokens s -> [Token s]
+ KMonad.Parsing: class (Stream s, MonadPlus m) => MonadParsec e s (m :: Type -> Type) | m -> e s
+ KMonad.Parsing: class Ord a => ShowErrorComponent a
+ KMonad.Parsing: class (Ord Token s, Ord Tokens s) => Stream s where {
+ KMonad.Parsing: class Stream s => TraversableStream s
+ KMonad.Parsing: class Stream s => VisualStream s
+ KMonad.Parsing: count :: Monad m => Int -> m a -> m [a]
+ KMonad.Parsing: count' :: MonadPlus m => Int -> Int -> m a -> m [a]
+ KMonad.Parsing: customFailure :: MonadParsec e s m => e -> m a
+ KMonad.Parsing: data () => ErrorFancy e
+ KMonad.Parsing: data () => ErrorItem t
+ KMonad.Parsing: data () => ParseErrorBundle s e
+ KMonad.Parsing: data () => ParsecT e s (m :: Type -> Type) a
+ KMonad.Parsing: data () => Pos
+ KMonad.Parsing: data () => PosState s
+ KMonad.Parsing: data () => SourcePos
+ KMonad.Parsing: data () => State s e
+ KMonad.Parsing: defaultTabWidth :: Pos
+ KMonad.Parsing: eitherP :: Alternative m => m a -> m b -> m (Either a b)
+ KMonad.Parsing: empty :: Alternative f => f a
+ KMonad.Parsing: endBy :: MonadPlus m => m a -> m sep -> m [a]
+ KMonad.Parsing: endBy1 :: MonadPlus m => m a -> m sep -> m [a]
+ KMonad.Parsing: eof :: MonadParsec e s m => m ()
+ KMonad.Parsing: errorBundlePretty :: (VisualStream s, TraversableStream s, ShowErrorComponent e) => ParseErrorBundle s e -> String
+ KMonad.Parsing: errorComponentLen :: ShowErrorComponent a => a -> Int
+ KMonad.Parsing: errorOffset :: ParseError s e -> Int
+ KMonad.Parsing: failure :: MonadParsec e s m => Maybe (ErrorItem (Token s)) -> Set (ErrorItem (Token s)) -> m a
+ KMonad.Parsing: fancyFailure :: MonadParsec e s m => Set (ErrorFancy e) -> m a
+ KMonad.Parsing: getInput :: MonadParsec e s m => m s
+ KMonad.Parsing: getOffset :: MonadParsec e s m => m Int
+ KMonad.Parsing: getParserState :: MonadParsec e s m => m (State s e)
+ KMonad.Parsing: getSourcePos :: (TraversableStream s, MonadParsec e s m) => m SourcePos
+ KMonad.Parsing: hidden :: MonadParsec e s m => m a -> m a
+ KMonad.Parsing: hlex :: Parser a -> Parser a
+ KMonad.Parsing: hsc :: Parser ()
+ KMonad.Parsing: infix 0 <?>
+ KMonad.Parsing: infixl 3 <|>
+ KMonad.Parsing: initialPos :: FilePath -> SourcePos
+ KMonad.Parsing: instance GHC.Classes.Eq KMonad.Parsing.ParseError
+ KMonad.Parsing: instance GHC.Exception.Type.Exception KMonad.Parsing.ParseError
+ KMonad.Parsing: instance GHC.Show.Show KMonad.Parsing.ParseError
+ KMonad.Parsing: label :: MonadParsec e s m => String -> m a -> m a
+ KMonad.Parsing: lex :: Parser a -> Parser a
+ KMonad.Parsing: lookAhead :: MonadParsec e s m => m a -> m a
+ KMonad.Parsing: many :: MonadPlus m => m a -> m [a]
+ KMonad.Parsing: manyTill :: MonadPlus m => m a -> m end -> m [a]
+ KMonad.Parsing: manyTill_ :: MonadPlus m => m a -> m end -> m ([a], end)
+ KMonad.Parsing: mapParseError :: Ord e' => (e -> e') -> ParseError s e -> ParseError s e'
+ KMonad.Parsing: match :: MonadParsec e s m => m a -> m (Tokens s, a)
+ KMonad.Parsing: mkParsec :: MonadParsec e s m => (State s e -> Reply e s a) -> m a
+ KMonad.Parsing: mkPos :: Int -> Pos
+ KMonad.Parsing: newtype () => InvalidPosException
+ KMonad.Parsing: newtype () => NoShareInput a
+ KMonad.Parsing: newtype ParseError
+ KMonad.Parsing: newtype () => ShareInput a
+ KMonad.Parsing: noneOf :: (Foldable f, MonadParsec e s m) => f (Token s) -> m (Token s)
+ KMonad.Parsing: notFollowedBy :: MonadParsec e s m => m a -> m ()
+ KMonad.Parsing: observing :: MonadParsec e s m => m a -> m (Either (ParseError s e) a)
+ KMonad.Parsing: oneOf :: (Foldable f, MonadParsec e s m) => f (Token s) -> m (Token s)
+ KMonad.Parsing: option :: Alternative m => a -> m a -> m a
+ KMonad.Parsing: optional :: Alternative f => f a -> f (Maybe a)
+ KMonad.Parsing: parse :: Parsec e s a -> String -> s -> Either (ParseErrorBundle s e) a
+ KMonad.Parsing: parseError :: MonadParsec e s m => ParseError s e -> m a
+ KMonad.Parsing: parseErrorPretty :: (VisualStream s, ShowErrorComponent e) => ParseError s e -> String
+ KMonad.Parsing: parseErrorTextPretty :: (VisualStream s, ShowErrorComponent e) => ParseError s e -> String
+ KMonad.Parsing: parseMaybe :: (Ord e, Stream s) => Parsec e s a -> s -> Maybe a
+ KMonad.Parsing: parseTest :: (ShowErrorComponent e, Show a, VisualStream s, TraversableStream s) => Parsec e s a -> s -> IO ()
+ KMonad.Parsing: pattern FancyError :: () => Int -> Set (ErrorFancy e) -> ParseError s e
+ KMonad.Parsing: pos1 :: Pos
+ KMonad.Parsing: reachOffset :: TraversableStream s => Int -> PosState s -> (Maybe String, PosState s)
+ KMonad.Parsing: reachOffsetNoLine :: TraversableStream s => Int -> PosState s -> PosState s
+ KMonad.Parsing: region :: MonadParsec e s m => (ParseError s e -> ParseError s e) -> m a -> m a
+ KMonad.Parsing: registerFailure :: MonadParsec e s m => Maybe (ErrorItem (Token s)) -> Set (ErrorItem (Token s)) -> m ()
+ KMonad.Parsing: registerFancyFailure :: MonadParsec e s m => Set (ErrorFancy e) -> m ()
+ KMonad.Parsing: registerParseError :: MonadParsec e s m => ParseError s e -> m ()
+ KMonad.Parsing: runParser :: Parsec e s a -> String -> s -> Either (ParseErrorBundle s e) a
+ KMonad.Parsing: runParser' :: Parsec e s a -> State s e -> (State s e, Either (ParseErrorBundle s e) a)
+ KMonad.Parsing: runParserT :: Monad m => ParsecT e s m a -> String -> s -> m (Either (ParseErrorBundle s e) a)
+ KMonad.Parsing: runParserT' :: Monad m => ParsecT e s m a -> State s e -> m (State s e, Either (ParseErrorBundle s e) a)
+ KMonad.Parsing: satisfy :: MonadParsec e s m => (Token s -> Bool) -> m (Token s)
+ KMonad.Parsing: sc :: Parser ()
+ KMonad.Parsing: sepBy :: MonadPlus m => m a -> m sep -> m [a]
+ KMonad.Parsing: sepBy1 :: MonadPlus m => m a -> m sep -> m [a]
+ KMonad.Parsing: sepEndBy :: MonadPlus m => m a -> m sep -> m [a]
+ KMonad.Parsing: sepEndBy1 :: MonadPlus m => m a -> m sep -> m [a]
+ KMonad.Parsing: setErrorOffset :: Int -> ParseError s e -> ParseError s e
+ KMonad.Parsing: setInput :: MonadParsec e s m => s -> m ()
+ KMonad.Parsing: setOffset :: MonadParsec e s m => Int -> m ()
+ KMonad.Parsing: setParserState :: MonadParsec e s m => State s e -> m ()
+ KMonad.Parsing: showErrorComponent :: ShowErrorComponent a => a -> String
+ KMonad.Parsing: showErrorItem :: VisualStream s => Proxy s -> ErrorItem (Token s) -> String
+ KMonad.Parsing: showTokens :: VisualStream s => Proxy s -> NonEmpty (Token s) -> String
+ KMonad.Parsing: single :: MonadParsec e s m => Token s -> m (Token s)
+ KMonad.Parsing: skipCount :: Monad m => Int -> m a -> m ()
+ KMonad.Parsing: skipMany :: MonadPlus m => m a -> m ()
+ KMonad.Parsing: skipManyTill :: MonadPlus m => m a -> m end -> m end
+ KMonad.Parsing: skipSome :: MonadPlus m => m a -> m ()
+ KMonad.Parsing: skipSomeTill :: MonadPlus m => m a -> m end -> m end
+ KMonad.Parsing: some :: MonadPlus m => m a -> m [a]
+ KMonad.Parsing: someTill :: MonadPlus m => m a -> m end -> m [a]
+ KMonad.Parsing: someTill_ :: MonadPlus m => m a -> m end -> m ([a], end)
+ KMonad.Parsing: sourcePosPretty :: SourcePos -> String
+ KMonad.Parsing: take1_ :: Stream s => s -> Maybe (Token s, s)
+ KMonad.Parsing: takeN_ :: Stream s => Int -> s -> Maybe (Tokens s, s)
+ KMonad.Parsing: takeP :: MonadParsec e s m => Maybe String -> Int -> m (Tokens s)
+ KMonad.Parsing: takeRest :: MonadParsec e s m => m (Tokens s)
+ KMonad.Parsing: takeWhile1P :: MonadParsec e s m => Maybe String -> (Token s -> Bool) -> m (Tokens s)
+ KMonad.Parsing: takeWhileP :: MonadParsec e s m => Maybe String -> (Token s -> Bool) -> m (Tokens s)
+ KMonad.Parsing: takeWhile_ :: Stream s => (Token s -> Bool) -> s -> (Tokens s, s)
+ KMonad.Parsing: token :: MonadParsec e s m => (Token s -> Maybe a) -> Set (ErrorItem (Token s)) -> m a
+ KMonad.Parsing: tokenToChunk :: Stream s => Proxy s -> Token s -> Tokens s
+ KMonad.Parsing: tokens :: MonadParsec e s m => (Tokens s -> Tokens s -> Bool) -> Tokens s -> m (Tokens s)
+ KMonad.Parsing: tokensLength :: VisualStream s => Proxy s -> NonEmpty (Token s) -> Int
+ KMonad.Parsing: tokensToChunk :: Stream s => Proxy s -> [Token s] -> Tokens s
+ KMonad.Parsing: try :: MonadParsec e s m => m a -> m a
+ KMonad.Parsing: type Parsec e s = ParsecT e s Identity
+ KMonad.Parsing: type Parser a = Parsec Void Text a
+ KMonad.Parsing: type ParserT m a = ParsecT Void Text m a
+ KMonad.Parsing: type family Tokens s
+ KMonad.Parsing: unPos :: Pos -> Int
+ KMonad.Parsing: unexpected :: MonadParsec e s m => ErrorItem (Token s) -> m a
+ KMonad.Parsing: updateParserState :: MonadParsec e s m => (State s e -> State s e) -> m ()
+ KMonad.Parsing: withRecovery :: MonadParsec e s m => (ParseError s e -> m a) -> m a -> m a
+ KMonad.Parsing: }
+ KMonad.Prelude.Imports: (#%%=) :: MonadState s m => ALens s s a b -> (a -> (r, b)) -> m r
+ KMonad.Prelude.Imports: (#%%~) :: Functor f => ALens s t a b -> (a -> f b) -> s -> f t
+ KMonad.Prelude.Imports: (#%=) :: MonadState s m => ALens s s a b -> (a -> b) -> m ()
+ KMonad.Prelude.Imports: (#%~) :: ALens s t a b -> (a -> b) -> s -> t
+ KMonad.Prelude.Imports: (#) :: AReview t b -> b -> t
+ KMonad.Prelude.Imports: (#=) :: MonadState s m => ALens s s a b -> b -> m ()
+ KMonad.Prelude.Imports: (#~) :: ALens s t a b -> b -> s -> t
+ KMonad.Prelude.Imports: ($!!) :: NFData a => (a -> b) -> a -> b
+ KMonad.Prelude.Imports: ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
+ KMonad.Prelude.Imports: ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
+ KMonad.Prelude.Imports: ($>) :: Functor f => f a -> b -> f b
+ KMonad.Prelude.Imports: (%%=) :: forall {k} s m p r (a :: k) b. MonadState s m => Over p ((,) r) s s a b -> p a (r, b) -> m r
+ KMonad.Prelude.Imports: (%%@=) :: MonadState s m => Over (Indexed i) ((,) r) s s a b -> (i -> a -> (r, b)) -> m r
+ KMonad.Prelude.Imports: (%%@~) :: forall {k1} i f s (t :: k1) a (b :: k1). Over (Indexed i) f s t a b -> (i -> a -> f b) -> s -> f t
+ KMonad.Prelude.Imports: (%%~) :: forall {k} f s (t :: k) a (b :: k). LensLike f s t a b -> (a -> f b) -> s -> f t
+ KMonad.Prelude.Imports: (%=) :: MonadState s m => ASetter s s a b -> (a -> b) -> m ()
+ KMonad.Prelude.Imports: (%@=) :: MonadState s m => AnIndexedSetter i s s a b -> (i -> a -> b) -> m ()
+ KMonad.Prelude.Imports: (%@~) :: AnIndexedSetter i s t a b -> (i -> a -> b) -> s -> t
+ KMonad.Prelude.Imports: (%~) :: ASetter s t a b -> (a -> b) -> s -> t
+ KMonad.Prelude.Imports: (&&&) :: Arrow a => a b c -> a b c' -> a b (c, c')
+ KMonad.Prelude.Imports: (&&) :: Bool -> Bool -> Bool
+ KMonad.Prelude.Imports: (&&=) :: MonadState s m => ASetter' s Bool -> Bool -> m ()
+ KMonad.Prelude.Imports: (&&~) :: ASetter s t Bool Bool -> Bool -> s -> t
+ KMonad.Prelude.Imports: (&) :: a -> (a -> b) -> b
+ KMonad.Prelude.Imports: (&~) :: s -> State s a -> s
+ KMonad.Prelude.Imports: (*) :: Num a => a -> a -> a
+ KMonad.Prelude.Imports: (**) :: Floating a => a -> a -> a
+ KMonad.Prelude.Imports: (***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c')
+ KMonad.Prelude.Imports: (**=) :: (MonadState s m, Floating a) => ASetter' s a -> a -> m ()
+ KMonad.Prelude.Imports: (**~) :: Floating a => ASetter s t a a -> a -> s -> t
+ KMonad.Prelude.Imports: (*=) :: (MonadState s m, Num a) => ASetter' s a -> a -> m ()
+ KMonad.Prelude.Imports: (*>) :: Applicative f => f a -> f b -> f b
+ KMonad.Prelude.Imports: (*~) :: Num a => ASetter s t a a -> a -> s -> t
+ KMonad.Prelude.Imports: (+) :: Num a => a -> a -> a
+ KMonad.Prelude.Imports: (++) :: [a] -> [a] -> [a]
+ KMonad.Prelude.Imports: (+=) :: (MonadState s m, Num a) => ASetter' s a -> a -> m ()
+ KMonad.Prelude.Imports: (+~) :: Num a => ASetter s t a a -> a -> s -> t
+ KMonad.Prelude.Imports: (-) :: Num a => a -> a -> a
+ KMonad.Prelude.Imports: (-=) :: (MonadState s m, Num a) => ASetter' s a -> a -> m ()
+ KMonad.Prelude.Imports: (-~) :: Num a => ASetter s t a a -> a -> s -> t
+ KMonad.Prelude.Imports: (.) :: (b -> c) -> (a -> b) -> a -> c
+ KMonad.Prelude.Imports: (...) :: forall {k} f c s t p (a :: k) b. (Applicative f, Plated c) => LensLike f s t c c -> Over p f c c a b -> Over p f s t a b
+ KMonad.Prelude.Imports: (.=) :: MonadState s m => ASetter s s a b -> b -> m ()
+ KMonad.Prelude.Imports: (.>) :: (st -> r) -> (kab -> st) -> kab -> r
+ KMonad.Prelude.Imports: (.@=) :: MonadState s m => AnIndexedSetter i s s a b -> (i -> b) -> m ()
+ KMonad.Prelude.Imports: (.@~) :: AnIndexedSetter i s t a b -> (i -> b) -> s -> t
+ KMonad.Prelude.Imports: (.~) :: ASetter s t a b -> b -> s -> t
+ KMonad.Prelude.Imports: (/) :: Fractional a => a -> a -> a
+ KMonad.Prelude.Imports: (//=) :: (MonadState s m, Fractional a) => ASetter' s a -> a -> m ()
+ KMonad.Prelude.Imports: (//~) :: Fractional a => ASetter s t a a -> a -> s -> t
+ KMonad.Prelude.Imports: (/=) :: Eq a => a -> a -> Bool
+ KMonad.Prelude.Imports: (:|) :: a -> [a] -> NonEmpty a
+ KMonad.Prelude.Imports: (<#%=) :: MonadState s m => ALens s s a b -> (a -> b) -> m b
+ KMonad.Prelude.Imports: (<#%~) :: ALens s t a b -> (a -> b) -> s -> (b, t)
+ KMonad.Prelude.Imports: (<#=) :: MonadState s m => ALens s s a b -> b -> m b
+ KMonad.Prelude.Imports: (<#~) :: ALens s t a b -> b -> s -> (b, t)
+ KMonad.Prelude.Imports: (<$!>) :: Monad m => (a -> b) -> m a -> m b
+ KMonad.Prelude.Imports: (<$) :: Functor f => a -> f b -> f a
+ KMonad.Prelude.Imports: (<$>) :: Functor f => (a -> b) -> f a -> f b
+ KMonad.Prelude.Imports: (<%=) :: MonadState s m => LensLike ((,) b) s s a b -> (a -> b) -> m b
+ KMonad.Prelude.Imports: (<%@=) :: MonadState s m => Over (Indexed i) ((,) b) s s a b -> (i -> a -> b) -> m b
+ KMonad.Prelude.Imports: (<%@~) :: Over (Indexed i) ((,) b) s t a b -> (i -> a -> b) -> s -> (b, t)
+ KMonad.Prelude.Imports: (<%~) :: LensLike ((,) b) s t a b -> (a -> b) -> s -> (b, t)
+ KMonad.Prelude.Imports: (<&&=) :: MonadState s m => LensLike' ((,) Bool) s Bool -> Bool -> m Bool
+ KMonad.Prelude.Imports: (<&&~) :: LensLike ((,) Bool) s t Bool Bool -> Bool -> s -> (Bool, t)
+ KMonad.Prelude.Imports: (<&>) :: Functor f => f a -> (a -> b) -> f b
+ KMonad.Prelude.Imports: (<) :: Ord a => a -> a -> Bool
+ KMonad.Prelude.Imports: (<*) :: Applicative f => f a -> f b -> f a
+ KMonad.Prelude.Imports: (<**=) :: (MonadState s m, Floating a) => LensLike' ((,) a) s a -> a -> m a
+ KMonad.Prelude.Imports: (<**~) :: Floating a => LensLike ((,) a) s t a a -> a -> s -> (a, t)
+ KMonad.Prelude.Imports: (<*=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
+ KMonad.Prelude.Imports: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
+ KMonad.Prelude.Imports: (<*~) :: Num a => LensLike ((,) a) s t a a -> a -> s -> (a, t)
+ KMonad.Prelude.Imports: (<+=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
+ KMonad.Prelude.Imports: (<+~) :: Num a => LensLike ((,) a) s t a a -> a -> s -> (a, t)
+ KMonad.Prelude.Imports: (<-=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
+ KMonad.Prelude.Imports: (<-~) :: Num a => LensLike ((,) a) s t a a -> a -> s -> (a, t)
+ KMonad.Prelude.Imports: (<.) :: Indexable i p => (Indexed i s t -> r) -> ((a -> b) -> s -> t) -> p a b -> r
+ KMonad.Prelude.Imports: (<.=) :: MonadState s m => ASetter s s a b -> b -> m b
+ KMonad.Prelude.Imports: (<.>) :: Indexable (i, j) p => (Indexed i s t -> r) -> (Indexed j a b -> s -> t) -> p a b -> r
+ KMonad.Prelude.Imports: (<.~) :: ASetter s t a b -> b -> s -> (b, t)
+ KMonad.Prelude.Imports: (<//=) :: (MonadState s m, Fractional a) => LensLike' ((,) a) s a -> a -> m a
+ KMonad.Prelude.Imports: (<//~) :: Fractional a => LensLike ((,) a) s t a a -> a -> s -> (a, t)
+ KMonad.Prelude.Imports: (<<%=) :: (Strong p, MonadState s m) => Over p ((,) a) s s a b -> p a b -> m a
+ KMonad.Prelude.Imports: (<<%@=) :: MonadState s m => Over (Indexed i) ((,) a) s s a b -> (i -> a -> b) -> m a
+ KMonad.Prelude.Imports: (<<%@~) :: Over (Indexed i) ((,) a) s t a b -> (i -> a -> b) -> s -> (a, t)
+ KMonad.Prelude.Imports: (<<%~) :: LensLike ((,) a) s t a b -> (a -> b) -> s -> (a, t)
+ KMonad.Prelude.Imports: (<<&&=) :: MonadState s m => LensLike' ((,) Bool) s Bool -> Bool -> m Bool
+ KMonad.Prelude.Imports: (<<&&~) :: LensLike' ((,) Bool) s Bool -> Bool -> s -> (Bool, s)
+ KMonad.Prelude.Imports: (<<**=) :: (MonadState s m, Floating a) => LensLike' ((,) a) s a -> a -> m a
+ KMonad.Prelude.Imports: (<<**~) :: Floating a => LensLike' ((,) a) s a -> a -> s -> (a, s)
+ KMonad.Prelude.Imports: (<<*=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
+ KMonad.Prelude.Imports: (<<*~) :: Num a => LensLike' ((,) a) s a -> a -> s -> (a, s)
+ KMonad.Prelude.Imports: (<<+=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
+ KMonad.Prelude.Imports: (<<+~) :: Num a => LensLike' ((,) a) s a -> a -> s -> (a, s)
+ KMonad.Prelude.Imports: (<<-=) :: (MonadState s m, Num a) => LensLike' ((,) a) s a -> a -> m a
+ KMonad.Prelude.Imports: (<<-~) :: Num a => LensLike' ((,) a) s a -> a -> s -> (a, s)
+ KMonad.Prelude.Imports: (<<.=) :: MonadState s m => LensLike ((,) a) s s a b -> b -> m a
+ KMonad.Prelude.Imports: (<<.~) :: LensLike ((,) a) s t a b -> b -> s -> (a, t)
+ KMonad.Prelude.Imports: (<<//=) :: (MonadState s m, Fractional a) => LensLike' ((,) a) s a -> a -> m a
+ KMonad.Prelude.Imports: (<<//~) :: Fractional a => LensLike' ((,) a) s a -> a -> s -> (a, s)
+ KMonad.Prelude.Imports: (<<<>=) :: (MonadState s m, Semigroup r) => LensLike' ((,) r) s r -> r -> m r
+ KMonad.Prelude.Imports: (<<<>~) :: Semigroup r => LensLike' ((,) r) s r -> r -> s -> (r, s)
+ KMonad.Prelude.Imports: (<<>=) :: (MonadState s m, Semigroup r) => LensLike' ((,) r) s r -> r -> m r
+ KMonad.Prelude.Imports: (<<>~) :: Semigroup m => LensLike ((,) m) s t m m -> m -> s -> (m, t)
+ KMonad.Prelude.Imports: (<<?=) :: MonadState s m => LensLike ((,) a) s s a (Maybe b) -> b -> m a
+ KMonad.Prelude.Imports: (<<?~) :: LensLike ((,) a) s t a (Maybe b) -> b -> s -> (a, t)
+ KMonad.Prelude.Imports: (<<^=) :: (MonadState s m, Num a, Integral e) => LensLike' ((,) a) s a -> e -> m a
+ KMonad.Prelude.Imports: (<<^^=) :: (MonadState s m, Fractional a, Integral e) => LensLike' ((,) a) s a -> e -> m a
+ KMonad.Prelude.Imports: (<<^^~) :: (Fractional a, Integral e) => LensLike' ((,) a) s a -> e -> s -> (a, s)
+ KMonad.Prelude.Imports: (<<^~) :: (Num a, Integral e) => LensLike' ((,) a) s a -> e -> s -> (a, s)
+ KMonad.Prelude.Imports: (<<||=) :: MonadState s m => LensLike' ((,) Bool) s Bool -> Bool -> m Bool
+ KMonad.Prelude.Imports: (<<||~) :: LensLike' ((,) Bool) s Bool -> Bool -> s -> (Bool, s)
+ KMonad.Prelude.Imports: (<<~) :: MonadState s m => ALens s s a b -> m b -> m b
+ KMonad.Prelude.Imports: (<=) :: Ord a => a -> a -> Bool
+ KMonad.Prelude.Imports: (<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
+ KMonad.Prelude.Imports: (<>) :: Semigroup a => a -> a -> a
+ KMonad.Prelude.Imports: (<>=) :: (MonadState s m, Semigroup a) => ASetter' s a -> a -> m ()
+ KMonad.Prelude.Imports: (<>~) :: Semigroup a => ASetter s t a a -> a -> s -> t
+ KMonad.Prelude.Imports: (<?=) :: MonadState s m => ASetter s s a (Maybe b) -> b -> m b
+ KMonad.Prelude.Imports: (<?~) :: ASetter s t a (Maybe b) -> b -> s -> (b, t)
+ KMonad.Prelude.Imports: (<^=) :: (MonadState s m, Num a, Integral e) => LensLike' ((,) a) s a -> e -> m a
+ KMonad.Prelude.Imports: (<^^=) :: (MonadState s m, Fractional a, Integral e) => LensLike' ((,) a) s a -> e -> m a
+ KMonad.Prelude.Imports: (<^^~) :: (Fractional a, Integral e) => LensLike ((,) a) s t a a -> e -> s -> (a, t)
+ KMonad.Prelude.Imports: (<^~) :: (Num a, Integral e) => LensLike ((,) a) s t a a -> e -> s -> (a, t)
+ KMonad.Prelude.Imports: (<|) :: Cons s s a a => a -> s -> s
+ KMonad.Prelude.Imports: (<|>) :: Alternative f => f a -> f a -> f a
+ KMonad.Prelude.Imports: (<||=) :: MonadState s m => LensLike' ((,) Bool) s Bool -> Bool -> m Bool
+ KMonad.Prelude.Imports: (<||~) :: LensLike ((,) Bool) s t Bool Bool -> Bool -> s -> (Bool, t)
+ KMonad.Prelude.Imports: (<~) :: MonadState s m => ASetter s s a b -> m b -> m ()
+ KMonad.Prelude.Imports: (=<<) :: Monad m => (a -> m b) -> m a -> m b
+ KMonad.Prelude.Imports: (==) :: Eq a => a -> a -> Bool
+ KMonad.Prelude.Imports: (>$) :: Contravariant f => b -> f b -> f a
+ KMonad.Prelude.Imports: (>) :: Ord a => a -> a -> Bool
+ KMonad.Prelude.Imports: (>=) :: Ord a => a -> a -> Bool
+ KMonad.Prelude.Imports: (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
+ KMonad.Prelude.Imports: (>>) :: Monad m => m a -> m b -> m b
+ KMonad.Prelude.Imports: (>>=) :: Monad m => m a -> (a -> m b) -> m b
+ KMonad.Prelude.Imports: (>>>) :: forall {k} cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c
+ KMonad.Prelude.Imports: (?=) :: MonadState s m => ASetter s s a (Maybe b) -> b -> m ()
+ KMonad.Prelude.Imports: (??) :: Functor f => f (a -> b) -> a -> f b
+ KMonad.Prelude.Imports: (?~) :: ASetter s t a (Maybe b) -> b -> s -> t
+ KMonad.Prelude.Imports: (^#) :: s -> ALens s t a b -> a
+ KMonad.Prelude.Imports: (^) :: (Num a, Integral b) => a -> b -> a
+ KMonad.Prelude.Imports: (^.) :: s -> Getting a s a -> a
+ KMonad.Prelude.Imports: (^..) :: s -> Getting (Endo [a]) s a -> [a]
+ KMonad.Prelude.Imports: (^=) :: (MonadState s m, Num a, Integral e) => ASetter' s a -> e -> m ()
+ KMonad.Prelude.Imports: (^?!) :: HasCallStack => s -> Getting (Endo a) s a -> a
+ KMonad.Prelude.Imports: (^?) :: s -> Getting (First a) s a -> Maybe a
+ KMonad.Prelude.Imports: (^@.) :: s -> IndexedGetting i (i, a) s a -> (i, a)
+ KMonad.Prelude.Imports: (^@..) :: s -> IndexedGetting i (Endo [(i, a)]) s a -> [(i, a)]
+ KMonad.Prelude.Imports: (^@?!) :: HasCallStack => s -> IndexedGetting i (Endo (i, a)) s a -> (i, a)
+ KMonad.Prelude.Imports: (^@?) :: s -> IndexedGetting i (Endo (Maybe (i, a))) s a -> Maybe (i, a)
+ KMonad.Prelude.Imports: (^^) :: (Fractional a, Integral b) => a -> b -> a
+ KMonad.Prelude.Imports: (^^=) :: (MonadState s m, Fractional a, Integral e) => ASetter' s a -> e -> m ()
+ KMonad.Prelude.Imports: (^^~) :: (Fractional a, Integral e) => ASetter s t a a -> e -> s -> t
+ KMonad.Prelude.Imports: (^~) :: (Num a, Integral e) => ASetter s t a a -> e -> s -> t
+ KMonad.Prelude.Imports: (|>) :: Snoc s s a a => s -> a -> s
+ KMonad.Prelude.Imports: (||) :: Bool -> Bool -> Bool
+ KMonad.Prelude.Imports: (||=) :: MonadState s m => ASetter' s Bool -> Bool -> m ()
+ KMonad.Prelude.Imports: (||~) :: ASetter s t Bool Bool -> Bool -> s -> t
+ KMonad.Prelude.Imports: -- | State token type.
+ KMonad.Prelude.Imports: AbsoluteSeek :: SeekMode
+ KMonad.Prelude.Imports: AppendMode :: IOMode
+ KMonad.Prelude.Imports: AsyncCancelled :: AsyncCancelled
+ KMonad.Prelude.Imports: AsyncExceptionWrapper :: e -> AsyncExceptionWrapper
+ KMonad.Prelude.Imports: Bazaar :: (forall (f :: Type -> Type). Applicative f => p a (f b) -> f t) -> Bazaar (p :: Type -> Type -> Type) a b t
+ KMonad.Prelude.Imports: Bazaar1 :: (forall (f :: Type -> Type). Apply f => p a (f b) -> f t) -> Bazaar1 (p :: Type -> Type -> Type) a b t
+ KMonad.Prelude.Imports: BlockBuffering :: Maybe Int -> BufferMode
+ KMonad.Prelude.Imports: Concurrently :: m a -> Concurrently (m :: Type -> Type) a
+ KMonad.Prelude.Imports: Const :: a -> Const a (b :: k)
+ KMonad.Prelude.Imports: ContT :: ((a -> m r) -> m r) -> ContT (r :: k) (m :: k -> Type) a
+ KMonad.Prelude.Imports: Context :: (b -> t) -> a -> Context a b t
+ KMonad.Prelude.Imports: DecodeError :: String -> Maybe Word8 -> UnicodeException
+ KMonad.Prelude.Imports: Down :: a -> Down a
+ KMonad.Prelude.Imports: EQ :: Ordering
+ KMonad.Prelude.Imports: EmptyWithNoAlternative :: ConcException
+ KMonad.Prelude.Imports: EncodeError :: String -> Maybe Char -> UnicodeException
+ KMonad.Prelude.Imports: ExitFailure :: Int -> ExitCode
+ KMonad.Prelude.Imports: ExitSuccess :: ExitCode
+ KMonad.Prelude.Imports: False :: Bool
+ KMonad.Prelude.Imports: Fold :: Fold s a -> ReifiedFold s a
+ KMonad.Prelude.Imports: GT :: Ordering
+ KMonad.Prelude.Imports: Getter :: Getter s a -> ReifiedGetter s a
+ KMonad.Prelude.Imports: Handler :: (e -> m a) -> Handler (m :: Type -> Type) a
+ KMonad.Prelude.Imports: Identity :: a -> Identity a
+ KMonad.Prelude.Imports: Indexed :: (i -> a -> b) -> Indexed i a b
+ KMonad.Prelude.Imports: IndexedFold :: IndexedFold i s a -> ReifiedIndexedFold i s a
+ KMonad.Prelude.Imports: IndexedGetter :: IndexedGetter i s a -> ReifiedIndexedGetter i s a
+ KMonad.Prelude.Imports: IndexedLens :: IndexedLens i s t a b -> ReifiedIndexedLens i s t a b
+ KMonad.Prelude.Imports: IndexedSetter :: IndexedSetter i s t a b -> ReifiedIndexedSetter i s t a b
+ KMonad.Prelude.Imports: IndexedTraversal :: IndexedTraversal i s t a b -> ReifiedIndexedTraversal i s t a b
+ KMonad.Prelude.Imports: Iso :: Iso s t a b -> ReifiedIso s t a b
+ KMonad.Prelude.Imports: Just :: a -> Maybe a
+ KMonad.Prelude.Imports: LT :: Ordering
+ KMonad.Prelude.Imports: Left :: a -> Either a b
+ KMonad.Prelude.Imports: Lens :: Lens s t a b -> ReifiedLens s t a b
+ KMonad.Prelude.Imports: LevelDebug :: LogLevel
+ KMonad.Prelude.Imports: LevelError :: LogLevel
+ KMonad.Prelude.Imports: LevelInfo :: LogLevel
+ KMonad.Prelude.Imports: LevelOther :: !Text -> LogLevel
+ KMonad.Prelude.Imports: LevelWarn :: LogLevel
+ KMonad.Prelude.Imports: LineBuffering :: BufferMode
+ KMonad.Prelude.Imports: MethodName :: Name -> Name -> DefName
+ KMonad.Prelude.Imports: NoBuffering :: BufferMode
+ KMonad.Prelude.Imports: Nothing :: Maybe a
+ KMonad.Prelude.Imports: Prism :: Prism s t a b -> ReifiedPrism s t a b
+ KMonad.Prelude.Imports: Proxy :: Proxy (t :: k)
+ KMonad.Prelude.Imports: RIO :: ReaderT env IO a -> RIO env a
+ KMonad.Prelude.Imports: ReadMode :: IOMode
+ KMonad.Prelude.Imports: ReadWriteMode :: IOMode
+ KMonad.Prelude.Imports: ReaderT :: (r -> m a) -> ReaderT r (m :: Type -> Type) a
+ KMonad.Prelude.Imports: RelativeSeek :: SeekMode
+ KMonad.Prelude.Imports: ReleaseEarly :: ReleaseType
+ KMonad.Prelude.Imports: ReleaseExceptionWith :: SomeException -> ReleaseType
+ KMonad.Prelude.Imports: ReleaseNormal :: ReleaseType
+ KMonad.Prelude.Imports: Right :: b -> Either a b
+ KMonad.Prelude.Imports: SeekFromEnd :: SeekMode
+ KMonad.Prelude.Imports: Setter :: Setter s t a b -> ReifiedSetter s t a b
+ KMonad.Prelude.Imports: SomeAsyncException :: e -> SomeAsyncException
+ KMonad.Prelude.Imports: SomeException :: e -> SomeException
+ KMonad.Prelude.Imports: StringException :: String -> CallStack -> StringException
+ KMonad.Prelude.Imports: SyncExceptionWrapper :: e -> SyncExceptionWrapper
+ KMonad.Prelude.Imports: TopName :: Name -> DefName
+ KMonad.Prelude.Imports: Traversal :: Traversal s t a b -> ReifiedTraversal s t a b
+ KMonad.Prelude.Imports: True :: Bool
+ KMonad.Prelude.Imports: UnliftIO :: (forall a. () => m a -> IO a) -> UnliftIO (m :: Type -> Type)
+ KMonad.Prelude.Imports: Utf8Builder :: Builder -> Utf8Builder
+ KMonad.Prelude.Imports: WriteMode :: IOMode
+ KMonad.Prelude.Imports: [Identical] :: forall {k} {k1} (a :: k) (b :: k1). Identical a b a b
+ KMonad.Prelude.Imports: [Refl] :: forall {k} (a :: k). a :~: a
+ KMonad.Prelude.Imports: [getConst] :: Const a (b :: k) -> a
+ KMonad.Prelude.Imports: [getDown] :: Down a -> a
+ KMonad.Prelude.Imports: [getUtf8Builder] :: Utf8Builder -> Builder
+ KMonad.Prelude.Imports: [runBazaar1] :: Bazaar1 (p :: Type -> Type -> Type) a b t -> forall (f :: Type -> Type). Apply f => p a (f b) -> f t
+ KMonad.Prelude.Imports: [runBazaar] :: Bazaar (p :: Type -> Type -> Type) a b t -> forall (f :: Type -> Type). Applicative f => p a (f b) -> f t
+ KMonad.Prelude.Imports: [runConcurrently] :: Concurrently (m :: Type -> Type) a -> m a
+ KMonad.Prelude.Imports: [runContT] :: ContT (r :: k) (m :: k -> Type) a -> (a -> m r) -> m r
+ KMonad.Prelude.Imports: [runFold] :: ReifiedFold s a -> Fold s a
+ KMonad.Prelude.Imports: [runGetter] :: ReifiedGetter s a -> Getter s a
+ KMonad.Prelude.Imports: [runIdentity] :: Identity a -> a
+ KMonad.Prelude.Imports: [runIndexedFold] :: ReifiedIndexedFold i s a -> IndexedFold i s a
+ KMonad.Prelude.Imports: [runIndexedGetter] :: ReifiedIndexedGetter i s a -> IndexedGetter i s a
+ KMonad.Prelude.Imports: [runIndexedLens] :: ReifiedIndexedLens i s t a b -> IndexedLens i s t a b
+ KMonad.Prelude.Imports: [runIndexedSetter] :: ReifiedIndexedSetter i s t a b -> IndexedSetter i s t a b
+ KMonad.Prelude.Imports: [runIndexedTraversal] :: ReifiedIndexedTraversal i s t a b -> IndexedTraversal i s t a b
+ KMonad.Prelude.Imports: [runIndexed] :: Indexed i a b -> i -> a -> b
+ KMonad.Prelude.Imports: [runIso] :: ReifiedIso s t a b -> Iso s t a b
+ KMonad.Prelude.Imports: [runLens] :: ReifiedLens s t a b -> Lens s t a b
+ KMonad.Prelude.Imports: [runPrism] :: ReifiedPrism s t a b -> Prism s t a b
+ KMonad.Prelude.Imports: [runReaderT] :: ReaderT r (m :: Type -> Type) a -> r -> m a
+ KMonad.Prelude.Imports: [runSetter] :: ReifiedSetter s t a b -> Setter s t a b
+ KMonad.Prelude.Imports: [runTraversal] :: ReifiedTraversal s t a b -> Traversal s t a b
+ KMonad.Prelude.Imports: [unRIO] :: RIO env a -> ReaderT env IO a
+ KMonad.Prelude.Imports: [unliftIO] :: UnliftIO (m :: Type -> Type) -> forall a. () => m a -> IO a
+ KMonad.Prelude.Imports: _1 :: Field1 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _1' :: Field1 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _10 :: Field10 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _10' :: Field10 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _11 :: Field11 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _11' :: Field11 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _12 :: Field12 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _12' :: Field12 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _13 :: Field13 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _13' :: Field13 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _14 :: Field14 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _14' :: Field14 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _15 :: Field15 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _15' :: Field15 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _16 :: Field16 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _16' :: Field16 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _17 :: Field17 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _17' :: Field17 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _18 :: Field18 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _18' :: Field18 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _19 :: Field19 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _19' :: Field19 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _2 :: Field2 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _2' :: Field2 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _3 :: Field3 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _3' :: Field3 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _4 :: Field4 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _4' :: Field4 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _5 :: Field5 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _5' :: Field5 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _6 :: Field6 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _6' :: Field6 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _7 :: Field7 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _7' :: Field7 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _8 :: Field8 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _8' :: Field8 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _9 :: Field9 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _9' :: Field9 s t a b => Lens s t a b
+ KMonad.Prelude.Imports: _Cons :: Cons s t a b => Prism s t (a, s) (b, t)
+ KMonad.Prelude.Imports: _Empty :: AsEmpty a => Prism' a ()
+ KMonad.Prelude.Imports: _GWrapped' :: forall s (d :: Meta) (c :: Meta) (s' :: Meta) a. (Generic s, D1 d (C1 c (S1 s' (Rec0 a))) ~ Rep s, Unwrapped s ~ GUnwrapped (Rep s)) => Iso' s (Unwrapped s)
+ KMonad.Prelude.Imports: _Just :: forall a b p f. (Choice p, Applicative f) => p a (f b) -> p (Maybe a) (f (Maybe b))
+ KMonad.Prelude.Imports: _Left :: forall a c b p f. (Choice p, Applicative f) => p a (f b) -> p (Either a c) (f (Either b c))
+ KMonad.Prelude.Imports: _Nothing :: forall a p f. (Choice p, Applicative f) => p () (f ()) -> p (Maybe a) (f (Maybe a))
+ KMonad.Prelude.Imports: _Right :: forall c a b p f. (Choice p, Applicative f) => p a (f b) -> p (Either c a) (f (Either c b))
+ KMonad.Prelude.Imports: _Show :: (Read a, Show a) => Prism' String a
+ KMonad.Prelude.Imports: _Snoc :: Snoc s t a b => Prism s t (s, a) (t, b)
+ KMonad.Prelude.Imports: _Unwrapped :: Rewrapping s t => Iso (Unwrapped t) (Unwrapped s) t s
+ KMonad.Prelude.Imports: _Unwrapped' :: Wrapped s => Iso' (Unwrapped s) s
+ KMonad.Prelude.Imports: _Unwrapping :: Rewrapping s t => (Unwrapped s -> s) -> Iso (Unwrapped t) (Unwrapped s) t s
+ KMonad.Prelude.Imports: _Unwrapping' :: Wrapped s => (Unwrapped s -> s) -> Iso' (Unwrapped s) s
+ KMonad.Prelude.Imports: _Void :: forall s a p f. (Choice p, Applicative f) => p a (f Void) -> p s (f s)
+ KMonad.Prelude.Imports: _Wrapped :: Rewrapping s t => Iso s t (Unwrapped s) (Unwrapped t)
+ KMonad.Prelude.Imports: _Wrapped' :: Wrapped s => Iso' s (Unwrapped s)
+ KMonad.Prelude.Imports: _Wrapping :: Rewrapping s t => (Unwrapped s -> s) -> Iso s t (Unwrapped s) (Unwrapped t)
+ KMonad.Prelude.Imports: _Wrapping' :: Wrapped s => (Unwrapped s -> s) -> Iso' s (Unwrapped s)
+ KMonad.Prelude.Imports: _head :: Cons s s a a => Traversal' s a
+ KMonad.Prelude.Imports: _init :: Snoc s s a a => Traversal' s s
+ KMonad.Prelude.Imports: _last :: Snoc s s a a => Traversal' s a
+ KMonad.Prelude.Imports: _tail :: Cons s s a a => Traversal' s s
+ KMonad.Prelude.Imports: abbreviatedFields :: LensRules
+ KMonad.Prelude.Imports: abbreviatedNamer :: FieldNamer
+ KMonad.Prelude.Imports: abs :: Num a => a -> a
+ KMonad.Prelude.Imports: absurd :: Void -> a
+ KMonad.Prelude.Imports: acos :: Floating a => a -> a
+ KMonad.Prelude.Imports: acosh :: Floating a => a -> a
+ KMonad.Prelude.Imports: ala :: (Functor f, Rewrapping s t) => (Unwrapped s -> s) -> ((Unwrapped t -> t) -> f s) -> f (Unwrapped s)
+ KMonad.Prelude.Imports: alaf :: (Functor f, Functor g, Rewrapping s t) => (Unwrapped s -> s) -> (f t -> g s) -> f (Unwrapped t) -> g (Unwrapped s)
+ KMonad.Prelude.Imports: all :: Foldable t => (a -> Bool) -> t a -> Bool
+ KMonad.Prelude.Imports: allOf :: Getting All s a -> (a -> Bool) -> s -> Bool
+ KMonad.Prelude.Imports: allocateAcquire :: MonadResource m => Acquire a -> m (ReleaseKey, a)
+ KMonad.Prelude.Imports: alongside :: LensLike (AlongsideLeft f b') s t a b -> LensLike (AlongsideRight f t) s' t' a' b' -> LensLike f (s, s') (t, t') (a, a') (b, b')
+ KMonad.Prelude.Imports: altOf :: Applicative f => Getting (Alt f a) s a -> s -> f a
+ KMonad.Prelude.Imports: and :: Foldable t => t Bool -> Bool
+ KMonad.Prelude.Imports: andOf :: Getting All s Bool -> s -> Bool
+ KMonad.Prelude.Imports: anon :: a -> (a -> Bool) -> Iso' (Maybe a) a
+ KMonad.Prelude.Imports: any :: Foldable t => (a -> Bool) -> t a -> Bool
+ KMonad.Prelude.Imports: anyOf :: Getting Any s a -> (a -> Bool) -> s -> Bool
+ KMonad.Prelude.Imports: ap :: Monad m => m (a -> b) -> m a -> m b
+ KMonad.Prelude.Imports: argument :: forall (p :: Type -> Type -> Type) b r a. Profunctor p => Setter (p b r) (p a r) a b
+ KMonad.Prelude.Imports: asBDeque :: BDeque s a -> BDeque s a
+ KMonad.Prelude.Imports: asIO :: IO a -> IO a
+ KMonad.Prelude.Imports: asIndex :: (Indexable i p, Contravariant f, Functor f) => p i (f i) -> Indexed i s (f s)
+ KMonad.Prelude.Imports: asSDeque :: SDeque s a -> SDeque s a
+ KMonad.Prelude.Imports: asTypeOf :: a -> a -> a
+ KMonad.Prelude.Imports: asUDeque :: UDeque s a -> UDeque s a
+ KMonad.Prelude.Imports: aside :: APrism s t a b -> Prism (e, s) (e, t) (e, a) (e, b)
+ KMonad.Prelude.Imports: asin :: Floating a => a -> a
+ KMonad.Prelude.Imports: asinh :: Floating a => a -> a
+ KMonad.Prelude.Imports: ask :: MonadReader r m => m r
+ KMonad.Prelude.Imports: askRunInIO :: MonadUnliftIO m => m (m a -> IO a)
+ KMonad.Prelude.Imports: askUnliftIO :: MonadUnliftIO m => m (UnliftIO m)
+ KMonad.Prelude.Imports: asks :: MonadReader r m => (r -> a) -> m a
+ KMonad.Prelude.Imports: assert :: Bool -> a -> a
+ KMonad.Prelude.Imports: assign :: MonadState s m => ASetter s s a b -> b -> m ()
+ KMonad.Prelude.Imports: assignA :: Arrow p => ASetter s t a b -> p s b -> p s t
+ KMonad.Prelude.Imports: asum :: (Foldable t, Alternative f) => t (f a) -> f a
+ KMonad.Prelude.Imports: asumOf :: Alternative f => Getting (Endo (f a)) s (f a) -> s -> f a
+ KMonad.Prelude.Imports: async :: MonadUnliftIO m => m a -> m (Async a)
+ KMonad.Prelude.Imports: asyncBound :: MonadUnliftIO m => m a -> m (Async a)
+ KMonad.Prelude.Imports: asyncExceptionFromException :: Exception e => SomeException -> Maybe e
+ KMonad.Prelude.Imports: asyncExceptionToException :: Exception e => e -> SomeException
+ KMonad.Prelude.Imports: asyncOn :: MonadUnliftIO m => Int -> m a -> m (Async a)
+ KMonad.Prelude.Imports: asyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall b. () => m b -> m b) -> m a) -> m (Async a)
+ KMonad.Prelude.Imports: asyncWithUnmask :: MonadUnliftIO m => ((forall b. () => m b -> m b) -> m a) -> m (Async a)
+ KMonad.Prelude.Imports: at :: At m => Index m -> Lens' m (Maybe (IxValue m))
+ KMonad.Prelude.Imports: atan :: Floating a => a -> a
+ KMonad.Prelude.Imports: atan2 :: RealFloat a => a -> a -> a
+ KMonad.Prelude.Imports: atanh :: Floating a => a -> a
+ KMonad.Prelude.Imports: atomicModifyIORef :: MonadIO m => IORef a -> (a -> (a, b)) -> m b
+ KMonad.Prelude.Imports: atomicModifyIORef' :: MonadIO m => IORef a -> (a -> (a, b)) -> m b
+ KMonad.Prelude.Imports: atomicWriteIORef :: MonadIO m => IORef a -> a -> m ()
+ KMonad.Prelude.Imports: atomically :: MonadIO m => STM a -> m a
+ KMonad.Prelude.Imports: au :: Functor f => AnIso s t a b -> ((b -> t) -> f s) -> f a
+ KMonad.Prelude.Imports: auf :: (Functor f, Functor g) => AnIso s t a b -> (f t -> g s) -> f b -> g a
+ KMonad.Prelude.Imports: backwards :: (Profunctor p, Profunctor q) => Optical p q (Backwards f) s t a b -> Optical p q f s t a b
+ KMonad.Prelude.Imports: below :: forall (f :: Type -> Type) s a. Traversable f => APrism' s a -> Prism' (f s) (f a)
+ KMonad.Prelude.Imports: beside :: (Representable q, Applicative (Rep q), Applicative f, Bitraversable r) => Optical p q f s t a b -> Optical p q f s' t' a b -> Optical p q f (r s s') (r t t') a b
+ KMonad.Prelude.Imports: biList :: Bifoldable t => t a a -> [a]
+ KMonad.Prelude.Imports: biall :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool
+ KMonad.Prelude.Imports: biand :: Bifoldable t => t Bool Bool -> Bool
+ KMonad.Prelude.Imports: biany :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool
+ KMonad.Prelude.Imports: biasum :: (Bifoldable t, Alternative f) => t (f a) (f a) -> f a
+ KMonad.Prelude.Imports: biconcat :: Bifoldable t => t [a] [a] -> [a]
+ KMonad.Prelude.Imports: biconcatMap :: Bifoldable t => (a -> [c]) -> (b -> [c]) -> t a b -> [c]
+ KMonad.Prelude.Imports: bielem :: (Bifoldable t, Eq a) => a -> t a a -> Bool
+ KMonad.Prelude.Imports: bifind :: Bifoldable t => (a -> Bool) -> t a a -> Maybe a
+ KMonad.Prelude.Imports: bifold :: (Bifoldable p, Monoid m) => p m m -> m
+ KMonad.Prelude.Imports: bifoldMap :: (Bifoldable p, Monoid m) => (a -> m) -> (b -> m) -> p a b -> m
+ KMonad.Prelude.Imports: bifoldl :: Bifoldable p => (c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c
+ KMonad.Prelude.Imports: bifoldl' :: Bifoldable t => (a -> b -> a) -> (a -> c -> a) -> a -> t b c -> a
+ KMonad.Prelude.Imports: bifoldl1 :: Bifoldable t => (a -> a -> a) -> t a a -> a
+ KMonad.Prelude.Imports: bifoldlM :: (Bifoldable t, Monad m) => (a -> b -> m a) -> (a -> c -> m a) -> a -> t b c -> m a
+ KMonad.Prelude.Imports: bifoldr :: Bifoldable p => (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
+ KMonad.Prelude.Imports: bifoldr' :: Bifoldable t => (a -> c -> c) -> (b -> c -> c) -> c -> t a b -> c
+ KMonad.Prelude.Imports: bifoldr1 :: Bifoldable t => (a -> a -> a) -> t a a -> a
+ KMonad.Prelude.Imports: bifoldrM :: (Bifoldable t, Monad m) => (a -> c -> m c) -> (b -> c -> m c) -> c -> t a b -> m c
+ KMonad.Prelude.Imports: bifor :: (Bitraversable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f (t c d)
+ KMonad.Prelude.Imports: bifor_ :: (Bifoldable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f ()
+ KMonad.Prelude.Imports: bilength :: Bifoldable t => t a b -> Int
+ KMonad.Prelude.Imports: bimap :: Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d
+ KMonad.Prelude.Imports: bimapAccumL :: Bitraversable t => (a -> b -> (a, c)) -> (a -> d -> (a, e)) -> a -> t b d -> (a, t c e)
+ KMonad.Prelude.Imports: bimapAccumR :: Bitraversable t => (a -> b -> (a, c)) -> (a -> d -> (a, e)) -> a -> t b d -> (a, t c e)
+ KMonad.Prelude.Imports: bimapping :: forall (f :: Type -> Type -> Type) (g :: Type -> Type -> Type) s t a b s' t' a' b'. (Bifunctor f, Bifunctor g) => AnIso s t a b -> AnIso s' t' a' b' -> Iso (f s s') (g t t') (f a a') (g b b')
+ KMonad.Prelude.Imports: bimaximum :: (Bifoldable t, Ord a) => t a a -> a
+ KMonad.Prelude.Imports: bimaximumBy :: Bifoldable t => (a -> a -> Ordering) -> t a a -> a
+ KMonad.Prelude.Imports: biminimum :: (Bifoldable t, Ord a) => t a a -> a
+ KMonad.Prelude.Imports: biminimumBy :: Bifoldable t => (a -> a -> Ordering) -> t a a -> a
+ KMonad.Prelude.Imports: binotElem :: (Bifoldable t, Eq a) => a -> t a a -> Bool
+ KMonad.Prelude.Imports: binull :: Bifoldable t => t a b -> Bool
+ KMonad.Prelude.Imports: bior :: Bifoldable t => t Bool Bool -> Bool
+ KMonad.Prelude.Imports: biproduct :: (Bifoldable t, Num a) => t a a -> a
+ KMonad.Prelude.Imports: bisequence :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b)
+ KMonad.Prelude.Imports: bisequence_ :: (Bifoldable t, Applicative f) => t (f a) (f b) -> f ()
+ KMonad.Prelude.Imports: bisum :: (Bifoldable t, Num a) => t a a -> a
+ KMonad.Prelude.Imports: bitraverse :: (Bitraversable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
+ KMonad.Prelude.Imports: bitraverse_ :: (Bifoldable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f ()
+ KMonad.Prelude.Imports: bool :: a -> a -> Bool -> a
+ KMonad.Prelude.Imports: both :: forall (r :: Type -> Type -> Type) a b. Bitraversable r => Traversal (r a a) (r b b) a b
+ KMonad.Prelude.Imports: both1 :: forall (r :: Type -> Type -> Type) a b. Bitraversable1 r => Traversal1 (r a a) (r b b) a b
+ KMonad.Prelude.Imports: bracket :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c
+ KMonad.Prelude.Imports: bracketOnError :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c
+ KMonad.Prelude.Imports: bracketOnError_ :: MonadUnliftIO m => m a -> m b -> m c -> m c
+ KMonad.Prelude.Imports: bracket_ :: MonadUnliftIO m => m a -> m b -> m c -> m c
+ KMonad.Prelude.Imports: break :: (a -> Bool) -> [a] -> ([a], [a])
+ KMonad.Prelude.Imports: byteSwap16 :: Word16 -> Word16
+ KMonad.Prelude.Imports: byteSwap32 :: Word32 -> Word32
+ KMonad.Prelude.Imports: byteSwap64 :: Word64 -> Word64
+ KMonad.Prelude.Imports: callCC :: MonadCont m => ((a -> m b) -> m a) -> m a
+ KMonad.Prelude.Imports: camelCaseFields :: LensRules
+ KMonad.Prelude.Imports: camelCaseNamer :: FieldNamer
+ KMonad.Prelude.Imports: cancel :: MonadIO m => Async a -> m ()
+ KMonad.Prelude.Imports: cancelWith :: (Exception e, MonadIO m) => Async a -> e -> m ()
+ KMonad.Prelude.Imports: catMaybes :: [Maybe a] -> [a]
+ KMonad.Prelude.Imports: catch :: (MonadUnliftIO m, Exception e) => m a -> (e -> m a) -> m a
+ KMonad.Prelude.Imports: catchAny :: MonadUnliftIO m => m a -> (SomeException -> m a) -> m a
+ KMonad.Prelude.Imports: catchAnyDeep :: (NFData a, MonadUnliftIO m) => m a -> (SomeException -> m a) -> m a
+ KMonad.Prelude.Imports: catchDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> (e -> m a) -> m a
+ KMonad.Prelude.Imports: catchIO :: MonadUnliftIO m => m a -> (IOException -> m a) -> m a
+ KMonad.Prelude.Imports: catchJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m a
+ KMonad.Prelude.Imports: catchSyncOrAsync :: (MonadUnliftIO m, Exception e) => m a -> (e -> m a) -> m a
+ KMonad.Prelude.Imports: catches :: MonadUnliftIO m => m a -> [Handler m a] -> m a
+ KMonad.Prelude.Imports: catchesDeep :: (MonadUnliftIO m, NFData a) => m a -> [Handler m a] -> m a
+ KMonad.Prelude.Imports: ceiling :: (RealFrac a, Integral b) => a -> b
+ KMonad.Prelude.Imports: censoring :: MonadWriter w m => Setter w w u v -> (u -> v) -> m a -> m a
+ KMonad.Prelude.Imports: checkSTM :: Bool -> STM ()
+ KMonad.Prelude.Imports: children :: Plated a => a -> [a]
+ KMonad.Prelude.Imports: choosing :: Functor f => LensLike f s t a b -> LensLike f s' t' a b -> LensLike f (Either s s') (Either t t') a b
+ KMonad.Prelude.Imports: chosen :: forall a b p f. (Conjoined p, Functor f) => p a (f b) -> p (Either a a) (f (Either b b))
+ KMonad.Prelude.Imports: class Applicative f => Alternative (f :: Type -> Type)
+ KMonad.Prelude.Imports: class Functor f => Applicative (f :: Type -> Type)
+ KMonad.Prelude.Imports: class Category a => Arrow (a :: Type -> Type -> Type)
+ KMonad.Prelude.Imports: class () => AsEmpty a
+ KMonad.Prelude.Imports: class Ixed m => At m
+ KMonad.Prelude.Imports: class () => Bifoldable (p :: Type -> Type -> Type)
+ KMonad.Prelude.Imports: class () => Bifunctor (p :: Type -> Type -> Type)
+ KMonad.Prelude.Imports: class (Bifunctor t, Bifoldable t) => Bitraversable (t :: Type -> Type -> Type)
+ KMonad.Prelude.Imports: class () => Bounded a
+ KMonad.Prelude.Imports: class () => Category (cat :: k -> k -> Type)
+ KMonad.Prelude.Imports: class Profunctor p => Choice (p :: Type -> Type -> Type)
+ KMonad.Prelude.Imports: class (Choice p, Corepresentable p, Comonad Corep p, Traversable Corep p, Strong p, Representable p, Monad Rep p, MonadFix Rep p, Distributive Rep p, Costrong p, ArrowLoop p, ArrowApply p, ArrowChoice p, Closed p) => Conjoined (p :: Type -> Type -> Type)
+ KMonad.Prelude.Imports: class () => Cons s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Contains m
+ KMonad.Prelude.Imports: class () => Contravariant (f :: Type -> Type)
+ KMonad.Prelude.Imports: class Typeable a => Data a
+ KMonad.Prelude.Imports: class () => Display a
+ KMonad.Prelude.Imports: class () => Each s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Enum a
+ KMonad.Prelude.Imports: class () => Eq a
+ KMonad.Prelude.Imports: class (Typeable e, Show e) => Exception e
+ KMonad.Prelude.Imports: class () => Field1 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field10 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field11 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field12 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field13 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field14 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field15 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field16 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field17 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field18 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field19 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field2 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field3 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field4 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field5 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field6 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field7 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field8 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Field9 s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class Fractional a => Floating a
+ KMonad.Prelude.Imports: class () => Foldable (t :: Type -> Type)
+ KMonad.Prelude.Imports: class Foldable f => FoldableWithIndex i (f :: Type -> Type) | f -> i
+ KMonad.Prelude.Imports: class Num a => Fractional a
+ KMonad.Prelude.Imports: class () => Functor (f :: Type -> Type)
+ KMonad.Prelude.Imports: class Functor f => FunctorWithIndex i (f :: Type -> Type) | f -> i
+ KMonad.Prelude.Imports: class () => GPlated a (g :: k -> Type)
+ KMonad.Prelude.Imports: class () => GPlated1 (f :: k -> Type) (g :: k -> Type)
+ KMonad.Prelude.Imports: class () => Generic a
+ KMonad.Prelude.Imports: class () => HasGLogFunc env where {
+ KMonad.Prelude.Imports: class () => HasLogFunc env
+ KMonad.Prelude.Imports: class () => HasLogLevel msg
+ KMonad.Prelude.Imports: class () => HasLogSource msg
+ KMonad.Prelude.Imports: class () => HasStateRef s env | env -> s
+ KMonad.Prelude.Imports: class () => HasWriteRef w env | env -> w
+ KMonad.Prelude.Imports: class Eq a => Hashable a
+ KMonad.Prelude.Imports: class Conjoined p => Indexable i (p :: Type -> Type -> Type)
+ KMonad.Prelude.Imports: class (Real a, Enum a) => Integral a
+ KMonad.Prelude.Imports: class () => IsString a
+ KMonad.Prelude.Imports: class () => Ixed m
+ KMonad.Prelude.Imports: class (Magnified m ~ Magnified n, MonadReader b m, MonadReader a n) => Magnify (m :: Type -> Type) (n :: Type -> Type) b a | m -> b, n -> a, m a -> n, n b -> m
+ KMonad.Prelude.Imports: class Applicative m => Monad (m :: Type -> Type)
+ KMonad.Prelude.Imports: class Monad m => MonadCont (m :: Type -> Type)
+ KMonad.Prelude.Imports: class Monad m => MonadFail (m :: Type -> Type)
+ KMonad.Prelude.Imports: class Monad m => MonadIO (m :: Type -> Type)
+ KMonad.Prelude.Imports: class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type)
+ KMonad.Prelude.Imports: class Monad m => MonadReader r (m :: Type -> Type) | m -> r
+ KMonad.Prelude.Imports: class Monad m => MonadThrow (m :: Type -> Type)
+ KMonad.Prelude.Imports: class () => MonadTrans (t :: Type -> Type -> Type -> Type)
+ KMonad.Prelude.Imports: class MonadIO m => MonadUnliftIO (m :: Type -> Type)
+ KMonad.Prelude.Imports: class Semigroup a => Monoid a
+ KMonad.Prelude.Imports: class () => NFData a
+ KMonad.Prelude.Imports: class () => Num a
+ KMonad.Prelude.Imports: class Eq a => Ord a
+ KMonad.Prelude.Imports: class () => Plated a
+ KMonad.Prelude.Imports: class () => Prefixed t
+ KMonad.Prelude.Imports: class Monad m => PrimMonad (m :: Type -> Type) where {
+ KMonad.Prelude.Imports: class () => Profunctor (p :: Type -> Type -> Type)
+ KMonad.Prelude.Imports: class () => Read a
+ KMonad.Prelude.Imports: class (Num a, Ord a) => Real a
+ KMonad.Prelude.Imports: class (RealFrac a, Floating a) => RealFloat a
+ KMonad.Prelude.Imports: class (Real a, Fractional a) => RealFrac a
+ KMonad.Prelude.Imports: class () => Reversing t
+ KMonad.Prelude.Imports: class (Profunctor p, Bifunctor p) => Reviewable (p :: Type -> Type -> Type)
+ KMonad.Prelude.Imports: class Wrapped s => Rewrapped s t
+ KMonad.Prelude.Imports: class (Rewrapped s t, Rewrapped t s) => Rewrapping s t
+ KMonad.Prelude.Imports: class () => Semigroup a
+ KMonad.Prelude.Imports: class (Applicative f, Distributive f, Traversable f) => Settable (f :: Type -> Type)
+ KMonad.Prelude.Imports: class () => Show a
+ KMonad.Prelude.Imports: class () => Snoc s t a b | s -> a, t -> b, s b -> t, t a -> s
+ KMonad.Prelude.Imports: class () => Storable a
+ KMonad.Prelude.Imports: class () => Suffixed t
+ KMonad.Prelude.Imports: class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
+ KMonad.Prelude.Imports: class (Foldable1 t, Traversable t) => Traversable1 (t :: Type -> Type)
+ KMonad.Prelude.Imports: class (FunctorWithIndex i t, FoldableWithIndex i t, Traversable t) => TraversableWithIndex i (t :: Type -> Type) | t -> i
+ KMonad.Prelude.Imports: class Ord k => TraverseMax k (m :: Type -> Type) | m -> k
+ KMonad.Prelude.Imports: class Ord k => TraverseMin k (m :: Type -> Type) | m -> k
+ KMonad.Prelude.Imports: class () => Typeable (a :: k)
+ KMonad.Prelude.Imports: class (Vector Vector a, MVector MVector a) => Unbox a
+ KMonad.Prelude.Imports: class () => Wrapped s where {
+ KMonad.Prelude.Imports: class (MonadState s m, MonadState t n) => Zoom (m :: Type -> Type) (n :: Type -> Type) s t | m -> s, n -> t, m t -> n, n s -> m
+ KMonad.Prelude.Imports: classUnderscoreNoPrefixFields :: LensRules
+ KMonad.Prelude.Imports: classUnderscoreNoPrefixNamer :: FieldNamer
+ KMonad.Prelude.Imports: classyRules :: LensRules
+ KMonad.Prelude.Imports: classyRules_ :: LensRules
+ KMonad.Prelude.Imports: cloneEquality :: forall {k1} {k2} (s :: k1) (t :: k2) (a :: k1) (b :: k2). AnEquality s t a b -> Equality s t a b
+ KMonad.Prelude.Imports: cloneIndexPreservingLens :: ALens s t a b -> IndexPreservingLens s t a b
+ KMonad.Prelude.Imports: cloneIndexPreservingSetter :: ASetter s t a b -> IndexPreservingSetter s t a b
+ KMonad.Prelude.Imports: cloneIndexPreservingTraversal :: ATraversal s t a b -> IndexPreservingTraversal s t a b
+ KMonad.Prelude.Imports: cloneIndexPreservingTraversal1 :: ATraversal1 s t a b -> IndexPreservingTraversal1 s t a b
+ KMonad.Prelude.Imports: cloneIndexedLens :: AnIndexedLens i s t a b -> IndexedLens i s t a b
+ KMonad.Prelude.Imports: cloneIndexedSetter :: AnIndexedSetter i s t a b -> IndexedSetter i s t a b
+ KMonad.Prelude.Imports: cloneIndexedTraversal :: AnIndexedTraversal i s t a b -> IndexedTraversal i s t a b
+ KMonad.Prelude.Imports: cloneIndexedTraversal1 :: AnIndexedTraversal1 i s t a b -> IndexedTraversal1 i s t a b
+ KMonad.Prelude.Imports: cloneIso :: AnIso s t a b -> Iso s t a b
+ KMonad.Prelude.Imports: cloneLens :: ALens s t a b -> Lens s t a b
+ KMonad.Prelude.Imports: clonePrism :: APrism s t a b -> Prism s t a b
+ KMonad.Prelude.Imports: cloneSetter :: ASetter s t a b -> Setter s t a b
+ KMonad.Prelude.Imports: cloneTChan :: TChan a -> STM (TChan a)
+ KMonad.Prelude.Imports: cloneTraversal :: ATraversal s t a b -> Traversal s t a b
+ KMonad.Prelude.Imports: cloneTraversal1 :: ATraversal1 s t a b -> Traversal1 s t a b
+ KMonad.Prelude.Imports: coerced :: forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
+ KMonad.Prelude.Imports: compare :: Ord a => a -> a -> Ordering
+ KMonad.Prelude.Imports: comparing :: Ord a => (b -> a) -> b -> b -> Ordering
+ KMonad.Prelude.Imports: composOpFold :: Plated a => b -> (b -> b -> b) -> (a -> b) -> a -> b
+ KMonad.Prelude.Imports: conc :: m a -> Conc m a
+ KMonad.Prelude.Imports: concat :: Foldable t => t [a] -> [a]
+ KMonad.Prelude.Imports: concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
+ KMonad.Prelude.Imports: concatMapOf :: Getting [r] s a -> (a -> [r]) -> s -> [r]
+ KMonad.Prelude.Imports: concatOf :: Getting [r] s [r] -> s -> [r]
+ KMonad.Prelude.Imports: concurrently :: MonadUnliftIO m => m a -> m b -> m (a, b)
+ KMonad.Prelude.Imports: concurrently_ :: MonadUnliftIO m => m a -> m b -> m ()
+ KMonad.Prelude.Imports: confusing :: Applicative f => LensLike (Curried (Yoneda f) (Yoneda f)) s t a b -> LensLike f s t a b
+ KMonad.Prelude.Imports: conjoined :: Conjoined p => (p ~ (->) => q (a -> b) r) -> q (p a b) r -> q (p a b) r
+ KMonad.Prelude.Imports: cons :: Cons s s a a => a -> s -> s
+ KMonad.Prelude.Imports: const :: a -> b -> a
+ KMonad.Prelude.Imports: cont :: ((a -> r) -> r) -> Cont r a
+ KMonad.Prelude.Imports: contains :: Contains m => Index m -> Lens' m Bool
+ KMonad.Prelude.Imports: contexts :: Plated a => a -> [Context a a a]
+ KMonad.Prelude.Imports: contextsOf :: ATraversal' a a -> a -> [Context a a a]
+ KMonad.Prelude.Imports: contextsOn :: Plated a => ATraversal s t a a -> s -> [Context a a t]
+ KMonad.Prelude.Imports: contextsOnOf :: ATraversal s t a a -> ATraversal' a a -> s -> [Context a a t]
+ KMonad.Prelude.Imports: contramap :: Contravariant f => (a' -> a) -> f a -> f a'
+ KMonad.Prelude.Imports: contramapGLogFunc :: (a -> b) -> GLogFunc b -> GLogFunc a
+ KMonad.Prelude.Imports: contramapMaybeGLogFunc :: (a -> Maybe b) -> GLogFunc b -> GLogFunc a
+ KMonad.Prelude.Imports: contramapped :: forall (f :: Type -> Type) b a. Contravariant f => Setter (f b) (f a) a b
+ KMonad.Prelude.Imports: contramapping :: forall (f :: Type -> Type) s t a b. Contravariant f => AnIso s t a b -> Iso (f a) (f b) (f s) (f t)
+ KMonad.Prelude.Imports: cos :: Floating a => a -> a
+ KMonad.Prelude.Imports: cosh :: Floating a => a -> a
+ KMonad.Prelude.Imports: cosmos :: Plated a => Fold a a
+ KMonad.Prelude.Imports: cosmosOf :: (Applicative f, Contravariant f) => LensLike' f a a -> LensLike' f a a
+ KMonad.Prelude.Imports: cosmosOn :: (Applicative f, Contravariant f, Plated a) => LensLike' f s a -> LensLike' f s a
+ KMonad.Prelude.Imports: cosmosOnOf :: (Applicative f, Contravariant f) => LensLike' f s a -> LensLike' f a a -> LensLike' f s a
+ KMonad.Prelude.Imports: createClass :: Lens' LensRules Bool
+ KMonad.Prelude.Imports: curried :: forall a b c d e f1 p f2. (Profunctor p, Functor f2) => p (a -> b -> c) (f2 (d -> e -> f1)) -> p ((a, b) -> c) (f2 ((d, e) -> f1))
+ KMonad.Prelude.Imports: curry :: ((a, b) -> c) -> a -> b -> c
+ KMonad.Prelude.Imports: cycled :: Apply f => LensLike f s t a b -> LensLike f s t a b
+ KMonad.Prelude.Imports: data () => (a :: k) :~: (b :: k)
+ KMonad.Prelude.Imports: data () => Acquire a
+ KMonad.Prelude.Imports: data () => Async a
+ KMonad.Prelude.Imports: data () => AsyncCancelled
+ KMonad.Prelude.Imports: data () => AsyncExceptionWrapper
+ KMonad.Prelude.Imports: data () => Bool
+ KMonad.Prelude.Imports: data () => BufferMode
+ KMonad.Prelude.Imports: data () => Builder
+ KMonad.Prelude.Imports: data () => ByteString
+ KMonad.Prelude.Imports: data () => CallStack
+ KMonad.Prelude.Imports: data () => Chan a
+ KMonad.Prelude.Imports: data () => Char
+ KMonad.Prelude.Imports: data () => Conc (m :: Type -> Type) a
+ KMonad.Prelude.Imports: data () => ConcException
+ KMonad.Prelude.Imports: data () => Context a b t
+ KMonad.Prelude.Imports: data () => DefName
+ KMonad.Prelude.Imports: data () => Deque (v :: Type -> Type -> Type) s a
+ KMonad.Prelude.Imports: data () => Double
+ KMonad.Prelude.Imports: data () => Either a b
+ KMonad.Prelude.Imports: data () => ExitCode
+ KMonad.Prelude.Imports: data () => Float
+ KMonad.Prelude.Imports: data () => GLogFunc msg
+ KMonad.Prelude.Imports: data () => Handle
+ KMonad.Prelude.Imports: data () => Handler (m :: Type -> Type) a
+ KMonad.Prelude.Imports: data () => HashMap k v
+ KMonad.Prelude.Imports: data () => HashSet a
+ KMonad.Prelude.Imports: data () => IO a
+ KMonad.Prelude.Imports: data () => IOException
+ KMonad.Prelude.Imports: data () => IOMode
+ KMonad.Prelude.Imports: data () => IORef a
+ KMonad.Prelude.Imports: data () => Identical (a :: k) (b :: k1) (s :: k) (t :: k1)
+ KMonad.Prelude.Imports: data () => Int
+ KMonad.Prelude.Imports: data () => Int16
+ KMonad.Prelude.Imports: data () => Int32
+ KMonad.Prelude.Imports: data () => Int64
+ KMonad.Prelude.Imports: data () => Int8
+ KMonad.Prelude.Imports: data () => IntMap a
+ KMonad.Prelude.Imports: data () => IntSet
+ KMonad.Prelude.Imports: data () => Integer
+ KMonad.Prelude.Imports: data () => Leftmost a
+ KMonad.Prelude.Imports: data () => LensRules
+ KMonad.Prelude.Imports: data () => Level i a
+ KMonad.Prelude.Imports: data () => LogFunc
+ KMonad.Prelude.Imports: data () => LogLevel
+ KMonad.Prelude.Imports: data () => LogOptions
+ KMonad.Prelude.Imports: data () => MVar a
+ KMonad.Prelude.Imports: data () => Magma i t b a
+ KMonad.Prelude.Imports: data () => Map k a
+ KMonad.Prelude.Imports: data () => Maybe a
+ KMonad.Prelude.Imports: data () => Memoized a
+ KMonad.Prelude.Imports: data () => Natural
+ KMonad.Prelude.Imports: data () => NonEmpty a
+ KMonad.Prelude.Imports: data () => Ordering
+ KMonad.Prelude.Imports: data () => Proxy (t :: k)
+ KMonad.Prelude.Imports: data () => QSem
+ KMonad.Prelude.Imports: data () => QSemN
+ KMonad.Prelude.Imports: data () => ReleaseType
+ KMonad.Prelude.Imports: data () => Rightmost a
+ KMonad.Prelude.Imports: data () => ST s a
+ KMonad.Prelude.Imports: data () => STM a
+ KMonad.Prelude.Imports: data () => SeekMode
+ KMonad.Prelude.Imports: data () => Seq a
+ KMonad.Prelude.Imports: data () => Sequenced a (m :: Type -> Type)
+ KMonad.Prelude.Imports: data () => Set a
+ KMonad.Prelude.Imports: data () => ShortByteString
+ KMonad.Prelude.Imports: data () => SimpleApp
+ KMonad.Prelude.Imports: data () => SomeAsyncException
+ KMonad.Prelude.Imports: data () => SomeException
+ KMonad.Prelude.Imports: data () => SomeRef a
+ KMonad.Prelude.Imports: data () => StringException
+ KMonad.Prelude.Imports: data () => SyncExceptionWrapper
+ KMonad.Prelude.Imports: data () => TBQueue a
+ KMonad.Prelude.Imports: data () => TChan a
+ KMonad.Prelude.Imports: data () => TMVar a
+ KMonad.Prelude.Imports: data () => TQueue a
+ KMonad.Prelude.Imports: data () => TVar a
+ KMonad.Prelude.Imports: data () => Text
+ KMonad.Prelude.Imports: data () => ThreadId
+ KMonad.Prelude.Imports: data () => Traversed a (f :: Type -> Type)
+ KMonad.Prelude.Imports: data () => URef s a
+ KMonad.Prelude.Imports: data () => UnicodeException
+ KMonad.Prelude.Imports: data () => Vector a
+ KMonad.Prelude.Imports: data () => Void
+ KMonad.Prelude.Imports: data () => Word
+ KMonad.Prelude.Imports: data () => Word16
+ KMonad.Prelude.Imports: data () => Word32
+ KMonad.Prelude.Imports: data () => Word64
+ KMonad.Prelude.Imports: data () => Word8
+ KMonad.Prelude.Imports: dataCast1 :: (Data a, Typeable t) => (forall d. Data d => c (t d)) -> Maybe (c a)
+ KMonad.Prelude.Imports: dataCast2 :: (Data a, Typeable t) => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)
+ KMonad.Prelude.Imports: dataTypeOf :: Data a => a -> DataType
+ KMonad.Prelude.Imports: declareClassy :: DecsQ -> DecsQ
+ KMonad.Prelude.Imports: declareClassyFor :: [(String, (String, String))] -> [(String, String)] -> DecsQ -> DecsQ
+ KMonad.Prelude.Imports: declareFields :: DecsQ -> DecsQ
+ KMonad.Prelude.Imports: declareLenses :: DecsQ -> DecsQ
+ KMonad.Prelude.Imports: declareLensesFor :: [(String, String)] -> DecsQ -> DecsQ
+ KMonad.Prelude.Imports: declareLensesWith :: LensRules -> DecsQ -> DecsQ
+ KMonad.Prelude.Imports: declarePrisms :: DecsQ -> DecsQ
+ KMonad.Prelude.Imports: declareWrapped :: DecsQ -> DecsQ
+ KMonad.Prelude.Imports: decodeFloat :: RealFloat a => a -> (Integer, Int)
+ KMonad.Prelude.Imports: decodeUtf8' :: ByteString -> Either UnicodeException Text
+ KMonad.Prelude.Imports: decodeUtf8Lenient :: ByteString -> Text
+ KMonad.Prelude.Imports: decodeUtf8With :: OnDecodeError -> ByteString -> Text
+ KMonad.Prelude.Imports: deep :: (Conjoined p, Applicative f, Plated s) => Traversing p f s s a b -> Over p f s s a b
+ KMonad.Prelude.Imports: deepOf :: (Conjoined p, Applicative f) => LensLike f s t s t -> Traversing p f s t a b -> Over p f s t a b
+ KMonad.Prelude.Imports: deepseq :: NFData a => a -> b -> b
+ KMonad.Prelude.Imports: defaultFieldRules :: LensRules
+ KMonad.Prelude.Imports: dequeToList :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m [a]
+ KMonad.Prelude.Imports: dequeToVector :: forall v' a (v :: Type -> Type -> Type) m. (Vector v' a, MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (v' a)
+ KMonad.Prelude.Imports: devoid :: forall {k} p f (a :: k) b. Over p f Void Void a b
+ KMonad.Prelude.Imports: dimap :: Profunctor p => (a -> b) -> (c -> d) -> p b c -> p a d
+ KMonad.Prelude.Imports: dimapping :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) s t a b s' t' a' b'. (Profunctor p, Profunctor q) => AnIso s t a b -> AnIso s' t' a' b' -> Iso (p a s') (q b t') (p s a') (q t b')
+ KMonad.Prelude.Imports: display :: Display a => a -> Utf8Builder
+ KMonad.Prelude.Imports: displayBytesUtf8 :: ByteString -> Utf8Builder
+ KMonad.Prelude.Imports: displayCallStack :: CallStack -> Utf8Builder
+ KMonad.Prelude.Imports: displayException :: Exception e => e -> String
+ KMonad.Prelude.Imports: displayShow :: Show a => a -> Utf8Builder
+ KMonad.Prelude.Imports: distrib :: (Conjoined p, Functor f) => p a b -> p (f a) (f b)
+ KMonad.Prelude.Imports: div :: Integral a => a -> a -> a
+ KMonad.Prelude.Imports: divMod :: Integral a => a -> a -> (a, a)
+ KMonad.Prelude.Imports: drop :: Int -> [a] -> [a]
+ KMonad.Prelude.Imports: dropWhile :: (a -> Bool) -> [a] -> [a]
+ KMonad.Prelude.Imports: dropping :: (Conjoined p, Applicative f) => Int -> Over p (Indexing f) s t a a -> Over p f s t a a
+ KMonad.Prelude.Imports: droppingWhile :: (Conjoined p, Profunctor q, Applicative f) => (a -> Bool) -> Optical p q (Compose (State Bool) f) s t a a -> Optical p q f s t a a
+ KMonad.Prelude.Imports: dupChan :: MonadIO m => Chan a -> m (Chan a)
+ KMonad.Prelude.Imports: dupTChan :: TChan a -> STM (TChan a)
+ KMonad.Prelude.Imports: each :: Each s t a b => Traversal s t a b
+ KMonad.Prelude.Imports: either :: (a -> c) -> (b -> c) -> Either a b -> c
+ KMonad.Prelude.Imports: elem :: (Foldable t, Eq a) => a -> t a -> Bool
+ KMonad.Prelude.Imports: elemIndexOf :: Eq a => IndexedGetting i (First i) s a -> a -> s -> Maybe i
+ KMonad.Prelude.Imports: elemIndicesOf :: Eq a => IndexedGetting i (Endo [i]) s a -> a -> s -> [i]
+ KMonad.Prelude.Imports: elemOf :: Eq a => Getting Any s a -> a -> s -> Bool
+ KMonad.Prelude.Imports: element :: forall (t :: Type -> Type) a. Traversable t => Int -> IndexedTraversal' Int (t a) a
+ KMonad.Prelude.Imports: elementOf :: forall (f :: Type -> Type) s t a. Applicative f => LensLike (Indexing f) s t a a -> Int -> IndexedLensLike Int f s t a a
+ KMonad.Prelude.Imports: elements :: forall (t :: Type -> Type) a. Traversable t => (Int -> Bool) -> IndexedTraversal' Int (t a) a
+ KMonad.Prelude.Imports: elementsOf :: forall (f :: Type -> Type) s t a. Applicative f => LensLike (Indexing f) s t a a -> (Int -> Bool) -> IndexedLensLike Int f s t a a
+ KMonad.Prelude.Imports: encodeFloat :: RealFloat a => Integer -> Int -> a
+ KMonad.Prelude.Imports: encodeUtf8 :: Text -> ByteString
+ KMonad.Prelude.Imports: encodeUtf8Builder :: Text -> Builder
+ KMonad.Prelude.Imports: enum :: Enum a => Iso' Int a
+ KMonad.Prelude.Imports: equality :: forall {k1} {k2} (s :: k1) (a :: k1) (b :: k2) (t :: k2). (s :~: a) -> (b :~: t) -> Equality s t a b
+ KMonad.Prelude.Imports: equality' :: forall {k2} (a :: k2) (b :: k2). (a :~: b) -> Equality' a b
+ KMonad.Prelude.Imports: error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
+ KMonad.Prelude.Imports: evaluate :: MonadIO m => a -> m a
+ KMonad.Prelude.Imports: evaluateDeep :: (MonadIO m, NFData a) => a -> m a
+ KMonad.Prelude.Imports: even :: Integral a => a -> Bool
+ KMonad.Prelude.Imports: exitFailure :: MonadIO m => m a
+ KMonad.Prelude.Imports: exitSuccess :: MonadIO m => m a
+ KMonad.Prelude.Imports: exitWith :: MonadIO m => ExitCode -> m a
+ KMonad.Prelude.Imports: exp :: Floating a => a -> a
+ KMonad.Prelude.Imports: exponent :: RealFloat a => a -> Int
+ KMonad.Prelude.Imports: fail :: MonadFail m => String -> m a
+ KMonad.Prelude.Imports: failing :: (Conjoined p, Applicative f) => Traversing p f s t a b -> Over p f s t a b -> Over p f s t a b
+ KMonad.Prelude.Imports: failover :: Alternative m => LensLike ((,) Any) s t a b -> (a -> b) -> s -> m t
+ KMonad.Prelude.Imports: filter :: (a -> Bool) -> [a] -> [a]
+ KMonad.Prelude.Imports: filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
+ KMonad.Prelude.Imports: filtered :: (Choice p, Applicative f) => (a -> Bool) -> Optic' p f a a
+ KMonad.Prelude.Imports: filteredBy :: (Indexable i p, Applicative f) => Getting (First i) a i -> p a (f a) -> a -> f a
+ KMonad.Prelude.Imports: finally :: MonadUnliftIO m => m a -> m b -> m a
+ KMonad.Prelude.Imports: findIndexOf :: IndexedGetting i (First i) s a -> (a -> Bool) -> s -> Maybe i
+ KMonad.Prelude.Imports: findIndicesOf :: IndexedGetting i (Endo [i]) s a -> (a -> Bool) -> s -> [i]
+ KMonad.Prelude.Imports: findMOf :: Monad m => Getting (Endo (m (Maybe a))) s a -> (a -> m Bool) -> s -> m (Maybe a)
+ KMonad.Prelude.Imports: findOf :: Getting (Endo (Maybe a)) s a -> (a -> Bool) -> s -> Maybe a
+ KMonad.Prelude.Imports: first :: Bifunctor p => (a -> b) -> p a c -> p b c
+ KMonad.Prelude.Imports: first1Of :: Getting (First a) s a -> s -> a
+ KMonad.Prelude.Imports: firstOf :: Getting (Leftmost a) s a -> s -> Maybe a
+ KMonad.Prelude.Imports: firsting :: forall (f :: Type -> Type -> Type) (g :: Type -> Type -> Type) s t a b x y. (Bifunctor f, Bifunctor g) => AnIso s t a b -> Iso (f s x) (g t y) (f a x) (g b y)
+ KMonad.Prelude.Imports: fix :: (a -> a) -> a
+ KMonad.Prelude.Imports: flip :: (a -> b -> c) -> b -> a -> c
+ KMonad.Prelude.Imports: flipped :: forall a b c a' b' c' p f. (Profunctor p, Functor f) => p (b -> a -> c) (f (b' -> a' -> c')) -> p (a -> b -> c) (f (a' -> b' -> c'))
+ KMonad.Prelude.Imports: floatDigits :: RealFloat a => a -> Int
+ KMonad.Prelude.Imports: floatRadix :: RealFloat a => a -> Integer
+ KMonad.Prelude.Imports: floatRange :: RealFloat a => a -> (Int, Int)
+ KMonad.Prelude.Imports: floor :: (RealFrac a, Integral b) => a -> b
+ KMonad.Prelude.Imports: flushTBQueue :: TBQueue a -> STM [a]
+ KMonad.Prelude.Imports: fmap :: Functor f => (a -> b) -> f a -> f b
+ KMonad.Prelude.Imports: fold :: (Foldable t, Monoid m) => t m -> m
+ KMonad.Prelude.Imports: foldBy :: Foldable t => (a -> a -> a) -> a -> t a -> a
+ KMonad.Prelude.Imports: foldByOf :: Fold s a -> (a -> a -> a) -> a -> s -> a
+ KMonad.Prelude.Imports: foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
+ KMonad.Prelude.Imports: foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m ()
+ KMonad.Prelude.Imports: foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
+ KMonad.Prelude.Imports: foldMapBy :: Foldable t => (r -> r -> r) -> r -> (a -> r) -> t a -> r
+ KMonad.Prelude.Imports: foldMapByOf :: Fold s a -> (r -> r -> r) -> r -> (a -> r) -> s -> r
+ KMonad.Prelude.Imports: foldMapM :: (Monad m, Monoid w, Foldable t) => (a -> m w) -> t a -> m w
+ KMonad.Prelude.Imports: foldMapOf :: Getting r s a -> (a -> r) -> s -> r
+ KMonad.Prelude.Imports: foldOf :: Getting a s a -> s -> a
+ KMonad.Prelude.Imports: folded :: forall (f :: Type -> Type) a. Foldable f => IndexedFold Int (f a) a
+ KMonad.Prelude.Imports: folded64 :: forall (f :: Type -> Type) a. Foldable f => IndexedFold Int64 (f a) a
+ KMonad.Prelude.Imports: folding :: Foldable f => (s -> f a) -> Fold s a
+ KMonad.Prelude.Imports: foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b
+ KMonad.Prelude.Imports: foldl1Of :: HasCallStack => Getting (Dual (Endo (Maybe a))) s a -> (a -> a -> a) -> s -> a
+ KMonad.Prelude.Imports: foldl1Of' :: HasCallStack => Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> a) -> s -> a
+ KMonad.Prelude.Imports: foldlDeque :: forall (v :: Type -> Type -> Type) a m acc. (MVector v a, PrimMonad m) => (acc -> a -> m acc) -> acc -> Deque v (PrimState m) a -> m acc
+ KMonad.Prelude.Imports: foldlMOf :: Monad m => Getting (Endo (r -> m r)) s a -> (r -> a -> m r) -> r -> s -> m r
+ KMonad.Prelude.Imports: foldlOf :: Getting (Dual (Endo r)) s a -> (r -> a -> r) -> r -> s -> r
+ KMonad.Prelude.Imports: foldlOf' :: Getting (Endo (Endo r)) s a -> (r -> a -> r) -> r -> s -> r
+ KMonad.Prelude.Imports: foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
+ KMonad.Prelude.Imports: foldr1Of :: HasCallStack => Getting (Endo (Maybe a)) s a -> (a -> a -> a) -> s -> a
+ KMonad.Prelude.Imports: foldr1Of' :: HasCallStack => Getting (Dual (Endo (Endo (Maybe a)))) s a -> (a -> a -> a) -> s -> a
+ KMonad.Prelude.Imports: foldrDeque :: forall (v :: Type -> Type -> Type) a m acc. (MVector v a, PrimMonad m) => (a -> acc -> m acc) -> acc -> Deque v (PrimState m) a -> m acc
+ KMonad.Prelude.Imports: foldrMOf :: Monad m => Getting (Dual (Endo (r -> m r))) s a -> (a -> r -> m r) -> r -> s -> m r
+ KMonad.Prelude.Imports: foldrOf :: Getting (Endo r) s a -> (a -> r -> r) -> r -> s -> r
+ KMonad.Prelude.Imports: foldrOf' :: Getting (Dual (Endo (Endo r))) s a -> (a -> r -> r) -> r -> s -> r
+ KMonad.Prelude.Imports: foldring :: (Contravariant f, Applicative f) => ((a -> f a -> f a) -> f a -> s -> f a) -> LensLike f s t a b
+ KMonad.Prelude.Imports: for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b)
+ KMonad.Prelude.Imports: for1Of_ :: Functor f => Getting (TraversedF r f) s a -> s -> (a -> f r) -> f ()
+ KMonad.Prelude.Imports: forConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b)
+ KMonad.Prelude.Imports: forConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m ()
+ KMonad.Prelude.Imports: forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)
+ KMonad.Prelude.Imports: forMOf :: LensLike (WrappedMonad m) s t a b -> s -> (a -> m b) -> m t
+ KMonad.Prelude.Imports: forMOf_ :: Monad m => Getting (Sequenced r m) s a -> s -> (a -> m r) -> m ()
+ KMonad.Prelude.Imports: forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m ()
+ KMonad.Prelude.Imports: forMaybeA :: Applicative f => [a] -> (a -> f (Maybe b)) -> f [b]
+ KMonad.Prelude.Imports: forMaybeM :: Monad m => [a] -> (a -> m (Maybe b)) -> m [b]
+ KMonad.Prelude.Imports: forOf :: LensLike f s t a b -> s -> (a -> f b) -> f t
+ KMonad.Prelude.Imports: forOf_ :: Functor f => Getting (Traversed r f) s a -> s -> (a -> f r) -> f ()
+ KMonad.Prelude.Imports: for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
+ KMonad.Prelude.Imports: force :: NFData a => a -> a
+ KMonad.Prelude.Imports: forever :: Applicative f => f a -> f b
+ KMonad.Prelude.Imports: freezeDeque :: (Vector v a, PrimMonad m) => Deque (Mutable v) (PrimState m) a -> m (v a)
+ KMonad.Prelude.Imports: from :: AnIso s t a b -> Iso b a t s
+ KMonad.Prelude.Imports: fromEither :: (Exception e, MonadIO m) => Either e a -> m a
+ KMonad.Prelude.Imports: fromEitherIO :: (Exception e, MonadIO m) => IO (Either e a) -> m a
+ KMonad.Prelude.Imports: fromEitherM :: (Exception e, MonadIO m) => m (Either e a) -> m a
+ KMonad.Prelude.Imports: fromEnum :: Enum a => a -> Int
+ KMonad.Prelude.Imports: fromEq :: forall {k2} {k1} (s :: k2) (t :: k1) (a :: k2) (b :: k1). AnEquality s t a b -> Equality b a t s
+ KMonad.Prelude.Imports: fromException :: Exception e => SomeException -> Maybe e
+ KMonad.Prelude.Imports: fromExceptionUnwrap :: Exception e => SomeException -> Maybe e
+ KMonad.Prelude.Imports: fromFirst :: a -> First a -> a
+ KMonad.Prelude.Imports: fromInteger :: Num a => Integer -> a
+ KMonad.Prelude.Imports: fromIntegral :: (Integral a, Num b) => a -> b
+ KMonad.Prelude.Imports: fromLeft :: a -> Either a b -> a
+ KMonad.Prelude.Imports: fromLeibniz :: forall {k1} {k2} (a :: k1) (b :: k2) (s :: k1) (t :: k2). (Identical a b a b -> Identical a b s t) -> Equality s t a b
+ KMonad.Prelude.Imports: fromLeibniz' :: forall {k2} (s :: k2) (a :: k2). ((s :~: s) -> s :~: a) -> Equality' s a
+ KMonad.Prelude.Imports: fromMaybe :: a -> Maybe a -> a
+ KMonad.Prelude.Imports: fromRational :: Fractional a => Rational -> a
+ KMonad.Prelude.Imports: fromRight :: b -> Either a b -> b
+ KMonad.Prelude.Imports: fromShort :: ShortByteString -> ByteString
+ KMonad.Prelude.Imports: fromStrictBytes :: ByteString -> LByteString
+ KMonad.Prelude.Imports: fromString :: IsString a => String -> a
+ KMonad.Prelude.Imports: fst :: (a, b) -> a
+ KMonad.Prelude.Imports: fusing :: Functor f => LensLike (Yoneda f) s t a b -> LensLike f s t a b
+ KMonad.Prelude.Imports: gLogFuncClassic :: (HasLogLevel msg, HasLogSource msg, Display msg) => LogFunc -> GLogFunc msg
+ KMonad.Prelude.Imports: gLogFuncL :: HasGLogFunc env => Lens' env (GLogFunc (GMsg env))
+ KMonad.Prelude.Imports: gcd :: Integral a => a -> a -> a
+ KMonad.Prelude.Imports: generateLazyPatterns :: Lens' LensRules Bool
+ KMonad.Prelude.Imports: generateRecordSyntax :: Lens' LensRules Bool
+ KMonad.Prelude.Imports: generateSignatures :: Lens' LensRules Bool
+ KMonad.Prelude.Imports: generateUpdateableOptics :: Lens' LensRules Bool
+ KMonad.Prelude.Imports: getChanContents :: MonadIO m => Chan a -> m [a]
+ KMonad.Prelude.Imports: getDequeSize :: forall m (v :: Type -> Type -> Type) a. PrimMonad m => Deque v (PrimState m) a -> m Int
+ KMonad.Prelude.Imports: getLogLevel :: HasLogLevel msg => msg -> LogLevel
+ KMonad.Prelude.Imports: getLogSource :: HasLogSource msg => msg -> LogSource
+ KMonad.Prelude.Imports: getMonotonicTime :: MonadIO m => m Double
+ KMonad.Prelude.Imports: getting :: (Profunctor p, Profunctor q, Functor f, Contravariant f) => Optical p q f s t a b -> Optical' p q f s a
+ KMonad.Prelude.Imports: gfoldl :: Data a => (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. () => g -> c g) -> a -> c a
+ KMonad.Prelude.Imports: glog :: (MonadIO m, HasCallStack, HasGLogFunc env, MonadReader env m) => GMsg env -> m ()
+ KMonad.Prelude.Imports: gmapM :: (Data a, Monad m) => (forall d. Data d => d -> m d) -> a -> m a
+ KMonad.Prelude.Imports: gmapMo :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
+ KMonad.Prelude.Imports: gmapMp :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
+ KMonad.Prelude.Imports: gmapQ :: Data a => (forall d. Data d => d -> u) -> a -> [u]
+ KMonad.Prelude.Imports: gmapQi :: Data a => Int -> (forall d. Data d => d -> u) -> a -> u
+ KMonad.Prelude.Imports: gmapQl :: Data a => (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
+ KMonad.Prelude.Imports: gmapQr :: forall r r'. Data a => (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
+ KMonad.Prelude.Imports: gmapT :: Data a => (forall b. Data b => b -> b) -> a -> a
+ KMonad.Prelude.Imports: gplate :: (Generic a, GPlated a (Rep a)) => Traversal' a a
+ KMonad.Prelude.Imports: gplate1 :: forall {k} (f :: k -> Type) (a :: k). (Generic1 f, GPlated1 f (Rep1 f)) => Traversal' (f a) (f a)
+ KMonad.Prelude.Imports: guard :: Alternative f => Bool -> f ()
+ KMonad.Prelude.Imports: gunfold :: Data a => (forall b r. Data b => c (b -> r) -> c r) -> (forall r. () => r -> c r) -> Constr -> c a
+ KMonad.Prelude.Imports: hClose :: MonadIO m => Handle -> m ()
+ KMonad.Prelude.Imports: hFileSize :: MonadIO m => Handle -> m Integer
+ KMonad.Prelude.Imports: hFlush :: MonadIO m => Handle -> m ()
+ KMonad.Prelude.Imports: hGetBuffering :: MonadIO m => Handle -> m BufferMode
+ KMonad.Prelude.Imports: hGetEcho :: MonadIO m => Handle -> m Bool
+ KMonad.Prelude.Imports: hIsClosed :: MonadIO m => Handle -> m Bool
+ KMonad.Prelude.Imports: hIsEOF :: MonadIO m => Handle -> m Bool
+ KMonad.Prelude.Imports: hIsOpen :: MonadIO m => Handle -> m Bool
+ KMonad.Prelude.Imports: hIsReadable :: MonadIO m => Handle -> m Bool
+ KMonad.Prelude.Imports: hIsSeekable :: MonadIO m => Handle -> m Bool
+ KMonad.Prelude.Imports: hIsTerminalDevice :: MonadIO m => Handle -> m Bool
+ KMonad.Prelude.Imports: hIsWritable :: MonadIO m => Handle -> m Bool
+ KMonad.Prelude.Imports: hPutBuilder :: MonadIO m => Handle -> Builder -> m ()
+ KMonad.Prelude.Imports: hReady :: MonadIO m => Handle -> m Bool
+ KMonad.Prelude.Imports: hSeek :: MonadIO m => Handle -> SeekMode -> Integer -> m ()
+ KMonad.Prelude.Imports: hSetBuffering :: MonadIO m => Handle -> BufferMode -> m ()
+ KMonad.Prelude.Imports: hSetEcho :: MonadIO m => Handle -> Bool -> m ()
+ KMonad.Prelude.Imports: hSetFileSize :: MonadIO m => Handle -> Integer -> m ()
+ KMonad.Prelude.Imports: hTell :: MonadIO m => Handle -> m Integer
+ KMonad.Prelude.Imports: hWaitForInput :: MonadIO m => Handle -> Int -> m Bool
+ KMonad.Prelude.Imports: handle :: (MonadUnliftIO m, Exception e) => (e -> m a) -> m a -> m a
+ KMonad.Prelude.Imports: handleAny :: MonadUnliftIO m => (SomeException -> m a) -> m a -> m a
+ KMonad.Prelude.Imports: handleAnyDeep :: (MonadUnliftIO m, NFData a) => (SomeException -> m a) -> m a -> m a
+ KMonad.Prelude.Imports: handleDeep :: (MonadUnliftIO m, Exception e, NFData a) => (e -> m a) -> m a -> m a
+ KMonad.Prelude.Imports: handleIO :: MonadUnliftIO m => (IOException -> m a) -> m a -> m a
+ KMonad.Prelude.Imports: handleJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> (b -> m a) -> m a -> m a
+ KMonad.Prelude.Imports: handleSyncOrAsync :: (MonadUnliftIO m, Exception e) => (e -> m a) -> m a -> m a
+ KMonad.Prelude.Imports: has :: Getting Any s a -> s -> Bool
+ KMonad.Prelude.Imports: hasn't :: Getting All s a -> s -> Bool
+ KMonad.Prelude.Imports: head1 :: forall (t :: Type -> Type) a. Traversable1 t => Lens' (t a) a
+ KMonad.Prelude.Imports: holes :: Plated a => a -> [Pretext (->) a a a]
+ KMonad.Prelude.Imports: holes1Of :: Conjoined p => Over p (Bazaar1 p a a) s t a a -> s -> NonEmpty (Pretext p a a t)
+ KMonad.Prelude.Imports: holesOf :: Conjoined p => Over p (Bazaar p a a) s t a a -> s -> [Pretext p a a t]
+ KMonad.Prelude.Imports: holesOn :: Conjoined p => Over p (Bazaar p a a) s t a a -> s -> [Pretext p a a t]
+ KMonad.Prelude.Imports: holesOnOf :: Conjoined p => LensLike (Bazaar p r r) s t a b -> Over p (Bazaar p r r) a b r r -> s -> [Pretext p r r t]
+ KMonad.Prelude.Imports: iall :: FoldableWithIndex i f => (i -> a -> Bool) -> f a -> Bool
+ KMonad.Prelude.Imports: iallOf :: IndexedGetting i All s a -> (i -> a -> Bool) -> s -> Bool
+ KMonad.Prelude.Imports: iany :: FoldableWithIndex i f => (i -> a -> Bool) -> f a -> Bool
+ KMonad.Prelude.Imports: ianyOf :: IndexedGetting i Any s a -> (i -> a -> Bool) -> s -> Bool
+ KMonad.Prelude.Imports: iat :: At m => Index m -> IndexedLens' (Index m) m (Maybe (IxValue m))
+ KMonad.Prelude.Imports: icensoring :: MonadWriter w m => IndexedSetter i w w u v -> (i -> u -> v) -> m a -> m a
+ KMonad.Prelude.Imports: icompose :: Indexable p c => (i -> j -> p) -> (Indexed i s t -> r) -> (Indexed j a b -> s -> t) -> c a b -> r
+ KMonad.Prelude.Imports: iconcatMap :: FoldableWithIndex i f => (i -> a -> [b]) -> f a -> [b]
+ KMonad.Prelude.Imports: iconcatMapOf :: IndexedGetting i [r] s a -> (i -> a -> [r]) -> s -> [r]
+ KMonad.Prelude.Imports: icontains :: Contains m => Index m -> IndexedLens' (Index m) m Bool
+ KMonad.Prelude.Imports: id :: a -> a
+ KMonad.Prelude.Imports: idroppingWhile :: (Indexable i p, Profunctor q, Applicative f) => (i -> a -> Bool) -> Optical (Indexed i) q (Compose (State Bool) f) s t a a -> Optical p q f s t a a
+ KMonad.Prelude.Imports: ifailover :: Alternative m => Over (Indexed i) ((,) Any) s t a b -> (i -> a -> b) -> s -> m t
+ KMonad.Prelude.Imports: ifiltered :: (Indexable i p, Applicative f) => (i -> a -> Bool) -> Optical' p (Indexed i) f a a
+ KMonad.Prelude.Imports: ifind :: FoldableWithIndex i f => (i -> a -> Bool) -> f a -> Maybe (i, a)
+ KMonad.Prelude.Imports: ifindMOf :: Monad m => IndexedGetting i (Endo (m (Maybe a))) s a -> (i -> a -> m Bool) -> s -> m (Maybe a)
+ KMonad.Prelude.Imports: ifindOf :: IndexedGetting i (Endo (Maybe a)) s a -> (i -> a -> Bool) -> s -> Maybe a
+ KMonad.Prelude.Imports: ifoldMap :: (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m
+ KMonad.Prelude.Imports: ifoldMap' :: (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m
+ KMonad.Prelude.Imports: ifoldMapBy :: FoldableWithIndex i t => (r -> r -> r) -> r -> (i -> a -> r) -> t a -> r
+ KMonad.Prelude.Imports: ifoldMapByOf :: IndexedFold i t a -> (r -> r -> r) -> r -> (i -> a -> r) -> t -> r
+ KMonad.Prelude.Imports: ifoldMapOf :: IndexedGetting i m s a -> (i -> a -> m) -> s -> m
+ KMonad.Prelude.Imports: ifolded :: forall i (f :: Type -> Type) a. FoldableWithIndex i f => IndexedFold i (f a) a
+ KMonad.Prelude.Imports: ifolding :: (Foldable f, Indexable i p, Contravariant g, Applicative g) => (s -> f (i, a)) -> Over p g s t a b
+ KMonad.Prelude.Imports: ifoldl :: FoldableWithIndex i f => (i -> b -> a -> b) -> b -> f a -> b
+ KMonad.Prelude.Imports: ifoldl' :: FoldableWithIndex i f => (i -> b -> a -> b) -> b -> f a -> b
+ KMonad.Prelude.Imports: ifoldlM :: (FoldableWithIndex i f, Monad m) => (i -> b -> a -> m b) -> b -> f a -> m b
+ KMonad.Prelude.Imports: ifoldlMOf :: Monad m => IndexedGetting i (Endo (r -> m r)) s a -> (i -> r -> a -> m r) -> r -> s -> m r
+ KMonad.Prelude.Imports: ifoldlOf :: IndexedGetting i (Dual (Endo r)) s a -> (i -> r -> a -> r) -> r -> s -> r
+ KMonad.Prelude.Imports: ifoldlOf' :: IndexedGetting i (Endo (r -> r)) s a -> (i -> r -> a -> r) -> r -> s -> r
+ KMonad.Prelude.Imports: ifoldr :: FoldableWithIndex i f => (i -> a -> b -> b) -> b -> f a -> b
+ KMonad.Prelude.Imports: ifoldr' :: FoldableWithIndex i f => (i -> a -> b -> b) -> b -> f a -> b
+ KMonad.Prelude.Imports: ifoldrM :: (FoldableWithIndex i f, Monad m) => (i -> a -> b -> m b) -> b -> f a -> m b
+ KMonad.Prelude.Imports: ifoldrMOf :: Monad m => IndexedGetting i (Dual (Endo (r -> m r))) s a -> (i -> a -> r -> m r) -> r -> s -> m r
+ KMonad.Prelude.Imports: ifoldrOf :: IndexedGetting i (Endo r) s a -> (i -> a -> r -> r) -> r -> s -> r
+ KMonad.Prelude.Imports: ifoldrOf' :: IndexedGetting i (Dual (Endo (r -> r))) s a -> (i -> a -> r -> r) -> r -> s -> r
+ KMonad.Prelude.Imports: ifoldring :: (Indexable i p, Contravariant f, Applicative f) => ((i -> a -> f a -> f a) -> f a -> s -> f a) -> Over p f s t a b
+ KMonad.Prelude.Imports: ifor :: (TraversableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f (t b)
+ KMonad.Prelude.Imports: iforM :: (TraversableWithIndex i t, Monad m) => t a -> (i -> a -> m b) -> m (t b)
+ KMonad.Prelude.Imports: iforMOf :: (Indexed i a (WrappedMonad m b) -> s -> WrappedMonad m t) -> s -> (i -> a -> m b) -> m t
+ KMonad.Prelude.Imports: iforMOf_ :: Monad m => IndexedGetting i (Sequenced r m) s a -> s -> (i -> a -> m r) -> m ()
+ KMonad.Prelude.Imports: iforM_ :: (FoldableWithIndex i t, Monad m) => t a -> (i -> a -> m b) -> m ()
+ KMonad.Prelude.Imports: iforOf :: (Indexed i a (f b) -> s -> f t) -> s -> (i -> a -> f b) -> f t
+ KMonad.Prelude.Imports: iforOf_ :: Functor f => IndexedGetting i (Traversed r f) s a -> s -> (i -> a -> f r) -> f ()
+ KMonad.Prelude.Imports: ifor_ :: (FoldableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f ()
+ KMonad.Prelude.Imports: ignored :: Applicative f => pafb -> s -> f s
+ KMonad.Prelude.Imports: iix :: Ixed m => Index m -> IndexedTraversal' (Index m) m (IxValue m)
+ KMonad.Prelude.Imports: ilens :: (s -> (i, a)) -> (s -> b -> t) -> IndexedLens i s t a b
+ KMonad.Prelude.Imports: ilevels :: forall (f :: Type -> Type) i s t a b j. Applicative f => Traversing (Indexed i) f s t a b -> IndexedLensLike Int f s t (Level i a) (Level j b)
+ KMonad.Prelude.Imports: ilike :: (Indexable i p, Contravariant f, Functor f) => i -> a -> Over' p f s a
+ KMonad.Prelude.Imports: ilistening :: MonadWriter w m => IndexedGetting i (i, u) w u -> m a -> m (a, (i, u))
+ KMonad.Prelude.Imports: ilistenings :: MonadWriter w m => IndexedGetting i v w u -> (i -> u -> v) -> m a -> m (a, v)
+ KMonad.Prelude.Imports: ilocally :: MonadReader s m => AnIndexedSetter i s s a b -> (i -> a -> b) -> m r -> m r
+ KMonad.Prelude.Imports: iloci :: forall i a c s b p f. (Indexable i p, Applicative f) => p a (f b) -> Bazaar (Indexed i) a c s -> f (Bazaar (Indexed i) b c s)
+ KMonad.Prelude.Imports: imagma :: Over (Indexed i) (Molten i a b) s t a b -> Iso s t' (Magma i t b a) (Magma j t' c c)
+ KMonad.Prelude.Imports: imap :: FunctorWithIndex i f => (i -> a -> b) -> f a -> f b
+ KMonad.Prelude.Imports: imapAccumL :: TraversableWithIndex i t => (i -> s -> a -> (s, b)) -> s -> t a -> (s, t b)
+ KMonad.Prelude.Imports: imapAccumLOf :: Over (Indexed i) (State acc) s t a b -> (i -> acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
+ KMonad.Prelude.Imports: imapAccumR :: TraversableWithIndex i t => (i -> s -> a -> (s, b)) -> s -> t a -> (s, t b)
+ KMonad.Prelude.Imports: imapAccumROf :: Over (Indexed i) (Backwards (State acc)) s t a b -> (i -> acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
+ KMonad.Prelude.Imports: imapM :: (TraversableWithIndex i t, Monad m) => (i -> a -> m b) -> t a -> m (t b)
+ KMonad.Prelude.Imports: imapMOf :: Over (Indexed i) (WrappedMonad m) s t a b -> (i -> a -> m b) -> s -> m t
+ KMonad.Prelude.Imports: imapMOf_ :: Monad m => IndexedGetting i (Sequenced r m) s a -> (i -> a -> m r) -> s -> m ()
+ KMonad.Prelude.Imports: imapM_ :: (FoldableWithIndex i t, Monad m) => (i -> a -> m b) -> t a -> m ()
+ KMonad.Prelude.Imports: imapOf :: AnIndexedSetter i s t a b -> (i -> a -> b) -> s -> t
+ KMonad.Prelude.Imports: imapped :: forall i (f :: Type -> Type) a b. FunctorWithIndex i f => IndexedSetter i (f a) (f b) a b
+ KMonad.Prelude.Imports: imodifying :: MonadState s m => AnIndexedSetter i s s a b -> (i -> a -> b) -> m ()
+ KMonad.Prelude.Imports: impureThrow :: Exception e => e -> a
+ KMonad.Prelude.Imports: index :: (Indexable i p, Eq i, Applicative f) => i -> Optical' p (Indexed i) f a a
+ KMonad.Prelude.Imports: indexed :: Indexable i p => p a b -> i -> a -> b
+ KMonad.Prelude.Imports: indexing :: Indexable Int p => ((a -> Indexing f b) -> s -> Indexing f t) -> p a (f b) -> s -> f t
+ KMonad.Prelude.Imports: indexing64 :: Indexable Int64 p => ((a -> Indexing64 f b) -> s -> Indexing64 f t) -> p a (f b) -> s -> f t
+ KMonad.Prelude.Imports: indices :: (Indexable i p, Applicative f) => (i -> Bool) -> Optical' p (Indexed i) f a a
+ KMonad.Prelude.Imports: infix 4 <#=
+ KMonad.Prelude.Imports: infixl 0 `on`
+ KMonad.Prelude.Imports: infixl 1 ??
+ KMonad.Prelude.Imports: infixl 3 <|>
+ KMonad.Prelude.Imports: infixl 4 <$!>
+ KMonad.Prelude.Imports: infixl 5 `failing`
+ KMonad.Prelude.Imports: infixl 6 -
+ KMonad.Prelude.Imports: infixl 7 *
+ KMonad.Prelude.Imports: infixl 8 ^@?!
+ KMonad.Prelude.Imports: infixr 0 $!!
+ KMonad.Prelude.Imports: infixr 1 <=<
+ KMonad.Prelude.Imports: infixr 2 <<~
+ KMonad.Prelude.Imports: infixr 3 &&
+ KMonad.Prelude.Imports: infixr 4 <#~
+ KMonad.Prelude.Imports: infixr 5 `cons`
+ KMonad.Prelude.Imports: infixr 6 <>
+ KMonad.Prelude.Imports: infixr 8 #
+ KMonad.Prelude.Imports: infixr 9 ...
+ KMonad.Prelude.Imports: inone :: FoldableWithIndex i f => (i -> a -> Bool) -> f a -> Bool
+ KMonad.Prelude.Imports: inoneOf :: IndexedGetting i Any s a -> (i -> a -> Bool) -> s -> Bool
+ KMonad.Prelude.Imports: inside :: forall (p :: Type -> Type -> Type) s t a b e. Corepresentable p => ALens s t a b -> Lens (p e s) (p e t) (p e a) (p e b)
+ KMonad.Prelude.Imports: involuted :: (a -> a) -> Iso' a a
+ KMonad.Prelude.Imports: iover :: AnIndexedSetter i s t a b -> (i -> a -> b) -> s -> t
+ KMonad.Prelude.Imports: ipartsOf :: (Indexable [i] p, Functor f) => Traversing (Indexed i) f s t a a -> Over p f s t [a] [a]
+ KMonad.Prelude.Imports: ipartsOf' :: forall i p f s t a. (Indexable [i] p, Functor f) => Over (Indexed i) (Bazaar' (Indexed i) a) s t a a -> Over p f s t [a] [a]
+ KMonad.Prelude.Imports: ipassing :: MonadWriter w m => IndexedSetter i w w u v -> m (a, i -> u -> v) -> m a
+ KMonad.Prelude.Imports: iplens :: (s -> a) -> (s -> b -> t) -> IndexPreservingLens s t a b
+ KMonad.Prelude.Imports: ipre :: IndexedGetting i (First (i, a)) s a -> IndexPreservingGetter s (Maybe (i, a))
+ KMonad.Prelude.Imports: ipreuse :: MonadState s m => IndexedGetting i (First (i, a)) s a -> m (Maybe (i, a))
+ KMonad.Prelude.Imports: ipreuses :: MonadState s m => IndexedGetting i (First r) s a -> (i -> a -> r) -> m (Maybe r)
+ KMonad.Prelude.Imports: ipreview :: MonadReader s m => IndexedGetting i (First (i, a)) s a -> m (Maybe (i, a))
+ KMonad.Prelude.Imports: ipreviews :: MonadReader s m => IndexedGetting i (First r) s a -> (i -> a -> r) -> m (Maybe r)
+ KMonad.Prelude.Imports: isAsyncException :: Exception e => e -> Bool
+ KMonad.Prelude.Imports: isCurrentThreadBound :: MonadIO m => m Bool
+ KMonad.Prelude.Imports: isDenormalized :: RealFloat a => a -> Bool
+ KMonad.Prelude.Imports: isEmptyMVar :: MonadIO m => MVar a -> m Bool
+ KMonad.Prelude.Imports: isEmptyTBQueue :: TBQueue a -> STM Bool
+ KMonad.Prelude.Imports: isEmptyTChan :: TChan a -> STM Bool
+ KMonad.Prelude.Imports: isEmptyTMVar :: TMVar a -> STM Bool
+ KMonad.Prelude.Imports: isEmptyTQueue :: TQueue a -> STM Bool
+ KMonad.Prelude.Imports: isFullTBQueue :: TBQueue a -> STM Bool
+ KMonad.Prelude.Imports: isIEEE :: RealFloat a => a -> Bool
+ KMonad.Prelude.Imports: isInfinite :: RealFloat a => a -> Bool
+ KMonad.Prelude.Imports: isJust :: Maybe a -> Bool
+ KMonad.Prelude.Imports: isLeft :: Either a b -> Bool
+ KMonad.Prelude.Imports: isNaN :: RealFloat a => a -> Bool
+ KMonad.Prelude.Imports: isNegativeZero :: RealFloat a => a -> Bool
+ KMonad.Prelude.Imports: isNothing :: Maybe a -> Bool
+ KMonad.Prelude.Imports: isRight :: Either a b -> Bool
+ KMonad.Prelude.Imports: isSyncException :: Exception e => e -> Bool
+ KMonad.Prelude.Imports: iset :: AnIndexedSetter i s t a b -> (i -> b) -> s -> t
+ KMonad.Prelude.Imports: isets :: ((i -> a -> b) -> s -> t) -> IndexedSetter i s t a b
+ KMonad.Prelude.Imports: isn't :: APrism s t a b -> s -> Bool
+ KMonad.Prelude.Imports: iso :: (s -> a) -> (b -> t) -> Iso s t a b
+ KMonad.Prelude.Imports: itakingWhile :: (Indexable i p, Profunctor q, Contravariant f, Applicative f) => (i -> a -> Bool) -> Optical' (Indexed i) q (Const (Endo (f s)) :: Type -> Type) s a -> Optical' p q f s a
+ KMonad.Prelude.Imports: iterated :: Apply f => (a -> a) -> LensLike' f a a
+ KMonad.Prelude.Imports: ito :: (Indexable i p, Contravariant f) => (s -> (i, a)) -> Over' p f s a
+ KMonad.Prelude.Imports: itoList :: FoldableWithIndex i f => f a -> [(i, a)]
+ KMonad.Prelude.Imports: itoListOf :: IndexedGetting i (Endo [(i, a)]) s a -> s -> [(i, a)]
+ KMonad.Prelude.Imports: itraverse :: (TraversableWithIndex i t, Applicative f) => (i -> a -> f b) -> t a -> f (t b)
+ KMonad.Prelude.Imports: itraverseBy :: TraversableWithIndex i t => (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> (i -> a -> f b) -> t a -> f (t b)
+ KMonad.Prelude.Imports: itraverseByOf :: IndexedTraversal i s t a b -> (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> (i -> a -> f b) -> s -> f t
+ KMonad.Prelude.Imports: itraverseOf :: (Indexed i a (f b) -> s -> f t) -> (i -> a -> f b) -> s -> f t
+ KMonad.Prelude.Imports: itraverseOf_ :: Functor f => IndexedGetting i (Traversed r f) s a -> (i -> a -> f r) -> s -> f ()
+ KMonad.Prelude.Imports: itraverse_ :: (FoldableWithIndex i t, Applicative f) => (i -> a -> f b) -> t a -> f ()
+ KMonad.Prelude.Imports: itraversed :: forall i (t :: Type -> Type) a b. TraversableWithIndex i t => IndexedTraversal i (t a) (t b) a b
+ KMonad.Prelude.Imports: iunsafePartsOf :: (Indexable [i] p, Functor f) => Traversing (Indexed i) f s t a b -> Over p f s t [a] [b]
+ KMonad.Prelude.Imports: iunsafePartsOf' :: forall i s t a b. Over (Indexed i) (Bazaar (Indexed i) a b) s t a b -> IndexedLens [i] s t [a] [b]
+ KMonad.Prelude.Imports: iuse :: MonadState s m => IndexedGetting i (i, a) s a -> m (i, a)
+ KMonad.Prelude.Imports: iuses :: MonadState s m => IndexedGetting i r s a -> (i -> a -> r) -> m r
+ KMonad.Prelude.Imports: iview :: MonadReader s m => IndexedGetting i (i, a) s a -> m (i, a)
+ KMonad.Prelude.Imports: iviews :: MonadReader s m => IndexedGetting i r s a -> (i -> a -> r) -> m r
+ KMonad.Prelude.Imports: ix :: Ixed m => Index m -> Traversal' m (IxValue m)
+ KMonad.Prelude.Imports: ixAt :: At m => Index m -> Traversal' m (IxValue m)
+ KMonad.Prelude.Imports: join :: Monad m => m (m a) -> m a
+ KMonad.Prelude.Imports: last1 :: forall (t :: Type -> Type) a. Traversable1 t => Lens' (t a) a
+ KMonad.Prelude.Imports: last1Of :: Getting (Last a) s a -> s -> a
+ KMonad.Prelude.Imports: lastOf :: Getting (Rightmost a) s a -> s -> Maybe a
+ KMonad.Prelude.Imports: lazy :: Strict lazy strict => Iso' strict lazy
+ KMonad.Prelude.Imports: lcm :: Integral a => a -> a -> a
+ KMonad.Prelude.Imports: left' :: Choice p => p a b -> p (Either a c) (Either b c)
+ KMonad.Prelude.Imports: lefts :: [Either a b] -> [a]
+ KMonad.Prelude.Imports: length :: Foldable t => t a -> Int
+ KMonad.Prelude.Imports: lengthOf :: Getting (Endo (Endo Int)) s a -> s -> Int
+ KMonad.Prelude.Imports: lengthTBQueue :: TBQueue a -> STM Natural
+ KMonad.Prelude.Imports: lenientDecode :: OnDecodeError
+ KMonad.Prelude.Imports: lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b
+ KMonad.Prelude.Imports: lensClass :: Lens' LensRules ClassyNamer
+ KMonad.Prelude.Imports: lensField :: Lens' LensRules FieldNamer
+ KMonad.Prelude.Imports: lensRules :: LensRules
+ KMonad.Prelude.Imports: lensRulesFor :: [(String, String)] -> LensRules
+ KMonad.Prelude.Imports: levels :: forall (f :: Type -> Type) s t a b. Applicative f => Traversing (->) f s t a b -> IndexedLensLike Int f s t (Level () a) (Level () b)
+ KMonad.Prelude.Imports: lift :: (MonadTrans t, Monad m) => m a -> t m a
+ KMonad.Prelude.Imports: liftA :: Applicative f => (a -> b) -> f a -> f b
+ KMonad.Prelude.Imports: liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
+ KMonad.Prelude.Imports: liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
+ KMonad.Prelude.Imports: liftIO :: MonadIO m => IO a -> m a
+ KMonad.Prelude.Imports: liftIOOp :: MonadUnliftIO m => (IO a -> IO b) -> m a -> m b
+ KMonad.Prelude.Imports: liftM :: Monad m => (a1 -> r) -> m a1 -> m r
+ KMonad.Prelude.Imports: liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
+ KMonad.Prelude.Imports: liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r
+ KMonad.Prelude.Imports: liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r
+ KMonad.Prelude.Imports: liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r
+ KMonad.Prelude.Imports: liftRIO :: (MonadIO m, MonadReader env m) => RIO env a -> m a
+ KMonad.Prelude.Imports: lifted :: forall (m :: Type -> Type) a b. Monad m => Setter (m a) (m b) a b
+ KMonad.Prelude.Imports: like :: (Profunctor p, Contravariant f, Functor f) => a -> Optic' p f s a
+ KMonad.Prelude.Imports: lined :: forall (f :: Type -> Type). Applicative f => IndexedLensLike' Int f String String
+ KMonad.Prelude.Imports: lines :: Text -> [Text]
+ KMonad.Prelude.Imports: link :: MonadIO m => Async a -> m ()
+ KMonad.Prelude.Imports: link2 :: MonadIO m => Async a -> Async b -> m ()
+ KMonad.Prelude.Imports: listToMaybe :: [a] -> Maybe a
+ KMonad.Prelude.Imports: listening :: MonadWriter w m => Getting u w u -> m a -> m (a, u)
+ KMonad.Prelude.Imports: listenings :: MonadWriter w m => Getting v w u -> (u -> v) -> m a -> m (a, v)
+ KMonad.Prelude.Imports: lmap :: Profunctor p => (a -> b) -> p b c -> p a c
+ KMonad.Prelude.Imports: lmapping :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) s t a b x y. (Profunctor p, Profunctor q) => AnIso s t a b -> Iso (p a x) (q b y) (p s x) (q t y)
+ KMonad.Prelude.Imports: local :: MonadReader r m => (r -> r) -> m a -> m a
+ KMonad.Prelude.Imports: locally :: MonadReader s m => ASetter s s a b -> (a -> b) -> m r -> m r
+ KMonad.Prelude.Imports: loci :: forall a c s b f. Applicative f => (a -> f b) -> Bazaar (->) a c s -> f (Bazaar (->) b c s)
+ KMonad.Prelude.Imports: locus :: forall (p :: Type -> Type -> Type -> Type) a c s b. IndexedComonadStore p => Lens (p a c s) (p b c s) a b
+ KMonad.Prelude.Imports: log :: Floating a => a -> a
+ KMonad.Prelude.Imports: logBase :: Floating a => a -> a -> a
+ KMonad.Prelude.Imports: logDebug :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logDebugS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logError :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logErrorS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logFuncAccentColorsL :: HasLogFunc env => SimpleGetter env (Int -> Utf8Builder)
+ KMonad.Prelude.Imports: logFuncL :: HasLogFunc env => Lens' env LogFunc
+ KMonad.Prelude.Imports: logFuncLogLevelColorsL :: HasLogFunc env => SimpleGetter env (LogLevel -> Utf8Builder)
+ KMonad.Prelude.Imports: logFuncSecondaryColorL :: HasLogFunc env => SimpleGetter env Utf8Builder
+ KMonad.Prelude.Imports: logFuncUseColorL :: HasLogFunc env => SimpleGetter env Bool
+ KMonad.Prelude.Imports: logGeneric :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> LogLevel -> Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logInfo :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logInfoS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logOptionsHandle :: MonadIO m => Handle -> Bool -> m LogOptions
+ KMonad.Prelude.Imports: logOptionsMemory :: MonadIO m => m (IORef Builder, LogOptions)
+ KMonad.Prelude.Imports: logOther :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Text -> Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logOtherS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Text -> LogSource -> Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logSticky :: (MonadIO m, HasCallStack, MonadReader env m, HasLogFunc env) => Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logStickyDone :: (MonadIO m, HasCallStack, MonadReader env m, HasLogFunc env) => Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logWarn :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
+ KMonad.Prelude.Imports: logWarnS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
+ KMonad.Prelude.Imports: lookingupNamer :: [(String, String)] -> FieldNamer
+ KMonad.Prelude.Imports: lookup :: Eq a => a -> [(a, b)] -> Maybe b
+ KMonad.Prelude.Imports: lookupOf :: Eq k => Getting (Endo (Maybe v)) s (k, v) -> k -> s -> Maybe v
+ KMonad.Prelude.Imports: magma :: LensLike (Mafic a b) s t a b -> Iso s u (Magma Int t b a) (Magma j u c c)
+ KMonad.Prelude.Imports: magnify :: Magnify m n b a => ((Functor (Magnified m c), Contravariant (Magnified m c)) => LensLike' (Magnified m c) a b) -> m c -> n c
+ KMonad.Prelude.Imports: makeClassy :: Name -> DecsQ
+ KMonad.Prelude.Imports: makeClassyFor :: String -> String -> [(String, String)] -> Name -> DecsQ
+ KMonad.Prelude.Imports: makeClassyPrisms :: Name -> DecsQ
+ KMonad.Prelude.Imports: makeClassy_ :: Name -> DecsQ
+ KMonad.Prelude.Imports: makeFields :: Name -> DecsQ
+ KMonad.Prelude.Imports: makeFieldsNoPrefix :: Name -> DecsQ
+ KMonad.Prelude.Imports: makeLenses :: Name -> DecsQ
+ KMonad.Prelude.Imports: makeLensesFor :: [(String, String)] -> Name -> DecsQ
+ KMonad.Prelude.Imports: makeLensesWith :: LensRules -> Name -> DecsQ
+ KMonad.Prelude.Imports: makePrisms :: Name -> DecsQ
+ KMonad.Prelude.Imports: makeWrapped :: Name -> DecsQ
+ KMonad.Prelude.Imports: map :: (a -> b) -> [a] -> [b]
+ KMonad.Prelude.Imports: mapAccumLOf :: LensLike (State acc) s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
+ KMonad.Prelude.Imports: mapAccumROf :: LensLike (Backwards (State acc)) s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
+ KMonad.Prelude.Imports: mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
+ KMonad.Prelude.Imports: mapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b)
+ KMonad.Prelude.Imports: mapConcurrently_ :: (MonadUnliftIO m, Foldable f) => (a -> m b) -> f a -> m ()
+ KMonad.Prelude.Imports: mapCont :: (r -> r) -> Cont r a -> Cont r a
+ KMonad.Prelude.Imports: mapContT :: forall {k} m (r :: k) a. (m r -> m r) -> ContT r m a -> ContT r m a
+ KMonad.Prelude.Imports: mapEq :: forall k1 k2 (s :: k1) (t :: k2) (a :: k1) (b :: k2) f. AnEquality s t a b -> f s -> f a
+ KMonad.Prelude.Imports: mapExceptionM :: (Exception e1, Exception e2, MonadUnliftIO m) => (e1 -> e2) -> m a -> m a
+ KMonad.Prelude.Imports: mapLeft :: (a1 -> a2) -> Either a1 b -> Either a2 b
+ KMonad.Prelude.Imports: mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
+ KMonad.Prelude.Imports: mapMOf :: LensLike (WrappedMonad m) s t a b -> (a -> m b) -> s -> m t
+ KMonad.Prelude.Imports: mapMOf_ :: Monad m => Getting (Sequenced r m) s a -> (a -> m r) -> s -> m ()
+ KMonad.Prelude.Imports: mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
+ KMonad.Prelude.Imports: mapMaybe :: (a -> Maybe b) -> [a] -> [b]
+ KMonad.Prelude.Imports: mapMaybeA :: Applicative f => (a -> f (Maybe b)) -> [a] -> f [b]
+ KMonad.Prelude.Imports: mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]
+ KMonad.Prelude.Imports: mapOf :: ASetter s t a b -> (a -> b) -> s -> t
+ KMonad.Prelude.Imports: mapRIO :: (outer -> inner) -> RIO inner a -> RIO outer a
+ KMonad.Prelude.Imports: mapped :: forall (f :: Type -> Type) a b. Functor f => Setter (f a) (f b) a b
+ KMonad.Prelude.Imports: mappend :: Monoid a => a -> a -> a
+ KMonad.Prelude.Imports: mapping :: forall (f :: Type -> Type) (g :: Type -> Type) s t a b. (Functor f, Functor g) => AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
+ KMonad.Prelude.Imports: mappingNamer :: (String -> [String]) -> FieldNamer
+ KMonad.Prelude.Imports: mask :: MonadUnliftIO m => ((forall a. () => m a -> m a) -> m b) -> m b
+ KMonad.Prelude.Imports: mask_ :: MonadUnliftIO m => m a -> m a
+ KMonad.Prelude.Imports: matching :: APrism s t a b -> s -> Either t a
+ KMonad.Prelude.Imports: matching' :: LensLike (Either a) s t a b -> s -> Either t a
+ KMonad.Prelude.Imports: max :: Ord a => a -> a -> a
+ KMonad.Prelude.Imports: maxBound :: Bounded a => a
+ KMonad.Prelude.Imports: maximum1Of :: Ord a => Getting (Max a) s a -> s -> a
+ KMonad.Prelude.Imports: maximumByOf :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> Maybe a
+ KMonad.Prelude.Imports: maximumOf :: Ord a => Getting (Endo (Endo (Maybe a))) s a -> s -> Maybe a
+ KMonad.Prelude.Imports: maybe :: b -> (a -> b) -> Maybe a -> b
+ KMonad.Prelude.Imports: maybeToList :: Maybe a -> [a]
+ KMonad.Prelude.Imports: mconcat :: Monoid a => [a] -> a
+ KMonad.Prelude.Imports: memoizeMVar :: MonadUnliftIO m => m a -> m (Memoized a)
+ KMonad.Prelude.Imports: memoizeRef :: MonadUnliftIO m => m a -> m (Memoized a)
+ KMonad.Prelude.Imports: mempty :: Monoid a => a
+ KMonad.Prelude.Imports: mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
+ KMonad.Prelude.Imports: min :: Ord a => a -> a -> a
+ KMonad.Prelude.Imports: minBound :: Bounded a => a
+ KMonad.Prelude.Imports: minimum1Of :: Ord a => Getting (Min a) s a -> s -> a
+ KMonad.Prelude.Imports: minimumByOf :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> Maybe a
+ KMonad.Prelude.Imports: minimumOf :: Ord a => Getting (Endo (Endo (Maybe a))) s a -> s -> Maybe a
+ KMonad.Prelude.Imports: mkAcquire :: IO a -> (a -> IO ()) -> Acquire a
+ KMonad.Prelude.Imports: mkAcquireType :: IO a -> (a -> ReleaseType -> IO ()) -> Acquire a
+ KMonad.Prelude.Imports: mkGLogFunc :: (CallStack -> msg -> IO ()) -> GLogFunc msg
+ KMonad.Prelude.Imports: mkLogFunc :: (CallStack -> LogSource -> LogLevel -> Utf8Builder -> IO ()) -> LogFunc
+ KMonad.Prelude.Imports: mkSimpleApp :: MonadIO m => LogFunc -> Maybe ProcessContext -> m SimpleApp
+ KMonad.Prelude.Imports: mkWeakIORef :: MonadUnliftIO m => IORef a -> m () -> m (Weak (IORef a))
+ KMonad.Prelude.Imports: mkWeakMVar :: MonadUnliftIO m => MVar a -> m () -> m (Weak (MVar a))
+ KMonad.Prelude.Imports: mkWeakTMVar :: MonadUnliftIO m => TMVar a -> m () -> m (Weak (TMVar a))
+ KMonad.Prelude.Imports: mkWeakTVar :: MonadUnliftIO m => TVar a -> m () -> m (Weak (TVar a))
+ KMonad.Prelude.Imports: mod :: Integral a => a -> a -> a
+ KMonad.Prelude.Imports: modifyIORef :: MonadIO m => IORef a -> (a -> a) -> m ()
+ KMonad.Prelude.Imports: modifyIORef' :: MonadIO m => IORef a -> (a -> a) -> m ()
+ KMonad.Prelude.Imports: modifyMVar :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b
+ KMonad.Prelude.Imports: modifyMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b
+ KMonad.Prelude.Imports: modifyMVarMasked_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m ()
+ KMonad.Prelude.Imports: modifyMVar_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m ()
+ KMonad.Prelude.Imports: modifySomeRef :: MonadIO m => SomeRef a -> (a -> a) -> m ()
+ KMonad.Prelude.Imports: modifyTVar :: TVar a -> (a -> a) -> STM ()
+ KMonad.Prelude.Imports: modifyTVar' :: TVar a -> (a -> a) -> STM ()
+ KMonad.Prelude.Imports: modifyURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> (a -> a) -> m ()
+ KMonad.Prelude.Imports: modifying :: MonadState s m => ASetter s s a b -> (a -> b) -> m ()
+ KMonad.Prelude.Imports: mplus :: MonadPlus m => m a -> m a -> m a
+ KMonad.Prelude.Imports: msum :: (Foldable t, MonadPlus m) => t (m a) -> m a
+ KMonad.Prelude.Imports: msumOf :: MonadPlus m => Getting (Endo (m a)) s (m a) -> s -> m a
+ KMonad.Prelude.Imports: myThreadId :: MonadIO m => m ThreadId
+ KMonad.Prelude.Imports: mzero :: MonadPlus m => m a
+ KMonad.Prelude.Imports: nearly :: a -> (a -> Bool) -> Prism' a ()
+ KMonad.Prelude.Imports: negate :: Num a => a -> a
+ KMonad.Prelude.Imports: newBroadcastTChan :: STM (TChan a)
+ KMonad.Prelude.Imports: newBroadcastTChanIO :: MonadIO m => m (TChan a)
+ KMonad.Prelude.Imports: newChan :: MonadIO m => m (Chan a)
+ KMonad.Prelude.Imports: newDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => m (Deque v (PrimState m) a)
+ KMonad.Prelude.Imports: newEmptyMVar :: MonadIO m => m (MVar a)
+ KMonad.Prelude.Imports: newEmptyTMVar :: STM (TMVar a)
+ KMonad.Prelude.Imports: newEmptyTMVarIO :: MonadIO m => m (TMVar a)
+ KMonad.Prelude.Imports: newIORef :: MonadIO m => a -> m (IORef a)
+ KMonad.Prelude.Imports: newLogFunc :: (MonadIO n, MonadIO m) => LogOptions -> n (LogFunc, m ())
+ KMonad.Prelude.Imports: newMVar :: MonadIO m => a -> m (MVar a)
+ KMonad.Prelude.Imports: newQSem :: MonadIO m => Int -> m QSem
+ KMonad.Prelude.Imports: newQSemN :: MonadIO m => Int -> m QSemN
+ KMonad.Prelude.Imports: newSomeRef :: MonadIO m => a -> m (SomeRef a)
+ KMonad.Prelude.Imports: newTBQueue :: Natural -> STM (TBQueue a)
+ KMonad.Prelude.Imports: newTBQueueIO :: MonadIO m => Natural -> m (TBQueue a)
+ KMonad.Prelude.Imports: newTChan :: STM (TChan a)
+ KMonad.Prelude.Imports: newTChanIO :: MonadIO m => m (TChan a)
+ KMonad.Prelude.Imports: newTMVar :: a -> STM (TMVar a)
+ KMonad.Prelude.Imports: newTMVarIO :: MonadIO m => a -> m (TMVar a)
+ KMonad.Prelude.Imports: newTQueue :: STM (TQueue a)
+ KMonad.Prelude.Imports: newTQueueIO :: MonadIO m => m (TQueue a)
+ KMonad.Prelude.Imports: newTVar :: a -> STM (TVar a)
+ KMonad.Prelude.Imports: newTVarIO :: MonadIO m => a -> m (TVar a)
+ KMonad.Prelude.Imports: newURef :: (PrimMonad m, Unbox a) => a -> m (URef (PrimState m) a)
+ KMonad.Prelude.Imports: newUnboxedSomeRef :: (MonadIO m, Unbox a) => a -> m (SomeRef a)
+ KMonad.Prelude.Imports: newtype () => Bazaar (p :: Type -> Type -> Type) a b t
+ KMonad.Prelude.Imports: newtype () => Bazaar1 (p :: Type -> Type -> Type) a b t
+ KMonad.Prelude.Imports: newtype () => Concurrently (m :: Type -> Type) a
+ KMonad.Prelude.Imports: newtype () => Const a (b :: k)
+ KMonad.Prelude.Imports: newtype () => ContT (r :: k) (m :: k -> Type) a
+ KMonad.Prelude.Imports: newtype () => Down a
+ KMonad.Prelude.Imports: newtype () => Identity a
+ KMonad.Prelude.Imports: newtype () => Indexed i a b
+ KMonad.Prelude.Imports: newtype () => RIO env a
+ KMonad.Prelude.Imports: newtype () => ReaderT r (m :: Type -> Type) a
+ KMonad.Prelude.Imports: newtype () => ReifiedFold s a
+ KMonad.Prelude.Imports: newtype () => ReifiedGetter s a
+ KMonad.Prelude.Imports: newtype () => ReifiedIndexedFold i s a
+ KMonad.Prelude.Imports: newtype () => ReifiedIndexedGetter i s a
+ KMonad.Prelude.Imports: newtype () => ReifiedIndexedLens i s t a b
+ KMonad.Prelude.Imports: newtype () => ReifiedIndexedSetter i s t a b
+ KMonad.Prelude.Imports: newtype () => ReifiedIndexedTraversal i s t a b
+ KMonad.Prelude.Imports: newtype () => ReifiedIso s t a b
+ KMonad.Prelude.Imports: newtype () => ReifiedLens s t a b
+ KMonad.Prelude.Imports: newtype () => ReifiedPrism s t a b
+ KMonad.Prelude.Imports: newtype () => ReifiedSetter s t a b
+ KMonad.Prelude.Imports: newtype () => ReifiedTraversal s t a b
+ KMonad.Prelude.Imports: newtype () => UnliftIO (m :: Type -> Type)
+ KMonad.Prelude.Imports: newtype () => Utf8Builder
+ KMonad.Prelude.Imports: noLogging :: (HasLogFunc env, MonadReader env m) => m a -> m a
+ KMonad.Prelude.Imports: non :: Eq a => a -> Iso' (Maybe a) a
+ KMonad.Prelude.Imports: non' :: APrism' a () -> Iso' (Maybe a) a
+ KMonad.Prelude.Imports: none :: Foldable f => (a -> Bool) -> f a -> Bool
+ KMonad.Prelude.Imports: noneOf :: Getting Any s a -> (a -> Bool) -> s -> Bool
+ KMonad.Prelude.Imports: not :: Bool -> Bool
+ KMonad.Prelude.Imports: notElem :: (Foldable t, Eq a) => a -> t a -> Bool
+ KMonad.Prelude.Imports: notElemOf :: Eq a => Getting All s a -> a -> s -> Bool
+ KMonad.Prelude.Imports: notNullOf :: Getting Any s a -> s -> Bool
+ KMonad.Prelude.Imports: nubOrd :: Ord a => [a] -> [a]
+ KMonad.Prelude.Imports: null :: Foldable t => t a -> Bool
+ KMonad.Prelude.Imports: nullOf :: Getting All s a -> s -> Bool
+ KMonad.Prelude.Imports: odd :: Integral a => a -> Bool
+ KMonad.Prelude.Imports: on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
+ KMonad.Prelude.Imports: onException :: MonadUnliftIO m => m a -> m b -> m a
+ KMonad.Prelude.Imports: only :: Eq a => a -> Prism' a ()
+ KMonad.Prelude.Imports: op :: Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
+ KMonad.Prelude.Imports: openFile :: MonadIO m => FilePath -> IOMode -> m Handle
+ KMonad.Prelude.Imports: optional :: Alternative f => f a -> f (Maybe a)
+ KMonad.Prelude.Imports: or :: Foldable t => t Bool -> Bool
+ KMonad.Prelude.Imports: orElse :: STM a -> STM a -> STM a
+ KMonad.Prelude.Imports: orOf :: Getting Any s Bool -> s -> Bool
+ KMonad.Prelude.Imports: otherwise :: Bool
+ KMonad.Prelude.Imports: outside :: forall (p :: Type -> Type -> Type) s t a b r. Representable p => APrism s t a b -> Lens (p t r) (p s r) (p b r) (p a r)
+ KMonad.Prelude.Imports: over :: ASetter s t a b -> (a -> b) -> s -> t
+ KMonad.Prelude.Imports: overA :: Arrow ar => LensLike (Context a b) s t a b -> ar a b -> ar s t
+ KMonad.Prelude.Imports: overEquality :: forall {k1} {k2} (s :: k1) (t :: k2) (a :: k1) (b :: k2) p. AnEquality s t a b -> p a b -> p s t
+ KMonad.Prelude.Imports: pack :: String -> Text
+ KMonad.Prelude.Imports: para :: Plated a => (a -> [r] -> r) -> a -> r
+ KMonad.Prelude.Imports: paraOf :: Getting (Endo [a]) a a -> (a -> [r] -> r) -> a -> r
+ KMonad.Prelude.Imports: partitionEithers :: [Either a b] -> ([a], [b])
+ KMonad.Prelude.Imports: parts :: Plated a => Lens' a [a]
+ KMonad.Prelude.Imports: partsOf :: Functor f => Traversing (->) f s t a a -> LensLike f s t [a] [a]
+ KMonad.Prelude.Imports: partsOf' :: ATraversal s t a a -> Lens s t [a] [a]
+ KMonad.Prelude.Imports: passing :: MonadWriter w m => Setter w w u v -> m (a, u -> v) -> m a
+ KMonad.Prelude.Imports: pattern ReleaseException :: ReleaseType
+ KMonad.Prelude.Imports: pattern Wrapped :: Rewrapped s s => Unwrapped s -> s
+ KMonad.Prelude.Imports: pattern List :: IsList l => [Item l] -> l
+ KMonad.Prelude.Imports: pattern (:<) :: Cons b b a a => a -> b -> b
+ KMonad.Prelude.Imports: pattern Swapped :: Swap p => p b a -> p a b
+ KMonad.Prelude.Imports: pattern Empty :: AsEmpty s => s
+ KMonad.Prelude.Imports: pattern Unwrapped :: Rewrapped t t => t -> Unwrapped t
+ KMonad.Prelude.Imports: peekTBQueue :: TBQueue a -> STM a
+ KMonad.Prelude.Imports: peekTChan :: TChan a -> STM a
+ KMonad.Prelude.Imports: peekTQueue :: TQueue a -> STM a
+ KMonad.Prelude.Imports: pi :: Floating a => a
+ KMonad.Prelude.Imports: plate :: Plated a => Traversal' a a
+ KMonad.Prelude.Imports: poll :: MonadIO m => Async a -> m (Maybe (Either SomeException a))
+ KMonad.Prelude.Imports: pollSTM :: Async a -> STM (Maybe (Either SomeException a))
+ KMonad.Prelude.Imports: pooledForConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b)
+ KMonad.Prelude.Imports: pooledForConcurrentlyN :: (MonadUnliftIO m, Traversable t) => Int -> t a -> (a -> m b) -> m (t b)
+ KMonad.Prelude.Imports: pooledForConcurrentlyN_ :: (MonadUnliftIO m, Foldable t) => Int -> t a -> (a -> m b) -> m ()
+ KMonad.Prelude.Imports: pooledForConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m ()
+ KMonad.Prelude.Imports: pooledMapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b)
+ KMonad.Prelude.Imports: pooledMapConcurrentlyN :: (MonadUnliftIO m, Traversable t) => Int -> (a -> m b) -> t a -> m (t b)
+ KMonad.Prelude.Imports: pooledMapConcurrentlyN_ :: (MonadUnliftIO m, Foldable f) => Int -> (a -> m b) -> f a -> m ()
+ KMonad.Prelude.Imports: pooledMapConcurrently_ :: (MonadUnliftIO m, Foldable f) => (a -> m b) -> f a -> m ()
+ KMonad.Prelude.Imports: pooledReplicateConcurrently :: MonadUnliftIO m => Int -> m a -> m [a]
+ KMonad.Prelude.Imports: pooledReplicateConcurrentlyN :: MonadUnliftIO m => Int -> Int -> m a -> m [a]
+ KMonad.Prelude.Imports: pooledReplicateConcurrentlyN_ :: MonadUnliftIO m => Int -> Int -> m a -> m ()
+ KMonad.Prelude.Imports: pooledReplicateConcurrently_ :: MonadUnliftIO m => Int -> m a -> m ()
+ KMonad.Prelude.Imports: popBackDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (Maybe a)
+ KMonad.Prelude.Imports: popFrontDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (Maybe a)
+ KMonad.Prelude.Imports: pre :: Getting (First a) s a -> IndexPreservingGetter s (Maybe a)
+ KMonad.Prelude.Imports: prefixed :: Prefixed t => t -> Prism' t t
+ KMonad.Prelude.Imports: preuse :: MonadState s m => Getting (First a) s a -> m (Maybe a)
+ KMonad.Prelude.Imports: preuses :: MonadState s m => Getting (First r) s a -> (a -> r) -> m (Maybe r)
+ KMonad.Prelude.Imports: preview :: MonadReader s m => Getting (First a) s a -> m (Maybe a)
+ KMonad.Prelude.Imports: previews :: MonadReader s m => Getting (First r) s a -> (a -> r) -> m (Maybe r)
+ KMonad.Prelude.Imports: primitive :: PrimMonad m => (State# (PrimState m) -> (# State# (PrimState m), a #)) -> m a
+ KMonad.Prelude.Imports: prism :: (b -> t) -> (s -> Either t a) -> Prism s t a b
+ KMonad.Prelude.Imports: prism' :: (b -> s) -> (s -> Maybe a) -> Prism s s a b
+ KMonad.Prelude.Imports: product :: (Foldable t, Num a) => t a -> a
+ KMonad.Prelude.Imports: productOf :: Num a => Getting (Endo (Endo a)) s a -> s -> a
+ KMonad.Prelude.Imports: properFraction :: (RealFrac a, Integral b) => a -> (b, a)
+ KMonad.Prelude.Imports: pure :: Applicative f => a -> f a
+ KMonad.Prelude.Imports: pureTry :: a -> Either SomeException a
+ KMonad.Prelude.Imports: pureTryDeep :: NFData a => a -> Either SomeException a
+ KMonad.Prelude.Imports: pushBackDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> a -> m ()
+ KMonad.Prelude.Imports: pushFrontDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> a -> m ()
+ KMonad.Prelude.Imports: putMVar :: MonadIO m => MVar a -> a -> m ()
+ KMonad.Prelude.Imports: putTMVar :: TMVar a -> a -> STM ()
+ KMonad.Prelude.Imports: quot :: Integral a => a -> a -> a
+ KMonad.Prelude.Imports: quotRem :: Integral a => a -> a -> (a, a)
+ KMonad.Prelude.Imports: race :: MonadUnliftIO m => m a -> m b -> m (Either a b)
+ KMonad.Prelude.Imports: race_ :: MonadUnliftIO m => m a -> m b -> m ()
+ KMonad.Prelude.Imports: re :: AReview t b -> Getter b t
+ KMonad.Prelude.Imports: readChan :: MonadIO m => Chan a -> m a
+ KMonad.Prelude.Imports: readFileBinary :: MonadIO m => FilePath -> m ByteString
+ KMonad.Prelude.Imports: readFileUtf8 :: MonadIO m => FilePath -> m Text
+ KMonad.Prelude.Imports: readIORef :: MonadIO m => IORef a -> m a
+ KMonad.Prelude.Imports: readMVar :: MonadIO m => MVar a -> m a
+ KMonad.Prelude.Imports: readMaybe :: Read a => String -> Maybe a
+ KMonad.Prelude.Imports: readSomeRef :: MonadIO m => SomeRef a -> m a
+ KMonad.Prelude.Imports: readTBQueue :: TBQueue a -> STM a
+ KMonad.Prelude.Imports: readTChan :: TChan a -> STM a
+ KMonad.Prelude.Imports: readTMVar :: TMVar a -> STM a
+ KMonad.Prelude.Imports: readTQueue :: TQueue a -> STM a
+ KMonad.Prelude.Imports: readTVar :: TVar a -> STM a
+ KMonad.Prelude.Imports: readTVarIO :: MonadIO m => TVar a -> m a
+ KMonad.Prelude.Imports: readURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> m a
+ KMonad.Prelude.Imports: realToFrac :: (Real a, Fractional b) => a -> b
+ KMonad.Prelude.Imports: recip :: Fractional a => a -> a
+ KMonad.Prelude.Imports: registerDelay :: MonadIO m => Int -> m (TVar Bool)
+ KMonad.Prelude.Imports: reindexed :: Indexable j p => (i -> j) -> (Indexed i a b -> r) -> p a b -> r
+ KMonad.Prelude.Imports: rem :: Integral a => a -> a -> a
+ KMonad.Prelude.Imports: repeated :: Apply f => LensLike' f a a
+ KMonad.Prelude.Imports: replicate :: Int -> a -> [a]
+ KMonad.Prelude.Imports: replicateConcurrently :: MonadUnliftIO f => Int -> f a -> f [a]
+ KMonad.Prelude.Imports: replicateConcurrently_ :: (Applicative m, MonadUnliftIO m) => Int -> m a -> m ()
+ KMonad.Prelude.Imports: replicateM :: Applicative m => Int -> m a -> m [a]
+ KMonad.Prelude.Imports: replicateM_ :: Applicative m => Int -> m a -> m ()
+ KMonad.Prelude.Imports: replicated :: Int -> Fold a a
+ KMonad.Prelude.Imports: retagged :: (Profunctor p, Bifunctor p) => p a b -> p s b
+ KMonad.Prelude.Imports: retrySTM :: STM a
+ KMonad.Prelude.Imports: return :: Monad m => a -> m a
+ KMonad.Prelude.Imports: reuse :: MonadState b m => AReview t b -> m t
+ KMonad.Prelude.Imports: reuses :: MonadState b m => AReview t b -> (t -> r) -> m r
+ KMonad.Prelude.Imports: reverse :: [a] -> [a]
+ KMonad.Prelude.Imports: reversed :: Reversing a => Iso' a a
+ KMonad.Prelude.Imports: reversing :: Reversing t => t -> t
+ KMonad.Prelude.Imports: review :: MonadReader b m => AReview t b -> m t
+ KMonad.Prelude.Imports: reviewing :: (Bifunctor p, Functor f) => Optic (Tagged :: Type -> Type -> Type) Identity s t a b -> Optic' p f t b
+ KMonad.Prelude.Imports: reviews :: MonadReader b m => AReview t b -> (t -> r) -> m r
+ KMonad.Prelude.Imports: rewrite :: Plated a => (a -> Maybe a) -> a -> a
+ KMonad.Prelude.Imports: rewriteM :: (Monad m, Plated a) => (a -> m (Maybe a)) -> a -> m a
+ KMonad.Prelude.Imports: rewriteMOf :: Monad m => LensLike (WrappedMonad m) a b a b -> (b -> m (Maybe a)) -> a -> m b
+ KMonad.Prelude.Imports: rewriteMOn :: (Monad m, Plated a) => LensLike (WrappedMonad m) s t a a -> (a -> m (Maybe a)) -> s -> m t
+ KMonad.Prelude.Imports: rewriteMOnOf :: Monad m => LensLike (WrappedMonad m) s t a b -> LensLike (WrappedMonad m) a b a b -> (b -> m (Maybe a)) -> s -> m t
+ KMonad.Prelude.Imports: rewriteOf :: ASetter a b a b -> (b -> Maybe a) -> a -> b
+ KMonad.Prelude.Imports: rewriteOn :: Plated a => ASetter s t a a -> (a -> Maybe a) -> s -> t
+ KMonad.Prelude.Imports: rewriteOnOf :: ASetter s t a b -> ASetter a b a b -> (b -> Maybe a) -> s -> t
+ KMonad.Prelude.Imports: right' :: Choice p => p a b -> p (Either c a) (Either c b)
+ KMonad.Prelude.Imports: rights :: [Either a b] -> [b]
+ KMonad.Prelude.Imports: rmap :: Profunctor p => (b -> c) -> p a b -> p a c
+ KMonad.Prelude.Imports: rmapping :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) s t a b x y. (Profunctor p, Profunctor q) => AnIso s t a b -> Iso (p x s) (q y t) (p x a) (q y b)
+ KMonad.Prelude.Imports: rnf :: NFData a => a -> ()
+ KMonad.Prelude.Imports: round :: (RealFrac a, Integral b) => a -> b
+ KMonad.Prelude.Imports: runConc :: MonadUnliftIO m => Conc m a -> m a
+ KMonad.Prelude.Imports: runCont :: Cont r a -> (a -> r) -> r
+ KMonad.Prelude.Imports: runEq :: forall {k1} {k2} (s :: k1) (t :: k2) (a :: k1) (b :: k2). AnEquality s t a b -> Identical s t a b
+ KMonad.Prelude.Imports: runMemoized :: MonadIO m => Memoized a -> m a
+ KMonad.Prelude.Imports: runRIO :: MonadIO m => env -> RIO env a -> m a
+ KMonad.Prelude.Imports: runReader :: Reader r a -> r -> a
+ KMonad.Prelude.Imports: runST :: (forall s. () => ST s a) -> a
+ KMonad.Prelude.Imports: runSimpleApp :: MonadIO m => RIO SimpleApp a -> m a
+ KMonad.Prelude.Imports: sans :: At m => Index m -> m -> m
+ KMonad.Prelude.Imports: sappend :: Semigroup s => s -> s -> s
+ KMonad.Prelude.Imports: scaleFloat :: RealFloat a => Int -> a -> a
+ KMonad.Prelude.Imports: scanl1Of :: LensLike (State (Maybe a)) s t a a -> (a -> a -> a) -> s -> t
+ KMonad.Prelude.Imports: scanr1Of :: LensLike (Backwards (State (Maybe a))) s t a a -> (a -> a -> a) -> s -> t
+ KMonad.Prelude.Imports: scribe :: (MonadWriter t m, Monoid s) => ASetter s t a b -> b -> m ()
+ KMonad.Prelude.Imports: second :: Bifunctor p => (b -> c) -> p a b -> p a c
+ KMonad.Prelude.Imports: seconding :: forall (f :: Type -> Type -> Type) (g :: Type -> Type -> Type) s t a b x y. (Bifunctor f, Bifunctor g) => AnIso s t a b -> Iso (f x s) (g y t) (f x a) (g y b)
+ KMonad.Prelude.Imports: selfIndex :: Indexable a p => p a fb -> a -> fb
+ KMonad.Prelude.Imports: seq :: forall {r :: RuntimeRep} a (b :: TYPE r). a -> b -> b
+ KMonad.Prelude.Imports: sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
+ KMonad.Prelude.Imports: sequence1Of_ :: Functor f => Getting (TraversedF a f) s (f a) -> s -> f ()
+ KMonad.Prelude.Imports: sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
+ KMonad.Prelude.Imports: sequenceAOf :: LensLike f s t (f b) b -> s -> f t
+ KMonad.Prelude.Imports: sequenceAOf_ :: Functor f => Getting (Traversed a f) s (f a) -> s -> f ()
+ KMonad.Prelude.Imports: sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f ()
+ KMonad.Prelude.Imports: sequenceBy :: Traversable t => (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> t (f a) -> f (t a)
+ KMonad.Prelude.Imports: sequenceByOf :: Traversal s t (f b) b -> (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> s -> f t
+ KMonad.Prelude.Imports: sequenceOf :: LensLike (WrappedMonad m) s t (m b) b -> s -> m t
+ KMonad.Prelude.Imports: sequenceOf_ :: Monad m => Getting (Sequenced a m) s (m a) -> s -> m ()
+ KMonad.Prelude.Imports: sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
+ KMonad.Prelude.Imports: set :: ASetter s t a b -> b -> s -> t
+ KMonad.Prelude.Imports: set' :: ASetter' s a -> a -> s -> s
+ KMonad.Prelude.Imports: setLogAccentColors :: (Int -> Utf8Builder) -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogFormat :: (Utf8Builder -> Utf8Builder) -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogLevelColors :: (LogLevel -> Utf8Builder) -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogMinLevel :: LogLevel -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogMinLevelIO :: IO LogLevel -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogSecondaryColor :: Utf8Builder -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogTerminal :: Bool -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogUseColor :: Bool -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogUseLoc :: Bool -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogUseTime :: Bool -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogVerboseFormat :: Bool -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: setLogVerboseFormatIO :: IO Bool -> LogOptions -> LogOptions
+ KMonad.Prelude.Imports: sets :: (Profunctor p, Profunctor q, Settable f) => (p a b -> q s t) -> Optical p q f s t a b
+ KMonad.Prelude.Imports: setting :: ((a -> b) -> s -> t) -> IndexPreservingSetter s t a b
+ KMonad.Prelude.Imports: show :: Show a => a -> String
+ KMonad.Prelude.Imports: signalQSem :: MonadIO m => QSem -> m ()
+ KMonad.Prelude.Imports: signalQSemN :: MonadIO m => QSemN -> Int -> m ()
+ KMonad.Prelude.Imports: significand :: RealFloat a => a -> a
+ KMonad.Prelude.Imports: signum :: Num a => a -> a
+ KMonad.Prelude.Imports: simple :: forall {k2} (a :: k2) k3 p (f :: k2 -> k3). p a (f a) -> p a (f a)
+ KMonad.Prelude.Imports: simpleLenses :: Lens' LensRules Bool
+ KMonad.Prelude.Imports: simply :: forall {k} {k1} p (f :: k -> k1) (s :: k) (a :: k) (rep :: RuntimeRep) (r :: TYPE rep). (Optic' p f s a -> r) -> Optic' p f s a -> r
+ KMonad.Prelude.Imports: sin :: Floating a => a -> a
+ KMonad.Prelude.Imports: singular :: (HasCallStack, Conjoined p, Functor f) => Traversing p f s t a a -> Over p f s t a a
+ KMonad.Prelude.Imports: sinh :: Floating a => a -> a
+ KMonad.Prelude.Imports: snd :: (a, b) -> b
+ KMonad.Prelude.Imports: snoc :: Snoc s s a a => s -> a -> s
+ KMonad.Prelude.Imports: span :: (a -> Bool) -> [a] -> ([a], [a])
+ KMonad.Prelude.Imports: sqrt :: Floating a => a -> a
+ KMonad.Prelude.Imports: stateRefL :: HasStateRef s env => Lens' env (SomeRef s)
+ KMonad.Prelude.Imports: stateTVar :: TVar s -> (s -> (a, s)) -> STM a
+ KMonad.Prelude.Imports: stderr :: Handle
+ KMonad.Prelude.Imports: stdin :: Handle
+ KMonad.Prelude.Imports: stdout :: Handle
+ KMonad.Prelude.Imports: storing :: ALens s t a b -> b -> s -> t
+ KMonad.Prelude.Imports: strict :: Strict lazy strict => Iso' lazy strict
+ KMonad.Prelude.Imports: stringException :: HasCallStack => String -> StringException
+ KMonad.Prelude.Imports: substEq :: forall {k1} {k2} (s :: k1) (t :: k2) (a :: k1) (b :: k2) (rep :: RuntimeRep) (r :: TYPE rep). AnEquality s t a b -> ((s ~ a, t ~ b) => r) -> r
+ KMonad.Prelude.Imports: subtract :: Num a => a -> a -> a
+ KMonad.Prelude.Imports: suffixed :: Suffixed t => t -> Prism' t t
+ KMonad.Prelude.Imports: sum :: (Foldable t, Num a) => t a -> a
+ KMonad.Prelude.Imports: sumOf :: Num a => Getting (Endo (Endo a)) s a -> s -> a
+ KMonad.Prelude.Imports: swapMVar :: MonadIO m => MVar a -> a -> m a
+ KMonad.Prelude.Imports: swapTMVar :: TMVar a -> a -> STM a
+ KMonad.Prelude.Imports: swapTVar :: TVar a -> a -> STM a
+ KMonad.Prelude.Imports: swapped :: forall (p :: Type -> Type -> Type) a b c d. Swap p => Iso (p a b) (p c d) (p b a) (p d c)
+ KMonad.Prelude.Imports: take :: Int -> [a] -> [a]
+ KMonad.Prelude.Imports: takeMVar :: MonadIO m => MVar a -> m a
+ KMonad.Prelude.Imports: takeTMVar :: TMVar a -> STM a
+ KMonad.Prelude.Imports: takeWhile :: (a -> Bool) -> [a] -> [a]
+ KMonad.Prelude.Imports: taking :: (Conjoined p, Applicative f) => Int -> Traversing p f s t a a -> Over p f s t a a
+ KMonad.Prelude.Imports: takingWhile :: (Conjoined p, Applicative f) => (a -> Bool) -> Over p (TakingWhile p f a a) s t a a -> Over p f s t a a
+ KMonad.Prelude.Imports: tan :: Floating a => a -> a
+ KMonad.Prelude.Imports: tanh :: Floating a => a -> a
+ KMonad.Prelude.Imports: textDisplay :: Display a => a -> Text
+ KMonad.Prelude.Imports: threadDelay :: MonadIO m => Int -> m ()
+ KMonad.Prelude.Imports: threadWaitRead :: MonadIO m => Fd -> m ()
+ KMonad.Prelude.Imports: threadWaitWrite :: MonadIO m => Fd -> m ()
+ KMonad.Prelude.Imports: throwIO :: (MonadIO m, Exception e) => e -> m a
+ KMonad.Prelude.Imports: throwM :: (MonadThrow m, Exception e) => e -> m a
+ KMonad.Prelude.Imports: throwString :: (MonadIO m, HasCallStack) => String -> m a
+ KMonad.Prelude.Imports: throwTo :: (Exception e, MonadIO m) => ThreadId -> e -> m ()
+ KMonad.Prelude.Imports: timeout :: MonadUnliftIO m => Int -> m a -> m (Maybe a)
+ KMonad.Prelude.Imports: to :: (Profunctor p, Contravariant f) => (s -> a) -> Optic' p f s a
+ KMonad.Prelude.Imports: toAsyncException :: Exception e => e -> SomeException
+ KMonad.Prelude.Imports: toConstr :: Data a => a -> Constr
+ KMonad.Prelude.Imports: toException :: Exception e => e -> SomeException
+ KMonad.Prelude.Imports: toIO :: MonadUnliftIO m => m a -> m (IO a)
+ KMonad.Prelude.Imports: toInteger :: Integral a => a -> Integer
+ KMonad.Prelude.Imports: toList :: Foldable t => t a -> [a]
+ KMonad.Prelude.Imports: toListOf :: Getting (Endo [a]) s a -> s -> [a]
+ KMonad.Prelude.Imports: toNonEmptyOf :: Getting (NonEmptyDList a) s a -> s -> NonEmpty a
+ KMonad.Prelude.Imports: toRational :: Real a => a -> Rational
+ KMonad.Prelude.Imports: toShort :: ByteString -> ShortByteString
+ KMonad.Prelude.Imports: toStrictBytes :: LByteString -> ByteString
+ KMonad.Prelude.Imports: toSyncException :: Exception e => e -> SomeException
+ KMonad.Prelude.Imports: trace :: Text -> a -> a
+ KMonad.Prelude.Imports: traceDisplay :: Display a => a -> b -> b
+ KMonad.Prelude.Imports: traceDisplayEvent :: Display a => a -> b -> b
+ KMonad.Prelude.Imports: traceDisplayEventIO :: (Display a, MonadIO m) => a -> m ()
+ KMonad.Prelude.Imports: traceDisplayIO :: (Display a, MonadIO m) => a -> m ()
+ KMonad.Prelude.Imports: traceDisplayId :: Display a => a -> a
+ KMonad.Prelude.Imports: traceDisplayM :: (Display a, Applicative f) => a -> f ()
+ KMonad.Prelude.Imports: traceDisplayMarker :: Display a => a -> b -> b
+ KMonad.Prelude.Imports: traceDisplayMarkerIO :: (Display a, MonadIO m) => a -> m ()
+ KMonad.Prelude.Imports: traceDisplayStack :: Display a => a -> b -> b
+ KMonad.Prelude.Imports: traceEvent :: Text -> a -> a
+ KMonad.Prelude.Imports: traceEventIO :: MonadIO m => Text -> m ()
+ KMonad.Prelude.Imports: traceIO :: MonadIO m => Text -> m ()
+ KMonad.Prelude.Imports: traceId :: Text -> Text
+ KMonad.Prelude.Imports: traceM :: Applicative f => Text -> f ()
+ KMonad.Prelude.Imports: traceMarker :: Text -> a -> a
+ KMonad.Prelude.Imports: traceMarkerIO :: MonadIO m => Text -> m ()
+ KMonad.Prelude.Imports: traceShow :: Show a => a -> b -> b
+ KMonad.Prelude.Imports: traceShowEvent :: Show a => a -> b -> b
+ KMonad.Prelude.Imports: traceShowEventIO :: (Show a, MonadIO m) => a -> m ()
+ KMonad.Prelude.Imports: traceShowIO :: (Show a, MonadIO m) => a -> m ()
+ KMonad.Prelude.Imports: traceShowId :: Show a => a -> a
+ KMonad.Prelude.Imports: traceShowM :: (Show a, Applicative f) => a -> f ()
+ KMonad.Prelude.Imports: traceShowMarker :: Show a => a -> b -> b
+ KMonad.Prelude.Imports: traceShowMarkerIO :: (Show a, MonadIO m) => a -> m ()
+ KMonad.Prelude.Imports: traceShowStack :: Show a => a -> b -> b
+ KMonad.Prelude.Imports: traceStack :: Text -> a -> a
+ KMonad.Prelude.Imports: transform :: Plated a => (a -> a) -> a -> a
+ KMonad.Prelude.Imports: transformM :: (Monad m, Plated a) => (a -> m a) -> a -> m a
+ KMonad.Prelude.Imports: transformMOf :: Monad m => LensLike (WrappedMonad m) a b a b -> (b -> m b) -> a -> m b
+ KMonad.Prelude.Imports: transformMOn :: (Monad m, Plated a) => LensLike (WrappedMonad m) s t a a -> (a -> m a) -> s -> m t
+ KMonad.Prelude.Imports: transformMOnOf :: Monad m => LensLike (WrappedMonad m) s t a b -> LensLike (WrappedMonad m) a b a b -> (b -> m b) -> s -> m t
+ KMonad.Prelude.Imports: transformOf :: ASetter a b a b -> (b -> b) -> a -> b
+ KMonad.Prelude.Imports: transformOn :: Plated a => ASetter s t a a -> (a -> a) -> s -> t
+ KMonad.Prelude.Imports: transformOnOf :: ASetter s t a b -> ASetter a b a b -> (b -> b) -> s -> t
+ KMonad.Prelude.Imports: transposeOf :: LensLike ZipList s t [a] a -> s -> [t]
+ KMonad.Prelude.Imports: traversal :: ((a -> f b) -> s -> f t) -> LensLike f s t a b
+ KMonad.Prelude.Imports: traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
+ KMonad.Prelude.Imports: traverse1 :: (Traversable1 t, Apply f) => (a -> f b) -> t a -> f (t b)
+ KMonad.Prelude.Imports: traverse1Of_ :: Functor f => Getting (TraversedF r f) s a -> (a -> f r) -> s -> f ()
+ KMonad.Prelude.Imports: traverseBy :: Traversable t => (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> (a -> f b) -> t a -> f (t b)
+ KMonad.Prelude.Imports: traverseByOf :: Traversal s t a b -> (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> (a -> f b) -> s -> f t
+ KMonad.Prelude.Imports: traverseMax :: TraverseMax k m => IndexedTraversal' k (m v) v
+ KMonad.Prelude.Imports: traverseMin :: TraverseMin k m => IndexedTraversal' k (m v) v
+ KMonad.Prelude.Imports: traverseOf :: LensLike f s t a b -> (a -> f b) -> s -> f t
+ KMonad.Prelude.Imports: traverseOf_ :: Functor f => Getting (Traversed r f) s a -> (a -> f r) -> s -> f ()
+ KMonad.Prelude.Imports: traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
+ KMonad.Prelude.Imports: traversed :: forall (f :: Type -> Type) a b. Traversable f => IndexedTraversal Int (f a) (f b) a b
+ KMonad.Prelude.Imports: traversed1 :: forall (f :: Type -> Type) a b. Traversable1 f => IndexedTraversal1 Int (f a) (f b) a b
+ KMonad.Prelude.Imports: traversed64 :: forall (f :: Type -> Type) a b. Traversable f => IndexedTraversal Int64 (f a) (f b) a b
+ KMonad.Prelude.Imports: truncate :: (RealFrac a, Integral b) => a -> b
+ KMonad.Prelude.Imports: try :: (MonadUnliftIO m, Exception e) => m a -> m (Either e a)
+ KMonad.Prelude.Imports: tryAny :: MonadUnliftIO m => m a -> m (Either SomeException a)
+ KMonad.Prelude.Imports: tryAnyDeep :: (MonadUnliftIO m, NFData a) => m a -> m (Either SomeException a)
+ KMonad.Prelude.Imports: tryDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> m (Either e a)
+ KMonad.Prelude.Imports: tryIO :: MonadUnliftIO m => m a -> m (Either IOException a)
+ KMonad.Prelude.Imports: tryJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a)
+ KMonad.Prelude.Imports: tryPeekTBQueue :: TBQueue a -> STM (Maybe a)
+ KMonad.Prelude.Imports: tryPeekTChan :: TChan a -> STM (Maybe a)
+ KMonad.Prelude.Imports: tryPeekTQueue :: TQueue a -> STM (Maybe a)
+ KMonad.Prelude.Imports: tryPutMVar :: MonadIO m => MVar a -> a -> m Bool
+ KMonad.Prelude.Imports: tryPutTMVar :: TMVar a -> a -> STM Bool
+ KMonad.Prelude.Imports: tryReadMVar :: MonadIO m => MVar a -> m (Maybe a)
+ KMonad.Prelude.Imports: tryReadTBQueue :: TBQueue a -> STM (Maybe a)
+ KMonad.Prelude.Imports: tryReadTChan :: TChan a -> STM (Maybe a)
+ KMonad.Prelude.Imports: tryReadTMVar :: TMVar a -> STM (Maybe a)
+ KMonad.Prelude.Imports: tryReadTQueue :: TQueue a -> STM (Maybe a)
+ KMonad.Prelude.Imports: trySyncOrAsync :: (MonadUnliftIO m, Exception e) => m a -> m (Either e a)
+ KMonad.Prelude.Imports: tryTakeMVar :: MonadIO m => MVar a -> m (Maybe a)
+ KMonad.Prelude.Imports: tryTakeTMVar :: TMVar a -> STM (Maybe a)
+ KMonad.Prelude.Imports: tshow :: Show a => a -> Text
+ KMonad.Prelude.Imports: type ALens s t a b = LensLike Pretext (->) a b s t a b
+ KMonad.Prelude.Imports: type ALens' s a = ALens s s a a
+ KMonad.Prelude.Imports: type APrism s t a b = Market a b a Identity b -> Market a b s Identity t
+ KMonad.Prelude.Imports: type APrism' s a = APrism s s a a
+ KMonad.Prelude.Imports: type AReview t b = Optic' Tagged :: Type -> Type -> Type Identity t b
+ KMonad.Prelude.Imports: type ASetter s t a b = a -> Identity b -> s -> Identity t
+ KMonad.Prelude.Imports: type ASetter' s a = ASetter s s a a
+ KMonad.Prelude.Imports: type ATraversal s t a b = LensLike Bazaar (->) a b s t a b
+ KMonad.Prelude.Imports: type ATraversal' s a = ATraversal s s a a
+ KMonad.Prelude.Imports: type ATraversal1 s t a b = LensLike Bazaar1 (->) a b s t a b
+ KMonad.Prelude.Imports: type ATraversal1' s a = ATraversal1 s s a a
+ KMonad.Prelude.Imports: type Accessing (p :: Type -> Type -> Type) m s a = p a Const m a -> s -> Const m s
+ KMonad.Prelude.Imports: type AnEquality (s :: k) (t :: k1) (a :: k) (b :: k2) = Identical a Proxy b a Proxy b -> Identical a Proxy b s Proxy t
+ KMonad.Prelude.Imports: type AnEquality' (s :: k) (a :: k) = AnEquality s s a a
+ KMonad.Prelude.Imports: type AnIndexedLens i s t a b = Optical Indexed i (->) Pretext Indexed i a b s t a b
+ KMonad.Prelude.Imports: type AnIndexedLens' i s a = AnIndexedLens i s s a a
+ KMonad.Prelude.Imports: type AnIndexedSetter i s t a b = Indexed i a Identity b -> s -> Identity t
+ KMonad.Prelude.Imports: type AnIndexedSetter' i s a = AnIndexedSetter i s s a a
+ KMonad.Prelude.Imports: type AnIndexedTraversal i s t a b = Over Indexed i Bazaar Indexed i a b s t a b
+ KMonad.Prelude.Imports: type AnIndexedTraversal' i s a = AnIndexedTraversal i s s a a
+ KMonad.Prelude.Imports: type AnIndexedTraversal1 i s t a b = Over Indexed i Bazaar1 Indexed i a b s t a b
+ KMonad.Prelude.Imports: type AnIndexedTraversal1' i s a = AnIndexedTraversal1 i s s a a
+ KMonad.Prelude.Imports: type AnIso s t a b = Exchange a b a Identity b -> Exchange a b s Identity t
+ KMonad.Prelude.Imports: type AnIso' s a = AnIso s s a a
+ KMonad.Prelude.Imports: type As (a :: k2) = Equality' a a
+ KMonad.Prelude.Imports: type BDeque = Deque MVector
+ KMonad.Prelude.Imports: type Bazaar' (p :: Type -> Type -> Type) a = Bazaar p a a
+ KMonad.Prelude.Imports: type Bazaar1' (p :: Type -> Type -> Type) a = Bazaar1 p a a
+ KMonad.Prelude.Imports: type ClassyNamer = Name -> Maybe (Name, Name)
+ KMonad.Prelude.Imports: type Cont r = ContT r Identity
+ KMonad.Prelude.Imports: type Context' a = Context a a
+ KMonad.Prelude.Imports: type Equality' (s :: k2) (a :: k2) = Equality s s a a
+ KMonad.Prelude.Imports: type FieldNamer = Name -> [Name] -> Name -> [DefName]
+ KMonad.Prelude.Imports: type FilePath = String
+ KMonad.Prelude.Imports: type GVector = Vector
+ KMonad.Prelude.Imports: type Getting r s a = a -> Const r a -> s -> Const r s
+ KMonad.Prelude.Imports: type HasCallStack = ?callStack :: CallStack
+ KMonad.Prelude.Imports: type IOURef = URef PrimState IO
+ KMonad.Prelude.Imports: type IndexPreservingLens' s a = IndexPreservingLens s s a a
+ KMonad.Prelude.Imports: type IndexPreservingSetter' s a = IndexPreservingSetter s s a a
+ KMonad.Prelude.Imports: type IndexPreservingTraversal' s a = IndexPreservingTraversal s s a a
+ KMonad.Prelude.Imports: type IndexPreservingTraversal1' s a = IndexPreservingTraversal1 s s a a
+ KMonad.Prelude.Imports: type IndexedGetting i m s a = Indexed i a Const m a -> s -> Const m s
+ KMonad.Prelude.Imports: type IndexedLens' i s a = IndexedLens i s s a a
+ KMonad.Prelude.Imports: type IndexedLensLike' i (f :: Type -> Type) s a = IndexedLensLike i f s s a a
+ KMonad.Prelude.Imports: type IndexedSetter' i s a = IndexedSetter i s s a a
+ KMonad.Prelude.Imports: type IndexedTraversal' i s a = IndexedTraversal i s s a a
+ KMonad.Prelude.Imports: type IndexedTraversal1' i s a = IndexedTraversal1 i s s a a
+ KMonad.Prelude.Imports: type Iso' s a = Iso s s a a
+ KMonad.Prelude.Imports: type LByteString = ByteString
+ KMonad.Prelude.Imports: type LText = Text
+ KMonad.Prelude.Imports: type Lens' s a = Lens s s a a
+ KMonad.Prelude.Imports: type LensLike (f :: k -> Type) s (t :: k) a (b :: k) = a -> f b -> s -> f t
+ KMonad.Prelude.Imports: type LensLike' (f :: Type -> Type) s a = LensLike f s s a a
+ KMonad.Prelude.Imports: type LogSource = Text
+ KMonad.Prelude.Imports: type Optic (p :: k -> k1 -> Type) (f :: k2 -> k1) (s :: k) (t :: k2) (a :: k) (b :: k2) = p a f b -> p s f t
+ KMonad.Prelude.Imports: type Review t b = forall (p :: Type -> Type -> Type) (f :: Type -> Type). (Choice p, Bifunctor p, Settable f) => Optic' p f t b
+ KMonad.Prelude.Imports: type Optical (p :: k -> k1 -> Type) (q :: k2 -> k1 -> Type) (f :: k3 -> k1) (s :: k2) (t :: k3) (a :: k) (b :: k3) = p a f b -> q s f t
+ KMonad.Prelude.Imports: type Optical' (p :: k -> k1 -> Type) (q :: k -> k1 -> Type) (f :: k -> k1) (s :: k) (a :: k) = Optical p q f s s a a
+ KMonad.Prelude.Imports: type Over (p :: k -> Type -> Type) (f :: k1 -> Type) s (t :: k1) (a :: k) (b :: k1) = p a f b -> s -> f t
+ KMonad.Prelude.Imports: type Over' (p :: Type -> Type -> Type) (f :: Type -> Type) s a = Over p f s s a a
+ KMonad.Prelude.Imports: type Prism' s a = Prism s s a a
+ KMonad.Prelude.Imports: type Rational = Ratio Integer
+ KMonad.Prelude.Imports: type Reader r = ReaderT r Identity
+ KMonad.Prelude.Imports: type ReifiedIndexedLens' i s a = ReifiedIndexedLens i s s a a
+ KMonad.Prelude.Imports: type ReifiedIndexedSetter' i s a = ReifiedIndexedSetter i s s a a
+ KMonad.Prelude.Imports: type ReifiedIndexedTraversal' i s a = ReifiedIndexedTraversal i s s a a
+ KMonad.Prelude.Imports: type ReifiedIso' s a = ReifiedIso s s a a
+ KMonad.Prelude.Imports: type ReifiedLens' s a = ReifiedLens s s a a
+ KMonad.Prelude.Imports: type ReifiedPrism' s a = ReifiedPrism s s a a
+ KMonad.Prelude.Imports: type ReifiedSetter' s a = ReifiedSetter s s a a
+ KMonad.Prelude.Imports: type ReifiedTraversal' s a = ReifiedTraversal s s a a
+ KMonad.Prelude.Imports: type SDeque = Deque MVector
+ KMonad.Prelude.Imports: type SVector = Vector
+ KMonad.Prelude.Imports: type Setter' s a = Setter s s a a
+ KMonad.Prelude.Imports: type Setting (p :: Type -> Type -> Type) s t a b = p a Identity b -> s -> Identity t
+ KMonad.Prelude.Imports: type Setting' (p :: Type -> Type -> Type) s a = Setting p s s a a
+ KMonad.Prelude.Imports: type Simple (f :: k1 -> k1 -> k2 -> k2 -> k) (s :: k1) (a :: k2) = f s s a a
+ KMonad.Prelude.Imports: type String = [Char]
+ KMonad.Prelude.Imports: type Traversal' s a = Traversal s s a a
+ KMonad.Prelude.Imports: type Traversal1' s a = Traversal1 s s a a
+ KMonad.Prelude.Imports: type Traversing (p :: Type -> Type -> Type) (f :: Type -> Type) s t a b = Over p BazaarT p f a b s t a b
+ KMonad.Prelude.Imports: type Traversing' (p :: Type -> Type -> Type) (f :: Type -> Type) s a = Traversing p f s s a a
+ KMonad.Prelude.Imports: type Traversing1 (p :: Type -> Type -> Type) (f :: Type -> Type) s t a b = Over p BazaarT1 p f a b s t a b
+ KMonad.Prelude.Imports: type Traversing1' (p :: Type -> Type -> Type) (f :: Type -> Type) s a = Traversing1 p f s s a a
+ KMonad.Prelude.Imports: type UDeque = Deque MVector
+ KMonad.Prelude.Imports: type UVector = Vector
+ KMonad.Prelude.Imports: type Unwrapped s = GUnwrapped Rep s;
+ KMonad.Prelude.Imports: type Traversal1 s t a b = forall (f :: Type -> Type). Apply f => a -> f b -> s -> f t
+ KMonad.Prelude.Imports: type family GMsg env
+ KMonad.Prelude.Imports: type IndexPreservingLens s t a b = forall (p :: Type -> Type -> Type) (f :: Type -> Type). (Conjoined p, Functor f) => p a f b -> p s f t
+ KMonad.Prelude.Imports: un :: (Profunctor p, Bifunctor p, Functor f) => Getting a s a -> Optic' p f a s
+ KMonad.Prelude.Imports: unGetTBQueue :: TBQueue a -> a -> STM ()
+ KMonad.Prelude.Imports: unGetTChan :: TChan a -> a -> STM ()
+ KMonad.Prelude.Imports: unGetTQueue :: TQueue a -> a -> STM ()
+ KMonad.Prelude.Imports: uncons :: Cons s s a a => s -> Maybe (a, s)
+ KMonad.Prelude.Imports: uncurried :: forall a b c d e f1 p f2. (Profunctor p, Functor f2) => p ((a, b) -> c) (f2 ((d, e) -> f1)) -> p (a -> b -> c) (f2 (d -> e -> f1))
+ KMonad.Prelude.Imports: uncurry :: (a -> b -> c) -> (a, b) -> c
+ KMonad.Prelude.Imports: undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
+ KMonad.Prelude.Imports: under :: AnIso s t a b -> (t -> s) -> b -> a
+ KMonad.Prelude.Imports: underEquality :: forall {k1} {k2} (s :: k1) (t :: k2) (a :: k1) (b :: k2) p. AnEquality s t a b -> p t s -> p b a
+ KMonad.Prelude.Imports: underscoreFields :: LensRules
+ KMonad.Prelude.Imports: underscoreNamer :: FieldNamer
+ KMonad.Prelude.Imports: underscoreNoPrefixNamer :: FieldNamer
+ KMonad.Prelude.Imports: unfolded :: (b -> Maybe (a, b)) -> Fold b a
+ KMonad.Prelude.Imports: uninterruptibleCancel :: MonadIO m => Async a -> m ()
+ KMonad.Prelude.Imports: uninterruptibleMask :: MonadUnliftIO m => ((forall a. () => m a -> m a) -> m b) -> m b
+ KMonad.Prelude.Imports: uninterruptibleMask_ :: MonadUnliftIO m => m a -> m a
+ KMonad.Prelude.Imports: united :: forall a f. Functor f => (() -> f ()) -> a -> f a
+ KMonad.Prelude.Imports: universe :: Plated a => a -> [a]
+ KMonad.Prelude.Imports: universeOf :: Getting (Endo [a]) a a -> a -> [a]
+ KMonad.Prelude.Imports: universeOn :: Plated a => Getting (Endo [a]) s a -> s -> [a]
+ KMonad.Prelude.Imports: universeOnOf :: Getting (Endo [a]) s a -> Getting (Endo [a]) a a -> s -> [a]
+ KMonad.Prelude.Imports: unless :: Applicative f => Bool -> f () -> f ()
+ KMonad.Prelude.Imports: unlessM :: Monad m => m Bool -> m () -> m ()
+ KMonad.Prelude.Imports: unlines :: [Text] -> Text
+ KMonad.Prelude.Imports: unpack :: Text -> String
+ KMonad.Prelude.Imports: unsafePartsOf :: Functor f => Traversing (->) f s t a b -> LensLike f s t [a] [b]
+ KMonad.Prelude.Imports: unsafePartsOf' :: ATraversal s t a b -> Lens s t [a] [b]
+ KMonad.Prelude.Imports: unsafeSingular :: (HasCallStack, Conjoined p, Functor f) => Traversing p f s t a b -> Over p f s t a b
+ KMonad.Prelude.Imports: unsnoc :: Snoc s s a a => s -> Maybe (s, a)
+ KMonad.Prelude.Imports: unto :: (Profunctor p, Bifunctor p, Functor f) => (b -> t) -> Optic p f s t a b
+ KMonad.Prelude.Imports: unwords :: [String] -> String
+ KMonad.Prelude.Imports: use :: MonadState s m => Getting a s a -> m a
+ KMonad.Prelude.Imports: uses :: MonadState s m => LensLike' (Const r :: Type -> Type) s a -> (a -> r) -> m r
+ KMonad.Prelude.Imports: utf8BuilderToLazyText :: Utf8Builder -> Text
+ KMonad.Prelude.Imports: utf8BuilderToText :: Utf8Builder -> Text
+ KMonad.Prelude.Imports: view :: MonadReader s m => Getting a s a -> m a
+ KMonad.Prelude.Imports: views :: MonadReader s m => LensLike' (Const r :: Type -> Type) s a -> (a -> r) -> m r
+ KMonad.Prelude.Imports: void :: Functor f => f a -> f ()
+ KMonad.Prelude.Imports: wait :: MonadIO m => Async a -> m a
+ KMonad.Prelude.Imports: waitAny :: MonadIO m => [Async a] -> m (Async a, a)
+ KMonad.Prelude.Imports: waitAnyCancel :: MonadIO m => [Async a] -> m (Async a, a)
+ KMonad.Prelude.Imports: waitAnyCatch :: MonadIO m => [Async a] -> m (Async a, Either SomeException a)
+ KMonad.Prelude.Imports: waitAnyCatchCancel :: MonadIO m => [Async a] -> m (Async a, Either SomeException a)
+ KMonad.Prelude.Imports: waitAnyCatchSTM :: [Async a] -> STM (Async a, Either SomeException a)
+ KMonad.Prelude.Imports: waitAnySTM :: [Async a] -> STM (Async a, a)
+ KMonad.Prelude.Imports: waitBoth :: MonadIO m => Async a -> Async b -> m (a, b)
+ KMonad.Prelude.Imports: waitBothSTM :: Async a -> Async b -> STM (a, b)
+ KMonad.Prelude.Imports: waitCatch :: MonadIO m => Async a -> m (Either SomeException a)
+ KMonad.Prelude.Imports: waitCatchSTM :: Async a -> STM (Either SomeException a)
+ KMonad.Prelude.Imports: waitEither :: MonadIO m => Async a -> Async b -> m (Either a b)
+ KMonad.Prelude.Imports: waitEitherCancel :: MonadIO m => Async a -> Async b -> m (Either a b)
+ KMonad.Prelude.Imports: waitEitherCatch :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
+ KMonad.Prelude.Imports: waitEitherCatchCancel :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
+ KMonad.Prelude.Imports: waitEitherCatchSTM :: Async a -> Async b -> STM (Either (Either SomeException a) (Either SomeException b))
+ KMonad.Prelude.Imports: waitEitherSTM :: Async a -> Async b -> STM (Either a b)
+ KMonad.Prelude.Imports: waitEitherSTM_ :: Async a -> Async b -> STM ()
+ KMonad.Prelude.Imports: waitEither_ :: MonadIO m => Async a -> Async b -> m ()
+ KMonad.Prelude.Imports: waitQSem :: MonadIO m => QSem -> m ()
+ KMonad.Prelude.Imports: waitQSemN :: MonadIO m => QSemN -> Int -> m ()
+ KMonad.Prelude.Imports: waitSTM :: Async a -> STM a
+ KMonad.Prelude.Imports: when :: Applicative f => Bool -> f () -> f ()
+ KMonad.Prelude.Imports: whenM :: Monad m => m Bool -> m () -> m ()
+ KMonad.Prelude.Imports: with :: MonadUnliftIO m => Acquire a -> (a -> m b) -> m b
+ KMonad.Prelude.Imports: withAcquire :: MonadUnliftIO m => Acquire a -> (a -> m b) -> m b
+ KMonad.Prelude.Imports: withAsync :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b
+ KMonad.Prelude.Imports: withAsyncBound :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b
+ KMonad.Prelude.Imports: withAsyncOn :: MonadUnliftIO m => Int -> m a -> (Async a -> m b) -> m b
+ KMonad.Prelude.Imports: withAsyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall c. () => m c -> m c) -> m a) -> (Async a -> m b) -> m b
+ KMonad.Prelude.Imports: withAsyncWithUnmask :: MonadUnliftIO m => ((forall c. () => m c -> m c) -> m a) -> (Async a -> m b) -> m b
+ KMonad.Prelude.Imports: withBinaryFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a
+ KMonad.Prelude.Imports: withCont :: ((b -> r) -> a -> r) -> Cont r a -> Cont r b
+ KMonad.Prelude.Imports: withContT :: forall {k} b m (r :: k) a. ((b -> m r) -> a -> m r) -> ContT r m a -> ContT r m b
+ KMonad.Prelude.Imports: withEquality :: forall {k1} {k2} (s :: k1) (t :: k2) (a :: k1) (b :: k2) (rep :: RuntimeRep) (r :: TYPE rep). AnEquality s t a b -> ((s :~: a) -> (b :~: t) -> r) -> r
+ KMonad.Prelude.Imports: withException :: (MonadUnliftIO m, Exception e) => m a -> (e -> m b) -> m a
+ KMonad.Prelude.Imports: withFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a
+ KMonad.Prelude.Imports: withIndex :: (Indexable i p, Functor f) => p (i, s) (f (j, t)) -> Indexed i s (f t)
+ KMonad.Prelude.Imports: withIso :: forall s t a b (rep :: RuntimeRep) (r :: TYPE rep). AnIso s t a b -> ((s -> a) -> (b -> t) -> r) -> r
+ KMonad.Prelude.Imports: withLazyFile :: MonadUnliftIO m => FilePath -> (ByteString -> m a) -> m a
+ KMonad.Prelude.Imports: withLazyFileUtf8 :: MonadUnliftIO m => FilePath -> (Text -> m a) -> m a
+ KMonad.Prelude.Imports: withLens :: forall s t a b (rep :: RuntimeRep) (r :: TYPE rep). ALens s t a b -> ((s -> a) -> (s -> b -> t) -> r) -> r
+ KMonad.Prelude.Imports: withLogFunc :: MonadUnliftIO m => LogOptions -> (LogFunc -> m a) -> m a
+ KMonad.Prelude.Imports: withMVar :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b
+ KMonad.Prelude.Imports: withMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b
+ KMonad.Prelude.Imports: withPrism :: APrism s t a b -> ((b -> t) -> (s -> Either t a) -> r) -> r
+ KMonad.Prelude.Imports: withQSem :: MonadUnliftIO m => QSem -> m a -> m a
+ KMonad.Prelude.Imports: withQSemN :: MonadUnliftIO m => QSemN -> Int -> m a -> m a
+ KMonad.Prelude.Imports: withRunInIO :: MonadUnliftIO m => ((forall a. () => m a -> IO a) -> IO b) -> m b
+ KMonad.Prelude.Imports: withSystemTempDirectory :: MonadUnliftIO m => String -> (FilePath -> m a) -> m a
+ KMonad.Prelude.Imports: withSystemTempFile :: MonadUnliftIO m => String -> (FilePath -> Handle -> m a) -> m a
+ KMonad.Prelude.Imports: withTempDirectory :: MonadUnliftIO m => FilePath -> String -> (FilePath -> m a) -> m a
+ KMonad.Prelude.Imports: withTempFile :: MonadUnliftIO m => FilePath -> String -> (FilePath -> Handle -> m a) -> m a
+ KMonad.Prelude.Imports: withUnliftIO :: MonadUnliftIO m => (UnliftIO m -> IO a) -> m a
+ KMonad.Prelude.Imports: without :: APrism s t a b -> APrism u v c d -> Prism (Either s u) (Either t v) (Either a c) (Either b d)
+ KMonad.Prelude.Imports: worded :: forall (f :: Type -> Type). Applicative f => IndexedLensLike' Int f String String
+ KMonad.Prelude.Imports: words :: String -> [String]
+ KMonad.Prelude.Imports: wrappedWithRunInIO :: MonadUnliftIO n => (n b -> m b) -> (forall a. () => m a -> n a) -> ((forall a. () => m a -> IO a) -> IO b) -> m b
+ KMonad.Prelude.Imports: writeChan :: MonadIO m => Chan a -> a -> m ()
+ KMonad.Prelude.Imports: writeFileBinary :: MonadIO m => FilePath -> ByteString -> m ()
+ KMonad.Prelude.Imports: writeFileUtf8 :: MonadIO m => FilePath -> Text -> m ()
+ KMonad.Prelude.Imports: writeFileUtf8Builder :: MonadIO m => FilePath -> Utf8Builder -> m ()
+ KMonad.Prelude.Imports: writeIORef :: MonadIO m => IORef a -> a -> m ()
+ KMonad.Prelude.Imports: writeList2Chan :: MonadIO m => Chan a -> [a] -> m ()
+ KMonad.Prelude.Imports: writeRefL :: HasWriteRef w env => Lens' env (SomeRef w)
+ KMonad.Prelude.Imports: writeSomeRef :: MonadIO m => SomeRef a -> a -> m ()
+ KMonad.Prelude.Imports: writeTBQueue :: TBQueue a -> a -> STM ()
+ KMonad.Prelude.Imports: writeTChan :: TChan a -> a -> STM ()
+ KMonad.Prelude.Imports: writeTMVar :: TMVar a -> a -> STM ()
+ KMonad.Prelude.Imports: writeTQueue :: TQueue a -> a -> STM ()
+ KMonad.Prelude.Imports: writeTVar :: TVar a -> a -> STM ()
+ KMonad.Prelude.Imports: writeURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> a -> m ()
+ KMonad.Prelude.Imports: xplat :: forall {k2} s g (t :: k2) a (b :: k2). Optic (Costar ((->) s)) g s t a b -> ((s -> a) -> g b) -> g t
+ KMonad.Prelude.Imports: xplatf :: forall {k} {k2} f g (s :: k) (t :: k2) (a :: k) (b :: k2). Optic (Costar f) g s t a b -> (f a -> g b) -> f s -> g t
+ KMonad.Prelude.Imports: yieldThread :: MonadIO m => m ()
+ KMonad.Prelude.Imports: zip :: [a] -> [b] -> [(a, b)]
+ KMonad.Prelude.Imports: zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
+ KMonad.Prelude.Imports: zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c]
+ KMonad.Prelude.Imports: zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m ()
+ KMonad.Prelude.Imports: zoom :: Zoom m n s t => LensLike' (Zoomed m c) t s -> m c -> n c
+ KMonad.Prelude.Imports: }
+ KMonad.Util: unMS :: Milliseconds -> Int
+ KMonad.Util.LayerStack: LayerDoesNotExist :: l -> LayerStackError l
+ KMonad.Util.LayerStack: LayerNotOnStack :: l -> LayerStackError l
+ KMonad.Util.LayerStack: _LayerDoesNotExist :: AsLayerStackError r_aSKO l_aSIE => Prism' r_aSKO l_aSIE
+ KMonad.Util.LayerStack: _LayerNotOnStack :: AsLayerStackError r_aSKO l_aSIE => Prism' r_aSKO l_aSIE
+ KMonad.Util.LayerStack: _LayerStackError :: AsLayerStackError r_aSKO l_aSIE => Prism' r_aSKO (LayerStackError l_aSIE)
+ KMonad.Util.LayerStack: atKey :: (CanKey l, CanKey k) => k -> Fold (LayerStack l k a) a
+ KMonad.Util.LayerStack: class AsLayerStackError r_aSKO l_aSIE | r_aSKO -> l_aSIE
+ KMonad.Util.LayerStack: data Layer k a
+ KMonad.Util.LayerStack: data LayerStack l k a
+ KMonad.Util.LayerStack: data LayerStackError l
+ KMonad.Util.LayerStack: inLayer :: (CanKey l, CanKey k) => l -> k -> Fold (LayerStack l k a) a
+ KMonad.Util.LayerStack: instance (Data.Typeable.Internal.Typeable l, GHC.Show.Show l) => GHC.Exception.Type.Exception (KMonad.Util.LayerStack.LayerStackError l)
+ KMonad.Util.LayerStack: instance (GHC.Classes.Eq k, GHC.Classes.Eq a) => GHC.Classes.Eq (KMonad.Util.LayerStack.Layer k a)
+ KMonad.Util.LayerStack: instance (GHC.Classes.Eq l, GHC.Classes.Eq k, GHC.Classes.Eq a) => GHC.Classes.Eq (KMonad.Util.LayerStack.LayerStack l k a)
+ KMonad.Util.LayerStack: instance (GHC.Classes.Ord k, GHC.Classes.Ord a) => GHC.Classes.Ord (KMonad.Util.LayerStack.Layer k a)
+ KMonad.Util.LayerStack: instance (GHC.Show.Show k, GHC.Show.Show a) => GHC.Show.Show (KMonad.Util.LayerStack.Layer k a)
+ KMonad.Util.LayerStack: instance (GHC.Show.Show l, GHC.Show.Show k, GHC.Show.Show a) => GHC.Show.Show (KMonad.Util.LayerStack.LayerStack l k a)
+ KMonad.Util.LayerStack: instance Data.Foldable.Foldable (KMonad.Util.LayerStack.Layer k)
+ KMonad.Util.LayerStack: instance Data.Traversable.Traversable (KMonad.Util.LayerStack.Layer k)
+ KMonad.Util.LayerStack: instance GHC.Base.Functor (KMonad.Util.LayerStack.Layer k)
+ KMonad.Util.LayerStack: instance GHC.Base.Functor (KMonad.Util.LayerStack.LayerStack l k)
+ KMonad.Util.LayerStack: instance GHC.Show.Show l => GHC.Show.Show (KMonad.Util.LayerStack.LayerStackError l)
+ KMonad.Util.LayerStack: instance KMonad.Util.LayerStack.AsLayerStackError (KMonad.Util.LayerStack.LayerStackError l) l
+ KMonad.Util.LayerStack: items :: forall l_aSL9 k_aSLa a_aSLb k_aTqS a_aTqT. Lens (LayerStack l_aSL9 k_aSLa a_aSLb) (LayerStack l_aSL9 k_aTqS a_aTqT) (HashMap (l_aSL9, k_aSLa) a_aSLb) (HashMap (l_aSL9, k_aTqS) a_aTqT)
+ KMonad.Util.LayerStack: maps :: forall l_aSL9 k_aSLa a_aSLb. Lens' (LayerStack l_aSL9 k_aSLa a_aSLb) (HashSet l_aSL9)
+ KMonad.Util.LayerStack: mkLayer :: (Foldable t, CanKey k) => t (k, a) -> Layer k a
+ KMonad.Util.LayerStack: mkLayerStack :: (Foldable t1, Foldable t2, CanKey k, CanKey l) => t1 (l, t2 (k, a)) -> LayerStack l k a
+ KMonad.Util.LayerStack: popLayer :: (CanKey l, CanKey k) => l -> LayerStack l k a -> Either (LayerStackError l) (LayerStack l k a)
+ KMonad.Util.LayerStack: pushLayer :: (CanKey l, CanKey k) => l -> LayerStack l k a -> Either (LayerStackError l) (LayerStack l k a)
+ KMonad.Util.LayerStack: stack :: forall l_aSL9 k_aSLa a_aSLb. Lens' (LayerStack l_aSL9 k_aSLa a_aSLb) [l_aSL9]
+ KMonad.Util.MultiMap: data MultiMap k v
+ KMonad.Util.MultiMap: fromSingletons :: (Foldable t, CanMM k v) => t (k, v) -> MultiMap k v
+ KMonad.Util.MultiMap: instance (GHC.Show.Show k, GHC.Show.Show v) => GHC.Show.Show (KMonad.Util.MultiMap.MultiMap k v)
+ KMonad.Util.MultiMap: instance KMonad.Util.MultiMap.CanMM k v => Control.Lens.At.At (KMonad.Util.MultiMap.MultiMap k v)
+ KMonad.Util.MultiMap: instance KMonad.Util.MultiMap.CanMM k v => Control.Lens.At.Ixed (KMonad.Util.MultiMap.MultiMap k v)
+ KMonad.Util.MultiMap: instance KMonad.Util.MultiMap.CanMM k v => GHC.Base.Monoid (KMonad.Util.MultiMap.MultiMap k v)
+ KMonad.Util.MultiMap: instance KMonad.Util.MultiMap.CanMM k v => GHC.Base.Semigroup (KMonad.Util.MultiMap.MultiMap k v)
+ KMonad.Util.MultiMap: itemed :: CanMM k v => Fold (MultiMap k v) (k, v)
+ KMonad.Util.MultiMap: mkMultiMap :: (Foldable t1, Foldable t2, CanMM k v) => t1 (k, t2 v) -> MultiMap k v
+ KMonad.Util.MultiMap: reverse :: (CanMM k v, CanMM v k) => MultiMap k v -> MultiMap v k
+ Paths_kmonad: getBinDir :: IO FilePath
+ Paths_kmonad: getDataDir :: IO FilePath
+ Paths_kmonad: getDataFileName :: FilePath -> IO FilePath
+ Paths_kmonad: getDynLibDir :: IO FilePath
+ Paths_kmonad: getLibDir :: IO FilePath
+ Paths_kmonad: getLibexecDir :: IO FilePath
+ Paths_kmonad: getSysconfDir :: IO FilePath
+ Paths_kmonad: version :: Version
- KMonad.Args.Cmd: Cmd :: FilePath -> Bool -> LogLevel -> Cmd
+ KMonad.Args.Cmd: Cmd :: FilePath -> Bool -> LogLevel -> Milliseconds -> DefSetting -> DefSetting -> Maybe DefSetting -> Maybe DefSetting -> Maybe DefSetting -> Maybe DefSetting -> Cmd
- KMonad.Args.Cmd: cfgFile :: HasCmd c_aZFF => Lens' c_aZFF FilePath
+ KMonad.Args.Cmd: cfgFile :: HasCmd c_a28ii => Lens' c_a28ii FilePath
- KMonad.Args.Cmd: class HasCmd c_aZFF
+ KMonad.Args.Cmd: class HasCmd c_a28ii
- KMonad.Args.Cmd: cmd :: HasCmd c_aZFF => Lens' c_aZFF Cmd
+ KMonad.Args.Cmd: cmd :: HasCmd c_a28ii => Lens' c_a28ii Cmd
- KMonad.Args.Cmd: dryRun :: HasCmd c_aZFF => Lens' c_aZFF Bool
+ KMonad.Args.Cmd: dryRun :: HasCmd c_a28ii => Lens' c_a28ii Bool
- KMonad.Args.Cmd: logLvl :: HasCmd c_aZFF => Lens' c_aZFF LogLevel
+ KMonad.Args.Cmd: logLvl :: HasCmd c_a28ii => Lens' c_a28ii LogLevel
- KMonad.Args.Parser: parseTokens :: Text -> Either PErrors [KExpr]
+ KMonad.Args.Parser: parseTokens :: Text -> Either ParseError [KExpr]
- KMonad.Args.Types: KCommand :: Text -> DefButton
+ KMonad.Args.Types: KCommand :: Text -> Maybe Text -> DefButton
- KMonad.Args.Types: KSendEventSink :: OToken
+ KMonad.Args.Types: KSendEventSink :: Maybe (Int, Int) -> OToken
- KMonad.Args.Types: KTapHoldNext :: Int -> DefButton -> DefButton -> DefButton
+ KMonad.Args.Types: KTapHoldNext :: Int -> DefButton -> DefButton -> Maybe DefButton -> DefButton
- KMonad.Args.Types: KTapHoldNextRelease :: Int -> DefButton -> DefButton -> DefButton
+ KMonad.Args.Types: KTapHoldNextRelease :: Int -> DefButton -> DefButton -> Maybe DefButton -> DefButton
- KMonad.Args.Types: KTapMacro :: [DefButton] -> DefButton
+ KMonad.Args.Types: KTapMacro :: [DefButton] -> Maybe Int -> DefButton
- KMonad.Args.Types: _DefSetting :: AsDefSetting r_a1S42 => Prism' r_a1S42 DefSetting
+ KMonad.Args.Types: _DefSetting :: AsDefSetting r_a1NS7 => Prism' r_a1NS7 DefSetting
- KMonad.Args.Types: _KDefAlias :: AsKExpr r_a1Seb => Prism' r_a1Seb DefAlias
+ KMonad.Args.Types: _KDefAlias :: AsKExpr r_a1O56 => Prism' r_a1O56 DefAlias
- KMonad.Args.Types: _KDefCfg :: AsKExpr r_a1Seb => Prism' r_a1Seb DefSettings
+ KMonad.Args.Types: _KDefCfg :: AsKExpr r_a1O56 => Prism' r_a1O56 DefSettings
- KMonad.Args.Types: _KDefLayer :: AsKExpr r_a1Seb => Prism' r_a1Seb DefLayer
+ KMonad.Args.Types: _KDefLayer :: AsKExpr r_a1O56 => Prism' r_a1O56 DefLayer
- KMonad.Args.Types: _KDefSrc :: AsKExpr r_a1Seb => Prism' r_a1Seb DefSrc
+ KMonad.Args.Types: _KDefSrc :: AsKExpr r_a1O56 => Prism' r_a1O56 DefSrc
- KMonad.Args.Types: _KExpr :: AsKExpr r_a1Seb => Prism' r_a1Seb KExpr
+ KMonad.Args.Types: _KExpr :: AsKExpr r_a1O56 => Prism' r_a1O56 KExpr
- KMonad.Args.Types: _SAllowCmd :: AsDefSetting r_a1S42 => Prism' r_a1S42 Bool
+ KMonad.Args.Types: _SAllowCmd :: AsDefSetting r_a1NS7 => Prism' r_a1NS7 Bool
- KMonad.Args.Types: _SCmpSeq :: AsDefSetting r_a1S42 => Prism' r_a1S42 DefButton
+ KMonad.Args.Types: _SCmpSeq :: AsDefSetting r_a1NS7 => Prism' r_a1NS7 DefButton
- KMonad.Args.Types: _SFallThrough :: AsDefSetting r_a1S42 => Prism' r_a1S42 Bool
+ KMonad.Args.Types: _SFallThrough :: AsDefSetting r_a1NS7 => Prism' r_a1NS7 Bool
- KMonad.Args.Types: _SIToken :: AsDefSetting r_a1S42 => Prism' r_a1S42 IToken
+ KMonad.Args.Types: _SIToken :: AsDefSetting r_a1NS7 => Prism' r_a1NS7 IToken
- KMonad.Args.Types: _SInitStr :: AsDefSetting r_a1S42 => Prism' r_a1S42 Text
+ KMonad.Args.Types: _SInitStr :: AsDefSetting r_a1NS7 => Prism' r_a1NS7 Text
- KMonad.Args.Types: _SOToken :: AsDefSetting r_a1S42 => Prism' r_a1S42 OToken
+ KMonad.Args.Types: _SOToken :: AsDefSetting r_a1NS7 => Prism' r_a1NS7 OToken
- KMonad.Args.Types: class AsDefSetting r_a1S42
+ KMonad.Args.Types: class AsDefSetting r_a1NS7
- KMonad.Args.Types: class AsKExpr r_a1Seb
+ KMonad.Args.Types: class AsKExpr r_a1O56
- KMonad.Keyboard.IO.Linux.UinputSink: keyboardName :: HasUinputCfg c_a1FBt => Lens' c_a1FBt String
+ KMonad.Keyboard.IO.Linux.UinputSink: keyboardName :: HasUinputCfg c_a1HAz => Lens' c_a1HAz String
- KMonad.Keyboard.IO.Linux.UinputSink: postInit :: HasUinputCfg c_a1FBt => Lens' c_a1FBt (Maybe String)
+ KMonad.Keyboard.IO.Linux.UinputSink: postInit :: HasUinputCfg c_a1HAz => Lens' c_a1HAz (Maybe String)
- KMonad.Keyboard.IO.Linux.UinputSink: productCode :: HasUinputCfg c_a1FBt => Lens' c_a1FBt CInt
+ KMonad.Keyboard.IO.Linux.UinputSink: productCode :: HasUinputCfg c_a1HAz => Lens' c_a1HAz CInt
- KMonad.Keyboard.IO.Linux.UinputSink: productVersion :: HasUinputCfg c_a1FBt => Lens' c_a1FBt CInt
+ KMonad.Keyboard.IO.Linux.UinputSink: productVersion :: HasUinputCfg c_a1HAz => Lens' c_a1HAz CInt
- KMonad.Keyboard.IO.Linux.UinputSink: vendorCode :: HasUinputCfg c_a1FBt => Lens' c_a1FBt CInt
+ KMonad.Keyboard.IO.Linux.UinputSink: vendorCode :: HasUinputCfg c_a1HAz => Lens' c_a1HAz CInt
Files
- app/Main.hs +2/−2
- c_src/mac/dext.cpp +96/−0
- c_src/mac/kext.cpp +117/−0
- c_src/mac/keyio_mac.cpp +0/−354
- changelog.md +43/−2
- kmonad.cabal +75/−28
- src/Data/LayerStack.hs +0/−155
- src/Data/MultiMap.hs +0/−85
- src/KMonad/Action.hs +0/−243
- src/KMonad/App.hs +3/−233
- src/KMonad/App/BEnv.hs +0/−63
- src/KMonad/App/Dispatch.hs +0/−114
- src/KMonad/App/Hooks.hs +0/−199
- src/KMonad/App/Keymap.hs +0/−121
- src/KMonad/App/Main.hs +175/−0
- src/KMonad/App/Sluice.hs +0/−119
- src/KMonad/App/Types.hs +149/−0
- src/KMonad/Args.hs +46/−26
- src/KMonad/Args/Cmd.hs +116/−10
- src/KMonad/Args/Joiner.hs +47/−26
- src/KMonad/Args/Parser.hs +111/−61
- src/KMonad/Args/TH.hs +30/−0
- src/KMonad/Args/Types.hs +36/−34
- src/KMonad/Button.hs +0/−355
- src/KMonad/Gesture.hs +154/−0
- src/KMonad/Keyboard.hs +7/−118
- src/KMonad/Keyboard/ComposeSeq.hs +7/−1
- src/KMonad/Keyboard/IO.hs +4/−5
- src/KMonad/Keyboard/IO/Linux/DeviceSource.hs +11/−6
- src/KMonad/Keyboard/IO/Linux/Types.hs +1/−1
- src/KMonad/Keyboard/IO/Linux/UinputSink.hs +18/−9
- src/KMonad/Keyboard/IO/Mac/IOKitSource.hs +7/−5
- src/KMonad/Keyboard/IO/Mac/KextSink.hs +1/−1
- src/KMonad/Keyboard/IO/Mac/Types.hs +216/−218
- src/KMonad/Keyboard/IO/Windows/SendEventSink.hs +51/−14
- src/KMonad/Keyboard/IO/Windows/Types.hs +295/−23
- src/KMonad/Keyboard/Keycode.hs +15/−10
- src/KMonad/Keyboard/Ops.hs +49/−0
- src/KMonad/Keyboard/Types.hs +68/−0
- src/KMonad/Model.hs +7/−0
- src/KMonad/Model/Action.hs +243/−0
- src/KMonad/Model/BEnv.hs +63/−0
- src/KMonad/Model/Button.hs +497/−0
- src/KMonad/Model/Dispatch.hs +114/−0
- src/KMonad/Model/Hooks.hs +199/−0
- src/KMonad/Model/Keymap.hs +124/−0
- src/KMonad/Model/Sluice.hs +119/−0
- src/KMonad/Parsing.hs +57/−0
- src/KMonad/Prelude.hs +2/−33
- src/KMonad/Prelude/Definitions.hs +7/−0
- src/KMonad/Prelude/Imports.hs +27/−0
- src/KMonad/Util.hs +4/−3
- src/KMonad/Util/LayerStack.hs +155/−0
- src/KMonad/Util/MultiMap.hs +85/−0
- test/KMonad/GestureSpec.hs +41/−0
- test/Spec.hs +1/−0
app/Main.hs view
@@ -15,7 +15,7 @@ ) where -import KMonad.Args (run)+import qualified KMonad.App as KMonad (main) main :: IO ()-main = run+main = KMonad.main
+ c_src/mac/dext.cpp view
@@ -0,0 +1,96 @@+#include "keyio_mac.hpp"++#include "virtual_hid_device_driver.hpp"+#include "virtual_hid_device_service.hpp"++/*+ * Resources needed to post altered key events back to the OS. They+ * are global so that they can be kept track of in the C++ code rather+ * than in the Haskell.+ */+static pqrs::karabiner::driverkit::virtual_hid_device_service::client *client;+static pqrs::karabiner::driverkit::virtual_hid_device_driver::hid_report::keyboard_input keyboard;+static pqrs::karabiner::driverkit::virtual_hid_device_driver::hid_report::apple_vendor_top_case_input top_case;+static pqrs::karabiner::driverkit::virtual_hid_device_driver::hid_report::apple_vendor_keyboard_input apple_keyboard;+static pqrs::karabiner::driverkit::virtual_hid_device_driver::hid_report::consumer_input consumer;++int init_sink() {+ pqrs::dispatcher::extra::initialize_shared_dispatcher();+ std::filesystem::path client_socket_file_path("/tmp/karabiner_driverkit_virtual_hid_device_service_client.sock");+ client = new pqrs::karabiner::driverkit::virtual_hid_device_service::client(client_socket_file_path);+ auto copy = client;+ client->async_driver_loaded();+ client->async_driver_version_matched();+ client->async_virtual_hid_keyboard_ready();+ client->async_virtual_hid_pointing_ready();+ /**/+ client->connected.connect([copy] {+ std::cout << "connected" << std::endl;+ copy->async_virtual_hid_keyboard_initialize(pqrs::hid::country_code::us);+ });+ client->connect_failed.connect([](auto&& error_code) {+ std::cout << "connect_failed " << error_code << std::endl;+ });+ client->closed.connect([] {+ std::cout << "closed" << std::endl;+ });+ client->error_occurred.connect([](auto&& error_code) {+ std::cout << "error_occurred " << error_code << std::endl;+ });+ client->driver_loaded_response.connect([](auto&& driver_loaded) {+ static std::optional<bool> previous_value;++ if (previous_value != driver_loaded) {+ std::cout << "driver_loaded " << driver_loaded << std::endl;+ previous_value = driver_loaded;+ }+ });+ client->driver_version_matched_response.connect([](auto&& driver_version_matched) {+ static std::optional<bool> previous_value;+ if (previous_value != driver_version_matched) {+ std::cout << "driver_version_matched " << driver_version_matched << std::endl;+ previous_value = driver_version_matched;+ }+ });+ /**/+ client->async_start();+ return 0;+}++int exit_sink() {+ free(client);+ pqrs::dispatcher::extra::terminate_shared_dispatcher();+ return 0;+}++/*+ * This gets us some code reuse (see the send_key overload below)+ */+template<typename T>+int send_key(T &keyboard, struct KeyEvent *e) {+ if(e->type == 1) keyboard.keys.insert(e->usage);+ else if(e->type == 0) keyboard.keys.erase(e->usage);+ else return 1;+ client->async_post_report(keyboard);+ return 0;+}+++/*+ * Haskell calls this with a new key event to send back to the OS. It+ * posts the information to the karabiner kernel extension (which+ * represents a virtual keyboard).+ */+extern "C" int send_key(struct KeyEvent *e) {+ auto usage_page = pqrs::hid::usage_page::value_t(e->page);+ if(usage_page == pqrs::hid::usage_page::keyboard_or_keypad)+ return send_key(keyboard, e);+ else if(usage_page == pqrs::hid::usage_page::apple_vendor_top_case)+ return send_key(top_case, e);+ else if(usage_page == pqrs::hid::usage_page::apple_vendor_keyboard)+ return send_key(apple_keyboard, e);+ else if(usage_page == pqrs::hid::usage_page::consumer)+ return send_key(consumer, e);+ else+ return 1;+}
+ c_src/mac/kext.cpp view
@@ -0,0 +1,117 @@+#include "keyio_mac.hpp"++#include "karabiner_virtual_hid_device_methods.hpp"++/*+ * Resources needed to post altered key events back to the OS. They+ * are global so that they can be kept track of in the C++ code rather+ * than in the Haskell.+ */+static mach_port_t connect;+static io_service_t service;+static pqrs::karabiner_virtual_hid_device::hid_report::keyboard_input keyboard;+static pqrs::karabiner_virtual_hid_device::hid_report::apple_vendor_top_case_input top_case;+static pqrs::karabiner_virtual_hid_device::hid_report::apple_vendor_keyboard_input apple_keyboard;+static pqrs::karabiner_virtual_hid_device::hid_report::consumer_input consumer;++int exit_sink() {+ int retval = 0;+ kern_return_t kr = pqrs::karabiner_virtual_hid_device_methods::reset_virtual_hid_keyboard(connect);+ if (kr != KERN_SUCCESS) {+ print_iokit_error("reset_virtual_hid_keyboard", kr);+ retval = 1;+ }+ if (connect) {+ kr = IOServiceClose(connect);+ if(kr != KERN_SUCCESS) {+ print_iokit_error("IOServiceClose", kr);+ retval = 1;+ }+ }+ if (service) {+ kr = IOObjectRelease(service);+ if(kr != KERN_SUCCESS) {+ print_iokit_error("IOObjectRelease", kr);+ retval = 1;+ }+ }+ return retval;+}++int init_sink() {+ kern_return_t kr;+ connect = IO_OBJECT_NULL;+ service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceNameMatching(pqrs::karabiner_virtual_hid_device::get_virtual_hid_root_name()));+ if (!service) {+ print_iokit_error("IOServiceGetMatchingService");+ return 1;+ }+ kr = IOServiceOpen(service, mach_task_self(), kIOHIDServerConnectType, &connect);+ if (kr != KERN_SUCCESS) {+ print_iokit_error("IOServiceOpen", kr);+ return kr;+ }+ //std::this_thread::sleep_for(std::chrono::milliseconds(10000));+ //setuid(501);+ {+ pqrs::karabiner_virtual_hid_device::properties::keyboard_initialization properties;+ kr = pqrs::karabiner_virtual_hid_device_methods::initialize_virtual_hid_keyboard(connect, properties);+ if (kr != KERN_SUCCESS) {+ print_iokit_error("initialize_virtual_hid_keyboard", kr);+ return 1;+ }+ while (true) {+ bool ready;+ kr = pqrs::karabiner_virtual_hid_device_methods::is_virtual_hid_keyboard_ready(connect, ready);+ if (kr != KERN_SUCCESS) {+ print_iokit_error("is_virtual_hid_keyboard_ready", kr);+ return kr;+ } else {+ if (ready) {+ break;+ }+ }+ std::this_thread::sleep_for(std::chrono::milliseconds(100));+ }+ }+ {+ pqrs::karabiner_virtual_hid_device::properties::keyboard_initialization properties;+ properties.country_code = 33;+ kr = pqrs::karabiner_virtual_hid_device_methods::initialize_virtual_hid_keyboard(connect, properties);+ if (kr != KERN_SUCCESS) {+ print_iokit_error("initialize_virtual_hid_keyboard", kr);+ return kr;+ }+ }+ return 0;+}++/*+ * This gets us some code reuse (see the send_key overload below)+ */+template<typename T>+int send_key(T &keyboard, struct KeyEvent *e) {+ if(e->type == 1) keyboard.keys.insert(e->usage);+ else if(e->type == 0) keyboard.keys.erase(e->usage);+ else return 1;+ return pqrs::karabiner_virtual_hid_device_methods::post_keyboard_input_report(connect, keyboard);+}++/*+ * Haskell calls this with a new key event to send back to the OS. It+ * posts the information to the karabiner kernel extension (which+ * represents a virtual keyboard).+ */+extern "C" int send_key(struct KeyEvent *e) {+ auto usage_page = pqrs::karabiner_virtual_hid_device::usage_page(e->page);+ if(usage_page == pqrs::karabiner_virtual_hid_device::usage_page::keyboard_or_keypad)+ return send_key(keyboard, e);+ else if(usage_page == pqrs::karabiner_virtual_hid_device::usage_page::apple_vendor_top_case)+ return send_key(top_case, e);+ else if(usage_page == pqrs::karabiner_virtual_hid_device::usage_page::apple_vendor_keyboard)+ return send_key(apple_keyboard, e);+ else if(usage_page == pqrs::karabiner_virtual_hid_device::usage_page::consumer)+ return send_key(consumer, e);+ else+ return 1;+}
− c_src/mac/keyio_mac.cpp
@@ -1,354 +0,0 @@-#include <IOKit/hid/IOHIDLib.h>-#include <IOKit/hidsystem/IOHIDShared.h>-#include <unistd.h>-#include <errno.h>-#include <thread>-#include <map>-#include <iostream>--#include "karabiner_virtual_hid_device_methods.hpp"--/*- * Key event information that's shared between C++ and Haskell.- *- * type: represents key up or key down- *- * keycode: 16 uppermost bits represent IOKit usage page- * 16 lowermost bits represent IOKit usage- */-struct KeyEvent {- uint8_t type;- uint32_t keycode;-};--/*- * Resources needed to post altered key events back to the OS. They- * are global so that they can be kept track of in the C++ code rather- * than in the Haskell.- */-static mach_port_t connect;-static io_service_t service;-static pqrs::karabiner_virtual_hid_device::hid_report::keyboard_input keyboard;-static pqrs::karabiner_virtual_hid_device::hid_report::apple_vendor_top_case_input top_case;-static pqrs::karabiner_virtual_hid_device::hid_report::apple_vendor_keyboard_input apple_keyboard;-static pqrs::karabiner_virtual_hid_device::hid_report::consumer_input consumer;--/*- * These are needed to receive unaltered key events from the OS.- */-static std::thread thread;-static CFRunLoopRef listener_loop;-static std::map<io_service_t,IOHIDDeviceRef> source_device;-static int fd[2];-static char *prod = nullptr;--/*- * We'll register this callback to run whenever an IOHIDDevice- * (representing a keyboard) sends input from the user.- *- * It passes the relevant information into a pipe that will be read- * from with wait_key.- */-void input_callback(void *context, IOReturn result, void *sender, IOHIDValueRef value) {- struct KeyEvent e;- CFIndex integer_value = IOHIDValueGetIntegerValue(value);- IOHIDElementRef element = IOHIDValueGetElement(value);- uint16_t usage_page = IOHIDElementGetUsagePage(element);- uint16_t usage = IOHIDElementGetUsage(element);- e.type = !integer_value;- e.keycode = (usage_page << 16) | usage;- write(fd[1], &e, sizeof(struct KeyEvent));-}--void open_matching_devices(char *product, io_iterator_t iter) {- io_name_t name;- kern_return_t kr;- CFStringRef cfproduct = NULL;- if(product) {- cfproduct = CFStringCreateWithCString(kCFAllocatorDefault, product, CFStringGetSystemEncoding());- if(cfproduct == NULL) {- std::cerr << "CFStringCreateWithCString error" << std::endl;- return;- }- }- CFStringRef cfkarabiner = CFStringCreateWithCString(kCFAllocatorDefault, "Karabiner VirtualHIDKeyboard", CFStringGetSystemEncoding());- if(cfkarabiner == NULL) {- std::cerr << "CFStringCreateWithCString error" << std::endl;- if(product) {- CFRelease(cfproduct);- }- return;- }- for(mach_port_t curr = IOIteratorNext(iter); curr; curr = IOIteratorNext(iter)) {- CFStringRef cfcurr = (CFStringRef)IORegistryEntryCreateCFProperty(curr, CFSTR(kIOHIDProductKey), kCFAllocatorDefault, kIOHIDOptionsTypeNone);- if(cfcurr == NULL) {- std::cerr << "IORegistryEntryCreateCFProperty error" << std::endl;- CFRelease(cfcurr);- continue;- }- bool match = (CFStringCompare(cfcurr, cfkarabiner, 0) != kCFCompareEqualTo);- if(product) {- match = match && (CFStringCompare(cfcurr, cfproduct, 0) == kCFCompareEqualTo);- }- CFRelease(cfcurr);- if(!match) continue;- IOHIDDeviceRef dev = IOHIDDeviceCreate(kCFAllocatorDefault, curr);- source_device[curr] = dev;- IOHIDDeviceRegisterInputValueCallback(dev, input_callback, NULL);- kr = IOHIDDeviceOpen(dev, kIOHIDOptionsTypeSeizeDevice);- if(kr != kIOReturnSuccess) {- std::cerr << "IOHIDDeviceOpen error: " << std::hex << kr << std::endl;- if(kr == kIOReturnNotPrivileged) {- std::cerr << "IOHIDDeviceOpen requires root privileges when called with kIOHIDOptionsTypeSeizeDevice" << std::endl;- }- }- IOHIDDeviceScheduleWithRunLoop(dev, listener_loop, kCFRunLoopDefaultMode);- }- if(product) {- CFRelease(cfproduct);- }- CFRelease(cfkarabiner);-}--/*- * We'll register this callback to run whenever an IOHIDDevice- * (representing a keyboard) is connected to the OS- *- */-void matched_callback(void *context, io_iterator_t iter) {- char *product = (char *)context;- open_matching_devices(product, iter);-}--/*- * We'll register this callback to run whenever an IOHIDDevice- * (representing a keyboard) is disconnected from the OS- *- */-void terminated_callback(void *context, io_iterator_t iter) {- for(mach_port_t curr = IOIteratorNext(iter); curr; curr = IOIteratorNext(iter)) {- source_device.erase(curr);- }-}--/*- * This gets us some code reuse (see the send_key overload below)- */-template<typename T>-int send_key(T &keyboard, struct KeyEvent *e) {- if(e->type == 0) keyboard.keys.insert((uint16_t)e->keycode);- else if (e->type == 1) keyboard.keys.erase((uint16_t)e->keycode);- return pqrs::karabiner_virtual_hid_device_methods::post_keyboard_input_report(connect, keyboard);-}--/*- * Haskell calls this with a new key event to send back to the OS. It- * posts the information to the karabiner kernel extension (which- * represents a virtual keyboard).- */-extern "C" int send_key(struct KeyEvent *e) {- pqrs::karabiner_virtual_hid_device::usage_page usage_page = pqrs::karabiner_virtual_hid_device::usage_page(e->keycode >> 16);- if(usage_page == pqrs::karabiner_virtual_hid_device::usage_page::keyboard_or_keypad)- return send_key(keyboard, e);- else if(usage_page == pqrs::karabiner_virtual_hid_device::usage_page::apple_vendor_top_case)- return send_key(top_case, e);- else if(usage_page == pqrs::karabiner_virtual_hid_device::usage_page::apple_vendor_keyboard)- return send_key(apple_keyboard, e);- else if(usage_page == pqrs::karabiner_virtual_hid_device::usage_page::consumer)- return send_key(consumer, e);- else- return 1;-}--/*- * Reads a new key event from the pipe, blocking until a new event is- * ready.- */-extern "C" int wait_key(struct KeyEvent *e) {- return read(fd[0], e, sizeof(struct KeyEvent)) == sizeof(struct KeyEvent);-}--/*- * For each keyboard, registers an asynchronous callback to run when- * new input from the user is available from that keyboard. Then- * sleeps indefinitely, ready to received asynchronous callbacks.- */-void monitor_kb(char *product) {- kern_return_t kr;- CFMutableDictionaryRef matching_dictionary = IOServiceMatching(kIOHIDDeviceKey);- if(!matching_dictionary) {- std::cerr << "IOServiceMatching error" << std::endl;- return;- }- UInt32 value;- CFNumberRef cfValue;- value = kHIDPage_GenericDesktop;- cfValue = CFNumberCreate( kCFAllocatorDefault, kCFNumberSInt32Type, &value );- CFDictionarySetValue(matching_dictionary, CFSTR(kIOHIDDeviceUsagePageKey), cfValue);- CFRelease(cfValue);- value = kHIDUsage_GD_Keyboard;- cfValue = CFNumberCreate( kCFAllocatorDefault, kCFNumberSInt32Type, &value );- CFDictionarySetValue(matching_dictionary,CFSTR(kIOHIDDeviceUsageKey),cfValue);- CFRelease(cfValue);- io_iterator_t iter = IO_OBJECT_NULL;- CFRetain(matching_dictionary);- kr = IOServiceGetMatchingServices(kIOMasterPortDefault,- matching_dictionary,- &iter);- if(kr != KERN_SUCCESS) {- std::cerr << "IOServiceGetMatchingServices error: " << std::hex << kr << std::endl;- return;- }- listener_loop = CFRunLoopGetCurrent();- open_matching_devices(product, iter);- IONotificationPortRef notification_port = IONotificationPortCreate(kIOMasterPortDefault);- CFRunLoopSourceRef notification_source = IONotificationPortGetRunLoopSource(notification_port);- CFRunLoopAddSource(listener_loop, notification_source, kCFRunLoopDefaultMode);- CFRetain(matching_dictionary);- kr = IOServiceAddMatchingNotification(notification_port,- kIOMatchedNotification,- matching_dictionary,- matched_callback,- product,- &iter);- if(kr != KERN_SUCCESS) {- std::cerr << "IOServiceAddMatchingNotification error: " << std::hex << kr << std::endl;- return;- }- for(mach_port_t curr = IOIteratorNext(iter); curr; curr = IOIteratorNext(iter)) {}- kr = IOServiceAddMatchingNotification(notification_port,- kIOTerminatedNotification,- matching_dictionary,- terminated_callback,- NULL,- &iter);- if(kr != KERN_SUCCESS) {- std::cerr << "IOServiceAddMatchingNotification error: " << std::hex << kr << std::endl;- return;- }- for(mach_port_t curr = IOIteratorNext(iter); curr; curr = IOIteratorNext(iter)) {}- CFRunLoopRun();- for(std::pair<const io_service_t,IOHIDDeviceRef> p: source_device) {- kr = IOHIDDeviceClose(p.second,kIOHIDOptionsTypeSeizeDevice);- if(kr != KERN_SUCCESS) {- std::cerr << "IOHIDDeviceClose error: " << std::hex << kr << std::endl;- }- }-}--/*- * Opens and seizes input from each keyboard device whose product name- * matches the parameter (if NULL is received, then it opens all- * keyboard devices). Spawns a thread to receive asynchronous input- * and opens a pipe for this thread to send key event data to the main- * thread.- *- * Loads a the karabiner kernel extension that will send key events- * back to the OS.- */-extern "C" int grab_kb(char *product) {- // Source- if (pipe(fd) == -1) {- std::cerr << "pipe error: " << errno << std::endl;- return errno;- }- if(product) {- prod = (char *)malloc(strlen(product) + 1);- strcpy(prod, product);- }- thread = std::thread{monitor_kb, prod};- // Sink- kern_return_t kr;- connect = IO_OBJECT_NULL;- service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceNameMatching(pqrs::karabiner_virtual_hid_device::get_virtual_hid_root_name()));- if (!service) {- std::cerr << "IOServiceGetMatchingService error" << std::endl;- return 1;- }- kr = IOServiceOpen(service, mach_task_self(), kIOHIDServerConnectType, &connect);- if (kr != KERN_SUCCESS) {- std::cerr << "IOServiceOpen error: " << std::hex << kr << std::endl;- return kr;- }- //std::this_thread::sleep_for(std::chrono::milliseconds(10000));- //setuid(501);- {- pqrs::karabiner_virtual_hid_device::properties::keyboard_initialization properties;- kr = pqrs::karabiner_virtual_hid_device_methods::initialize_virtual_hid_keyboard(connect, properties);- if (kr != KERN_SUCCESS) {- std::cerr << "initialize_virtual_hid_keyboard error: " << std::hex << kr << std::endl;- return 1;- }- while (true) {- bool ready;- kr = pqrs::karabiner_virtual_hid_device_methods::is_virtual_hid_keyboard_ready(connect, ready);- if (kr != KERN_SUCCESS) {- std::cerr << "is_virtual_hid_keyboard_ready error: " << std::hex << kr << std::endl;- return kr;- } else {- if (ready) {- break;- }- }- std::this_thread::sleep_for(std::chrono::milliseconds(100));- }- }- {- pqrs::karabiner_virtual_hid_device::properties::keyboard_initialization properties;- properties.country_code = 33;- kr = pqrs::karabiner_virtual_hid_device_methods::initialize_virtual_hid_keyboard(connect, properties);- if (kr != KERN_SUCCESS) {- std::cerr << "initialize_virtual_hid_keyboard error: " << std::hex << kr << std::endl;- return kr;- }- }- return 0;-}--/*- * Releases the resources needed to receive key events from and send- * key events to the OS.- */-extern "C" int release_kb() {- int retval = 0;- kern_return_t kr;- // Source- if(thread.joinable()) {- CFRunLoopStop(listener_loop);- thread.join();- } else {- std::cerr << "no thread was running!" << std::endl;- }- if(prod) {- free(prod);- }- if (close(fd[0]) == -1) {- std::cerr << "close error: " << errno << std::endl;- retval = 1;- }- if (close(fd[1]) == -1) {- std::cerr << "close error: " << errno << std::endl;- retval = 1;- }- // Sink- kr = pqrs::karabiner_virtual_hid_device_methods::reset_virtual_hid_keyboard(connect);- if (kr != KERN_SUCCESS) {- std::cerr << "reset_virtual_hid_keyboard error: " << std::hex << kr << std::endl;- retval = 1;- }- if (connect) {- kr = IOServiceClose(connect);- if(kr != KERN_SUCCESS) {- std::cerr << "IOServiceClose error: " << std::hex << kr << std::endl;- retval = 1;- }- }- if (service) {- kr = IOObjectRelease(service);- if(kr != KERN_SUCCESS) {- std::cerr << "IOObjectRelease error: " << std::hex << kr << std::endl;- retval = 1;- }- }- return retval;-}
changelog.md view
@@ -1,9 +1,50 @@ # Changelog+ A log of all notable changes to KMonad. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0) -## [Unreleased]+## Unreleased -## [0.4.1] - 2020-09-12+### Added++### Changed++### Fixed++## 0.4.2 – 2023-10-07++### Added++- Added `around-next-single`, a variant of `around-next` that will release its+ context on any change, as opposed to only on the release of the 'arounded'+ button.+- Added default compose sequence for Ü+- Added systemd user unit+- Added runit startup script+- Added short delay in startup+- Added macOS 11.0 support+- Added a `sticky-key`+- Expanded documentation+- Added `--version` (`-V`) flag+- Added `+,` for "add a cedilla"+- Added `:timeout-button` keyword to `tap-hold-next` and+ `tap-hold-next-release`, so that they can switch to a button other than the+ hold button when the timeout expires.+- Added openrc startup script++### Changed++- Reorganized codebase+- The `multi-tap` key now immediately taps the current key when another+ key is pressed during tapping.++### Fixed++- Fixed compilation error under Mac, having to do with typo in Keycodes+- Fixed issue with empty-names for uinput-sinks+- Ignore SIGCHLD to deal with non-termination bug++## 0.4.1 - 2020-09-12+ - First release where we start tracking changes.
kmonad.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: kmonad-version: 0.4.1+version: 0.4.2 license: MIT license-file: LICENSE maintainer: janssen.dhj@gmail.com@@ -17,31 +17,51 @@ build-type: Simple extra-source-files: changelog.md +flag kext+ description: build against the kext [macOS only]+ default: False++flag dext+ description: build against the dext [macOS only]+ default: False+ library exposed-modules:- Data.LayerStack- Data.MultiMap- KMonad.Action KMonad.App- KMonad.App.BEnv- KMonad.App.Dispatch- KMonad.App.Hooks- KMonad.App.Keymap- KMonad.App.Sluice+ KMonad.App.Main+ KMonad.App.Types KMonad.Args KMonad.Args.Cmd KMonad.Args.Parser KMonad.Args.Joiner+ KMonad.Args.TH KMonad.Args.Types- KMonad.Button+ KMonad.Model+ KMonad.Model.Action+ KMonad.Model.BEnv+ KMonad.Model.Button+ KMonad.Model.Dispatch+ KMonad.Model.Hooks+ KMonad.Model.Keymap+ KMonad.Model.Sluice+ KMonad.Gesture KMonad.Keyboard- KMonad.Keyboard.Keycode KMonad.Keyboard.ComposeSeq KMonad.Keyboard.IO+ KMonad.Keyboard.Keycode+ KMonad.Keyboard.Ops+ KMonad.Keyboard.Types+ KMonad.Parsing KMonad.Prelude+ KMonad.Prelude.Imports+ KMonad.Prelude.Definitions KMonad.Util+ KMonad.Util.LayerStack+ KMonad.Util.MultiMap+ Paths_kmonad hs-source-dirs: src+ autogen-modules: Paths_kmonad default-language: Haskell2010 default-extensions: ConstraintKinds DeriveFunctor DeriveGeneric DeriveTraversable@@ -52,16 +72,17 @@ ghc-options: -Wall -Wno-name-shadowing -Wno-unused-imports build-depends:- base >=4.12.0.0 && <4.13,- cereal >=0.5.8.1 && <0.6,- lens >=4.17.1 && <4.18,- megaparsec >=7.0.5 && <7.1,- mtl >=2.2.2 && <2.3,- optparse-applicative >=0.14.3.0 && <0.15,- resourcet >=1.2.2 && <1.3,- rio >=0.1.14.0 && <0.2,- time >=1.8.0.2 && <1.9,- unliftio >=0.2.12 && <0.3+ base <4.18,+ cereal <0.6,+ lens <5.3,+ megaparsec <9.4,+ mtl <2.3,+ optparse-applicative <0.18,+ resourcet <1.3,+ rio <0.2,+ time <1.13,+ unliftio <0.3,+ template-haskell <2.20 if os(linux) exposed-modules:@@ -70,7 +91,7 @@ KMonad.Keyboard.IO.Linux.UinputSink c-sources: c_src/keyio.c- build-depends: unix >=2.7.2.2 && <2.8+ build-depends: unix <2.8 if os(windows) exposed-modules:@@ -79,7 +100,7 @@ KMonad.Keyboard.IO.Windows.Types c-sources: c_src/keyio_win.c- build-depends: Win32 >=2.6.1.0 && <2.7+ build-depends: Win32 if os(osx) exposed-modules:@@ -87,17 +108,43 @@ KMonad.Keyboard.IO.Mac.KextSink KMonad.Keyboard.IO.Mac.Types - cxx-options: -std=c++14 frameworks: CoreFoundation IOKit- cxx-sources: c_src/mac/keyio_mac.cpp extra-libraries: c++- build-depends: unix >=2.7.2.2 && <2.8+ build-depends: unix <2.8 + if flag(kext)+ cxx-options: -std=c++14+ cxx-sources: c_src/mac/kext.cpp++ if flag(dext)+ cxx-options: -std=c++2a+ cxx-sources: c_src/mac/dext.cpp+ executable kmonad main-is: Main.hs hs-source-dirs: app default-language: Haskell2010 ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends:- base >=4.12.0.0 && <4.13,- kmonad -any+ base <4.18,+ kmonad++test-suite spec+ type: exitcode-stdio-1.0+ main-is: Spec.hs+ build-tool-depends: hspec-discover:hspec-discover >=2 && <3+ hs-source-dirs: test+ other-modules: KMonad.GestureSpec+ default-language: Haskell2010+ default-extensions:+ ConstraintKinds DeriveFunctor DeriveGeneric DeriveTraversable+ FlexibleContexts FlexibleInstances FunctionalDependencies+ GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses+ MultiWayIf NoImplicitPrelude OverloadedStrings RankNTypes+ TemplateHaskell TupleSections TypeFamilies++ ghc-options: -Wall+ build-depends:+ base <4.18,+ kmonad,+ hspec <2.11
− src/Data/LayerStack.hs
@@ -1,155 +0,0 @@-{-# LANGUAGE ScopedTypeVariables #-}-{-|-Module : Data.LayerStack-Description : A container of overlapping mappings-Copyright : (c) David Janssen, 2019-License : MIT-Maintainer : janssen.dhj@gmail.com-Stability : experimental-Portability : portable--A 'LayerStack' is a set of different mappings between keys and values, and-provides functionality for keeping track of a `stack` of these mappings. Lookup-in a 'LayerStack' happens by checking the front-most mapping on the stack, and-if that fails, descending deeper.--A 'LayerStack' has 3 type parameters, in the documentation we will refer to-those as:- - l: The layer key, which is the identifier for the different layers- - k: The item key, which is the per-layer identifier for different items- - a: The item (value), which is the value stored for k in a particular layer--'LayerStack' is used to implement the basic keymap logic in KMonad, where the-configuration for a keyboard is essentially a set of layers. Each layer maps-keycodes to buttons, and the entire layers can be overlayed on top of eachother.---}-module Data.LayerStack- ( -- * Basic types- -- $types- Layer- , mkLayer- , LayerStack- , mkLayerStack- , items- , maps- , stack-- -- * Basic operations on LayerStacks- -- $ops- , atKey- , inLayer- , pushLayer- , popLayer-- -- * Things that can go wrong with LayerStacks- -- $err- , LayerStackError(..)- , AsLayerStackError(..)- )--where--import KMonad.Prelude--import RIO.List (delete)--import qualified RIO.HashMap as M-import qualified RIO.HashSet as S------------------------------------------------------------------------------------- $err---- | The things that can go wrong with a 'LayerStack'-data LayerStackError l- = LayerDoesNotExist l -- ^ Requested use of a non-existing layer- | LayerNotOnStack l -- ^ Requested use of a non-stack layer- deriving Show-makeClassyPrisms ''LayerStackError--instance (Typeable l, Show l) => Exception (LayerStackError l)------------------------------------------------------------------------------------- $constraints---- | The type of things that can function as either layer or item keys in a--- LayerStack.-type CanKey k = (Eq k, Hashable k)------------------------------------------------------------------------------------- $types---- | A 'Layer' is one of the maps contained inside a 'LayerStack'-newtype Layer k a = Layer { unLayer :: M.HashMap k a}- deriving (Show, Eq, Ord, Functor, Foldable, Traversable)---- | Create a new 'Layer' from a 'Foldable' of key-value pairs-mkLayer :: (Foldable t, CanKey k) => t (k, a) -> Layer k a-mkLayer = Layer . M.fromList . toList---- | A 'LayerStack' is a named collection of maps and a sequence of maps to use--- for lookup.-data LayerStack l k a = LayerStack- { _stack :: ![l] -- ^ The current stack of layers- , _maps :: !(S.HashSet l) -- ^ A set of all 'Layer' names- , _items :: !(M.HashMap (l, k) a) -- ^ The map of all the bindings- } deriving (Show, Eq, Functor)-makeLenses ''LayerStack----- | Create a new 'LayerStack' from a foldable of foldables.-mkLayerStack :: (Foldable t1, Foldable t2, CanKey k, CanKey l)- => t1 (l, t2 (k, a)) -- ^ The /alist/ of /alists/ describing the mapping- -> LayerStack l k a-mkLayerStack nestMaps = let- -- Create a HashMap l (Layer k a) from the listlikes- hms = M.fromList . map (over _2 mkLayer) $ toList nestMaps--- -- Create a HashMap (l, k) a from `hms`- its = M.fromList $ hms ^@.. ifolded <.> (to unLayer . ifolded)--- -- Create a HashSet of keys from `its`- kys = S.fromList . M.keys $ hms- in LayerStack [] kys its------------------------------------------------------------------------------------- $ops---- | Return a fold of all the items currently mapped to the item-key------ This can be used with 'toListOf' to get an overview of all the items--- currently mapped to an item-key, or more usefully, with 'firstOf' to simply--- try a lookup like this: `stack^? atKey KeyA`-atKey :: (CanKey l, CanKey k) => k -> Fold (LayerStack l k a) a-atKey c = folding $ \m -> m ^.. stack . folded . to (getK m) . folded- where getK m n = fromMaybe [] (pure <$> M.lookup (n, c) (m^.items))---- | Try to look up a key in a specific layer, regardless of the stack-inLayer :: (CanKey l, CanKey k) => l -> k -> Fold (LayerStack l k a) a-inLayer l c = folding $ \m -> m ^? items . ix (l, c)---- | Add a layer to the front of the stack and return the new 'LayerStack'.------ If the 'Layer' does not exist, return a 'LayerStackError'. If the 'Layer' is--- already on the stack, bring it to the front.----pushLayer :: (CanKey l, CanKey k)- => l- -> LayerStack l k a- -> Either (LayerStackError l) (LayerStack l k a)-pushLayer n keymap = if n `elem` keymap^.maps- then Right $ keymap & stack %~ (addFront n)- else Left $ LayerDoesNotExist n- where addFront a as = case break (a ==) as of- (frnt, a':rest) -> a':(frnt <> rest)- (frnt, []) -> a:frnt---- | Remove a layer from the stack. If the layer index does not exist on the--- stack, return a 'LayerNotOnStack', if the layer index does not exist at all--- in the 'LayerStack', return a 'LayerDoesNotExist'.-popLayer :: (CanKey l, CanKey k)- => l- -> LayerStack l k a- -> Either (LayerStackError l) (LayerStack l k a)-popLayer n keymap = if- | n `elem` keymap^.stack -> Right $ keymap & stack %~ delete n- | n `elem` keymap^.maps -> Left $ LayerNotOnStack n- | otherwise -> Left $ LayerDoesNotExist n
− src/Data/MultiMap.hs
@@ -1,85 +0,0 @@-{-|-Module : Data.MultiMap-Description : A `k -> Set v` mapping, with reversing utilities-Copyright : (c) David Janssen, 2019-License : MIT-Maintainer : janssen.dhj@gmail.com-Stability : experimental-Portability : portable--This datastructure represents a `k -> Set v` mapping: that is to say, each key-can have multiple values (but no duplicates). Additionally, we provide some-operations to reverse this mapping.--In KMonad we use this exclusively to easily define multiple names for the same-'KMonad.Keyboard.Keycode' in a reversible manner.---}-module Data.MultiMap- ( -- * Types- -- $typ- MultiMap- , mkMultiMap- , fromSingletons-- -- * Operations on MultiMaps- -- $ops- , itemed- , reverse- )-where--import KMonad.Prelude hiding (reverse)--import qualified RIO.HashMap as M-import qualified RIO.HashSet as S------------------------------------------------------------------------------------- $typ---- | All the type constraints required for something to function as a MultiMap-type CanMM k v = (Eq k, Ord v, Hashable k, Hashable v)---- | The 'MultiMap', which describes a one to many (unique) mapping-newtype MultiMap k v = MultiMap { _unMM :: M.HashMap k (S.HashSet v) }- deriving Show-makeLenses ''MultiMap--instance (CanMM k v) => Semigroup (MultiMap k v) where- (MultiMap a) <> (MultiMap b) = MultiMap $ M.unionWith (<>) a b-instance (CanMM k v) => Monoid (MultiMap k v) where- mempty = MultiMap $ M.empty--type instance Index (MultiMap k v) = k-type instance IxValue (MultiMap k v) = S.HashSet v--instance CanMM k v => Ixed (MultiMap k v)-instance CanMM k v => At (MultiMap k v) where- at k = unMM . at k---- | Create a new multimap from a foldable of (k, foldable v) pairs.-mkMultiMap :: (Foldable t1, Foldable t2, CanMM k v)- => t1 (k, t2 v) -> MultiMap k v-mkMultiMap = foldMap- ( MultiMap- . uncurry M.singleton- . over _2 (S.fromList . toList)- )---- | Create a new multimap from a foldable of (k, v) pairs-fromSingletons :: (Foldable t, CanMM k v)- => t (k, v) -> MultiMap k v-fromSingletons = mkMultiMap . map (over _2 (:[])) . toList--------------------------------------------------------------------------------------- $ops---- | A fold over all the (k, v) pairs in a 'MultiMap'-itemed :: (CanMM k v) => Fold (MultiMap k v) (k, v)-itemed = folding $ \m -> m ^@.. unMM . ifolded <. folded---- | Reverse a MultiMap. Note: this is not necessarily a lossless conversion.-reverse :: (CanMM k v, CanMM v k) => MultiMap k v -> MultiMap v k-reverse m = mkMultiMap $ m ^.. itemed . swapped . to (over _2 (:[]))
− src/KMonad/Action.hs
@@ -1,243 +0,0 @@-{-|-Module : KMonad.Action-Description : Collection of basic operations-Copyright : (c) David Janssen, 2019-License : MIT-Maintainer : janssen.dhj@gmail.com-Stability : experimental-Portability : portable--KMonad is implemented as an engine that is capable of running 'MonadK' actions.-The logic of various different buttons and keyboard operations are expressed in-this 'MonadK'. This module defines the basic types and operations that make up-'MonadK'. The implementation of how KMonad implements 'MonadK' can be found in-the "KMonad.App" module.--NOTE: All of this is a bit muddled, and redoing the way hooks are handled, and-the basic structuring of MonadK and MonadKIO are liable to change soon.---}-module KMonad.Action- (- KeyPred- , Catch(..)- , Trigger(..)- , Timeout(..)- , HookLocation(..)- , Hook(..)-- -- * Lenses- , HasHook(..)- , HasTimeout(..)- , HasTrigger(..)-- -- * Layer operations- -- $lop- , LayerOp(..)-- -- * MonadK- -- $monadk- , MonadKIO(..)- , MonadK(..)- , AnyK- , Action(..)-- -- * Constituted actions- -- $combs- , my- , matchMy- , after- , whenDone- , await- , awaitMy- , tHookF- , hookF- , within- , withinHeld- )--where--import KMonad.Prelude hiding (timeout)--import KMonad.Keyboard-import KMonad.Util------------------------------------------------------------------------------------- $keyfun---- | Boolean isomorph signalling wether an event should be caught or not-data Catch = Catch | NoCatch deriving (Show, Eq)--instance Semigroup Catch where- NoCatch <> NoCatch = NoCatch- _ <> _ = Catch--instance Monoid Catch where- mempty = NoCatch---- | The packet used to trigger a KeyFun, containing info about the event and--- how long since the Hook was registered.-data Trigger = Trigger- { _elapsed :: Milliseconds -- ^ Time elapsed since hook was registered- , _event :: KeyEvent -- ^ The key event triggering this call- }-makeClassy ''Trigger-------------------------------------------------------------------------------------- $hook------ The general structure of the 'Hook' record, that defines the most general way--- of registering a 'KeyEvent' function.---- | ADT signalling where to install a hook-data HookLocation- = InputHook -- ^ Install the hook immediately after receiving a 'KeyEvent'- | OutputHook -- ^ Install the hook just before emitting a 'KeyEvent'- deriving (Eq, Show)---- | A 'Timeout' value describes how long to wait and what to do upon timeout-data Timeout m = Timeout- { _delay :: Milliseconds -- ^ Delay before timeout action is triggered- , _action :: m () -- ^ Action to perform upon timeout- }-makeClassy ''Timeout---- | The content for 1 key hook-data Hook m = Hook- { _hTimeout :: Maybe (Timeout m) -- ^ Optional timeout machinery- , _keyH :: Trigger -> m Catch -- ^ The function to call on the next 'KeyEvent'- }-makeClassy ''Hook-------------------------------------------------------------------------------------- $lop------ Operations that manipulate the layer-stack---- | 'LayerOp' describes all the different layer-manipulations that KMonad--- supports.-data LayerOp- = PushLayer LayerTag -- ^ Add a layer to the top of the stack- | PopLayer LayerTag -- ^ Remove the first occurence of a layer- | SetBaseLayer LayerTag -- ^ Change the base-layer-------------------------------------------------------------------------------------- $monadk------ The fundamental components that make up any 'KMonad.Button.Button' operation.---- | 'MonadK' contains all the operations used to constitute button actions. It--- encapsulates all the side-effects required to get everything running.-class Monad m => MonadKIO m where- -- | Emit a KeyEvent to the OS- emit :: KeyEvent -> m ()- -- | Pause the current thread for n milliseconds- pause :: Milliseconds -> m ()- -- | Pause or unpause event processing- hold :: Bool -> m ()- -- | Register a callback hook- register :: HookLocation -> Hook m -> m ()- -- | Run a layer-stack manipulation- layerOp :: LayerOp -> m ()- -- | Insert an event in the input queue- inject :: KeyEvent -> m ()- -- | Run a shell-command- shellCmd :: Text -> m ()---- | 'MonadKIO' contains the additional bindings that get added when we are--- currently processing a button.-class MonadKIO m => MonadK m where- -- | Access the keycode to which the current button is bound- myBinding :: m Keycode---- | Type alias for `any monad that can perform MonadK actions`-type AnyK a = forall m. MonadK m => m a---- | A newtype wrapper used to construct 'MonadK' actions-newtype Action = Action { runAction :: AnyK ()}------------------------------------------------------------------------------------- $util---- | Create a KeyEvent matching pressing or releasing of the current button.-my :: MonadK m => Switch -> m KeyEvent-my s = mkKeyEvent s <$> myBinding---- | Register a simple hook without a timeout-hookF :: MonadKIO m => HookLocation -> (KeyEvent -> m Catch) -> m ()-hookF l f = register l . Hook Nothing $ \t -> f (t^.event)---- | Register a hook with a timeout-tHookF :: MonadK m- => HookLocation -- ^ Where to install the hook- -> Milliseconds -- ^ The timeout delay for the hook- -> m () -- ^ The action to perform on timeout- -> (Trigger -> m Catch) -- ^ The action to perform on trigger- -> m () -- ^ The resulting action-tHookF l d a f = register l $ Hook (Just $ Timeout d a) f---- | Perform an action after a period of time has elapsed------ This is essentially just a way to perform async actions using the KMonad hook--- system.-after :: MonadK m- => Milliseconds- -> m ()- -> m ()-after d a = do- let rehook t = after (d - t^.elapsed) a *> pure NoCatch- tHookF InputHook d a rehook---- | Perform an action immediately after the current action is finished. NOTE:--- there is no guarantee that another event doesn't outrace this, only that it--- will happen as soon as the CPU gets to it.-whenDone :: MonadK m- => m ()- -> m ()-whenDone = after 0----- | Create a KeyPred that matches the Press or Release of the current button.-matchMy :: MonadK m => Switch -> m KeyPred-matchMy s = (==) <$> my s---- | Wait for an event to match a predicate and then execute an action-await :: MonadKIO m => KeyPred -> (KeyEvent -> m Catch) -> m ()-await p a = hookF InputHook $ \e -> if p e- then a e- else await p a *> pure NoCatch---- | Execute an action on the detection of the Switch of the active button.-awaitMy :: MonadK m => Switch -> m Catch -> m ()-awaitMy s a = matchMy s >>= flip await (const a)---- | Try to call a function on a succesful match of a predicate within a certain--- time period. On a timeout, perform an action.-within :: MonadK m- => Milliseconds -- ^ The time within which this filter is active- -> m KeyPred -- ^ The predicate used to find a match- -> m () -- ^ The action to call on timeout- -> (Trigger -> m Catch) -- ^ The action to call on a succesful match- -> m () -- ^ The resulting action-within d p a f = do- p' <- p- -- define f' to run action on predicate match, or rehook on predicate mismatch- let f' t = if p' (t^.event)- then f t- else within (d - t^.elapsed) p a f *> pure NoCatch- tHookF InputHook d a f'---- | Like `within`, but acquires a hold when starting, and releases when done-withinHeld :: MonadK m- => Milliseconds -- ^ The time within which this filter is active- -> m KeyPred -- ^ The predicate used to find a match- -> m () -- ^ The action to call on timeout- -> (Trigger -> m Catch) -- ^ The action to call on a succesful match- -> m () -- ^ The resulting action-withinHeld d p a f = do- hold True- within d p (a <* hold False) (\x -> f x <* hold False)
src/KMonad/App.hs view
@@ -1,4 +1,5 @@ {-# OPTIONS_GHC -Wno-orphans #-}+{-# LANGUAGE CPP #-} {-| Module : KMonad.App Description : The central app-loop of KMonad@@ -10,238 +11,7 @@ -} module KMonad.App- ( AppCfg(..)- , HasAppCfg(..)- , startApp- )+ ( main ) where -import KMonad.Prelude--import UnliftIO.Process (spawnCommand)-import RIO.Text (unpack)--import KMonad.Action-import KMonad.Button-import KMonad.Keyboard-import KMonad.Keyboard.IO-import KMonad.Util-import KMonad.App.BEnv--import qualified KMonad.App.Dispatch as Dp-import qualified KMonad.App.Hooks as Hs-import qualified KMonad.App.Sluice as Sl-import qualified KMonad.App.Keymap as Km------------------------------------------------------------------------------------- $appcfg------ The 'AppCfg' and 'AppEnv' records store the configuration and runtime--- environment of KMonad's app-loop respectively. This contains nearly all of--- the components required to run KMonad.------ Note that the 'AppEnv' is still not sufficient to satisfy 'MonadK', since--- there are times where we are not processing a button push. I.e. 'MonadK' is a--- series of operations that allow us to specify how to deal with the current--- button-push, but it required us to have actually registered a push (or--- release) of some button. 'AppEnv' exists before any buttons have been pushed,--- and therefore contains no information about 'the current button push' (nor--- could it). Later in this module we specify KEnv as a combination of AppEnv--- and a BEnv. It is that environment that we use to satisfy 'MonadK'.---- | Record of all the configuration options required to run KMonad's core App--- loop.-data AppCfg = AppCfg- { _keySinkDev :: Acquire KeySink -- ^ How to open a 'KeySink'- , _keySourceDev :: Acquire KeySource -- ^ How to open a 'KeySource'- , _keymapCfg :: LMap Button -- ^ The map defining the 'Button' layout- , _firstLayer :: LayerTag -- ^ Active layer when KMonad starts- , _fallThrough :: Bool -- ^ Whether uncaught events should be emitted or not- , _allowCmd :: Bool -- ^ Whether shell-commands are allowed- }-makeClassy ''AppCfg----- | Environment of a running KMonad app-loop-data AppEnv = AppEnv- { -- Stored copy of cfg- _keAppCfg :: AppCfg- - -- General IO- , _keLogFunc :: LogFunc- , _keySink :: KeySink- , _keySource :: KeySource-- -- Pull chain- , _dispatch :: Dp.Dispatch- , _inHooks :: Hs.Hooks- , _sluice :: Sl.Sluice-- -- Other components- , _keymap :: Km.Keymap- , _outHooks :: Hs.Hooks- , _outVar :: TMVar KeyEvent- }-makeClassy ''AppEnv--instance HasLogFunc AppEnv where logFuncL = keLogFunc-instance HasAppCfg AppEnv where appCfg = keAppCfg-------------------------------------------------------------------------------------- $init---- | Initialize all the components of the KMonad app-loop------ NOTE: This is written in 'ContT' over our normal RIO monad. This is just to--- to simplify a bunch of nesting of calls. At no point do we make use of--- 'callCC' or other 'ContT' functionality.----initAppEnv :: HasLogFunc e => AppCfg -> ContT r (RIO e) AppEnv-initAppEnv cfg = do- -- Get a reference to the logging function- lgf <- view logFuncL-- -- Acquire the keysource and keysink- snk <- using $ cfg^.keySinkDev- src <- using $ cfg^.keySourceDev-- -- Initialize the pull-chain components- dsp <- Dp.mkDispatch $ awaitKey src- ihk <- Hs.mkHooks $ Dp.pull dsp- slc <- Sl.mkSluice $ Hs.pull ihk-- -- Initialize the button environments in the keymap- phl <- Km.mkKeymap (cfg^.firstLayer) (cfg^.keymapCfg)-- -- Initialize output components- otv <- lift . atomically $ newEmptyTMVar- ohk <- Hs.mkHooks . atomically . takeTMVar $ otv-- -- Setup thread to read from outHooks and emit to keysink- launch_ "emitter_proc" $ do- e <- atomically . takeTMVar $ otv- emitKey snk e- -- emit e = view keySink >>= flip emitKey e- pure $ AppEnv- { _keAppCfg = cfg- , _keLogFunc = lgf- , _keySink = snk- , _keySource = src-- , _dispatch = dsp- , _inHooks = ihk- , _sluice = slc-- , _keymap = phl- , _outHooks = ohk- , _outVar = otv- }-------------------------------------------------------------------------------------- $loop------ The central app-loop of KMonad.---- | Trigger the button-action press currently registered to 'Keycode'-pressKey :: (HasAppEnv e, HasLogFunc e, HasAppCfg e) => Keycode -> RIO e ()-pressKey c =- view keymap >>= flip Km.lookupKey c >>= \case-- -- If the keycode does not occur in our keymap- Nothing -> do- ft <- view fallThrough- if ft- then do- emit $ mkPress c- await (isReleaseOf c) $ \_ -> do- emit $ mkRelease c- pure Catch- else pure ()-- -- If the keycode does occur in our keymap- Just b -> runBEnv b Press >>= \case- Nothing -> pure () -- If the previous action on this key was *not* a release- Just a -> do- -- Execute the press and register the release- app <- view appEnv- runRIO (KEnv app b) $ do- runAction a- awaitMy Release $ do- runBEnv b Release >>= maybe (pure ()) runAction- pure Catch---- | Perform 1 step of KMonad's app loop------ We forever:--- 1. Pull from the pull-chain until an unhandled event reaches us.--- 2. If that event is a 'Press' we use our keymap to trigger an action.-loop :: RIO AppEnv ()-loop = forever $ view sluice >>= Sl.pull >>= \case- e | e^.switch == Press -> pressKey $ e^.keycode- _ -> pure ()---- | Run KMonad using the provided configuration-startApp :: HasLogFunc e => AppCfg -> RIO e ()-startApp c = runContT (initAppEnv c) (flip runRIO loop)--instance (HasAppEnv e, HasAppCfg e, HasLogFunc e) => MonadKIO (RIO e) where- -- Emitting with the keysink- emit e = view outVar >>= atomically . flip putTMVar e- -- emit e = view keySink >>= flip emitKey e-- -- Pausing is a simple IO action- pause = threadDelay . (*1000) . fromIntegral-- -- Holding and rerunning through the sluice and dispatch- hold b = do- sl <- view sluice- di <- view dispatch- if b then Sl.block sl else Sl.unblock sl >>= Dp.rerun di-- -- Hooking is performed with the hooks component- register l h = do- hs <- case l of- InputHook -> view inHooks- OutputHook -> view outHooks- Hs.register hs h-- -- Layer-ops are sent to the 'Keymap'- layerOp o = view keymap >>= \hl -> Km.layerOp hl o-- -- Injecting by adding to Dispatch's rerun buffer- inject e = do- di <- view dispatch- logDebug $ "Injecting event: " <> display e- Dp.rerun di [e]-- -- Shell-command through spawnCommand- shellCmd t = do- f <- view allowCmd- if f then do- logInfo $ "Running command: " <> display t- void . spawnCommand . unpack $ t- else- logInfo $ "Received but not running: " <> display t------------------------------------------------------------------------------------- $kenv------- | The complete environment capable of satisfying 'MonadK'-data KEnv = KEnv- { _kAppEnv :: AppEnv -- ^ The app environment containing all the components- , _kBEnv :: BEnv -- ^ The environment describing the currently active button- }-makeClassy ''KEnv--instance HasAppCfg KEnv where appCfg = kAppEnv.appCfg-instance HasAppEnv KEnv where appEnv = kAppEnv-instance HasBEnv KEnv where bEnv = kBEnv-instance HasLogFunc KEnv where logFuncL = kAppEnv.logFuncL---- | Hook up all the components to the different 'MonadK' functionalities-instance MonadK (RIO KEnv) where- -- Binding is found in the stored 'BEnv'- myBinding = view (bEnv.binding)+import KMonad.App.Main ( main )
− src/KMonad/App/BEnv.hs
@@ -1,63 +0,0 @@-{-|-Module : KMonad.App.BEnv-Description : Implementation details behind 'Button'-Copyright : (c) David Janssen, 2019-License : MIT-Maintainer : janssen.dhj@gmail.com-Stability : experimental-Portability : portable--When running KMonad, we need to keep track the last switchstate of a 'Button',-because we only allowing switching, (we have to filter out repeated 'Press' or-'Release' events). Additionally, we keep track of what 'Keycode' a button is-bound to, to provide the 'myBinding' functionality from 'MonadK'.---}--module KMonad.App.BEnv- ( BEnv(..)- , HasBEnv(..)- , initBEnv- , runBEnv- )-where--import KMonad.Prelude--import KMonad.Action-import KMonad.Button-import KMonad.Keyboard------------------------------------------------------------------------------------- $benv------ When running KMonad, a button also keeps track of what keycode it's bound to,--- and what its last switch was. This is used to provide the 'myBinding' feature--- of MonadK, and the invariant that switches always alternate (there is no--- press-press or release-release).---- | The configuration of a 'Button' with some additional state to keep track of--- the last 'Switch'-data BEnv = BEnv- { _beButton :: !Button -- ^ The configuration for this button- , _binding :: !Keycode -- ^ The 'Keycode' to which this button is bound- , _lastSwitch :: !(MVar Switch) -- ^ State to keep track of last manipulation- }-makeClassy ''BEnv--instance HasButton BEnv where button = beButton---- | Initialize a 'BEnv', note that a key is always initialized in an unpressed--- state.-initBEnv :: MonadIO m => Button -> Keycode -> m BEnv-initBEnv b c = BEnv b c <$> newMVar Release---- | Try to switch a 'BEnv'. This only does something if the 'Switch' is--- different from the 'lastSwitch' field. I.e. pressing a pressed button or--- releasing a released button does nothing.-runBEnv :: MonadUnliftIO m => BEnv -> Switch -> m (Maybe Action)-runBEnv b a =- modifyMVar (b^.lastSwitch) $ \l -> pure $ case (a, l) of- (Press, Release) -> (Press, Just $ b^.pressAction)- (Release, Press) -> (Release, Just $ b^.releaseAction)- _ -> (a, Nothing)
− src/KMonad/App/Dispatch.hs
@@ -1,114 +0,0 @@-{-|-Module : KMonad.App.Dispatch-Description : Component for async reading.-Copyright : (c) David Janssen, 2019-License : MIT-Maintainer : janssen.dhj@gmail.com-Stability : experimental-Portability : portable--The 'Dispatch' component of the app-loop solves the following problem: we might-at some point during execution be in the following situation:-- We have set our processing to held-- There is a timer running that might unhold at any point-- We are awaiting a key from the OS--This means we need to be able to:-1. Await events from some kind of rerun buffer-2. Await events from the OS-3. Do both of these things without ever entering a race-condition where we lose- an event because both 1. and 2. happen at exactly the same time.--The Dispatch component provides the ability to read events from some IO action-while at the same time providing a method to write events into the Dispatch,-sending them to the head of the read-queue, while guaranteeing that no events-ever get lost.--In the sequencing of components, the 'Dispatch' occurs first, which means that-it reads directly from the KeySource. Any component after the 'Dispatch' need-not worry about wether an event is being rerun or not, it simply treats all-events as equal.---}-module KMonad.App.Dispatch- ( -- $env- Dispatch- , mkDispatch-- -- $op- , pull- , rerun- )-where--import KMonad.Prelude-import KMonad.Keyboard--import RIO.Seq (Seq(..), (><))-import qualified RIO.Seq as Seq-import qualified RIO.Text as T------------------------------------------------------------------------------------- $env------ The 'Dispatch' environment, describing what values are required to perform--- the Dispatch operations, and constructors for creating such an environment.---- | The 'Dispatch' environment-data Dispatch = Dispatch- { _eventSrc :: IO KeyEvent -- ^ How to read 1 event- , _readProc :: TMVar (Async KeyEvent) -- ^ Store for reading process- , _rerunBuf :: TVar (Seq KeyEvent) -- ^ Buffer for rerunning events- }-makeLenses ''Dispatch---- | Create a new 'Dispatch' environment-mkDispatch' :: MonadUnliftIO m => m KeyEvent -> m Dispatch-mkDispatch' s = withRunInIO $ \u -> do- rpc <- atomically $ newEmptyTMVar- rrb <- atomically $ newTVar Seq.empty- pure $ Dispatch (u s) rpc rrb---- | Create a new 'Dispatch' environment in a 'ContT' environment-mkDispatch :: MonadUnliftIO m => m KeyEvent -> ContT r m Dispatch-mkDispatch = lift . mkDispatch'------------------------------------------------------------------------------------- $op------ The supported 'Dispatch' operations.---- | Return the next event, this will return either (in order of precedence):--- 1. The next item to be rerun--- 2. A new item read from the OS--- 3. Pausing until either 1. or 2. triggers-pull :: (HasLogFunc e) => Dispatch -> RIO e KeyEvent-pull d = do- -- Check for an unfinished read attempt started previously. If it exists,- -- fetch it, otherwise, start a new read attempt.- a <- atomically (tryTakeTMVar $ d^.readProc) >>= \case- Nothing -> async . liftIO $ d^.eventSrc- Just a' -> pure a'-- -- First try reading from the rerunBuf, or failing that, from the- -- read-process. If both fail we enter an STM race.- atomically ((Left <$> popRerun) `orElse` (Right <$> waitSTM a)) >>= \case- -- If we take from the rerunBuf, put the running read-process back in place- Left e' -> do- logDebug $ "\n" <> display (T.replicate 80 "-")- <> "\nRerunning event: " <> display e'- atomically $ putTMVar (d^.readProc) a- pure e'- Right e' -> pure e'-- where- -- Pop the head off the rerun-buffer (or 'retrySTM' if empty)- popRerun = readTVar (d^.rerunBuf) >>= \case- Seq.Empty -> retrySTM- (e :<| b) -> do- writeTVar (d^.rerunBuf) b- pure e---- | Add a list of elements to be rerun.-rerun :: (HasLogFunc e) => Dispatch -> [KeyEvent] -> RIO e ()-rerun d es = atomically $ modifyTVar (d^.rerunBuf) (>< Seq.fromList es)
− src/KMonad/App/Hooks.hs
@@ -1,199 +0,0 @@-{-|-Module : KMonad.App.Hooks-Description : Component for handling hooks-Copyright : (c) David Janssen, 2019-License : MIT-Maintainer : janssen.dhj@gmail.com-Stability : experimental-Portability : portable--Part of the KMonad deferred-decision mechanics are implemented using hooks,-which will call predicates and actions on future keypresses and/or timer events.-The 'Hooks' component is the concrete implementation of this functionality.--In the sequencing of components, this happens second, right after the-'KMonad.App.Dispatch.Dispatch' component.---}-module KMonad.App.Hooks- ( Hooks- , mkHooks- , pull- , register- )-where--import KMonad.Prelude--import Data.Time.Clock.System-import Data.Unique--import KMonad.Action hiding (register)-import KMonad.Keyboard-import KMonad.Util--import RIO.Partial (fromJust)--import qualified RIO.HashMap as M------------------------------------------------------------------------------------- $hooks------ -- | A 'Hook' contains the 'KeyPred' and 'Callback'--- newtype Hook = Hook (KeyPred, Callback IO)--- makeWrapped ''Hook---- -- | Create a new 'Hook' value--- mkHook :: MonadUnliftIO m => KeyPred -> Callback m -> m Hook--- mkHook p c = withRunInIO $ \u -> pure $ Hook (p, (u . c))------------------------------------------------------------------------------------- $env--data Entry = Entry- { _time :: SystemTime- , _eHook :: Hook IO- }-makeLenses ''Entry--instance HasHook Entry IO where hook = eHook--type Store = M.HashMap Unique Entry---- | The 'Hooks' environment that is required for keeping track of all the--- different targets and callbacks.-data Hooks = Hooks- { _eventSrc :: IO KeyEvent -- ^ Where we get our events from- , _injectTmr :: TMVar Unique -- ^ Used to signal timeouts- , _hooks :: TVar Store -- ^ Store of hooks- }-makeLenses ''Hooks---- | Create a new 'Hooks' environment which reads events from the provided action-mkHooks' :: MonadUnliftIO m => m KeyEvent -> m Hooks-mkHooks' s = withRunInIO $ \u -> do- itr <- atomically $ newEmptyTMVar- hks <- atomically $ newTVar M.empty- pure $ Hooks (u s) itr hks---- | Create a new 'Hooks' environment, but as a 'ContT' monad to avoid nesting-mkHooks :: MonadUnliftIO m => m KeyEvent -> ContT r m Hooks-mkHooks = lift . mkHooks'---- | Convert a hook in some UnliftIO monad into an IO version, to store it in Hooks-ioHook :: MonadUnliftIO m => Hook m -> m (Hook IO)-ioHook h = withRunInIO $ \u -> do-- t <- case _hTimeout h of- Nothing -> pure Nothing- Just t' -> pure . Just $ Timeout (t'^.delay) (u (_action t'))- let f = \e -> u $ (_keyH h) e- pure $ Hook t f-------------------------------------------------------------------------------------- $op------ The following code deals with simple operations on the environment, like--- inserting and removing hooks.---- | Insert a hook, along with the current time, into the store-register :: (HasLogFunc e)- => Hooks- -> Hook (RIO e)- -> RIO e ()-register hs h = do- -- Insert an entry into the store- tag <- liftIO newUnique- e <- Entry <$> liftIO getSystemTime <*> ioHook h- atomically $ modifyTVar (hs^.hooks) (M.insert tag e)- -- If the hook has a timeout, start a thread that will signal timeout- case h^.hTimeout of- Nothing -> logDebug $ "Registering untimed hook: " <> display (hashUnique tag)- Just t' -> void . async $ do- logDebug $ "Registering " <> display (t'^.delay)- <> "ms hook: " <> display (hashUnique tag)- threadDelay $ 1000 * (fromIntegral $ t'^.delay)- atomically $ putTMVar (hs^.injectTmr) tag---- | Cancel a hook by removing it from the store-cancelHook :: (HasLogFunc e)- => Hooks- -> Unique- -> RIO e ()-cancelHook hs tag = do- e <- atomically $ do- m <- readTVar $ hs^.hooks- let v = M.lookup tag m- when (isJust v) $ modifyTVar (hs^.hooks) (M.delete tag)- pure v- case e of- Nothing ->- logDebug $ "Tried cancelling expired hook: " <> display (hashUnique tag)- Just e' -> do- logDebug $ "Cancelling hook: " <> display (hashUnique tag)- liftIO $ e' ^. hTimeout . to fromJust . action-------------------------------------------------------------------------------------- $run------ The following code deals with how we check hooks against incoming events, and--- how this updates the 'Hooks' environment.---- | Run the function stored in a Hook on the event and the elapsed time-runEntry :: MonadIO m => SystemTime -> KeyEvent -> Entry -> m Catch-runEntry t e v = liftIO $ do- (v^.keyH) $ Trigger ((v^.time) `tDiff` t) e---- | Run all hooks on the current event and reset the store-runHooks :: (HasLogFunc e)- => Hooks- -> KeyEvent- -> RIO e (Maybe KeyEvent)-runHooks hs e = do- logDebug "Running hooks"- m <- atomically $ swapTVar (hs^.hooks) M.empty- now <- liftIO getSystemTime- foldMapM (runEntry now e) (M.elems m) >>= \case- Catch -> pure $ Nothing- NoCatch -> pure $ Just e-------------------------------------------------------------------------------------- $loop------ The following code deals with how to use the 'Hooks' component as part of a--- pull-chain. It contains logic for how to try to pull events from upstream and--- check them against the hooks, and for how to keep stepping until an unhandled--- event comes through.---- | Pull 1 event from the '_eventSrc'. If that action is not caught by any--- callback, then return it (otherwise return Nothing). At the same time, keep--- reading the timer-cancellation inject point and handle any cancellation as it--- comes up.-step :: (HasLogFunc e)- => Hooks -- ^ The 'Hooks' environment- -> RIO e (Maybe KeyEvent) -- ^ An action that returns perhaps the next event-step h = do-- -- Asynchronously start reading the next event- a <- async . liftIO $ h^.eventSrc- - -- Handle any timer event first, and then try to read from the source- let next = (Left <$> takeTMVar (h^.injectTmr)) `orElse` (Right <$> waitSTM a)-- -- Keep taking and cancelling timers until we encounter a key event, then run- -- the hooks on that event.- let read = atomically next >>= \case- Left t -> cancelHook h t >> read -- We caught a cancellation- Right e -> runHooks h e -- We caught a real event- read---- | Keep stepping until we succesfully get an unhandled 'KeyEvent'-pull :: HasLogFunc e- => Hooks- -> RIO e KeyEvent-pull h = step h >>= maybe (pull h) pure
− src/KMonad/App/Keymap.hs
@@ -1,121 +0,0 @@-{-|-Module : KMonad.App.Keymap-Description : Implementation of mapping key-presses to button actions-Copyright : (c) David Janssen, 2019-License : MIT-Maintainer : janssen.dhj@gmail.com-Stability : experimental-Portability : portable--In KMonad we handle all releases (and some other actions) via callback-mechanisms. It is the button-presses that get handled through a keymap. It is-the 'Keymap' component that manages the keymap state and ensures that-incoming events are mapped to---}-module KMonad.App.Keymap- ( Keymap- , mkKeymap- , layerOp- , lookupKey- )-where---import KMonad.Prelude--import KMonad.Action hiding (layerOp)-import KMonad.Button-import KMonad.Keyboard-import KMonad.App.BEnv--import qualified Data.LayerStack as Ls------------------------------------------------------------------------------------- $env-------- | The 'Keymap' environment containing the current keymap------ NOTE: Since the 'Keymap' will never have to deal with anything--- asynchronously we can simply use 'IORef's here.-data Keymap = Keymap- { _stack :: IORef (LMap BEnv)- , _baseL :: IORef LayerTag- }-makeClassy ''Keymap---- | Create a 'Keymap' from a 'Keymap' of uninitialized 'Button's and a--- tag indicating which layer should start as the base.-mkKeymap' :: MonadUnliftIO m- => LayerTag -- ^ The initial base layer- -> LMap Button -- ^ The keymap of 'Button's- -> m Keymap-mkKeymap' n m = do- envs <- m & Ls.items . itraversed %%@~ \(_, c) b -> initBEnv b c- Keymap <$> newIORef envs <*> newIORef n---- | Create a 'Keymap' but do so in the context of a 'ContT' monad to ease nesting.-mkKeymap :: MonadUnliftIO m => LayerTag -> LMap Button -> ContT r m Keymap-mkKeymap n = lift . mkKeymap' n-------------------------------------------------------------------------------------- $op------ The following code describes how we add and remove layers from the--- 'Keymap'.---- | Print a header message followed by an enumeration of the layer-stack-debugReport :: HasLogFunc e => Keymap -> Utf8Builder -> RIO e ()-debugReport h hdr = do- st <- view Ls.stack <$> (readIORef $ h^.stack)- let ub = foldMap (\(i, n) -> " " <> display i- <> ". " <> display n <> "\n")- (zip ([1..] :: [Int]) st)- ls <- readIORef (h^.baseL)- logDebug $ hdr <> "\n" <> ub <> "Base-layer: " <> display ls <> "\n"---- | Perform operations on the layer-stack-layerOp :: (HasLogFunc e)- => Keymap -- ^ The 'Keymap' environment- -> LayerOp -- ^ The 'LayerOp' to perform- -> RIO e () -- ^ The resulting action-layerOp h o = let km = h^.stack in case o of- (PushLayer n) -> do- Ls.pushLayer n <$> readIORef km >>= \case- Left e -> throwIO e- Right m' -> writeIORef km m'- debugReport h $ "Pushed layer to stack: " <> display n-- (PopLayer n) -> do- Ls.popLayer n <$> readIORef km >>= \case- Left e -> throwIO e- Right m' -> writeIORef km m'- debugReport h $ "Popped layer from stack: " <> display n-- (SetBaseLayer n) -> do- (n `elem`) . view Ls.maps <$> (readIORef km) >>= \case- True -> writeIORef (h^.baseL) n- False -> throwIO $ Ls.LayerDoesNotExist n- debugReport h $ "Set base layer to: " <> display n-------------------------------------------------------------------------------------- $run------ How we use the 'Keymap' to handle events.---- | Lookup the 'BEnv' currently mapped to the key press.-lookupKey :: MonadIO m- => Keymap -- ^ The 'Keymap' to lookup in- -> Keycode -- ^ The 'Keycode' to lookup- -> m (Maybe BEnv) -- ^ The resulting action-lookupKey h c = do- m <- readIORef $ h^.stack- f <- readIORef $ h^.baseL-- pure $ case m ^? Ls.atKey c of- Nothing -> m ^? Ls.inLayer f c- benv -> benv
+ src/KMonad/App/Main.hs view
@@ -0,0 +1,175 @@+{-# LANGUAGE CPP #-}+{-|+Module : KMonad.App.Main+Description : The entry-point to KMonad+Copyright : (c) David Janssen, 2021+License : MIT++Maintainer : janssen.dhj@gmail.com+Stability : experimental+Portability : non-portable++-}+module KMonad.App.Main+ ( -- * The entry-point to KMonad+ main+ )+where++import KMonad.Prelude++import KMonad.Args+import KMonad.App.Types+import KMonad.Keyboard+import KMonad.Util+import KMonad.Model++++import qualified KMonad.Model.Dispatch as Dp+import qualified KMonad.Model.Hooks as Hs+import qualified KMonad.Model.Sluice as Sl+import qualified KMonad.Model.Keymap as Km++-- FIXME: This should live somewhere else++#ifdef linux_HOST_OS+import System.Posix.Signals (Handler(Ignore), installHandler, sigCHLD)+#endif++--------------------------------------------------------------------------------+-- $start+--+-- How to start KMonad++-- | The first command in KMonad+--+-- Get the invocation from the command-line, then do something with it.+main :: IO ()+main = getCmd >>= runCmd++-- | Execute the provided 'Cmd'+--+-- 1. Construct the log-func+-- 2. Parse the config-file+-- 3. Maybe start KMonad+runCmd :: Cmd -> IO ()+runCmd c = do+ o <- logOptionsHandle stdout False <&> setLogMinLevel (c^.logLvl)+ withLogFunc o $ \f -> runRIO f $ do+ cfg <- loadConfig c+ unless (c^.dryRun) $ startApp cfg++--------------------------------------------------------------------------------+-- $init+--+-- The steps required to turn a configuration into the initial KMonad env++-- | Initialize all the components of the KMonad app-loop+--+-- NOTE: This is written in 'ContT' over our normal RIO monad. This is just to+-- to simplify a bunch of nesting of calls. At no point do we make use of+-- 'callCC' or other 'ContT' functionality.+--+initAppEnv :: HasLogFunc e => AppCfg -> ContT r (RIO e) AppEnv+initAppEnv cfg = do+ -- Get a reference to the logging function+ lgf <- view logFuncL++ -- Wait a bit for the user to release the 'Return' key with which they started KMonad+ threadDelay $ fromIntegral (cfg^.startDelay) * 1000++ -- Acquire the keysource and keysink+ snk <- using $ cfg^.keySinkDev+ src <- using $ cfg^.keySourceDev++ -- Initialize the pull-chain components+ dsp <- Dp.mkDispatch $ awaitKey src+ ihk <- Hs.mkHooks $ Dp.pull dsp+ slc <- Sl.mkSluice $ Hs.pull ihk++ -- Initialize the button environments in the keymap+ phl <- Km.mkKeymap (cfg^.firstLayer) (cfg^.keymapCfg)++ -- Initialize output components+ otv <- lift newEmptyTMVarIO+ ohk <- Hs.mkHooks . atomically . takeTMVar $ otv++ -- Setup thread to read from outHooks and emit to keysink+ launch_ "emitter_proc" $ do+ e <- atomically . takeTMVar $ otv+ emitKey snk e+ -- emit e = view keySink >>= flip emitKey e+ pure $ AppEnv+ { _keAppCfg = cfg+ , _keLogFunc = lgf+ , _keySink = snk+ , _keySource = src++ , _dispatch = dsp+ , _inHooks = ihk+ , _sluice = slc++ , _keymap = phl+ , _outHooks = ohk+ , _outVar = otv+ }++--------------------------------------------------------------------------------+-- $emit+--+-- How to use a KMonad env to emit keys to the OS+--+-- FIXME: this needs to live somewhere else++-- | Trigger the button-action press currently registered to 'Keycode'+pressKey :: (HasAppEnv e, HasLogFunc e, HasAppCfg e) => Keycode -> RIO e ()+pressKey c =+ view keymap >>= flip Km.lookupKey c >>= \case++ -- If the keycode does not occur in our keymap+ Nothing -> do+ ft <- view fallThrough+ when ft $ do+ emit $ mkPress c+ await (isReleaseOf c) $ \_ -> do+ emit $ mkRelease c+ pure Catch++ -- If the keycode does occur in our keymap+ Just b -> runBEnv b Press >>= \case+ Nothing -> pure () -- If the previous action on this key was *not* a release+ Just a -> do+ -- Execute the press and register the release+ app <- view appEnv+ runRIO (KEnv app b) $ do+ runAction a+ awaitMy Release $ do+ runBEnv b Release >>= \case+ Nothing -> pure ()+ Just a -> runAction a+ pure Catch++--------------------------------------------------------------------------------+-- $loop+--+-- The app-loop of KMonad++-- | Perform 1 step of KMonad's app loop+--+-- We forever:+-- 1. Pull from the pull-chain until an unhandled event reaches us.+-- 2. If that event is a 'Press' we use our keymap to trigger an action.+loop :: RIO AppEnv ()+loop = forever $ view sluice >>= Sl.pull >>= \case+ e | e^.switch == Press -> pressKey $ e^.keycode+ _ -> pure ()++-- | Run KMonad using the provided configuration+startApp :: HasLogFunc e => AppCfg -> RIO e ()+startApp c = do+#ifdef linux_HOST_OS+ -- Ignore SIGCHLD to avoid zombie processes.+ liftIO . void $ installHandler sigCHLD Ignore Nothing+#endif+ runContT (initAppEnv c) (`runRIO` loop)
− src/KMonad/App/Sluice.hs
@@ -1,119 +0,0 @@-{-|-Module : KMonad.App.Sluice-Description : The component that provides pausing functionality-Copyright : (c) David Janssen, 2019-License : MIT-Maintainer : janssen.dhj@gmail.com-Stability : experimental-Portability : portable--For certain KMonad operations we need to be able to pause and resume processing-of events. This component provides the ability to temporarily pause processing,-and then resume processing and return all events that were caught while paused.---}-module KMonad.App.Sluice- ( Sluice- , mkSluice- , block- , unblock- , pull- )-where--import KMonad.Prelude--import KMonad.Keyboard------------------------------------------------------------------------------------- $env---- | The 'Sluice' environment.------ NOTE: 'Sluice' has no internal multithreading, i.e. its 'pull' action will--- never be interrupted, therefore we can simply use 'IORef' and sidestep all--- the STM complications.-data Sluice = Sluice- { _eventSrc :: IO KeyEvent -- ^ Where we get our 'KeyEvent's from- , _blocked :: IORef Int -- ^ How many locks have been applied to the sluice- , _blockBuf :: IORef [KeyEvent] -- ^ Internal buffer to store events while closed- }-makeLenses ''Sluice---- | Create a new 'Sluice' environment-mkSluice' :: MonadUnliftIO m => m KeyEvent -> m Sluice-mkSluice' s = withRunInIO $ \u -> do- bld <- newIORef 0- buf <- newIORef []- pure $ Sluice (u s) bld buf---- | Create a new 'Sluice' environment, but do so in a ContT context-mkSluice :: MonadUnliftIO m => m KeyEvent -> ContT r m Sluice-mkSluice = lift . mkSluice'-------------------------------------------------------------------------------------- $op------ The following code deals with simple operations on the environment, like--- blocking and unblocking the sluice.---- | Increase the block-count by 1-block :: HasLogFunc e => Sluice -> RIO e ()-block s = do- modifyIORef (s^.blocked) (+1)- readIORef (s^.blocked) >>= \n ->- logDebug $ "Block level set to: " <> display n---- | Set the Sluice to unblocked mode, return a list of all the stored events--- that should be rerun, in the correct order (head was first-in, etc).------ NOTE: After successfully unblocking the 'Sluice' will be empty, it is the--- caller's responsibility to insert the returned events at an appropriate--- location in the 'KMonad.App.App'.------ We do this in KMonad by writing the events into the--- 'KMonad.App.Dispatch.Dispatch's rerun buffer. (this happens in the--- "KMonad.App" module.)-unblock :: HasLogFunc e => Sluice -> RIO e [KeyEvent]-unblock s = do- modifyIORef' (s^.blocked) (\n -> n - 1)- readIORef (s^.blocked) >>= \case- 0 -> do- es <- readIORef (s^.blockBuf)- writeIORef (s^.blockBuf) []- logDebug $ "Unblocking input stream, " <>- if null es- then "no stored events"- else "rerunning:\n" <> (display . unlines . map textDisplay $ reverse es)- pure $ reverse es- n -> do- logDebug $ "Block level set to: " <> display n- pure []-------------------------------------------------------------------------------------- $loop------ The following code deals with how a 'Sluice' fits into the KMonad pull-chain.--- As long as we are blocked, we do not return any events, but keep storing them--- internally. When we are unblocked, events simply pass through.----- | Try to read from the Sluice, if we are blocked, store the event internally--- and return Nothing. If we are unblocked, return Just the KeyEvent.-step :: HasLogFunc e => Sluice -> RIO e (Maybe KeyEvent)-step s = do- e <- liftIO $ s^.eventSrc- readIORef (s^.blocked) >>= \case- 0 -> pure $ Just e- _ -> do- modifyIORef' (s^.blockBuf) (e:)- readIORef (s^.blockBuf) >>= \es -> do- let xs = map ((" - " <>) . textDisplay) es- logDebug . display . unlines $ "Storing event, current store: ":xs- pure Nothing---- | Keep trying to read from the Sluice until an event passes through-pull :: HasLogFunc e => Sluice -> RIO e KeyEvent-pull s = step s >>= maybe (pull s) pure
+ src/KMonad/App/Types.hs view
@@ -0,0 +1,149 @@+{-# OPTIONS_GHC -Wno-orphans #-}+module KMonad.App.Types+ ( AppCfg(..)+ , AppEnv(..)+ , KEnv(..)+ , HasAppCfg(..)+ , HasAppEnv(..)+ , HasKEnv(..)+ )+where++import KMonad.Prelude++import UnliftIO.Process (CreateProcess(close_fds), createProcess_, shell)++import KMonad.Keyboard+import KMonad.Keyboard.IO+import KMonad.Model.Action+import KMonad.Model.Button+import KMonad.Model.BEnv+import KMonad.Util++import qualified KMonad.Model.Dispatch as Dp+import qualified KMonad.Model.Hooks as Hs+import qualified KMonad.Model.Sluice as Sl+import qualified KMonad.Model.Keymap as Km++--------------------------------------------------------------------------------+-- $appcfg+--+-- The 'AppCfg' and 'AppEnv' records store the configuration and runtime+-- environment of KMonad's app-loop respectively. This contains nearly all of+-- the components required to run KMonad.+--+-- Note that the 'AppEnv' is still not sufficient to satisfy 'MonadK', since+-- there are times where we are not processing a button push. I.e. 'MonadK' is a+-- series of operations that allow us to specify how to deal with the current+-- button-push, but it required us to have actually registered a push (or+-- release) of some button. 'AppEnv' exists before any buttons have been pushed,+-- and therefore contains no information about 'the current button push' (nor+-- could it). Later in this module we specify KEnv as a combination of AppEnv+-- and a BEnv. It is that environment that we use to satisfy 'MonadK'.++-- | Record of all the configuration options required to run KMonad's core App+-- loop.+data AppCfg = AppCfg+ { _keySinkDev :: Acquire KeySink -- ^ How to open a 'KeySink'+ , _keySourceDev :: Acquire KeySource -- ^ How to open a 'KeySource'+ , _keymapCfg :: LMap Button -- ^ The map defining the 'Button' layout+ , _firstLayer :: LayerTag -- ^ Active layer when KMonad starts+ , _fallThrough :: Bool -- ^ Whether uncaught events should be emitted or not+ , _allowCmd :: Bool -- ^ Whether shell-commands are allowed+ , _startDelay :: Milliseconds -- ^ How long to wait before acquiring the input keyboard+ }+makeClassy ''AppCfg+++-- | Environment of a running KMonad app-loop+data AppEnv = AppEnv+ { -- Stored copy of cfg+ _keAppCfg :: AppCfg++ -- General IO+ , _keLogFunc :: LogFunc+ , _keySink :: KeySink+ , _keySource :: KeySource++ -- Pull chain+ , _dispatch :: Dp.Dispatch+ , _inHooks :: Hs.Hooks+ , _sluice :: Sl.Sluice++ -- Other components+ , _keymap :: Km.Keymap+ , _outHooks :: Hs.Hooks+ , _outVar :: TMVar KeyEvent+ }+makeClassy ''AppEnv++instance HasLogFunc AppEnv where logFuncL = keLogFunc+instance HasAppCfg AppEnv where appCfg = keAppCfg++--------------------------------------------------------------------------------+-- $kenv+--++-- | The complete environment capable of satisfying 'MonadK'+data KEnv = KEnv+ { _kAppEnv :: AppEnv -- ^ The app environment containing all the components+ , _kBEnv :: BEnv -- ^ The environment describing the currently active button+ }+makeClassy ''KEnv++instance HasAppCfg KEnv where appCfg = kAppEnv.appCfg+instance HasAppEnv KEnv where appEnv = kAppEnv+instance HasBEnv KEnv where bEnv = kBEnv+instance HasLogFunc KEnv where logFuncL = kAppEnv.logFuncL++-- | Hook up all the components to the different 'MonadK' functionalities+instance MonadK (RIO KEnv) where+ -- Binding is found in the stored 'BEnv'+ myBinding = view (bEnv.binding)++instance (HasAppEnv e, HasAppCfg e, HasLogFunc e) => MonadKIO (RIO e) where+ -- Emitting with the keysink+ emit e = view outVar >>= atomically . flip putTMVar e+ -- emit e = view keySink >>= flip emitKey e++ -- Pausing is a simple IO action+ pause = threadDelay . (*1000) . fromIntegral++ -- Holding and rerunning through the sluice and dispatch+ hold b = do+ sl <- view sluice+ di <- view dispatch+ if b then Sl.block sl else Sl.unblock sl >>= Dp.rerun di++ -- Hooking is performed with the hooks component+ register l h = do+ hs <- case l of+ InputHook -> view inHooks+ OutputHook -> view outHooks+ Hs.register hs h++ -- Layer-ops are sent to the 'Keymap'+ layerOp o = view keymap >>= \hl -> Km.layerOp hl o++ -- Injecting by adding to Dispatch's rerun buffer+ inject e = do+ di <- view dispatch+ logDebug $ "Injecting event: " <> display e+ Dp.rerun di [e]++ -- Shell-command through spawnCommand+ shellCmd t = do+ f <- view allowCmd+ if f then do+ logInfo $ "Running command: " <> display t+ spawnCommand . unpack $ t+ else+ logInfo $ "Received but not running: " <> display t+ where+ spawnCommand :: MonadIO m => String -> m ()+ spawnCommand cmd = void $ createProcess_ "spawnCommand"+ (shell cmd){ -- We don't want the child process to inherit things like+ -- our keyboard grab (this would, for example, make it+ -- impossible for a command to restart kmonad).+ close_fds = True+ }
src/KMonad/Args.hs view
@@ -10,11 +10,11 @@ -} module KMonad.Args- ( run )+ ( getCmd, loadConfig, Cmd, HasCmd(..)) where import KMonad.Prelude-import KMonad.App+import KMonad.App.Types import KMonad.Args.Cmd import KMonad.Args.Joiner import KMonad.Args.Parser@@ -23,40 +23,60 @@ -------------------------------------------------------------------------------- -- --- | Run KMonad-run :: IO ()-run = getCmd >>= runCmd---- | Execute the provided 'Cmd'------ 1. Construct the log-func--- 2. Parse the config-file--- 3. Maybe start KMonad-runCmd :: Cmd -> IO ()-runCmd c = do- o <- logOptionsHandle stdout False <&> setLogMinLevel (c^.logLvl)- withLogFunc o $ \f -> runRIO f $ do- cfg <- loadConfig $ c^.cfgFile- unless (c^.dryRun) $ startApp cfg- -- | Parse a configuration file into a 'AppCfg' record-loadConfig :: HasLogFunc e => FilePath -> RIO e AppCfg-loadConfig pth = do+loadConfig :: HasLogFunc e => Cmd -> RIO e AppCfg+loadConfig cmd = do - tks <- loadTokens pth -- This can throw a PErrors- cgt <- joinConfigIO tks -- This can throw a JoinError+ tks <- loadTokens (cmd^.cfgFile) -- This can throw a ParseError+ cgt <- joinConfigIO (joinCLI cmd tks) -- This can throw a JoinError -- Try loading the sink and src lf <- view logFuncL snk <- liftIO . _snk cgt $ lf src <- liftIO . _src cgt $ lf + -- Emit the release of <Enter> if requested+ -- Assemble the AppCfg record pure $ AppCfg { _keySinkDev = snk , _keySourceDev = src- , _keymapCfg = _km cgt- , _firstLayer = _fstL cgt- , _fallThrough = _flt cgt- , _allowCmd = _allow cgt+ , _keymapCfg = _km cgt+ , _firstLayer = _fstL cgt+ , _fallThrough = _flt cgt+ , _allowCmd = _allow cgt+ , _startDelay = _strtDel cmd }+++-- | Join the options given from the command line with the one read from the+-- configuration file.+-- This does not yet throw any kind of exception, as we are simply inserting the+-- given options into every 'KDefCfg' block that we see.+joinCLI :: Cmd -> [KExpr] -> [KExpr]+joinCLI cmd = traverse._KDefCfg %~ insertCliOption cliList+ where+ -- | All options and flags that were given on the command line.+ cliList :: DefSettings+ cliList = catMaybes $+ map flagToMaybe [cmd^.cmdAllow, cmd^.fallThrgh]+ <> [cmd^.iToken, cmd^.oToken, cmd^.cmpSeq, cmd^.initStr]++ -- | Convert command line flags to a 'Maybe' type, where the non-presence, as+ -- well as the default value of a flag will be interpreted as @Nothing@+ flagToMaybe :: DefSetting -> Maybe DefSetting+ flagToMaybe = \case+ SAllowCmd b -> if b then Just (SAllowCmd b) else Nothing+ SFallThrough b -> if b then Just (SFallThrough b) else Nothing+ _ -> Nothing++ -- | Insert all command line options, potentially overwriting already existing+ -- options that were given in the configuration file. This is a paramorphism+ insertCliOption :: DefSettings -> DefSettings -> DefSettings+ insertCliOption cliSettings cfgSettings =+ foldr (\s cfgs ->+ if s `elem` cfgs+ then map (\x -> if s == x then s else x) cfgs+ else s : cfgs)+ cfgSettings+ cliSettings
src/KMonad/Args/Cmd.hs view
@@ -16,8 +16,16 @@ ) where -import KMonad.Prelude+import KMonad.Prelude hiding (try)+import KMonad.Args.Parser (itokens, keywordButtons, noKeywordButtons, otokens, symbol, numP)+import KMonad.Args.TH (gitHash)+import KMonad.Args.Types (DefSetting(..))+import KMonad.Util+import Paths_kmonad (version) +import qualified KMonad.Parsing as M -- [M]egaparsec functionality++import Data.Version (showVersion) import Options.Applicative @@ -28,21 +36,38 @@ -- | Record describing the instruction to KMonad data Cmd = Cmd- { _cfgFile :: FilePath -- ^ Which file to read the config from- , _dryRun :: Bool -- ^ Flag to indicate we are only test-parsing- , _logLvl :: LogLevel -- ^ Level of logging to use+ { _cfgFile :: FilePath -- ^ Which file to read the config from+ , _dryRun :: Bool -- ^ Flag to indicate we are only test-parsing+ , _logLvl :: LogLevel -- ^ Level of logging to use+ , _strtDel :: Milliseconds -- ^ How long to wait before acquiring the input keyboard++ -- All 'KDefCfg' options of a 'KExpr'+ , _cmdAllow :: DefSetting -- ^ Allow execution of arbitrary shell-commands?+ , _fallThrgh :: DefSetting -- ^ Re-emit unhandled events?+ , _initStr :: Maybe DefSetting -- ^ TODO: What does this do?+ , _cmpSeq :: Maybe DefSetting -- ^ Key to use for compose-key sequences+ , _oToken :: Maybe DefSetting -- ^ How to emit the output+ , _iToken :: Maybe DefSetting -- ^ How to capture the input } deriving Show makeClassy ''Cmd -- | Parse 'Cmd' from the evocation of this program getCmd :: IO Cmd-getCmd = customExecParser (prefs showHelpOnEmpty) $ info (cmdP <**> helper)- ( fullDesc- <> progDesc "Start KMonad"- <> header "kmonad - an onion of buttons."- )+getCmd = customExecParser (prefs showHelpOnEmpty) $+ info (cmdP <**> versioner <**> helper)+ ( fullDesc+ <> progDesc "Start KMonad"+ <> header "kmonad - an onion of buttons."+ ) +-- | Equip a parser with version information about the program+versioner :: Parser (a -> a)+versioner = infoOption (showVersion version <> ", commit " <> $(gitHash))+ ( long "version"+ <> short 'V'+ <> help "Show version"+ ) -------------------------------------------------------------------------------- -- $prs@@ -51,7 +76,17 @@ -- | Parse the full command cmdP :: Parser Cmd-cmdP = Cmd <$> fileP <*> dryrunP <*> levelP+cmdP =+ Cmd <$> fileP+ <*> dryrunP+ <*> levelP+ <*> startDelayP+ <*> cmdAllowP+ <*> fallThrghP+ <*> initStrP+ <*> cmpSeqP+ <*> oTokenP+ <*> iTokenP -- | Parse a filename that points us at the config-file fileP :: Parser FilePath@@ -67,6 +102,7 @@ <> help "If used, do not start KMonad, only try parsing the config file" ) + -- | Parse the log-level as either a level option or a verbose flag levelP :: Parser LogLevel levelP = option f@@ -79,3 +115,73 @@ f = maybeReader $ flip lookup [ ("debug", LevelDebug), ("warn", LevelWarn) , ("info", LevelInfo), ("error", LevelError) ] +-- | Allow the execution of arbitrary shell-commands+cmdAllowP :: Parser DefSetting+cmdAllowP = SAllowCmd <$> switch+ ( long "allow-cmd"+ <> short 'c'+ <> help "Whether to allow the execution of arbitrary shell-commands"+ )++-- | Re-emit unhandled events+fallThrghP :: Parser DefSetting+fallThrghP = SFallThrough <$> switch+ ( long "fallthrough"+ <> short 'f'+ <> help "Whether to simply re-emit unhandled events"+ )++-- | TODO what does this do?+initStrP :: Parser (Maybe DefSetting)+initStrP = optional $ SInitStr <$> strOption+ ( long "init"+ <> short 't'+ <> metavar "STRING"+ <> help "TODO"+ )++-- | Key to use for compose-key sequences+cmpSeqP :: Parser (Maybe DefSetting)+cmpSeqP = optional $ SCmpSeq <$> option+ (tokenParser keywordButtons <|> megaReadM (M.choice noKeywordButtons))+ ( long "cmp-seq"+ <> short 's'+ <> metavar "BUTTON"+ <> help "Which key to use to emit compose-key sequences"+ )++-- | Where to emit the output+oTokenP :: Parser (Maybe DefSetting)+oTokenP = optional $ SOToken <$> option (tokenParser otokens)+ ( long "output"+ <> short 'o'+ <> metavar "OTOKEN"+ <> help "Emit output to OTOKEN"+ )++-- | How to capture the keyboard input+iTokenP :: Parser (Maybe DefSetting)+iTokenP = optional $ SIToken <$> option (tokenParser itokens)+ ( long "input"+ <> short 'i'+ <> metavar "ITOKEN"+ <> help "Capture input via ITOKEN"+ )++-- | Parse a flag that disables auto-releasing the release of enter+startDelayP :: Parser Milliseconds+startDelayP = option (fromIntegral <$> megaReadM numP)+ ( long "start-delay"+ <> short 'w'+ <> value 300+ <> showDefaultWith (show . unMS )+ <> help "How many ms to wait before grabbing the input keyboard (time to release enter if launching from terminal)")++-- | Transform a bunch of tokens of the form @(Keyword, Parser)@ into an+-- optparse-applicative parser+tokenParser :: [(Text, M.Parser a)] -> ReadM a+tokenParser = megaReadM . M.choice . map (M.try . uncurry ((*>) . symbol))++-- | Megaparsec <--> optparse-applicative interface+megaReadM :: M.Parser a -> ReadM a+megaReadM p = eitherReader (mapLeft show . M.parse p "" . fromString)
src/KMonad/Args/Joiner.hs view
@@ -28,8 +28,8 @@ import KMonad.Args.Types -import KMonad.Action-import KMonad.Button+import KMonad.Model.Action+import KMonad.Model.Button import KMonad.Keyboard import KMonad.Keyboard.IO @@ -50,9 +50,9 @@ import Control.Monad.Except -import RIO.List (uncons, headMaybe)+import RIO.List (headMaybe, intersperse, uncons) import RIO.Partial (fromJust)-import qualified Data.LayerStack as L+import qualified KMonad.Util.LayerStack as L import qualified RIO.HashMap as M import qualified RIO.Text as T @@ -129,7 +129,7 @@ -- | Extract anything matching a particular prism from a list extract :: Prism' a b -> [a] -> [b]-extract p = catMaybes . map (preview p)+extract p = mapMaybe (preview p) data SingletonError = None@@ -144,14 +144,14 @@ -- | Take the one and only block matching the prism from the expressions oneBlock :: Text -> Prism' KExpr a -> J a-oneBlock t l = onlyOne . extract l <$> view kes >>= \case+oneBlock t l = (view kes <&> (extract l >>> onlyOne)) >>= \case Right x -> pure x Left None -> throwError $ MissingBlock t Left Duplicate -> throwError $ DuplicateBlock t -- | Update the JCfg and then run the entire joining process joinConfig :: J CfgToken-joinConfig = getOverride >>= \cfg -> (local (const cfg) joinConfig')+joinConfig = getOverride >>= \cfg -> local (const cfg) joinConfig' -- | Join an entire 'CfgToken' from the current list of 'KExpr'. joinConfig' :: J CfgToken@@ -166,8 +166,8 @@ al <- getAllow -- Extract the other blocks and join them into a keymap- let als = extract _KDefAlias $ es- let lys = extract _KDefLayer $ es+ let als = extract _KDefAlias es+ let lys = extract _KDefLayer es src <- oneBlock "defsrc" _KDefSrc (km, fl) <- joinKeymap src als lys @@ -199,10 +199,9 @@ foldM go env cfg -- | Turn a 'HasLogFunc'-only RIO into a function from LogFunc to IO-runLF :: (forall e. HasLogFunc e => RIO e a) -> LogFunc -> IO a+runLF :: HasLogFunc lf => RIO lf a -> lf -> IO a runLF = flip runRIO - -- | Extract the KeySource-loader from the 'KExpr's getI :: J (LogFunc -> IO (Acquire KeySource)) getI = do@@ -230,7 +229,7 @@ Left None -> pure False Left Duplicate -> throwError $ DuplicateSetting "fallthrough" --- | Extract the fallthrough setting+-- | Extract the allow-cmd setting getAllow :: J Bool getAllow = do cfg <- oneBlock "defcfg" _KDefCfg@@ -239,6 +238,15 @@ Left None -> pure False Left Duplicate -> throwError $ DuplicateSetting "allow-cmd" +-- | Extract the cmp-seq-delay setting+getCmpSeqDelay :: J (Maybe Int)+getCmpSeqDelay = do+ cfg <- oneBlock "defcfg" _KDefCfg+ case onlyOne . extract _SCmpSeqDelay $ cfg of+ Right b -> pure (Just b)+ Left None -> pure Nothing+ Left Duplicate -> throwError $ DuplicateSetting "cmp-seq-delay"+ #ifdef linux_HOST_OS -- | The Linux correspondence between IToken and actual code@@ -252,7 +260,7 @@ pickOutput (KUinputSink t init) = pure $ runLF (uinputSink cfg) where cfg = defUinputCfg { _keyboardName = T.unpack t , _postInit = T.unpack <$> init }-pickOutput KSendEventSink = throwError $ InvalidOS "SendEventSink"+pickOutput (KSendEventSink _) = throwError $ InvalidOS "SendEventSink" pickOutput KKextSink = throwError $ InvalidOS "KextSink" #endif@@ -267,9 +275,9 @@ -- | The Windows correspondence between OToken and actual code pickOutput :: OToken -> J (LogFunc -> IO (Acquire KeySink))-pickOutput KSendEventSink = pure $ runLF sendEventKeySink-pickOutput (KUinputSink _ _) = throwError $ InvalidOS "UinputSink"-pickOutput KKextSink = throwError $ InvalidOS "KextSink"+pickOutput (KSendEventSink di) = pure $ runLF (sendEventKeySink di)+pickOutput (KUinputSink _ _) = throwError $ InvalidOS "UinputSink"+pickOutput KKextSink = throwError $ InvalidOS "KextSink" #endif @@ -285,7 +293,7 @@ pickOutput :: OToken -> J (LogFunc -> IO (Acquire KeySink)) pickOutput KKextSink = pure $ runLF kextSink pickOutput (KUinputSink _ _) = throwError $ InvalidOS "UinputSink"-pickOutput KSendEventSink = throwError $ InvalidOS "SendEventSink"+pickOutput (KSendEventSink _) = throwError $ InvalidOS "SendEventSink" #endif @@ -302,7 +310,7 @@ joinAliases ns als = foldM f M.empty $ concat als where f mp (t, b) = if t `M.member` mp then throwError $ DuplicateAlias t- else flip (M.insert t) mp <$> (unnest $ joinButton ns mp b)+ else flip (M.insert t) mp <$> unnest (joinButton ns mp b) -------------------------------------------------------------------------------- -- $but@@ -310,7 +318,7 @@ -- | Turn 'Nothing's (caused by joining a KTrans) into the appropriate error. -- KTrans buttons may only occur in 'DefLayer' definitions. unnest :: J (Maybe Button) -> J Button-unnest = join . fmap (maybe (throwError NestedTrans) (pure . id))+unnest = (maybe (throwError NestedTrans) pure =<<) -- | Turn a button token into an actual KMonad `Button` value joinButton :: LNames -> Aliases -> DefButton -> J (Maybe Button)@@ -321,6 +329,7 @@ go = unnest . joinButton ns als jst = fmap Just fi = fromIntegral+ isps l = traverse go . maybe l ((`intersperse` l) . KPause . fi) in \case -- Variable dereference KRef t -> case M.lookup t als of@@ -329,7 +338,9 @@ -- Various simple buttons KEmit c -> ret $ emitB c- KCommand t -> ret $ cmdButton t+ KPressOnly c -> ret $ pressOnly c+ KReleaseOnly c -> ret $ releaseOnly c+ KCommand pr mbR -> ret $ cmdButton pr mbR KLayerToggle t -> if t `elem` ns then ret $ layerToggle t else throwError $ MissingLayer t@@ -350,19 +361,29 @@ else throwError $ MissingLayer t -- Various compound buttons- KComposeSeq bs -> view cmpKey >>= \c -> jst $ tapMacro . (c:) <$> mapM go bs- KTapMacro bs -> jst $ tapMacro <$> mapM go bs+ KComposeSeq bs -> do csd <- getCmpSeqDelay+ c <- view cmpKey+ jst $ tapMacro . (c:) <$> isps bs csd+ KTapMacro bs mbD -> jst $ tapMacro <$> isps bs mbD+ KBeforeAfterNext b a -> jst $ beforeAfterNext <$> go b <*> go a+ KTapMacroRelease bs mbD ->+ jst $ tapMacroRelease <$> isps bs mbD KAround o i -> jst $ around <$> go o <*> go i KTapNext t h -> jst $ tapNext <$> go t <*> go h KTapHold s t h -> jst $ tapHold (fi s) <$> go t <*> go h- KTapHoldNext s t h -> jst $ tapHoldNext (fi s) <$> go t <*> go h+ KTapHoldNext s t h mtb+ -> jst $ tapHoldNext (fi s) <$> go t <*> go h <*> traverse go mtb KTapNextRelease t h -> jst $ tapNextRelease <$> go t <*> go h- KTapHoldNextRelease ms t h- -> jst $ tapHoldNextRelease (fi ms) <$> go t <*> go h+ KTapHoldNextRelease ms t h mtb+ -> jst $ tapHoldNextRelease (fi ms) <$> go t <*> go h <*> traverse go mtb+ KTapNextPress t h -> jst $ tapNextPress <$> go t <*> go h KAroundNext b -> jst $ aroundNext <$> go b+ KAroundNextSingle b -> jst $ aroundNextSingle <$> go b+ KAroundNextTimeout ms b t -> jst $ aroundNextTimeout (fi ms) <$> go b <*> go t KPause ms -> jst . pure $ onPress (pause ms) KMultiTap bs d -> jst $ multiTap <$> go d <*> mapM f bs where f (ms, b) = (fi ms,) <$> go b+ KStickyKey s d -> jst $ stickyKey (fi s) <$> go d -- Non-action buttons KTrans -> pure Nothing@@ -382,7 +403,7 @@ als' <- joinAliases nms als -- Join aliases into 1 hashmap lys' <- mapM (joinLayer als' nms src) lys -- Join all layers -- Return the layerstack and the name of the first layer- pure $ (L.mkLayerStack lys', _layerName . fromJust . headMaybe $ lys)+ pure (L.mkLayerStack lys', _layerName . fromJust . headMaybe $ lys) -- | Check and join 1 deflayer. joinLayer ::
src/KMonad/Args/Parser.hs view
@@ -16,22 +16,36 @@ -} module KMonad.Args.Parser- ( parseTokens+ ( -- * Parsing 'KExpr's+ parseTokens , loadTokens++ -- * Building Parsers+ , symbol+ , numP++ -- * Parsers for Tokens and Buttons+ , otokens+ , itokens+ , keywordButtons+ , noKeywordButtons ) where import KMonad.Prelude hiding (try, bool) +import KMonad.Parsing import KMonad.Args.Types import KMonad.Keyboard import KMonad.Keyboard.ComposeSeq ++ import Data.Char import RIO.List (sortBy, find) -import qualified Data.MultiMap as Q+import qualified KMonad.Util.MultiMap as Q import qualified RIO.Text as T import qualified Text.Megaparsec.Char.Lexer as L @@ -40,14 +54,14 @@ -- $run -- | Try to parse a list of 'KExpr' from 'Text'-parseTokens :: Text -> Either PErrors [KExpr]+parseTokens :: Text -> Either ParseError [KExpr] parseTokens t = case runParser configP "" t of- Left e -> Left $ PErrors e+ Left e -> Left $ ParseError e Right x -> Right x -- | Load a set of tokens from file, throw an error on parse-fail loadTokens :: FilePath -> RIO e [KExpr]-loadTokens pth = parseTokens <$> readFileUtf8 pth >>= \case+loadTokens pth = (readFileUtf8 pth <&> parseTokens) >>= \case Left e -> throwM e Right xs -> pure xs @@ -55,13 +69,6 @@ -------------------------------------------------------------------------------- -- $basic --- | Consume whitespace-sc :: Parser ()-sc = L.space- space1- (L.skipLineComment ";;")- (L.skipBlockComment "#|" "|#")- -- | Consume whitespace after the provided parser lexeme :: Parser a -> Parser a lexeme = L.lexeme sc@@ -102,7 +109,7 @@ x -> x -- | Make a parser that matches a terminated symbol or fails- mkOne (s, x) = terminated (string s) *> pure x+ mkOne (s, x) = terminated (string s) $> x -- | Run a parser between 2 sets of parentheses paren :: Parser a -> Parser a@@ -114,9 +121,14 @@ -- | Run a parser that parser a bool value bool :: Parser Bool-bool = symbol "true" *> pure True- <|> symbol "false" *> pure False+bool = (symbol "true" $> True)+ <|> (symbol "false" $> False) +-- | Parse a LISP-like keyword of the form @:keyword value@+keywordP :: Text -> Parser p -> Parser p+keywordP kw p = symbol (":" <> kw) *> lexeme p+ <?> "Keyword " <> ":" <> T.unpack kw+ -------------------------------------------------------------------------------- -- $elem --@@ -130,7 +142,7 @@ numP :: Parser Int numP = L.decimal --- | Parse text with escaped characters between "s+-- | Parse text with escaped characters between double quotes. textP :: Parser Text textP = do _ <- char '\"'@@ -171,7 +183,7 @@ -- | Different ways to refer to shifted versions of keycodes shiftedNames :: [(Text, DefButton)] shiftedNames = let f = second $ \kc -> KAround (KEmit KeyLeftShift) (KEmit kc) in- map f $ cps <> num <> oth+ map f $ cps <> num <> oth <> lng where cps = zip (map T.singleton ['A'..'Z']) [ KeyA, KeyB, KeyC, KeyD, KeyE, KeyF, KeyG, KeyH, KeyI, KeyJ, KeyK, KeyL, KeyM,@@ -181,6 +193,8 @@ oth = zip (map T.singleton "<>:~\"|{}+?") [ KeyComma, KeyDot, KeySemicolon, KeyGrave, KeyApostrophe, KeyBackslash , KeyLeftBrace, KeyRightBrace, KeyEqual, KeySlash]+ lng = [ ("quot", KeyApostrophe), ("pipe", KeyBackslash), ("cln", KeySemicolon)+ , ("tild", KeyGrave) , ("udrs", KeyMinus)] -- | Names for various buttons buttonNames :: [(Text, DefButton)]@@ -203,7 +217,7 @@ , ("A-", KeyLeftAlt), ("M-", KeyLeftMeta) , ("RS-", KeyRightShift), ("RC-", KeyRightCtrl) , ("RA-", KeyRightAlt), ("RM-", KeyRightMeta)]- prfx = choice $ map (\(t, p) -> prefix (string t) *> pure (KEmit p)) mods+ prfx = choice $ map (\(t, p) -> prefix (string t) $> KEmit p) mods -- | Parse Pxxx as pauses (useful in macros) pauseP :: Parser DefButton@@ -211,14 +225,16 @@ -- | #()-syntax tap-macro rmTapMacroP :: Parser DefButton-rmTapMacroP = KTapMacro <$> (char '#' *> paren (some buttonP))+rmTapMacroP =+ char '#' *> paren (KTapMacro <$> some buttonP+ <*> optional (keywordP "delay" numP)) -- | Compose-key sequence composeSeqP :: Parser [DefButton] composeSeqP = do -- Lookup 1 character in the compose-seq list c <- anySingle <?> "special character"- s <- case find (\(_, c', _) -> (c' == c)) ssComposed of+ s <- case find (\(_, c', _) -> c' == c) ssComposed of Nothing -> fail "Unrecognized compose-char" Just b -> pure $ b^._1 @@ -231,7 +247,7 @@ deadkeySeqP :: Parser [DefButton] deadkeySeqP = do _ <- prefix (char '+')- c <- satisfy (`elem` ("~'^`\"" :: String))+ c <- satisfy (`elem` ("~'^`\"," :: String)) case runParser buttonP "" (T.singleton c) of Left _ -> fail "Could not parse deadkey sequence" Right b -> pure [b]@@ -239,26 +255,56 @@ -- | Parse any button buttonP :: Parser DefButton buttonP = (lexeme . choice . map try $- [ statement "around" $ KAround <$> buttonP <*> buttonP- , statement "multi-tap" $ KMultiTap <$> timed <*> buttonP- , statement "tap-hold" $ KTapHold <$> lexeme numP <*> buttonP <*> buttonP- , statement "tap-hold-next" $ KTapHoldNext <$> lexeme numP <*> buttonP <*> buttonP- , statement "tap-next-release"- $ KTapNextRelease <$> buttonP <*> buttonP- , statement "tap-hold-next-release"- $ KTapHoldNextRelease <$> lexeme numP <*> buttonP <*> buttonP- , statement "tap-next" $ KTapNext <$> buttonP <*> buttonP- , statement "layer-toggle" $ KLayerToggle <$> word- , statement "layer-switch" $ KLayerSwitch <$> word- , statement "layer-add" $ KLayerAdd <$> word- , statement "layer-rem" $ KLayerRem <$> word- , statement "layer-delay" $ KLayerDelay <$> lexeme numP <*> word- , statement "layer-next" $ KLayerNext <$> word- , statement "around-next" $ KAroundNext <$> buttonP- , statement "tap-macro" $ KTapMacro <$> some buttonP- , statement "cmd-button" $ KCommand <$> textP- , statement "pause" $ KPause . fromIntegral <$> numP- , KComposeSeq <$> deadkeySeqP+ map (uncurry statement) keywordButtons ++ noKeywordButtons+ ) <?> "button"++-- | Parsers for buttons that have a keyword at the start; the format is+-- @(keyword, how to parse the token)@+keywordButtons :: [(Text, Parser DefButton)]+keywordButtons =+ [ ("around" , KAround <$> buttonP <*> buttonP)+ , ("press-only" , KPressOnly <$> keycodeP)+ , ("release-only" , KReleaseOnly <$> keycodeP)+ , ("multi-tap" , KMultiTap <$> timed <*> buttonP)+ , ("tap-hold" , KTapHold <$> lexeme numP <*> buttonP <*> buttonP)+ , ("tap-hold-next"+ , KTapHoldNext <$> lexeme numP <*> buttonP <*> buttonP+ <*> optional (keywordP "timeout-button" buttonP))+ , ("tap-next-release"+ , KTapNextRelease <$> buttonP <*> buttonP)+ , ("tap-hold-next-release"+ , KTapHoldNextRelease <$> lexeme numP <*> buttonP <*> buttonP+ <*> optional (keywordP "timeout-button" buttonP))+ , ("tap-next-press"+ , KTapNextPress <$> buttonP <*> buttonP)+ , ("tap-next" , KTapNext <$> buttonP <*> buttonP)+ , ("layer-toggle" , KLayerToggle <$> lexeme word)+ , ("momentary-layer" , KLayerToggle <$> lexeme word)+ , ("layer-switch" , KLayerSwitch <$> lexeme word)+ , ("permanent-layer" , KLayerSwitch <$> lexeme word)+ , ("layer-add" , KLayerAdd <$> lexeme word)+ , ("layer-rem" , KLayerRem <$> lexeme word)+ , ("layer-delay" , KLayerDelay <$> lexeme numP <*> lexeme word)+ , ("layer-next" , KLayerNext <$> lexeme word)+ , ("around-next" , KAroundNext <$> buttonP)+ , ("before-after-next", KBeforeAfterNext <$> buttonP <*> buttonP)+ , ("around-next-timeout", KAroundNextTimeout <$> lexeme numP <*> buttonP <*> buttonP)+ , ("tap-macro"+ , KTapMacro <$> lexeme (some buttonP) <*> optional (keywordP "delay" numP))+ , ("tap-macro-release"+ , KTapMacroRelease <$> lexeme (some buttonP) <*> optional (keywordP "delay" numP))+ , ("cmd-button" , KCommand <$> lexeme textP <*> optional (lexeme textP))+ , ("pause" , KPause . fromIntegral <$> numP)+ , ("sticky-key" , KStickyKey <$> lexeme numP <*> buttonP)+ ]+ where+ timed :: Parser [(Int, DefButton)]+ timed = many ((,) <$> lexeme numP <*> lexeme buttonP)++-- | Parsers for buttons that do __not__ have a keyword at the start+noKeywordButtons :: [Parser DefButton]+noKeywordButtons =+ [ KComposeSeq <$> deadkeySeqP , KRef <$> derefP , lexeme $ fromNamed buttonNames , try moddedP@@ -266,29 +312,33 @@ , lexeme $ try pauseP , KEmit <$> keycodeP , KComposeSeq <$> composeSeqP- ]) <?> "button"-- where- timed = many ((,) <$> lexeme numP <*> lexeme buttonP)-+ ] -------------------------------------------------------------------------------- -- $defcfg -- | Parse an input token itokenP :: Parser IToken-itokenP = choice . map try $- [ statement "device-file" $ KDeviceSource <$> (T.unpack <$> textP)- , statement "low-level-hook" $ pure KLowLevelHookSource- , statement "iokit-name" $ KIOKitSource <$> optional textP]+itokenP = choice $ map (try . uncurry statement) itokens +-- | Input tokens to parse; the format is @(keyword, how to parse the token)@+itokens :: [(Text, Parser IToken)]+itokens =+ [ ("device-file" , KDeviceSource <$> (T.unpack <$> textP))+ , ("low-level-hook", pure KLowLevelHookSource)+ , ("iokit-name" , KIOKitSource <$> optional textP)]+ -- | Parse an output token otokenP :: Parser OToken-otokenP = choice . map try $- [ statement "uinput-sink" $ KUinputSink <$> lexeme textP <*> optional textP- , statement "send-event-sink" $ pure KSendEventSink- , statement "kext" $ pure KKextSink]+otokenP = choice $ map (try . uncurry statement) otokens +-- | Output tokens to parse; the format is @(keyword, how to parse the token)@+otokens :: [(Text, Parser OToken)]+otokens =+ [ ("uinput-sink" , KUinputSink <$> lexeme textP <*> optional textP)+ , ("send-event-sink", KSendEventSink <$> optional ((,) <$> lexeme numP <*> numP))+ , ("kext" , pure KKextSink)]+ -- | Parse the DefCfg token defcfgP :: Parser DefSettings defcfgP = some (lexeme settingP)@@ -297,12 +347,13 @@ settingP :: Parser DefSetting settingP = let f s p = symbol s *> p in (lexeme . choice . map try $- [ SIToken <$> f "input" itokenP- , SOToken <$> f "output" otokenP- , SCmpSeq <$> f "cmp-seq" buttonP- , SInitStr <$> f "init" textP- , SFallThrough <$> f "fallthrough" bool- , SAllowCmd <$> f "allow-cmd" bool+ [ SIToken <$> f "input" itokenP+ , SOToken <$> f "output" otokenP+ , SCmpSeq <$> f "cmp-seq" buttonP+ , SInitStr <$> f "init" textP+ , SFallThrough <$> f "fallthrough" bool+ , SAllowCmd <$> f "allow-cmd" bool+ , SCmpSeqDelay <$> f "cmp-seq-delay" numP ]) --------------------------------------------------------------------------------@@ -323,4 +374,3 @@ -- $deflayer deflayerP :: Parser DefLayer deflayerP = DefLayer <$> lexeme word <*> many (lexeme buttonP)-
+ src/KMonad/Args/TH.hs view
@@ -0,0 +1,30 @@+{-# LANGUAGE BlockArguments #-}+{-|+Module : KMonad.Args.TH+Description : Template Haskell to use in the CLI+Copyright : (c) slotThe, 2021+License : MIT++Maintainer : soliditsallgood@mailbox.org+Stability : experimental+Portability : non-portable (TH)++-}+module KMonad.Args.TH (gitHash) where++import KMonad.Prelude++import Language.Haskell.TH (Exp, Q)+import Language.Haskell.TH.Syntax (runIO)+import UnliftIO.Process (readProcessWithExitCode)+++-- | Get the git hash of the current revision at compile time+gitHash :: Q Exp+gitHash = do+ str <- runIO do+ (exitCode, hash, _) <- readProcessWithExitCode "git" ["rev-parse", "HEAD"] ""+ pure case exitCode of+ ExitSuccess -> takeWhile (/= '\n') hash+ _ -> ""+ [| fromString str |]
src/KMonad/Args/Types.hs view
@@ -10,12 +10,9 @@ -} module KMonad.Args.Types- ( -- * $bsc- Parser- , PErrors(..)-+ ( -- * $cfg- , CfgToken(..)+ CfgToken(..) -- * $but , DefButton(..)@@ -35,67 +32,59 @@ -- * $lenses , AsKExpr(..) , AsDefSetting(..)-- -- * Reexports- , module Text.Megaparsec- , module Text.Megaparsec.Char ) where import KMonad.Prelude -import KMonad.Button+import KMonad.Model.Button import KMonad.Keyboard import KMonad.Keyboard.IO import KMonad.Util -import Text.Megaparsec-import Text.Megaparsec.Char- ----------------------------------------------------------------------------------- $bsc------ The basic types of parsing---- | Parser's operate on Text and carry no state-type Parser = Parsec Void Text---- | The type of errors returned by the Megaparsec parsers-newtype PErrors = PErrors (ParseErrorBundle Text Void)--instance Show PErrors where- show (PErrors e) = "Parse error at " <> errorBundlePretty e--instance Exception PErrors---------------------------------------------------------------------------------- -- $but -- -- Tokens representing different types of buttons +-- FIXME: This is really broken: why are there 2 lists of 'DefButton's? There is+-- one here, and one in Parser/Types.hs+ -- | Button ADT data DefButton = KRef Text -- ^ Reference a named button | KEmit Keycode -- ^ Emit a keycode+ | KPressOnly Keycode -- ^ Emit only the press of a keycode+ | KReleaseOnly Keycode -- ^ Emit only the release of a keycode | KLayerToggle Text -- ^ Toggle to a layer when held | KLayerSwitch Text -- ^ Switch base-layer when pressed | KLayerAdd Text -- ^ Add a layer when pressed | KLayerRem Text -- ^ Remove top instance of a layer when pressed | KTapNext DefButton DefButton -- ^ Do 2 things based on behavior | KTapHold Int DefButton DefButton -- ^ Do 2 things based on behavior and delay- | KTapHoldNext Int DefButton DefButton -- ^ Mixture between KTapNext and KTapHold+ | KTapHoldNext Int DefButton DefButton (Maybe DefButton)+ -- ^ Mixture between KTapNext and KTapHold | KTapNextRelease DefButton DefButton -- ^ Do 2 things based on behavior- | KTapHoldNextRelease Int DefButton DefButton+ | KTapHoldNextRelease Int DefButton DefButton (Maybe DefButton) -- ^ Like KTapNextRelease but with a timeout+ | KTapNextPress DefButton DefButton -- ^ Like KTapNextRelease but also hold on presses | KAroundNext DefButton -- ^ Surround a future button+ | KAroundNextSingle DefButton -- ^ Surround a future button | KMultiTap [(Int, DefButton)] DefButton -- ^ Do things depending on tap-count | KAround DefButton DefButton -- ^ Wrap 1 button around another- | KTapMacro [DefButton] -- ^ Sequence of buttons to tap+ | KAroundNextTimeout Int DefButton DefButton+ | KTapMacro [DefButton] (Maybe Int)+ -- ^ Sequence of buttons to tap, possible delay between each press+ | KTapMacroRelease [DefButton] (Maybe Int)+ -- ^ Sequence of buttons to tap, tap last on release, possible delay between each press | KComposeSeq [DefButton] -- ^ Compose-key sequence | KPause Milliseconds -- ^ Pause for a period of time | KLayerDelay Int LayerTag -- ^ Switch to a layer for a period of time | KLayerNext LayerTag -- ^ Perform next button in different layer- | KCommand Text -- ^ Execute a shell command+ | KCommand Text (Maybe Text) -- ^ Execute a shell command on press, as well+ -- as possibly on release+ | KStickyKey Int DefButton -- ^ Act as if a button is pressed for a period of time+ | KBeforeAfterNext DefButton DefButton -- ^ Surround a future button in a before and after tap | KTrans -- ^ Transparent button that does nothing | KBlock -- ^ Button that catches event deriving Show@@ -156,7 +145,7 @@ -- | All different output-tokens KMonad can take data OToken = KUinputSink Text (Maybe Text)- | KSendEventSink+ | KSendEventSink (Maybe (Int, Int)) | KKextSink deriving Show @@ -168,8 +157,21 @@ | SInitStr Text | SFallThrough Bool | SAllowCmd Bool+ | SCmpSeqDelay Int deriving Show makeClassyPrisms ''DefSetting++-- | 'Eq' instance for a 'DefSetting'. Because every one of these options may be+-- given at most once, we only need to check the outermost constructor in order+-- to test for equality+instance Eq DefSetting where+ SIToken{} == SIToken{} = True+ SOToken{} == SOToken{} = True+ SCmpSeq{} == SCmpSeq{} = True+ SInitStr{} == SInitStr{} = True+ SFallThrough{} == SFallThrough{} = True+ SAllowCmd{} == SAllowCmd{} = True+ _ == _ = False -- | A list of different 'DefSetting' values type DefSettings = [DefSetting]
− src/KMonad/Button.hs
@@ -1,355 +0,0 @@-{-|-Module : KMonad.Button-Description : How buttons work-Copyright : (c) David Janssen, 2019-License : MIT-Maintainer : janssen.dhj@gmail.com-Stability : experimental-Portability : portable--A button contains 2 actions, one to perform on press, and another to perform on-release. This module contains that definition, and some helper code that helps-combine buttons. It is here that most of the complicated` buttons are-implemented (like TapHold).---}-module KMonad.Button- ( -- * Button basics- -- $but- Button- , HasButton(..)- , onPress- , mkButton- , around- , tapOn-- -- * Simple buttons- -- $simple- , emitB- , modded- , layerToggle- , layerSwitch- , layerAdd- , layerRem- , pass- , cmdButton-- -- * Button combinators- -- $combinators- , aroundNext- , layerDelay- , layerNext- , tapHold- , multiTap- , tapNext- , tapHoldNext- , tapNextRelease- , tapHoldNextRelease- , tapMacro- )-where--import KMonad.Prelude--import KMonad.Action-import KMonad.Keyboard-import KMonad.Util-------------------------------------------------------------------------------------- $but------ This section contains the basic definition of KMonad's 'Button' datatype. A--- 'Button' is essentially a collection of 2 different actions, 1 to perform on--- 'Press' and another on 'Release'.---- | A 'Button' consists of two 'MonadK' actions, one to take when a press is--- registered from the OS, and another when a release is registered.-data Button = Button- { _pressAction :: !Action -- ^ Action to take when pressed- , _releaseAction :: !Action -- ^ Action to take when released- }-makeClassy ''Button---- | Create a 'Button' out of a press and release action------ NOTE: Since 'AnyK' is an existentially qualified 'MonadK', the monadic--- actions specified must be runnable by all implementations of 'MonadK', and--- therefore can only rely on functionality from 'MonadK'. I.e. the actions must--- be pure 'MonadK'.-mkButton :: AnyK () -> AnyK () -> Button-mkButton a b = Button (Action a) (Action b)---- | Create a new button with only a 'Press' action-onPress :: AnyK () -> Button-onPress p = mkButton p $ pure ()-------------------------------------------------------------------------------------- $running------ Triggering the actions stored in a 'Button'.---- | Perform both the press and release of a button immediately-tap :: MonadK m => Button -> m ()-tap b = do- runAction $ b^.pressAction- runAction $ b^.releaseAction---- | Perform the press action of a Button and register its release callback.------ This performs the action stored in the 'pressAction' field and registers a--- callback that will trigger the 'releaseAction' when the release is detected.-press :: MonadK m => Button -> m ()-press b = do- runAction $ b^.pressAction- awaitMy Release $ do- runAction $ b^.releaseAction- pure Catch------------------------------------------------------------------------------------- $simple------ A collection of simple buttons. These are basically almost direct wrappings--- around 'MonadK' functionality.---- | A button that emits a Press of a keycode when pressed, and a release when--- released.-emitB :: Keycode -> Button-emitB c = mkButton- (emit $ mkPress c)- (emit $ mkRelease c)---- | Create a new button that first presses a 'Keycode' before running an inner--- button, releasing the 'Keycode' again after the inner 'Button' is released.-modded ::- Keycode -- ^ The 'Keycode' to `wrap around` the inner button- -> Button -- ^ The button to nest inside `being modded`- -> Button-modded modder = around (emitB modder)---- | Create a button that toggles a layer on and off-layerToggle :: LayerTag -> Button-layerToggle t = mkButton- (layerOp $ PushLayer t)- (layerOp $ PopLayer t)---- | Create a button that switches the base-layer on a press-layerSwitch :: LayerTag -> Button-layerSwitch t = onPress (layerOp $ SetBaseLayer t)---- | Create a button that adds a layer on a press-layerAdd :: LayerTag -> Button-layerAdd t = onPress (layerOp $ PushLayer t)---- | Create a button that removes the top instance of a layer on a press-layerRem :: LayerTag -> Button-layerRem t = onPress (layerOp $ PopLayer t)---- | Create a button that does nothing (but captures the input)-pass :: Button-pass = onPress $ pure ()---- | Create a button that executes a shell command on press-cmdButton :: Text -> Button-cmdButton t = onPress $ shellCmd t------------------------------------------------------------------------------------- $combinators------ Functions that take 'Button's and combine them to form new 'Button's.---- | Create a new button from 2 buttons, an inner and an outer. When the new--- button is pressed, first the outer is pressed, then the inner. On release,--- the inner is released first, and then the outer.-around ::- Button -- ^ The outer 'Button'- -> Button -- ^ The inner 'Button'- -> Button -- ^ The resulting nested 'Button'-around outer inner = Button- (Action (runAction (outer^.pressAction) *> runAction (inner^.pressAction)))- (Action (runAction (inner^.releaseAction) *> runAction (outer^.releaseAction)))---- | A 'Button' that, once pressed, will surround the next button with another.------ Think of this as, essentially, a tappable mod. For example, an 'aroundNext--- KeyCtrl' would, once tapped, then make the next keypress C-<whatever>.-aroundNext ::- Button -- ^ The outer 'Button'- -> Button -- ^ The resulting 'Button'-aroundNext b = onPress $ await isPress $ \e -> do- runAction $ b^.pressAction- await (isReleaseOf $ e^.keycode) $ \_ -> do- runAction $ b^.releaseAction- pure NoCatch- pure NoCatch---- | Create a new button that performs both a press and release of the input--- button on just a press or release-tapOn ::- Switch -- ^ Which 'Switch' should trigger the tap- -> Button -- ^ The 'Button' to tap- -> Button -- ^ The tapping 'Button'-tapOn Press b = mkButton (tap b) (pure ())-tapOn Release b = mkButton (pure ()) (tap b)---- | Create a 'Button' that performs a tap of one button if it is released--- within an interval. If the interval is exceeded, press the other button (and--- release it when a release is detected).-tapHold :: Milliseconds -> Button -> Button -> Button-tapHold ms t h = onPress $ withinHeld ms (matchMy Release)- (press h) -- If we catch timeout before release- (const $ tap t *> pure Catch) -- If we catch release before timeout---- | Create a 'Button' that performs a tap of 1 button if the next event is its--- own release, or else switches to holding some other button if the next event--- is a different keypress.-tapNext :: Button -> Button -> Button-tapNext t h = onPress $ hookF InputHook $ \e -> do- p <- matchMy Release- if p e- then tap t *> pure Catch- else press h *> pure NoCatch---- | Like 'tapNext', except that after some interval it switches anyways-tapHoldNext :: Milliseconds -> Button -> Button -> Button-tapHoldNext ms t h = onPress $ within ms (pure $ const True) (press h) $ \tr -> do- p <- matchMy Release- if p $ tr^.event- then tap t *> pure Catch- else press h *> pure NoCatch---- | Create a tap-hold style button that makes its decision based on the next--- detected release in the following manner:--- 1. It is the release of this button: We are tapping--- 2. It is of some other button that was pressed *before* this one, ignore.--- 3. It is of some other button that was pressed *after* this one, we hold.------ It does all of this while holding processing of other buttons, so time will--- get rolled back like a TapHold button.-tapNextRelease :: Button -> Button -> Button-tapNextRelease t h = onPress $ do- hold True- go []- where- go :: MonadK m => [Keycode] -> m ()- go ks = hookF InputHook $ \e -> do- p <- matchMy Release- let isRel = isRelease e- if- -- If the next event is my own release: we act as if we were tapped- | p e -> doTap- -- If the next event is the release of some button that was held after me- -- we act as if we were held- | isRel && (e^.keycode `elem` ks) -> doHold e- -- Else, if it is a press, store the keycode and wait again- | not isRel -> go ((e^.keycode):ks) *> pure NoCatch- -- Else, if it is a release of some button held before me, just ignore- | otherwise -> go ks *> pure NoCatch-- -- Behave like a tap is simple: tap the button `t` and release processing- doTap :: MonadK m => m Catch- doTap = tap t *> hold False *> pure Catch-- -- Behave like a hold is not simple: first we release the processing hold,- -- then we catch the release of ButtonX that triggered this action, and then- -- we rethrow this release.- doHold :: MonadK m => KeyEvent -> m Catch- doHold e = press h *> hold False *> inject e *> pure Catch----- | Create a tap-hold style button that makes its decision based on the next--- detected release in the following manner:--- 1. It is the release of this button: We are tapping--- 2. It is of some other button that was pressed *before* this one, ignore.--- 3. It is of some other button that was pressed *after* this one, we hold.------ If we encounter the timeout before any other release, we switch to holding--- mode.------ It does all of this while holding processing of other buttons, so time will--- get rolled back like a TapHold button.-tapHoldNextRelease :: Milliseconds -> Button -> Button -> Button-tapHoldNextRelease ms t h = onPress $ do- hold True- go ms []- where-- go :: MonadK m => Milliseconds -> [Keycode] -> m ()- go ms' ks = tHookF InputHook ms' onTimeout $ \r -> do- p <- matchMy Release- let e = r^.event- let isRel = isRelease e- if- -- If the next event is my own release: act like tapped- | p e -> onRelSelf- -- If the next event is another release that was pressed after me- | isRel && (e^.keycode `elem` ks) -> onRelOther e- -- If the next event is a press, store and recurse- | not isRel -> go (ms' - r^.elapsed) (e^.keycode : ks) *> pure NoCatch- -- If the next event is a release of some button pressed before me, recurse- | otherwise -> go (ms' - r^.elapsed) ks *> pure NoCatch-- onTimeout :: MonadK m => m ()- onTimeout = press h *> hold False-- onRelSelf :: MonadK m => m Catch- onRelSelf = tap t *> hold False *> pure Catch-- onRelOther :: MonadK m => KeyEvent -> m Catch- onRelOther e = press h *> hold False *> inject e *> pure Catch----- | Create a 'Button' that contains a number of delays and 'Button's. As long--- as the next press is registered before the timeout, the multiTap descends--- into its list. The moment a delay is exceeded or immediately upon reaching--- the last button, that button is pressed.-multiTap :: Button -> [(Milliseconds, Button)] -> Button-multiTap l bs = onPress $ go bs- where- go :: [(Milliseconds, Button)] -> AnyK ()- go [] = press l- go ((ms, b):bs') = do- -- This is a bit complicated. What we do is:- -- 1. We wait for the release of the key that triggered this action- -- 2A. If it doesn't occur in the interval we press the button from the list- -- and we are done.- -- 2B. If we do detect the release, we must now keep waiting to detect another press.- -- 3A. If we do not detect a press before the interval is up, we know a tap occured,- -- so we tap the current button and we are done.- -- 3B. If we detect another press, then the user is descending into the buttons tied- -- to this multi-tap, so we recurse on the remaining buttons.- let onMatch t = do- within (ms - t^.elapsed) (matchMy Press)- (tap b)- (const $ go bs' *> pure Catch)- pure Catch- within ms (matchMy Release) (press b) onMatch----- | Create a 'Button' that performs a series of taps on press. Note that the--- last button is only released when the tapMacro itself is released.-tapMacro :: [Button] -> Button-tapMacro bs = onPress $ go bs- where- go [] = pure ()- go (b:[]) = press b- go (b:rst) = tap b >> go rst----- | Switch to a layer for a period of time, then automatically switch back-layerDelay :: Milliseconds -> LayerTag -> Button-layerDelay d t = onPress $ do- layerOp (PushLayer t)- after d (layerOp $ PopLayer t)---- | Switch to a layer for the next button-press and switch back automaically.------ NOTE: liable to change, this is essentially just `aroundNext` and--- `layerToggle` combined.-layerNext :: LayerTag -> Button-layerNext t = onPress $ do- layerOp (PushLayer t)- await isPress (\_ -> whenDone (layerOp $ PopLayer t) *> pure NoCatch)--
+ src/KMonad/Gesture.hs view
@@ -0,0 +1,154 @@+-- |++module KMonad.Gesture++where++import KMonad.Prelude hiding (try)+import KMonad.Parsing++import Control.Monad.Except+import Control.Monad.State+import Data.Char++import RIO.List.Partial (head)+import RIO.Seq (Seq(..))++import qualified RIO.List as L+import qualified RIO.Seq as Q+import qualified RIO.Set as S+++--------------------------------------------------------------------------------++data Toggle a = On a | Off a deriving (Eq, Show, Functor)++-- | A sequence of toggle-changes guaranteed to be valid+newtype Gesture a = Gesture { _gesture :: Q.Seq (Toggle a) }+ deriving (Eq, Show, Functor)++instance Semigroup (Gesture a) where+ (Gesture a) <> (Gesture b) = Gesture $ a <> b+instance Monoid (Gesture a) where+ mempty = Gesture Q.empty++-- | All the ways a '[Toggle a]' can be an invalid 'Gesture'+data GestureError a+ = OffWithoutOn a -- ^ An Off not preceded by an On+ | OnWithoutOff a -- ^ An On not succeeded by an Off+ deriving (Eq, Show)+++--------------------------------------------------------------------------------++-- | A lens into the i+tag :: Lens' (Toggle a) a+tag = lens get set+ where get (On x) = x+ get (Off x) = x+ set (On _) x = On x+ set (Off _) x = Off x++-- | A fold of all the unique elements in a gesture+tags :: Ord a => Fold (Gesture a) a+tags = folding $ \(Gesture as) -> toList . S.fromList $ as^..folded.tag++-- | Create a tapping gesture+tap :: a -> Gesture a+tap a = Gesture . Q.fromList $ [On a, Off a]++-- | Wrap a gesture in a toggle iff the id does not already occur+around :: Ord a => a -> Gesture a -> Either (GestureError a) (Gesture a)+around x g@(Gesture seq)+ | anyOf tags (== x) g = Left $ OnWithoutOff x+ | otherwise = Right . Gesture $ (On x <| seq) |> Off x++-- | Create a gesture from a list of toggles+fromList :: Ord a => [Toggle a] -> Either (GestureError a) (Gesture a)+fromList as = case (`runState` S.empty) . runExceptT . foldM f Q.empty $ as of+ (Left e, _) -> Left e+ (Right g, s) | S.null s -> Right $ Gesture g+ | otherwise -> Left $ OnWithoutOff (head . S.elems $ s)+ where+ f s x = do+ pressed <- get+ case x of+ On c | c `S.member` pressed -> throwError $ OnWithoutOff c+ On c -> put (S.insert c pressed) >> pure (s |> On c)+ Off c | not (c `S.member` pressed) -> throwError $ OffWithoutOn c+ Off c -> put (S.delete c pressed) >> pure (s |> Off c)++--------------------------------------------------------------------------------++type Gest = Q.Seq (Toggle Text)++data GestureReadError+ = GestureParseError ParseError+ | GestureValidateError (GestureError Text)+ deriving Eq++instance Show GestureReadError where+ show (GestureParseError e) = show e+ show (GestureValidateError e) = show e++instance Exception GestureReadError++-- | Parse a Gesture straight from Text+prsGesture :: Text -> Either GestureReadError (Gesture Text)+prsGesture t = case runParser gest "" t of+ Left e -> Left . GestureParseError . ParseError $ e+ Right gs -> case fromList (toList gs) of+ Left e -> Left . GestureValidateError $ e+ Right g -> pure g++-- | Characters that may not occur in tag-names+reserved :: [Char]+reserved = "()-~[]"++-- | Parse a series of valid characters as a tag+tag_ :: Parser Text+tag_ = takeWhile1P (Just "tag-character") f+ where f c = not $ isSpace c || c `elem` reserved++-- | Parse a "S-" sequence as 1 tag around another+around_ :: Parser Gest+around_ = do+ a <- tag_+ _ <- char '-'+ b <- try around_ <|> subg <|> tap_+ pure $ (On a <| b) |> Off a++-- | Parse a ")-X" as an OFF-toggle+closeTag :: Parser Gest+closeTag = do+ _ <- string ")-"+ a <- tag_+ pure . Q.singleton $ Off a++-- | Parse a "X-(" as an ON-toggle+openTag :: Parser Gest+openTag = do+ a <- tag_+ _ <- string "-("+ pure . Q.singleton $ On a++-- | Parse only a tag as a tap of that element+tap_ :: Parser Gest+tap_ = do+ a <- tag_+ pure . Q.fromList $ [On a, Off a]++-- | Parse a [] delimited series as a nested gesture+subg :: Parser Gest+subg = do+ _ <- char '['+ g <- gest+ _ <- char ']'+ pure g++-- | Parse a full gesture+gest :: Parser Gest+gest = do+ let one = lex . choice $ [subg, try openTag, try around_, try closeTag, tap_]+ es <- some one+ pure $ mconcat es
src/KMonad/Keyboard.hs view
@@ -1,132 +1,21 @@-{-# LANGUAGE DeriveAnyClass #-} {-| Module : KMonad.Keyboard Description : Basic keyboard types-Copyright : (c) David Janssen, 2019+Copyright : (c) David Janssen, 2021 License : MIT Maintainer : janssen.dhj@gmail.com Stability : experimental Portability : portable -This module contains or reexports all the basic, non-IO concepts related to-dealing with key codes, events, and mappings. For keyboard-related IO see-"KMonad.Keyboard.IO".+Interface to the Keyboard module -} module KMonad.Keyboard- ( -- * KeyEvents and their helpers- -- $event- Switch(..)- , KeyEvent- , switch- , keycode- , mkKeyEvent- , mkPress- , mkRelease-- -- * Predicates- , KeyPred- , isPress- , isRelease- , isKeycode- , isPressOf- , isReleaseOf-- -- * LMaps- -- $lmap- , LayerTag- , LMap-- -- * Reexports- , module KMonad.Keyboard.Keycode+ ( module X )- where -import KMonad.Prelude--import KMonad.Keyboard.Keycode--import qualified Data.LayerStack as Ls-------------------------------------------------------------------------------------- $event------ An 'KeyEvent' in KMonad is either the 'Press' or 'Release' of a particular--- 'Keycode'. A complete list of keycodes can be found in--- "KMonad.Keyboard.Keycode".---- | KMonad recognizes 2 different types of actions: presses and releases. Note--- that we do not handle repeat events at all.-data Switch- = Press- | Release- deriving (Eq, Ord, Show, Enum, Generic, Hashable)---- | An 'KeyEvent' is a 'Switch' on a particular 'Keycode'-data KeyEvent = KeyEvent- { _switch :: Switch -- ^ Whether the 'KeyEvent' was a 'Press' or 'Release'- , _keycode :: Keycode -- ^ The 'Keycode' mapped to this 'KeyEvent'- } deriving (Eq, Show, Generic, Hashable)-makeLenses ''KeyEvent---- | A 'Display' instance for 'KeyEvent's that prints them out nicely.-instance Display KeyEvent where- textDisplay a = tshow (a^.switch) <> " " <> textDisplay (a^.keycode)---- | An 'Ord' instance, where Press > Release, and otherwise we 'Ord' on the--- 'Keycode'-instance Ord KeyEvent where- a `compare` b = case (a^.switch) `compare` (b^.switch) of- EQ -> (a^.keycode) `compare` (b^.keycode)- x -> x---- | Create a new 'KeyEvent' from a 'Switch' and a 'Keycode'-mkKeyEvent :: Switch -> Keycode -> KeyEvent-mkKeyEvent = KeyEvent---- | Create a 'KeyEvent' that represents pressing a key-mkPress :: Keycode -> KeyEvent-mkPress = KeyEvent Press---- | Create a 'KeyEvent' that represents releaseing a key-mkRelease :: Keycode -> KeyEvent-mkRelease = KeyEvent Release----- | Predicate on KeyEvent's-type KeyPred = KeyEvent -> Bool---- | Return whether the provided KeyEvent is a Press-isPress :: KeyPred-isPress = (== Press) . view switch---- | Return whether the provided KeyEvent is a Release-isRelease :: KeyPred-isRelease = not . isPress---- | Return whether the provided KeyEvent matches a particular Keycode-isKeycode :: Keycode -> KeyPred-isKeycode c = (== c) . view keycode---- | Returth whether the provided KeyEvent matches the release of the Keycode-isReleaseOf :: Keycode -> KeyPred-isReleaseOf = (==) . mkRelease---- | Return whether the provided KeyEvent matches the press of the Keycode-isPressOf :: Keycode -> KeyPred-isPressOf = (==) . mkPress--------------------------------------------------------------------------------------- $lmap------ Type aliases for specifying stacked-layer mappings---- | Layers are identified by a tag that is simply a 'Text' value.-type LayerTag = Text---- | 'LMap's are mappings from 'LayerTag'd maps from 'Keycode' to things.-type LMap a = Ls.LayerStack LayerTag Keycode a+import KMonad.Keyboard.IO as X+import KMonad.Keyboard.Keycode as X+import KMonad.Keyboard.Ops as X+import KMonad.Keyboard.Types as X
src/KMonad/Keyboard/ComposeSeq.hs view
@@ -135,6 +135,8 @@ , ("` E" , 'È' , "Egrave") , ("' E" , 'É' , "Eacute") , ("^ E" , 'Ê' , "Ecircumflex")+ , ("^ U" , 'Û' , "Ucircumflex")+ , ("` U" , 'Ù' , "Ugrave") , ("\" E" , 'Ë' , "Ediaeresis") , ("` I" , 'Ì' , "Igrave") , ("' I" , 'Í' , "Iacute")@@ -147,6 +149,8 @@ , ("^ O" , 'Ô' , "Ocircumflex") , ("~ O" , 'Õ' , "Otilde") , ("\" O" , 'Ö' , "Odiaeresis")+ , ("\" U" , 'Ü' , "Udiaeresis")+ , ("' U" , 'Ú' , "Uacute") , ("x x" , '×' , "multiply") , ("/ O" , 'Ø' , "Oslash") , ("' Y" , 'Ý' , "Yacute")@@ -724,9 +728,11 @@ , ("_ '" , '⍘' , "U2358") , ("0 ~" , '⍬' , "U236c") , ("| ~" , '⍭' , "U236d")+ , ("c /" , '¢' , "cent" )+ , ("< _" , '≤' , "U2264")+ , ("> _" , '≥' , "U2265") -- Sequences that should exist but do not work --, ("^ spc", '^', "asciicircum") -- This overlaps with the normal 'shifted-6' macro for -- , ("' j", 'j́', "jacute") ]-
src/KMonad/Keyboard/IO.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE DeriveAnyClass #-} {-| Module : KMonad.Keyboard.IO Description : The logic behind sending and receiving key events to the OS@@ -26,7 +25,7 @@ import KMonad.Prelude -import KMonad.Keyboard+import KMonad.Keyboard.Types import KMonad.Util import qualified RIO.Text as T@@ -66,9 +65,9 @@ -- | Create a new KeySource mkKeySource :: HasLogFunc e- => RIO e src -- ^ Action to acquire the keysink- -> (src -> RIO e ()) -- ^ Action to close the keysink- -> (src -> RIO e KeyEvent) -- ^ Action to write with the keysink+ => RIO e src -- ^ Action to acquire the keysource+ -> (src -> RIO e ()) -- ^ Action to close the keysource+ -> (src -> RIO e KeyEvent) -- ^ Action to write with the keysource -> RIO e (Acquire KeySource) mkKeySource o c r = do u <- askUnliftIO
src/KMonad/Keyboard/IO/Linux/DeviceSource.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveAnyClass #-} {-| Module : KMonad.Keyboard.IO.Linux.DeviceSource@@ -77,7 +78,7 @@ -- | The KeyEventParser that works on my 64-bit Linux environment decode64 :: B.ByteString -> Either String LinuxKeyEvent-decode64 bs = (linuxKeyEvent . fliptup) <$> result+decode64 bs = linuxKeyEvent . fliptup <$> result where result :: Either String (Int32, Word16, Word16, Word64, Word64) result = B.decode . B.reverse $ bs@@ -131,10 +132,14 @@ -> FilePath -- ^ The path to the device file -> RIO e DeviceFile lsOpen pr pt = do- h <- liftIO . openFd pt ReadOnly Nothing $- OpenFileFlags False False False False False+ h <- liftIO $ openFd pt+ ReadOnly+#if !MIN_VERSION_unix(2,8,0)+ Nothing+#endif+ defaultFileFlags hd <- liftIO $ fdToHandle h- logInfo $ "Initiating ioctl grab"+ logInfo "Initiating ioctl grab" ioctl_keyboard h True `onErr` IOCtlGrabError pt return $ DeviceFile (DeviceSourceCfg pt pr) h hd @@ -143,7 +148,7 @@ -- 'IOCtlReleaseError' if the ioctl release could not be properly performed. lsClose :: (HasLogFunc e) => DeviceFile -> RIO e () lsClose src = do- logInfo $ "Releasing ioctl grab"+ logInfo "Releasing ioctl grab" ioctl_keyboard (src^.fd) False `onErr` IOCtlReleaseError (src^.pth) liftIO . closeFd $ src^.fd @@ -153,7 +158,7 @@ lsRead :: (HasLogFunc e) => DeviceFile -> RIO e KeyEvent lsRead src = do bts <- B.hGet (src^.hdl) (src^.nbytes)- case (src^.prs $ bts) of+ case src^.prs $ bts of Right p -> case fromLinuxKeyEvent p of Just e -> return e Nothing -> lsRead src
src/KMonad/Keyboard/IO/Linux/Types.hs view
@@ -119,4 +119,4 @@ = LinuxKeyEvent (fi s, fi ns, 1, c, val) where c = fi . fromEnum $ e^.keycode- val = if (e^.switch == Press) then 1 else 0+ val = if e^.switch == Press then 1 else 0
src/KMonad/Keyboard/IO/Linux/UinputSink.hs view
@@ -1,4 +1,6 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveAnyClass #-}+{-# OPTIONS_GHC -Wno-dodgy-imports #-} {-| Module : KMonad.Keyboard.IO.Linux.UinputSink Description : Using Linux's uinput interface to emit events@@ -27,9 +29,9 @@ import Foreign.C.String import Foreign.C.Types-import System.Posix+import System.Posix hiding (sync) import UnliftIO.Async (async)-import UnliftIO.Process (callCommand)+import UnliftIO.Process (spawnCommand) import KMonad.Keyboard.IO.Linux.Types import KMonad.Util@@ -44,6 +46,7 @@ = UinputRegistrationError SinkId -- ^ Could not register device | UinputReleaseError SinkId -- ^ Could not release device | SinkEncodeError SinkId LinuxKeyEvent -- ^ Could not decode event+ | EmptyNameError -- ^ Invalid name deriving Exception instance Show UinputSinkError where@@ -55,6 +58,7 @@ , "to bytes for writing to" , snk ]+ show EmptyNameError = "Provided empty name for Uinput keyboard" makeClassyPrisms ''UinputSinkError @@ -129,7 +133,7 @@ -> LinuxKeyEvent -> RIO e () send_event u (Fd h) e@(LinuxKeyEvent (s', ns', typ, c, val)) = do- (liftIO $ c_send_event h typ c val s' ns')+ liftIO (c_send_event h typ c val s' ns') `onErr` SinkEncodeError (u^.cfg.keyboardName) e @@ -138,13 +142,18 @@ -- | Create a new UinputSink usOpen :: HasLogFunc e => UinputCfg -> RIO e UinputSink usOpen c = do- fd <- liftIO . openFd "/dev/uinput" WriteOnly Nothing $- OpenFileFlags False False False True False+ when (null $ c ^. keyboardName) $ throwM EmptyNameError+ fd <- liftIO $ openFd "/dev/uinput"+ WriteOnly+#if !MIN_VERSION_unix(2,8,0)+ Nothing+#endif+ defaultFileFlags logInfo "Registering Uinput device" acquire_uinput_keysink fd c `onErr` UinputRegistrationError (c ^. keyboardName) flip (maybe $ pure ()) (c^.postInit) $ \cmd -> do logInfo $ "Running UinputSink command: " <> displayShow cmd- void . async . callCommand $ cmd+ void . async . spawnCommand $ cmd UinputSink c <$> newMVar fd -- | Close a 'UinputSink'@@ -152,18 +161,18 @@ usClose snk = withMVar (snk^.st) $ \h -> finally (release h) (close h) where release h = do- logInfo $ "Unregistering Uinput device"+ logInfo "Unregistering Uinput device" release_uinput_keysink h `onErr` UinputReleaseError (snk^.cfg.keyboardName) close h = do- logInfo $ "Closing Uinput device file"+ logInfo "Closing Uinput device file" liftIO $ closeFd h -- | Write a keyboard event to the sink and sync the driver state. Using an MVar -- ensures that we can never have 2 threads try to write at the same time. usWrite :: HasLogFunc e => UinputSink -> KeyEvent -> RIO e () usWrite u e = withMVar (u^.st) $ \fd -> do- now <- liftIO $ getSystemTime+ now <- liftIO getSystemTime send_event u fd . toLinuxKeyEvent e $ now send_event u fd . sync $ now
src/KMonad/Keyboard/IO/Mac/IOKitSource.hs view
@@ -30,14 +30,14 @@ wait_key :: Ptr MacKeyEvent -> IO Word8 -data EvBuf = EvBuf- { _buffer :: !(Ptr MacKeyEvent)+newtype EvBuf = EvBuf+ { _buffer :: Ptr MacKeyEvent } makeLenses ''EvBuf -- | Return a KeySource using the Mac IOKit approach iokitSource :: HasLogFunc e- => (Maybe String)+ => Maybe String -> RIO e (Acquire KeySource) iokitSource name = mkKeySource (iokitOpen name) iokitClose iokitRead @@ -46,7 +46,7 @@ -- | Ask IOKit to open keyboards matching the specified name iokitOpen :: HasLogFunc e- => (Maybe String)+ => Maybe String -> RIO e EvBuf iokitOpen m = do logInfo "Opening IOKit devices"@@ -78,4 +78,6 @@ we <- liftIO $ do _ <- wait_key $ b^.buffer peek $ b^.buffer- either throwIO pure $ fromMacKeyEvent we+ case fromMacKeyEvent we of+ Nothing -> iokitRead b+ Just e -> either throwIO pure e
src/KMonad/Keyboard/IO/Mac/KextSink.hs view
@@ -16,7 +16,7 @@ foreign import ccall "send_key" send_key :: Ptr MacKeyEvent -> IO () -data EvBuf = EvBuf+newtype EvBuf = EvBuf { _buffer :: Ptr MacKeyEvent -- ^ The pointer we write events to } makeClassy ''EvBuf
src/KMonad/Keyboard/IO/Mac/Types.hs view
@@ -1,7 +1,6 @@ module KMonad.Keyboard.IO.Mac.Types ( MacError(..) , MacKeyEvent- , mkMacKeyEvent , toMacKeyEvent , fromMacKeyEvent )@@ -23,18 +22,21 @@ data MacError = NoMacKeycodeTo Keycode -- ^ Error translating to 'MacKeycode' | NoMacKeycodeFrom MacKeycode -- ^ Error translating from 'MacKeycode'+ | BadMacSwitch MacSwitch -- ^ Error interpreting 'MacSwitch' instance Exception MacError instance Show MacError where show e = case e of NoMacKeycodeTo c -> "Cannot translate to mac keycode: " <> show c NoMacKeycodeFrom i -> "Cannot translate from mac keycode: " <> show i+ BadMacSwitch s -> "Cannot interpret mac switch: " <> show s+instance Exception [MacError] -------------------------------------------------------------------------------- -- $typ -type MacSwitch = Word8 -- ^ Type alias for the switch value-type MacKeycode = Word32 -- ^ Type alias for the Mac keycode+type MacSwitch = Word64 -- ^ Type alias for the switch value+type MacKeycode = (Word32, Word32) -- ^ Type alias for the Mac keycode -- | 'MacKeyEvent' is the C-representation of a a 'KeyEvent' for our Mac API. --@@ -50,33 +52,30 @@ -- | This lets us send 'MacKeyEvent's between Haskell and C. instance Storable MacKeyEvent where- alignment _ = 4 -- lowest common denominator of: 1 4- sizeOf _ = 8 -- (1 + 3-padding) + 4+ alignment _ = 4+ sizeOf _ = 16 peek ptr = do s <- peekByteOff ptr 0- c <- peekByteOff ptr 4- return $ MacKeyEvent (s, c)- poke ptr (MacKeyEvent (s, c)) = do+ p <- peekByteOff ptr 8+ u <- peekByteOff ptr 12+ return $ MacKeyEvent (s, (p, u))+ poke ptr (MacKeyEvent (s, (p, u))) = do pokeByteOff ptr 0 s- pokeByteOff ptr 4 c--mkMacKeyEvent :: MacSwitch -> MacKeycode -> MacKeyEvent-mkMacKeyEvent s e = MacKeyEvent (s, e)+ pokeByteOff ptr 8 p+ pokeByteOff ptr 12 u -------------------------------------------------------------------------------- -- $conv --- | Convert between 'MacSwitch' and 'Switch' representations.------ NOTE: Although 'MacSwitch' could theoretically be something besides 0 or 1,--- practically it can't, because those are the only values the API generates,--- guaranteed.-_MacSwitch :: Iso' MacSwitch Switch-_MacSwitch = iso to' from'- where- to' w = if w == 0 then Press else Release- from' s = if s == Press then 0 else 1+fromMacSwitch :: MacSwitch -> Maybe Switch+fromMacSwitch s = case s of+ 1 -> Just Press+ 0 -> Just Release+ _ -> Nothing +toMacSwitch :: Switch -> MacSwitch+toMacSwitch s = if s == Press then 1 else 0+ -- | Lookup the corresponding 'Keycode' for this 'MacKeycode' fromMacKeycode :: MacKeycode -> Maybe Keycode fromMacKeycode = flip M.lookup kcMap@@ -84,7 +83,7 @@ -- | Lookup the correspondig 'MacKeycode' for this 'Keycode' toMacKeycode :: Keycode -> Maybe MacKeycode toMacKeycode = flip M.lookup revMap- where revMap = M.fromList $ (M.toList kcMap) ^.. folded . swapped+ where revMap = M.fromList $ M.toList kcMap ^.. folded . swapped -- | Convert a 'KeyEvent' to a 'MacKeyEvent' --@@ -94,17 +93,21 @@ -- perfectly, this is essentially an Iso. toMacKeyEvent :: KeyEvent -> Either MacError MacKeyEvent toMacKeyEvent e = case toMacKeycode $ e^.keycode of- Just c -> Right $ MacKeyEvent (e^.switch.from _MacSwitch, c)+ Just c -> Right $ MacKeyEvent (toMacSwitch (e^.switch), c) Nothing -> Left . NoMacKeycodeTo $ e^.keycode -- | Convert a 'MacKeyEvent' to a 'KeyEvent' -- -- NOTE: Same limitations as 'toMacKeyEvent' apply-fromMacKeyEvent :: MacKeyEvent -> Either MacError KeyEvent-fromMacKeyEvent (MacKeyEvent (s, c)) = case fromMacKeycode c of- Just c' -> Right $ mkKeyEvent (s^._MacSwitch) c'- Nothing -> Left . NoMacKeycodeFrom $ c-+fromMacKeyEvent :: MacKeyEvent -> Maybe (Either [MacError] KeyEvent)+fromMacKeyEvent (MacKeyEvent (s, (p, u)))+ | p == 7 && u <= 0x3 = Nothing+ | p == 7 && u >= 0xFFFF = Nothing+ | otherwise = case (fromMacKeycode (p, u), fromMacSwitch s) of+ (Just c', Just s') -> Just (Right $ mkKeyEvent s' c')+ (Just _, Nothing) -> Just (Left [BadMacSwitch s])+ (Nothing, Just _) -> Just (Left [NoMacKeycodeFrom (p,u)])+ (Nothing, Nothing) -> Just (Left [BadMacSwitch s, NoMacKeycodeFrom (p,u)]) -------------------------------------------------------------------------------- -- $kc@@ -114,193 +117,188 @@ -- See https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-315.7.16/IOHIDFamily/IOHIDUsageTables.h -- See https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-700/IOHIDFamily/AppleHIDUsageTables.h.auto.html kcMap :: M.HashMap MacKeycode Keycode-kcMap = M.fromList $- [ (0x00070000, KeyError) -- There's no documentation on this error code, but- -- I've seen it sent when the rollover is exceeded on- -- my macbook internal keyboard- , (0x00070001, KeyError) -- kHIDUsage_KeyErrorRollOver- , (0x00070002, KeyError) -- kHIDUsage_KeyPOSTFail- , (0x00070003, KeyError) -- kHIDUsage_Undefined- , (0x00070004, KeyA)- , (0x00070005, KeyB)- , (0x00070006, KeyC)- , (0x00070007, KeyD)- , (0x00070008, KeyE)- , (0x00070009, KeyF)- , (0x0007000A, KeyG)- , (0x0007000B, KeyH)- , (0x0007000C, KeyI)- , (0x0007000D, KeyJ)- , (0x0007000E, KeyK)- , (0x0007000F, KeyL)- , (0x00070010, KeyM)- , (0x00070011, KeyN)- , (0x00070012, KeyO)- , (0x00070013, KeyP)- , (0x00070014, KeyQ)- , (0x00070015, KeyR)- , (0x00070016, KeyS)- , (0x00070017, KeyT)- , (0x00070018, KeyU)- , (0x00070019, KeyV)- , (0x0007001A, KeyW)- , (0x0007001B, KeyX)- , (0x0007001C, KeyY)- , (0x0007001D, KeyZ)- , (0x0007001E, Key1)- , (0x0007001F, Key2)- , (0x00070020, Key3)- , (0x00070021, Key4)- , (0x00070022, Key5)- , (0x00070023, Key6)- , (0x00070024, Key7)- , (0x00070025, Key8)- , (0x00070026, Key9)- , (0x00070027, Key0)- , (0x00070028, KeyEnter)- , (0x00070029, KeyEsc)- , (0x0007002A, KeyBackspace)- , (0x0007002B, KeyTab)- , (0x0007002C, KeySpace)- , (0x0007002D, KeyMinus)- , (0x0007002E, KeyEqual)- , (0x0007002F, KeyLeftBrace)- , (0x00070030, KeyRightBrace)- , (0x00070031, KeyBackslash)- -- , (0x00070032, KeyNonUSPound)- , (0x00070033, KeySemicolon)- , (0x00070034, KeyApostrophe)- , (0x00070035, KeyGrave)- , (0x00070036, KeyComma)- , (0x00070037, KeyDot)- , (0x00070038, KeySlash)- , (0x00070039, KeyCapsLock)- , (0x0007003A, KeyF1)- , (0x0007003B, KeyF2)- , (0x0007003C, KeyF3)- , (0x0007003D, KeyF4)- , (0x0007003E, KeyF5)- , (0x0007003F, KeyF6)- , (0x00070040, KeyF7)- , (0x00070041, KeyF8)- , (0x00070042, KeyF9)- , (0x00070043, KeyF10)- , (0x00070044, KeyF11)- , (0x00070045, KeyF12)- , (0x00070046, KeyPrint)- , (0x00070047, KeyScrollLock)- , (0x00070048, KeyPause)- , (0x00070049, KeyInsert)- , (0x0007004A, KeyHome)- , (0x0007004B, KeyPageUp)- , (0x0007004C, KeyDelete)- , (0x0007004D, KeyEnd)- , (0x0007004E, KeyPageDown)- , (0x0007004F, KeyRight)- , (0x00070050, KeyLeft)- , (0x00070051, KeyDown)- , (0x00070052, KeyUp)- , (0x00070053, KeyNumLock)- , (0x00070054, KeyKpSlash)- , (0x00070055, KeyKpAsterisk)- , (0x00070056, KeyKpMinus)- , (0x00070057, KeyKpPlus)- , (0x00070058, KeyKpenter)- , (0x00070059, KeyKp1)- , (0x0007005A, KeyKp2)- , (0x0007005B, KeyKp3)- , (0x0007005C, KeyKp4)- , (0x0007005D, KeyKp5)- , (0x0007005E, KeyKp6)- , (0x0007005F, KeyKp7)- , (0x00070060, KeyKp8)- , (0x00070061, KeyKp9)- , (0x00070062, KeyKp0)- , (0x00070063, KeyKpDot)- -- , (0x00070064, KeyNonUSBackslash)- -- , (0x00070065, KeyApplication)- , (0x00070066, KeyPower)- , (0x00070067, KeyKpEqual)- , (0x00070068, KeyF13)- , (0x00070069, KeyF14)- , (0x0007006A, KeyF15)- , (0x0007006B, KeyF16)- , (0x0007006C, KeyF17)- , (0x0007006D, KeyF18)- , (0x0007006E, KeyF19)- , (0x0007006F, KeyF20)- , (0x00070070, KeyF21)- , (0x00070071, KeyF22)- , (0x00070072, KeyF23)- , (0x00070073, KeyF24)- -- , (0x00070074, KeyExecute)- , (0x00070075, KeyHelp)- , (0x00070076, KeyMenu)- -- , (0x00070077, KeySelect)- , (0x00070078, KeyStop)- , (0x00070079, KeyAgain)- , (0x0007007A, KeyUndo)- , (0x0007007B, KeyCut)- , (0x0007007C, KeyCopy)- , (0x0007007D, KeyPaste)- , (0x0007007E, KeyFind)- , (0x0007007F, KeyMute)- , (0x00070080, KeyVolumeUp)- , (0x00070081, KeyVolumeDown)- -- , (0x00070082, KeyLockingCapsLock)- -- , (0x00070083, KeyLockingNumLock)- -- , (0x00070084, KeyLockingScrollLock)- , (0x00070085, KeyKpComma)- -- , (0x00070086, KeyKpEqualSignAS400)- -- , (0x00070087, KeyInternational1)- -- , (0x00070088, KeyInternational2)- -- , (0x00070089, KeyInternational3)- -- , (0x0007008A, KeyInternational4)- -- , (0x0007008B, KeyInternational5)- -- , (0x0007008C, KeyInternational6)- -- , (0x0007008D, KeyInternational7)- -- , (0x0007008E, KeyInternational8)- -- , (0x0007008F, KeyInternational9)- -- , (0x00070090, KeyLANG1)- -- , (0x00070091, KeyLANG2)- -- , (0x00070092, KeyLANG3)- -- , (0x00070093, KeyLANG4)- -- , (0x00070094, KeyLANG5)- -- , (0x00070095, KeyLANG6)- -- , (0x00070096, KeyLANG7)- -- , (0x00070097, KeyLANG8)- -- , (0x00070098, KeyLANG9)- -- , (0x00070099, KeyAlternateErase)- -- , (0x0007009A, KeySysReqOrAttention)- , (0x0007009B, KeyCancel)- -- , (0x0007009C, KeyClear)- -- , (0x0007009D, KeyPrior)- -- , (0x0007009E, KeyReturn)- -- , (0x0007009F, KeySeparator)- -- , (0x000700A0, KeyOut)- -- , (0x000700A1, KeyOper)- -- , (0x000700A2, KeyClearOrAgain)- -- , (0x000700A3, KeyCrSelOrProps)- -- , (0x000700A4, KeyExSel)- -- /* 0x000700A5-0x000700DF Reserved */- , (0x000700E0, KeyLeftCtrl)- , (0x000700E1, KeyLeftShift)- , (0x000700E2, KeyLeftAlt)- , (0x000700E3, KeyLeftMeta)- , (0x000700E4, KeyRightCtrl)- , (0x000700E5, KeyRightShift)- , (0x000700E6, KeyRightAlt)- , (0x000700E7, KeyRightMeta)- -- /* 0x000700E8-0x0007FFFF Reserved */- , (0x0007FFFF, KeyReserved)- , (0x000C00B5, KeyNextSong)- , (0x000C00B6, KeyPreviousSong)- , (0x000C00CD, KeyPlayPause)- , (0x00FF0003, KeyFn)- , (0x00FF0004, KeyBrightnessUp)- , (0x00FF0005, KeyBrightnessDown)- , (0x00FF0008, KeyBacklightUp)- , (0x00FF0009, KeyBacklightDown)- , (0xFF010004, KeyLaunchpad)- , (0xFF010010, KeyMissionCtrl)+kcMap = M.fromList+ [ ((0x7,0x4), KeyA)+ , ((0x7,0x5), KeyB)+ , ((0x7,0x6), KeyC)+ , ((0x7,0x7), KeyD)+ , ((0x7,0x8), KeyE)+ , ((0x7,0x9), KeyF)+ , ((0x7,0xA), KeyG)+ , ((0x7,0xB), KeyH)+ , ((0x7,0xC), KeyI)+ , ((0x7,0xD), KeyJ)+ , ((0x7,0xE), KeyK)+ , ((0x7,0xF), KeyL)+ , ((0x7,0x10), KeyM)+ , ((0x7,0x11), KeyN)+ , ((0x7,0x12), KeyO)+ , ((0x7,0x13), KeyP)+ , ((0x7,0x14), KeyQ)+ , ((0x7,0x15), KeyR)+ , ((0x7,0x16), KeyS)+ , ((0x7,0x17), KeyT)+ , ((0x7,0x18), KeyU)+ , ((0x7,0x19), KeyV)+ , ((0x7,0x1A), KeyW)+ , ((0x7,0x1B), KeyX)+ , ((0x7,0x1C), KeyY)+ , ((0x7,0x1D), KeyZ)+ , ((0x7,0x1E), Key1)+ , ((0x7,0x1F), Key2)+ , ((0x7,0x20), Key3)+ , ((0x7,0x21), Key4)+ , ((0x7,0x22), Key5)+ , ((0x7,0x23), Key6)+ , ((0x7,0x24), Key7)+ , ((0x7,0x25), Key8)+ , ((0x7,0x26), Key9)+ , ((0x7,0x27), Key0)+ , ((0x7,0x28), KeyEnter)+ , ((0x7,0x29), KeyEsc)+ , ((0x7,0x2A), KeyBackspace)+ , ((0x7,0x2B), KeyTab)+ , ((0x7,0x2C), KeySpace)+ , ((0x7,0x2D), KeyMinus)+ , ((0x7,0x2E), KeyEqual)+ , ((0x7,0x2F), KeyLeftBrace)+ , ((0x7,0x30), KeyRightBrace)+ , ((0x7,0x31), KeyBackslash)+ -- , ((0x7,0x32), KeyNonUSPound)+ , ((0x7,0x33), KeySemicolon)+ , ((0x7,0x34), KeyApostrophe)+ , ((0x7,0x35), KeyGrave)+ , ((0x7,0x36), KeyComma)+ , ((0x7,0x37), KeyDot)+ , ((0x7,0x38), KeySlash)+ , ((0x7,0x39), KeyCapsLock)+ , ((0x7,0x3A), KeyF1)+ , ((0x7,0x3B), KeyF2)+ , ((0x7,0x3C), KeyF3)+ , ((0x7,0x3D), KeyF4)+ , ((0x7,0x3E), KeyF5)+ , ((0x7,0x3F), KeyF6)+ , ((0x7,0x40), KeyF7)+ , ((0x7,0x41), KeyF8)+ , ((0x7,0x42), KeyF9)+ , ((0x7,0x43), KeyF10)+ , ((0x7,0x44), KeyF11)+ , ((0x7,0x45), KeyF12)+ , ((0x7,0x46), KeyPrint)+ , ((0x7,0x47), KeyScrollLock)+ , ((0x7,0x48), KeyPause)+ , ((0x7,0x49), KeyInsert)+ , ((0x7,0x4A), KeyHome)+ , ((0x7,0x4B), KeyPageUp)+ , ((0x7,0x4C), KeyDelete)+ , ((0x7,0x4D), KeyEnd)+ , ((0x7,0x4E), KeyPageDown)+ , ((0x7,0x4F), KeyRight)+ , ((0x7,0x50), KeyLeft)+ , ((0x7,0x51), KeyDown)+ , ((0x7,0x52), KeyUp)+ , ((0x7,0x53), KeyNumLock)+ , ((0x7,0x54), KeyKpSlash)+ , ((0x7,0x55), KeyKpAsterisk)+ , ((0x7,0x56), KeyKpMinus)+ , ((0x7,0x57), KeyKpPlus)+ , ((0x7,0x58), KeyKpEnter)+ , ((0x7,0x59), KeyKp1)+ , ((0x7,0x5A), KeyKp2)+ , ((0x7,0x5B), KeyKp3)+ , ((0x7,0x5C), KeyKp4)+ , ((0x7,0x5D), KeyKp5)+ , ((0x7,0x5E), KeyKp6)+ , ((0x7,0x5F), KeyKp7)+ , ((0x7,0x60), KeyKp8)+ , ((0x7,0x61), KeyKp9)+ , ((0x7,0x62), KeyKp0)+ , ((0x7,0x63), KeyKpDot)+ -- , ((0x7,0x64), KeyNonUSBackslash)+ -- , ((0x7,0x65), KeyApplication)+ , ((0x7,0x66), KeyPower)+ , ((0x7,0x67), KeyKpEqual)+ , ((0x7,0x68), KeyF13)+ , ((0x7,0x69), KeyF14)+ , ((0x7,0x6A), KeyF15)+ , ((0x7,0x6B), KeyF16)+ , ((0x7,0x6C), KeyF17)+ , ((0x7,0x6D), KeyF18)+ , ((0x7,0x6E), KeyF19)+ , ((0x7,0x6F), KeyF20)+ , ((0x7,0x70), KeyF21)+ , ((0x7,0x71), KeyF22)+ , ((0x7,0x72), KeyF23)+ , ((0x7,0x73), KeyF24)+ -- , ((0x7,0x74), KeyExecute)+ , ((0x7,0x75), KeyHelp)+ , ((0x7,0x76), KeyMenu)+ -- , ((0x7,0x77), KeySelect)+ , ((0x7,0x78), KeyStop)+ , ((0x7,0x79), KeyAgain)+ , ((0x7,0x7A), KeyUndo)+ , ((0x7,0x7B), KeyCut)+ , ((0x7,0x7C), KeyCopy)+ , ((0x7,0x7D), KeyPaste)+ , ((0x7,0x7E), KeyFind)+ , ((0x7,0x7F), KeyMute)+ , ((0x7,0x80), KeyVolumeUp)+ , ((0x7,0x81), KeyVolumeDown)+ -- , ((0x7,0x82), KeyLockingCapsLock)+ -- , ((0x7,0x83), KeyLockingNumLock)+ -- , ((0x7,0x84), KeyLockingScrollLock)+ , ((0x7,0x85), KeyKpComma)+ -- , ((0x7,0x86), KeyKpEqualSignAS400)+ -- , ((0x7,0x87), KeyInternational1)+ -- , ((0x7,0x88), KeyInternational2)+ -- , ((0x7,0x89), KeyInternational3)+ -- , ((0x7,0x8A), KeyInternational4)+ -- , ((0x7,0x8B), KeyInternational5)+ -- , ((0x7,0x8C), KeyInternational6)+ -- , ((0x7,0x8D), KeyInternational7)+ -- , ((0x7,0x8E), KeyInternational8)+ -- , ((0x7,0x8F), KeyInternational9)+ -- , ((0x7,0x90), KeyLANG1)+ -- , ((0x7,0x91), KeyLANG2)+ -- , ((0x7,0x92), KeyLANG3)+ -- , ((0x7,0x93), KeyLANG4)+ -- , ((0x7,0x94), KeyLANG5)+ -- , ((0x7,0x95), KeyLANG6)+ -- , ((0x7,0x96), KeyLANG7)+ -- , ((0x7,0x97), KeyLANG8)+ -- , ((0x7,0x98), KeyLANG9)+ -- , ((0x7,0x99), KeyAlternateErase)+ -- , ((0x7,0x9A), KeySysReqOrAttention)+ , ((0x7,0x9B), KeyCancel)+ -- , ((0x7,0x9C), KeyClear)+ -- , ((0x7,0x9D), KeyPrior)+ -- , ((0x7,0x9E), KeyReturn)+ -- , ((0x7,0x9F), KeySeparator)+ -- , ((0x7,0xA0), KeyOut)+ -- , ((0x7,0xA1), KeyOper)+ -- , ((0x7,0xA2), KeyClearOrAgain)+ -- , ((0x7,0xA3), KeyCrSelOrProps)+ -- , ((0x7,0xA4), KeyExSel)+ -- (0x7,0xA5) - (0x7,0xDF) Reserved+ , ((0x7,0xE0), KeyLeftCtrl)+ , ((0x7,0xE1), KeyLeftShift)+ , ((0x7,0xE2), KeyLeftAlt)+ , ((0x7,0xE3), KeyLeftMeta)+ , ((0x7,0xE4), KeyRightCtrl)+ , ((0x7,0xE5), KeyRightShift)+ , ((0x7,0xE6), KeyRightAlt)+ , ((0x7,0xE7), KeyRightMeta)+ -- (0x7,0xE8) - (0x7,0xFFFF) Reserved+ , ((0xC,0xB5), KeyNextSong)+ , ((0xC,0xB6), KeyPreviousSong)+ , ((0xC,0xCD), KeyPlayPause)+ , ((0xC,0xCF), KeyDictation)+ , ((0xFF,0x3), KeyFn)+ , ((0xFF,0x4), KeyBrightnessUp)+ , ((0xFF,0x5), KeyBrightnessDown)+ , ((0xFF,0x8), KeyKbdIllumUp)+ , ((0xFF,0x9), KeyKbdIllumDown)+ , ((0xFF01,0x1), KeySpotlight)+ , ((0xFF01,0x4), KeyLaunchpad)+ , ((0xFF01,0x10), KeyMissionCtrl) ]
src/KMonad/Keyboard/IO/Windows/SendEventSink.hs view
@@ -29,36 +29,73 @@ -------------------------------------------------------------------------------- -foreign import ccall "sendKey"- sendKey :: Ptr WinKeyEvent -> IO ()+foreign import ccall "sendKey" sendKey :: Ptr WinKeyEvent -> IO () +++ -- | The SKSink environment data SKSink = SKSink- { _buffer :: Ptr WinKeyEvent -- ^ The pointer we write events to+ { _buffer :: MVar (Ptr WinKeyEvent) -- ^ The pointer we write events to+ , _keyrep :: MVar (Maybe (Keycode, Async ()))+ , _delay :: Int -- ^ How long to wait before starting key repeat in ms+ , _rate :: Int -- ^ How long to wait between key repeats in ms } makeClassy ''SKSink -- | Return a 'KeySink' using Window's @sendEvent@ functionality.-sendEventKeySink :: HasLogFunc e => RIO e (Acquire KeySink)-sendEventKeySink = mkKeySink skOpen skClose skSend+sendEventKeySink :: HasLogFunc e => Maybe (Int, Int) -> RIO e (Acquire KeySink)+sendEventKeySink di = mkKeySink (skOpen (fromMaybe (300, 100) di)) skClose skSend -- | Create the 'SKSink' environment-skOpen :: HasLogFunc e => RIO e SKSink-skOpen = do+skOpen :: HasLogFunc e => (Int, Int) -> RIO e SKSink+skOpen (d, i) = do logInfo "Initializing Windows key sink"- liftIO $ SKSink <$> mallocBytes (sizeOf (undefined :: WinKeyEvent))+ bv <- liftIO $ mallocBytes (sizeOf (undefined :: WinKeyEvent))+ bm <- newMVar bv+ r <- newMVar Nothing+ pure $ SKSink bm r d i -- | Close the 'SKSink' environment skClose :: HasLogFunc e => SKSink -> RIO e ()-skClose sk = do+skClose s = do logInfo "Closing Windows key sink"- liftIO . free $ sk^.buffer+ withMVar (s^.keyrep) $ \r -> maybe (pure ()) cancel (r^?_Just._2)+ withMVar (s^.buffer) (liftIO . free) +-- | Send 1 key event to Windows+emit :: MonadUnliftIO m => SKSink -> WinKeyEvent -> m ()+emit s w = withMVar (s^.buffer) $ \b -> liftIO $ poke b w >> sendKey b+ -- | Write an event to the pointer and prompt windows to inject it -- -- NOTE: This can throw an error if event-conversion fails. skSend :: HasLogFunc e => SKSink -> KeyEvent -> RIO e ()-skSend sk e = either throwIO go $ toWinKeyEvent e- where go e' = liftIO $ do- poke (sk^.buffer) e'- sendKey $ sk^.buffer+skSend s e = do++ w <- either throwIO pure $ toWinKeyEvent e -- the event for windows+ r <- takeMVar $ s^.keyrep -- the keyrep token++ -- Whether this keycode is currently active in key-repeat+ let beingRepped = Just (e^.keycode) == (r^?_Just._1)++ -- When we're going to emit a press we are not already repeating+ let handleNewPress = do+ maybe (pure ()) cancel (r^?_Just._2)+ emit s w+ a <- async $ do+ threadDelay (1000 * s^.delay)+ forever $ emit s w >> threadDelay (1000 * s^.rate)+ pure $ Just (e^.keycode, a)++ -- When the event is a release+ let handleRelease = do+ when beingRepped $ maybe (pure ()) cancel (r^?_Just._2)+ emit s w+ pure $ if beingRepped then Nothing else r++ -- Perform the correct action and store the rep-env+ newRep <- if | isPress e && not beingRepped -> handleNewPress+ | isRelease e -> handleRelease+ | otherwise -> pure r+ putMVar (s^.keyrep) newRep
src/KMonad/Keyboard/IO/Windows/Types.hs view
@@ -90,12 +90,11 @@ -- | Lookup the corresponding 'Keycode' for this 'WinKeycode' fromWinKeycode :: WinKeycode -> Maybe Keycode-fromWinKeycode = flip M.lookup kcMap+fromWinKeycode = flip M.lookup winCodeToKeyCode -- | Lookup the correspondig 'WinKeycode' for this 'Keycode' toWinKeycode :: Keycode -> Maybe WinKeycode-toWinKeycode = flip M.lookup revMap- where revMap = M.fromList $ (M.toList kcMap) ^.. folded . swapped+toWinKeycode = flip M.lookup keyCodeToWinCode -- | Convert a 'KeyEvent' to a 'WinKeyEvent' --@@ -120,16 +119,22 @@ -------------------------------------------------------------------------------- -- $kc --- | Windows does not use the same keycodes as Linux, so we need to translate.+-- | Translate a virtual-key code from Windows into a suitable KMonad KeyCode -- -- FIXME: There are loads of missing correspondences, mostly for rare-keys. How -- do these line up? Ideally this mapping would be total.-kcMap :: M.HashMap WinKeycode Keycode-kcMap = M.fromList $+winCodeToKeyCode :: M.HashMap WinKeycode Keycode+winCodeToKeyCode = M.fromList [ (0x00, Missing254) -- Not documented, but happens often. Why??+ -- , (0x01, ???) -- Defined as VK_LBUTTON+ -- , (0x02, ???) -- Defined as VK_RBUTTON+ , (0x03, KeyCancel)+ -- , (0x04, ???) -- Defined as VK_MBUTTON+ -- , (0x05, ???) -- Defined as VK_XBUTTON1+ -- , (0x06, ???) -- Defined as VK_XBUTTON2 , (0x08, KeyBackspace) , (0x09, KeyTab)- , (0x0C, KeyKp5) -- VK_CLEAR: NumPad 5 when numlock is not engaged+ , (0x0C, KeyDelete) -- Defined as VK_CLEAR , (0x0D, KeyEnter) , (0x10, KeyLeftShift) -- No 'sidedness'?? , (0x11, KeyLeftCtrl) -- No 'sidedness'??@@ -137,12 +142,14 @@ , (0x13, KeyPause) , (0x14, KeyCapsLock) , (0x15, KeyKatakana) -- Also: KeyHangul+ -- , (0x16, ???) -- Defined as VK_IME_ON -- , (0x17, ???) -- Defined as VK_JUNJA- -- , (0x18, ???) -- Defined as VK_HANJA- -- , (0x19, ???) -- Defined as VK_KANJI+ -- , (0x18, ???) -- Defined as VK_FINAL+ , (0x19, KeyHanja)+ -- , (0x1A, ???) -- Defined as VK_IME_OFF , (0x1B, KeyEsc)- -- , (0x1C, ???) -- Defined as VK_CONVERT- -- , (0x1D, ???) -- Defined as VK_NONCONVERT+ , (0x1C, KeyHenkan) -- Defined as VK_CONVERT+ , (0x1D, KeyMuhenkan) -- Defined as VK_NONCONVERT -- , (0x1E, ???) -- Defined as VK_ACCEPT -- , (0x1F, ???) -- Defined as VK_MODECHANGE , (0x20, KeySpace)@@ -155,9 +162,9 @@ , (0x27, KeyRight) , (0x28, KeyDown) -- , (0x29, ???) -- Defined as VK_SELECT- , (0x2A, KeyPrint)+ -- , (0x2A, ???) -- Defined as VK_PRINT (legacy PrintScreen) -- , (0x2B, ???) -- Defined as VK_EXECUTE- , (0x2C, KeyPrint) -- Defined as VK_PRINT_SCREEN+ , (0x2C, KeyPrint) -- Defined as VK_PRINT_SCREEN / VK_SNAPSHOT , (0x2D, KeyInsert) , (0x2E, KeyDelete) , (0x2F, KeyHelp)@@ -249,13 +256,13 @@ , (0xA3, KeyRightCtrl) , (0xA4, KeyLeftAlt) , (0xA5, KeyRightAlt)- -- , (0xA6, ???) -- Defined as VK_BROWSER_BACK- -- , (0xA7, ???) -- Defined as VK_BROWSER_FORWARD- -- , (0xA8, ???) -- Defined as VK_BROWSER_REFRESH- -- , (0xA9, ???) -- Defined as VK_BROWSER_STOP- -- , (0xAA, ???) -- Defined as VK_BROWSER_SEARCH+ , (0xA6, KeyBack)+ , (0xA7, KeyForward)+ , (0xA8, KeyRefresh)+ , (0xA9, KeyStop)+ , (0xAA, KeySearch) -- , (0xAB, ???) -- Defined as VK_BROWSER_FAVORITES- -- , (0xAC, ???) -- Defined as VK_BROWSER_HOME+ , (0xAC, KeyHomepage) , (0xAD, KeyMute) , (0xAE, KeyVolumeDown) , (0xAF, KeyVolumeUp)@@ -265,8 +272,8 @@ , (0xB3, KeyPlayPause) , (0xB4, KeyMail) , (0xB5, KeyMedia)- -- , (0xB6, ???) -- Defined as VK_LAUNCH_APP1- -- , (0xB7, ???) -- Defined as VK_LAUNCH_APP2+ , (0xB6, KeyProg1) -- Defined as VK_LAUNCH_APP1+ , (0xB7, KeyProg2) -- Defined as VK_LAUNCH_APP2 , (0xBA, KeySemicolon) -- Defined as VK_OEM_1 , (0xBB, KeyEqual) -- Defined as VK_OEM_PLUS , (0xBC, KeyComma) -- Defined as VK_OEM_COMMA@@ -274,6 +281,7 @@ , (0xBE, KeyDot) -- Defined as VK_OEM_PERIOD , (0xBF, KeySlash) -- Defined as VK_OEM_2 , (0xC0, KeyGrave) -- Defined as VK_OEM_3+ , (0xC1, KeyRo) , (0xDB, KeyLeftBrace) -- Defined as VK_OEM_4 , (0xDC, KeyBackslash) -- Defined as VK_OEM_5 , (0xDD, KeyRightBrace) -- Defined as VK_OEM_6@@ -283,7 +291,7 @@ , (0xE2, Key102nd) -- , (0xE3, ???) -- Defined as `OEM specific` -- , (0xE4, ???) -- Defined as `OEM specific`- -- , (0xE5, ???) -- Defined as OEM PROCESS key+ -- , (0xE5, ???) -- Defined as VK_PROCESSKEY -- , (0xE6, ???) -- Defined as `OEM specific` -- , (0xE7, ???) -- Defined as VK_PACKET -- , (0xE9, ???) -- Defined as `OEM specific`@@ -307,6 +315,270 @@ -- , (0xFB, ???) -- Defined as VK_ZOOM -- , (0xFC, ???) -- Defined as VK_NONAME -- , (0xFD, ???) -- Defined as VK_PA1- -- , (0xFE, ???) -- Defined as VK_CLEAR+ -- , (0xFE, KeyDelete) -- Defined as VK_OEM_CLEAR ] +-- | Translate a KMonad KeyCode to the corresponding Windows virtual-key code+--+-- We cannot simply reverse the above map for the opposite direction, because+-- there will be duplicates where more than one virtual-key code produces the+-- same KMonad KeyCode. See https://github.com/kmonad/kmonad/issues/326+keyCodeToWinCode :: M.HashMap Keycode WinKeycode+keyCodeToWinCode = M.fromList+ [ -- (KeyReserved, ???)+ (KeyEsc, 0x1B)+ , (Key1, 0x31)+ , (Key2, 0x32)+ , (Key3, 0x33)+ , (Key4, 0x34)+ , (Key5, 0x35)+ , (Key6, 0x36)+ , (Key7, 0x37)+ , (Key8, 0x38)+ , (Key9, 0x39)+ , (Key0, 0x30)+ , (KeyMinus, 0xBD)+ , (KeyEqual, 0xBB)+ , (KeyBackspace, 0x08)+ , (KeyTab, 0x09)+ , (KeyQ, 0x51)+ , (KeyW, 0x57)+ , (KeyE, 0x45)+ , (KeyR, 0x52)+ , (KeyT, 0x54)+ , (KeyY, 0x59)+ , (KeyU, 0x55)+ , (KeyI, 0x49)+ , (KeyO, 0x4F)+ , (KeyP, 0x50)+ , (KeyLeftBrace, 0xDB)+ , (KeyRightBrace, 0xDD)+ , (KeyEnter, 0x0D)+ , (KeyLeftCtrl, 0xA2)+ , (KeyA, 0x41)+ , (KeyS, 0x53)+ , (KeyD, 0x44)+ , (KeyF, 0x46)+ , (KeyG, 0x47)+ , (KeyH, 0x48)+ , (KeyJ, 0x4A)+ , (KeyK, 0x4B)+ , (KeyL, 0x4C)+ , (KeySemicolon, 0xBA)+ , (KeyApostrophe, 0xDE)+ , (KeyGrave, 0xC0)+ , (KeyLeftShift, 0xA0)+ , (KeyBackslash, 0xDC)+ , (KeyZ, 0x5A)+ , (KeyX, 0x58)+ , (KeyC, 0x43)+ , (KeyV, 0x56)+ , (KeyB, 0x42)+ , (KeyN, 0x4E)+ , (KeyM, 0x4D)+ , (KeyComma, 0xBC)+ , (KeyDot, 0xBE)+ , (KeySlash, 0xBF)+ , (KeyRightShift, 0xA1)+ , (KeyKpAsterisk, 0x6A)+ , (KeyLeftAlt, 0xA4)+ , (KeySpace, 0x20)+ , (KeyCapsLock, 0x14)+ , (KeyF1, 0x70)+ , (KeyF2, 0x71)+ , (KeyF3, 0x72)+ , (KeyF4, 0x73)+ , (KeyF5, 0x74)+ , (KeyF6, 0x75)+ , (KeyF7, 0x76)+ , (KeyF8, 0x77)+ , (KeyF9, 0x78)+ , (KeyF10, 0x79)+ , (KeyNumLock, 0x90)+ , (KeyScrollLock, 0x91)+ , (KeyKp7, 0x67)+ , (KeyKp8, 0x68)+ , (KeyKp9, 0x69)+ , (KeyKpMinus, 0x6D)+ , (KeyKp4, 0x64)+ , (KeyKp5, 0x65)+ , (KeyKp6, 0x66)+ , (KeyKpPlus, 0x6B)+ , (KeyKp1, 0x61)+ , (KeyKp2, 0x62)+ , (KeyKp3, 0x63)+ , (KeyKp0, 0x60)+ , (KeyKpDot, 0x6E)+ -- , (Missing84, ???)+ -- , (KeyZenkakuHankaku, ???)+ , (Key102nd, 0xE2)+ , (KeyF11, 0x7A)+ , (KeyF12, 0x7B)+ , (KeyRo, 0xC1)+ , (KeyKatakana, 0x15)+ -- , (KeyHiragana, ???)+ , (KeyHenkan, 0x1C)+ , (KeyKatakanaHiragana, 0x15)+ , (KeyMuhenkan, 0x1D)+ -- , (KeyKpjpcomma, ???)+ , (KeyKpEnter, 0x0D)+ , (KeyRightCtrl, 0xA3)+ , (KeyKpSlash, 0x6F)+ -- , (KeySysRq, ???)+ , (KeyRightAlt, 0xA5)+ -- , (KeyLinefeed, ???)+ , (KeyHome, 0x24)+ , (KeyUp, 0x26)+ , (KeyPageUp, 0x21)+ , (KeyLeft, 0x25)+ , (KeyRight, 0x27)+ , (KeyEnd, 0x23)+ , (KeyDown, 0x28)+ , (KeyPageDown, 0x22)+ , (KeyInsert, 0x2D)+ , (KeyDelete, 0x2E)+ -- , (KeyMacro, ???)+ , (KeyMute, 0xAD)+ , (KeyVolumeDown, 0xAE)+ , (KeyVolumeUp, 0xAF)+ -- , (KeyPower, ???)+ -- , (KeyKpEqual, ???)+ -- , (KeyKpPlusMinus, ???)+ , (KeyPause, 0x13)+ -- , (KeyScale, ???)+ -- , (KeyKpComma, ???)+ , (KeyHangeul, 0x15)+ , (KeyHanja, 0x19)+ -- , (KeyYen, ???)+ , (KeyLeftMeta, 0x5B)+ , (KeyRightMeta, 0x5C)+ , (KeyCompose, 0x5D)+ , (KeyStop, 0xA9)+ -- , (KeyAgain, ???)+ -- , (KeyProps, ???)+ -- , (KeyUndo, ???)+ -- , (KeyFront, ???)+ -- , (KeyCopy, ???)+ -- , (KeyOpen, ???)+ -- , (KeyPaste, ???)+ -- , (KeyFind, ???)+ -- , (KeyCut, ???)+ , (KeyHelp, 0x2F)+ , (KeyMenu, 0x5D)+ -- , (KeyCalc, ???)+ -- , (KeySetup, ???)+ , (KeySleep, 0x5F)+ -- , (KeyWakeUp, ???)+ -- , (KeyFile, ???)+ -- , (KeySendFile, ???)+ -- , (KeyDeleteFile, ???)+ -- , (KeyXfer, ???)+ -- , (KeyProg1, ???)+ -- , (KeyProg2, ???)+ -- , (KeyWww, ???)+ -- , (KeyMsDos, ???)+ -- , (KeyCoffee, ???)+ -- , (KeyDirection, ???)+ -- , (KeyCycleWindows, ???)+ , (KeyMail, 0xB4)+ -- , (KeyBookmarks, ???)+ -- , (KeyComputer, ???)+ , (KeyBack, 0xA6)+ , (KeyForward, 0xA7)+ -- , (KeyCloseCd, ???)+ -- , (KeyEjectCd, ???)+ -- , (KeyEjectCloseCd, ???)+ , (KeyNextSong, 0xB0)+ , (KeyPlayPause, 0xB3)+ , (KeyPreviousSong, 0xB1)+ , (KeyStopCd, 0xB2)+ -- , (KeyRecord, ???)+ -- , (KeyRewind, ???)+ -- , (KeyPhone, ???)+ -- , (KeyIso, ???)+ -- , (KeyConfig, ???)+ , (KeyHomepage, 0xAC)+ , (KeyRefresh, 0xA8)+ -- , (KeyExit, ???)+ -- , (KeyMove, ???)+ -- , (KeyEdit, ???)+ -- , (KeyScrollUp, ???)+ -- , (KeyScrollDown, ???)+ -- , (KeyKpLeftParen, ???)+ -- , (KeyKpRightParen, ???)+ -- , (KeyNew, ???)+ -- , (KeyRedo, ???)+ , (KeyF13, 0x7C)+ , (KeyF14, 0x7D)+ , (KeyF15, 0x7E)+ , (KeyF16, 0x7F)+ , (KeyF17, 0x80)+ , (KeyF18, 0x81)+ , (KeyF19, 0x82)+ , (KeyF20, 0x83)+ , (KeyF21, 0x84)+ , (KeyF22, 0x85)+ , (KeyF23, 0x86)+ , (KeyF24, 0x87)+ -- , (Missing195, ???)+ -- , (Missing196, ???)+ -- , (Missing197, ???)+ -- , (Missing198, ???)+ -- , (Missing199, ???)+ -- , (KeyPlayCd, ???)+ -- , (KeyPauseCd, ???)+ -- , (KeyProg3, ???)+ -- , (KeyProg4, ???)+ -- , (KeyDashboard, ???)+ -- , (KeySuspend, ???)+ -- , (KeyClose, ???)+ , (KeyPlay, 0xFA)+ --, (KeyFastForward, ???)+ --, (KeyBassBoost, ???)+ , (KeyPrint, 0x2C)+ -- , (KeyHp, ???)+ -- , (KeyCamera, ???)+ -- , (KeySound, ???)+ -- , (KeyQuestion, ???)+ , (KeyEmail, 0xB4)+ -- , (KeyChat, ???)+ , (KeySearch, 0xAA)+ -- , (KeyConnect, ???)+ -- , (KeyFinance, ???)+ -- , (KeySport, ???)+ -- , (KeyShop, ???)+ -- , (KeyAlterase, ???)+ , (KeyCancel, 0x03)+ -- , (KeyBrightnessDown, ???)+ -- , (KeyBrightnessUp, ???)+ , (KeyMedia, 0xB5)+ -- , (KeySwitchVideoMode, ???)+ -- , (KeyKbdIllumToggle, ???)+ -- , (KeyKbdIllumDown, ???)+ -- , (KeyKbdIllumUp, ???)+ -- , (KeySend, ???)+ -- , (KeyReply, ???)+ -- , (KeyForwardMail, ???)+ -- , (KeySave, ???)+ -- , (KeyDocuments, ???)+ -- , (KeyBattery, ???)+ -- , (KeyBluetooth, ???)+ -- , (KeyWlan, ???)+ -- , (KeyUwb, ???)+ -- , (KeyUnknown, ???)+ , (KeyVideoNext, 0xB0)+ , (KeyVideoPrev, 0xB1)+ -- , (KeyBrightnessCycle, ???)+ -- , (KeyBrightnessZero, ???)+ -- , (KeyDisplayOff, ???)+ -- , (KeyWimax, ???)+ -- , (Missing247, ???)+ -- , (Missing248, ???)+ -- , (Missing249, ???)+ -- , (Missing250, ???)+ -- , (Missing251, ???)+ -- , (Missing252, ???)+ -- , (Missing253, ???)+ -- , (Missing254, ???)+ -- , (Missing255, ???)+ ]
src/KMonad/Keyboard/Keycode.hs view
@@ -25,7 +25,7 @@ import KMonad.Prelude -import qualified Data.MultiMap as Q+import qualified KMonad.Util.MultiMap as Q import qualified RIO.HashSet as S import qualified RIO.Text as T import qualified RIO.Text.Partial as T (head)@@ -305,9 +305,8 @@ | KeyFn | KeyLaunchpad | KeyMissionCtrl- | KeyBacklightDown- | KeyBacklightUp- | KeyError+ | KeySpotlight+ | KeyDictation #endif deriving (Eq, Show, Bounded, Enum, Ord, Generic, Hashable) @@ -326,7 +325,7 @@ -- | The set of all existing 'Keycode' kcAll :: S.HashSet Keycode-kcAll = S.fromList $ [minBound .. maxBound]+kcAll = S.fromList [minBound .. maxBound] -- | The set of all 'Keycode' that are not of the MissingXX pattern kcNotMissing :: S.HashSet Keycode@@ -378,10 +377,11 @@ , (KeyRightMeta, ["rmeta", "rmet"]) , (KeyBackspace, ["bks", "bspc"]) , (KeyCapsLock, ["caps"])- , (KeyGrave, ["grv"])- , (Key102nd, ["102d"])+ , (Key102nd, ["102d", "lsgt", "nubs"]) , (KeyForward, ["fwd"]) , (KeyScrollLock, ["scrlck", "slck"])+ , (KeyScrollUp, ["scrup", "sup"])+ , (KeyScrollDown, ["scrdn", "sdwn", "sdn"]) , (KeyPrint, ["prnt"]) , (KeyWakeUp, ["wkup"]) , (KeyLeft, ["lft"])@@ -389,7 +389,7 @@ , (KeyLeftBrace, ["lbrc", "["]) , (KeyRightBrace, ["rbrc", "]"]) , (KeySemicolon, ["scln", ";"])- , (KeyApostrophe, ["apos", "'"])+ , (KeyApostrophe, ["apos", "'", "apo"]) , (KeyGrave, ["grv", "`"]) , (KeyBackslash, ["bksl", "\\"]) -- NOTE: "\\" here is a 1char string, the first \ is consumed by Haskell as an escape character , (KeyComma, ["comm", ","])@@ -403,10 +403,15 @@ , (KeyKpMinus, ["kp-"]) , (KeyKpDot, ["kp."]) , (KeySysRq, ["ssrq", "sys"])+ , (KeyKbdIllumDown, ["bldn"])+ , (KeyKbdIllumUp, ["blup"])+ , (KeyNextSong, ["next"])+ , (KeyPlayPause, ["pp"])+ , (KeyPreviousSong, ["prev"]) #ifdef darwin_HOST_OS , (KeyLaunchpad, ["lp"]) , (KeyMissionCtrl, ["mctl"])- , (KeyBacklightDown, ["bldn"])- , (KeyBacklightUp, ["blup"])+ , (KeySpotlight, ["spot"])+ , (KeyDictation, ["dict"]) #endif ]
+ src/KMonad/Keyboard/Ops.hs view
@@ -0,0 +1,49 @@+module KMonad.Keyboard.Ops+ ( switch+ , keycode+ , mkKeyEvent+ , mkPress+ , mkRelease++ -- * Predicates+ , isPress+ , isRelease+ , isKeycode+ , isPressOf+ , isReleaseOf+ )+where++import KMonad.Prelude+import KMonad.Keyboard.Types+import KMonad.Keyboard.Keycode++++-- | Create a 'KeyEvent' that represents pressing a key+mkPress :: Keycode -> KeyEvent+mkPress = mkKeyEvent Press++-- | Create a 'KeyEvent' that represents releaseing a key+mkRelease :: Keycode -> KeyEvent+mkRelease = mkKeyEvent Release++-- | Return whether the provided KeyEvent is a Press+isPress :: KeyPred+isPress = (== Press) . view switch++-- | Return whether the provided KeyEvent is a Release+isRelease :: KeyPred+isRelease = not . isPress++-- | Return whether the provided KeyEvent matches a particular Keycode+isKeycode :: Keycode -> KeyPred+isKeycode c = (== c) . view keycode++-- | Returth whether the provided KeyEvent matches the release of the Keycode+isReleaseOf :: Keycode -> KeyPred+isReleaseOf = (==) . mkRelease++-- | Return whether the provided KeyEvent matches the press of the Keycode+isPressOf :: Keycode -> KeyPred+isPressOf = (==) . mkPress
+ src/KMonad/Keyboard/Types.hs view
@@ -0,0 +1,68 @@+{-# LANGUAGE DeriveAnyClass #-}+module KMonad.Keyboard.Types+ (+ Switch(..)+ , KeyEvent+ , mkKeyEvent+ , HasKeyEvent(..)+ , KeyPred+ , LayerTag+ , LMap+ )+where++import KMonad.Prelude+import KMonad.Keyboard.Keycode++import qualified KMonad.Util.LayerStack as Ls++--------------------------------------------------------------------------------+-- $event+--+-- An 'KeyEvent' in KMonad is either the 'Press' or 'Release' of a particular+-- 'Keycode'. A complete list of keycodes can be found in+-- "KMonad.Keyboard.Keycode".++-- | KMonad recognizes 2 different types of actions: presses and releases. Note+-- that we do not handle repeat events at all.+data Switch+ = Press+ | Release+ deriving (Eq, Ord, Show, Enum, Generic, Hashable)++-- | An 'KeyEvent' is a 'Switch' on a particular 'Keycode'+data KeyEvent = KeyEvent+ { _switch :: Switch -- ^ Whether the 'KeyEvent' was a 'Press' or 'Release'+ , _keycode :: Keycode -- ^ The 'Keycode' mapped to this 'KeyEvent'+ } deriving (Eq, Show, Generic, Hashable)+makeClassy ''KeyEvent++-- | Create a new 'KeyEvent' from a 'Switch' and a 'Keycode'+mkKeyEvent :: Switch -> Keycode -> KeyEvent+mkKeyEvent = KeyEvent++-- | A 'Display' instance for 'KeyEvent's that prints them out nicely.+instance Display KeyEvent where+ textDisplay a = tshow (a^.switch) <> " " <> textDisplay (a^.keycode)++-- | An 'Ord' instance, where Press > Release, and otherwise we 'Ord' on the+-- 'Keycode'+instance Ord KeyEvent where+ a `compare` b = case (a^.switch) `compare` (b^.switch) of+ EQ -> (a^.keycode) `compare` (b^.keycode)+ x -> x+++-- | Predicate on KeyEvent's+type KeyPred = KeyEvent -> Bool++--------------------------------------------------------------------------------+-- $lmap+--+-- Type aliases for specifying stacked-layer mappings++-- | Layers are identified by a tag that is simply a 'Text' value.+type LayerTag = Text++-- | 'LMap's are mappings from 'LayerTag'd maps from 'Keycode' to things.+type LMap a = Ls.LayerStack LayerTag Keycode a
+ src/KMonad/Model.hs view
@@ -0,0 +1,7 @@+module KMonad.Model+ ( module X )+where++import KMonad.Model.Action as X+import KMonad.Model.Button as X+import KMonad.Model.BEnv as X
+ src/KMonad/Model/Action.hs view
@@ -0,0 +1,243 @@+{-|+Module : KMonad.Model.Action+Description : Collection of basic operations+Copyright : (c) David Janssen, 2019+License : MIT+Maintainer : janssen.dhj@gmail.com+Stability : experimental+Portability : portable++KMonad is implemented as an engine that is capable of running 'MonadK' actions.+The logic of various different buttons and keyboard operations are expressed in+this 'MonadK'. This module defines the basic types and operations that make up+'MonadK'. The implementation of how KMonad implements 'MonadK' can be found in+the "KMonad.App" module.++NOTE: All of this is a bit muddled, and redoing the way hooks are handled, and+the basic structuring of MonadK and MonadKIO are liable to change soon.++-}+module KMonad.Model.Action+ (+ KeyPred+ , Catch(..)+ , Trigger(..)+ , Timeout(..)+ , HookLocation(..)+ , Hook(..)++ -- * Lenses+ , HasHook(..)+ , HasTimeout(..)+ , HasTrigger(..)++ -- * Layer operations+ -- $lop+ , LayerOp(..)++ -- * MonadK+ -- $monadk+ , MonadKIO(..)+ , MonadK(..)+ , AnyK+ , Action(..)++ -- * Constituted actions+ -- $combs+ , my+ , matchMy+ , after+ , whenDone+ , await+ , awaitMy+ , tHookF+ , hookF+ , within+ , withinHeld+ )++where++import KMonad.Prelude hiding (timeout)++import KMonad.Keyboard+import KMonad.Util++--------------------------------------------------------------------------------+-- $keyfun++-- | Boolean isomorph signalling wether an event should be caught or not+data Catch = Catch | NoCatch deriving (Show, Eq)++instance Semigroup Catch where+ NoCatch <> NoCatch = NoCatch+ _ <> _ = Catch++instance Monoid Catch where+ mempty = NoCatch++-- | The packet used to trigger a KeyFun, containing info about the event and+-- how long since the Hook was registered.+data Trigger = Trigger+ { _elapsed :: Milliseconds -- ^ Time elapsed since hook was registered+ , _event :: KeyEvent -- ^ The key event triggering this call+ }+makeClassy ''Trigger+++--------------------------------------------------------------------------------+-- $hook+--+-- The general structure of the 'Hook' record, that defines the most general way+-- of registering a 'KeyEvent' function.++-- | ADT signalling where to install a hook+data HookLocation+ = InputHook -- ^ Install the hook immediately after receiving a 'KeyEvent'+ | OutputHook -- ^ Install the hook just before emitting a 'KeyEvent'+ deriving (Eq, Show)++-- | A 'Timeout' value describes how long to wait and what to do upon timeout+data Timeout m = Timeout+ { _delay :: Milliseconds -- ^ Delay before timeout action is triggered+ , _action :: m () -- ^ Action to perform upon timeout+ }+makeClassy ''Timeout++-- | The content for 1 key hook+data Hook m = Hook+ { _hTimeout :: Maybe (Timeout m) -- ^ Optional timeout machinery+ , _keyH :: Trigger -> m Catch -- ^ The function to call on the next 'KeyEvent'+ }+makeClassy ''Hook+++--------------------------------------------------------------------------------+-- $lop+--+-- Operations that manipulate the layer-stack++-- | 'LayerOp' describes all the different layer-manipulations that KMonad+-- supports.+data LayerOp+ = PushLayer LayerTag -- ^ Add a layer to the top of the stack+ | PopLayer LayerTag -- ^ Remove the first occurence of a layer+ | SetBaseLayer LayerTag -- ^ Change the base-layer+++--------------------------------------------------------------------------------+-- $monadk+--+-- The fundamental components that make up any 'KMonad.Model.Button.Button' operation.++-- | 'MonadK' contains all the operations used to constitute button actions. It+-- encapsulates all the side-effects required to get everything running.+class Monad m => MonadKIO m where+ -- | Emit a KeyEvent to the OS+ emit :: KeyEvent -> m ()+ -- | Pause the current thread for n milliseconds+ pause :: Milliseconds -> m ()+ -- | Pause or unpause event processing+ hold :: Bool -> m ()+ -- | Register a callback hook+ register :: HookLocation -> Hook m -> m ()+ -- | Run a layer-stack manipulation+ layerOp :: LayerOp -> m ()+ -- | Insert an event in the input queue+ inject :: KeyEvent -> m ()+ -- | Run a shell-command+ shellCmd :: Text -> m ()++-- | 'MonadKIO' contains the additional bindings that get added when we are+-- currently processing a button.+class MonadKIO m => MonadK m where+ -- | Access the keycode to which the current button is bound+ myBinding :: m Keycode++-- | Type alias for `any monad that can perform MonadK actions`+type AnyK a = forall m. MonadK m => m a++-- | A newtype wrapper used to construct 'MonadK' actions+newtype Action = Action { runAction :: AnyK ()}++--------------------------------------------------------------------------------+-- $util++-- | Create a KeyEvent matching pressing or releasing of the current button.+my :: MonadK m => Switch -> m KeyEvent+my s = mkKeyEvent s <$> myBinding++-- | Register a simple hook without a timeout+hookF :: MonadKIO m => HookLocation -> (KeyEvent -> m Catch) -> m ()+hookF l f = register l . Hook Nothing $ \t -> f (t^.event)++-- | Register a hook with a timeout+tHookF :: MonadK m+ => HookLocation -- ^ Where to install the hook+ -> Milliseconds -- ^ The timeout delay for the hook+ -> m () -- ^ The action to perform on timeout+ -> (Trigger -> m Catch) -- ^ The action to perform on trigger+ -> m () -- ^ The resulting action+tHookF l d a f = register l $ Hook (Just $ Timeout d a) f++-- | Perform an action after a period of time has elapsed+--+-- This is essentially just a way to perform async actions using the KMonad hook+-- system.+after :: MonadK m+ => Milliseconds+ -> m ()+ -> m ()+after d a = do+ let rehook t = after (d - t^.elapsed) a $> NoCatch+ tHookF InputHook d a rehook++-- | Perform an action immediately after the current action is finished. NOTE:+-- there is no guarantee that another event doesn't outrace this, only that it+-- will happen as soon as the CPU gets to it.+whenDone :: MonadK m+ => m ()+ -> m ()+whenDone = after 0+++-- | Create a KeyPred that matches the Press or Release of the current button.+matchMy :: MonadK m => Switch -> m KeyPred+matchMy s = (==) <$> my s++-- | Wait for an event to match a predicate and then execute an action+await :: MonadKIO m => KeyPred -> (KeyEvent -> m Catch) -> m ()+await p a = hookF InputHook $ \e -> if p e+ then a e+ else await p a $> NoCatch++-- | Execute an action on the detection of the Switch of the active button.+awaitMy :: MonadK m => Switch -> m Catch -> m ()+awaitMy s a = matchMy s >>= flip await (const a)++-- | Try to call a function on a succesful match of a predicate within a certain+-- time period. On a timeout, perform an action.+within :: MonadK m+ => Milliseconds -- ^ The time within which this filter is active+ -> m KeyPred -- ^ The predicate used to find a match+ -> m () -- ^ The action to call on timeout+ -> (Trigger -> m Catch) -- ^ The action to call on a succesful match+ -> m () -- ^ The resulting action+within d p a f = do+ p' <- p+ -- define f' to run action on predicate match, or rehook on predicate mismatch+ let f' t = if p' (t^.event)+ then f t+ else within (d - t^.elapsed) p a f $> NoCatch+ tHookF InputHook d a f'++-- | Like `within`, but acquires a hold when starting, and releases when done+withinHeld :: MonadK m+ => Milliseconds -- ^ The time within which this filter is active+ -> m KeyPred -- ^ The predicate used to find a match+ -> m () -- ^ The action to call on timeout+ -> (Trigger -> m Catch) -- ^ The action to call on a succesful match+ -> m () -- ^ The resulting action+withinHeld d p a f = do+ hold True+ within d p (a <* hold False) (\x -> f x <* hold False)
+ src/KMonad/Model/BEnv.hs view
@@ -0,0 +1,63 @@+{-|+Module : KMonad.Model.BEnv+Description : Implementation details behind 'Button'+Copyright : (c) David Janssen, 2019+License : MIT+Maintainer : janssen.dhj@gmail.com+Stability : experimental+Portability : portable++When running KMonad, we need to keep track the last switchstate of a 'Button',+because we only allowing switching, (we have to filter out repeated 'Press' or+'Release' events). Additionally, we keep track of what 'Keycode' a button is+bound to, to provide the 'myBinding' functionality from 'MonadK'.++-}++module KMonad.Model.BEnv+ ( BEnv(..)+ , HasBEnv(..)+ , initBEnv+ , runBEnv+ )+where++import KMonad.Prelude++import KMonad.Model.Action+import KMonad.Model.Button+import KMonad.Keyboard++--------------------------------------------------------------------------------+-- $benv+--+-- When running KMonad, a button also keeps track of what keycode it's bound to,+-- and what its last switch was. This is used to provide the 'myBinding' feature+-- of MonadK, and the invariant that switches always alternate (there is no+-- press-press or release-release).++-- | The configuration of a 'Button' with some additional state to keep track of+-- the last 'Switch'+data BEnv = BEnv+ { _beButton :: !Button -- ^ The configuration for this button+ , _binding :: !Keycode -- ^ The 'Keycode' to which this button is bound+ , _lastSwitch :: !(MVar Switch) -- ^ State to keep track of last manipulation+ }+makeClassy ''BEnv++instance HasButton BEnv where button = beButton++-- | Initialize a 'BEnv', note that a key is always initialized in an unpressed+-- state.+initBEnv :: MonadIO m => Button -> Keycode -> m BEnv+initBEnv b c = BEnv b c <$> newMVar Release++-- | Try to switch a 'BEnv'. This only does something if the 'Switch' is+-- different from the 'lastSwitch' field. I.e. pressing a pressed button or+-- releasing a released button does nothing.+runBEnv :: MonadUnliftIO m => BEnv -> Switch -> m (Maybe Action)+runBEnv b a =+ modifyMVar (b^.lastSwitch) $ \l -> pure $ case (a, l) of+ (Press, Release) -> (Press, Just $ b^.pressAction)+ (Release, Press) -> (Release, Just $ b^.releaseAction)+ _ -> (a, Nothing)
+ src/KMonad/Model/Button.hs view
@@ -0,0 +1,497 @@+{-|+Module : KMonad.Model.Button+Description : How buttons work+Copyright : (c) David Janssen, 2019+License : MIT+Maintainer : janssen.dhj@gmail.com+Stability : experimental+Portability : portable++A button contains 2 actions, one to perform on press, and another to perform on+release. This module contains that definition, and some helper code that helps+combine buttons. It is here that most of the complicated` buttons are+implemented (like TapHold).++-}+module KMonad.Model.Button+ ( -- * Button basics+ -- $but+ Button+ , HasButton(..)+ , onPress+ , onRelease+ , mkButton+ , around+ , tapOn++ -- * Simple buttons+ -- $simple+ , emitB+ , pressOnly+ , releaseOnly+ , modded+ , layerToggle+ , layerSwitch+ , layerAdd+ , layerRem+ , pass+ , cmdButton++ -- * Button combinators+ -- $combinators+ , aroundNext+ , aroundNextTimeout+ , aroundNextSingle+ , beforeAfterNext+ , layerDelay+ , layerNext+ , tapHold+ , multiTap+ , tapNext+ , tapHoldNext+ , tapNextRelease+ , tapHoldNextRelease+ , tapNextPress+ , tapMacro+ , tapMacroRelease+ , stickyKey+ )+where++import KMonad.Prelude++import KMonad.Model.Action+import KMonad.Keyboard+import KMonad.Util+++--------------------------------------------------------------------------------+-- $but+--+-- This section contains the basic definition of KMonad's 'Button' datatype. A+-- 'Button' is essentially a collection of 2 different actions, 1 to perform on+-- 'Press' and another on 'Release'.++-- | A 'Button' consists of two 'MonadK' actions, one to take when a press is+-- registered from the OS, and another when a release is registered.+data Button = Button+ { _pressAction :: !Action -- ^ Action to take when pressed+ , _releaseAction :: !Action -- ^ Action to take when released+ }+makeClassy ''Button++-- | Create a 'Button' out of a press and release action+--+-- NOTE: Since 'AnyK' is an existentially qualified 'MonadK', the monadic+-- actions specified must be runnable by all implementations of 'MonadK', and+-- therefore can only rely on functionality from 'MonadK'. I.e. the actions must+-- be pure 'MonadK'.+mkButton :: AnyK () -> AnyK () -> Button+mkButton a b = Button (Action a) (Action b)++-- | Create a new button with only a 'Press' action+onPress :: AnyK () -> Button+onPress p = mkButton p $ pure ()++onRelease :: AnyK () -> Button+onRelease = mkButton (pure ())++--------------------------------------------------------------------------------+-- $running+--+-- Triggering the actions stored in a 'Button'.++-- | Perform both the press and release of a button immediately+tap :: MonadK m => Button -> m ()+tap b = do+ runAction $ b^.pressAction+ runAction $ b^.releaseAction++-- | Perform the press action of a Button and register its release callback.+--+-- This performs the action stored in the 'pressAction' field and registers a+-- callback that will trigger the 'releaseAction' when the release is detected.+press :: MonadK m => Button -> m ()+press b = do+ runAction $ b^.pressAction+ awaitMy Release $ do+ runAction $ b^.releaseAction+ pure Catch++--------------------------------------------------------------------------------+-- $simple+--+-- A collection of simple buttons. These are basically almost direct wrappings+-- around 'MonadK' functionality.++-- | A button that emits a Press of a keycode when pressed, and a release when+-- released.+emitB :: Keycode -> Button+emitB c = mkButton+ (emit $ mkPress c)+ (emit $ mkRelease c)++-- | A button that emits only a Press of a keycode.+pressOnly :: Keycode -> Button+pressOnly c = onPress $ emit $ mkPress c++-- | A button that emits only a Release of a keycode.+releaseOnly :: Keycode -> Button+releaseOnly c = onPress $ emit $ mkRelease c++-- | Create a new button that first presses a 'Keycode' before running an inner+-- button, releasing the 'Keycode' again after the inner 'Button' is released.+modded ::+ Keycode -- ^ The 'Keycode' to `wrap around` the inner button+ -> Button -- ^ The button to nest inside `being modded`+ -> Button+modded modder = around (emitB modder)++-- | Create a button that toggles a layer on and off+layerToggle :: LayerTag -> Button+layerToggle t = mkButton+ (layerOp $ PushLayer t)+ (layerOp $ PopLayer t)++-- | Create a button that switches the base-layer on a press+layerSwitch :: LayerTag -> Button+layerSwitch t = onPress (layerOp $ SetBaseLayer t)++-- | Create a button that adds a layer on a press+layerAdd :: LayerTag -> Button+layerAdd t = onPress (layerOp $ PushLayer t)++-- | Create a button that removes the top instance of a layer on a press+layerRem :: LayerTag -> Button+layerRem t = onPress (layerOp $ PopLayer t)++-- | Create a button that does nothing (but captures the input)+pass :: Button+pass = onPress $ pure ()++-- | Create a button that executes a shell command on press and possibly on+-- release+cmdButton :: Text -> Maybe Text -> Button+cmdButton pr mbR = mkButton (shellCmd pr) (maybe (pure ()) shellCmd mbR)++--------------------------------------------------------------------------------+-- $combinators+--+-- Functions that take 'Button's and combine them to form new 'Button's.++-- | Create a new button from 2 buttons, an inner and an outer. When the new+-- button is pressed, first the outer is pressed, then the inner. On release,+-- the inner is released first, and then the outer.+around ::+ Button -- ^ The outer 'Button'+ -> Button -- ^ The inner 'Button'+ -> Button -- ^ The resulting nested 'Button'+around outer inner = Button+ (Action (runAction (outer^.pressAction) *> runAction (inner^.pressAction)))+ (Action (runAction (inner^.releaseAction) *> runAction (outer^.releaseAction)))++-- | A 'Button' that, once pressed, will surround the next button with another.+--+-- Think of this as, essentially, a tappable mod. For example, an 'aroundNext+-- KeyCtrl' would, once tapped, then make the next keypress C-<whatever>.+aroundNext ::+ Button -- ^ The outer 'Button'+ -> Button -- ^ The resulting 'Button'+aroundNext b = onPress $ await isPress $ \e -> do+ runAction $ b^.pressAction+ await (isReleaseOf $ e^.keycode) $ \_ -> do+ runAction $ b^.releaseAction+ pure NoCatch+ pure NoCatch++-- | A 'Button' that, once pressed, will surround the next button within some timeout with another.+--+-- If some other key is not pressed within an interval another button will be triggered as a tap.+aroundNextTimeout ::+ Milliseconds -- ^ How long before we tap+ -> Button -- ^ The 'Button' to use to surround next+ -> Button -- ^ The 'Button' to tap on timeout+ -> Button -- ^ The resulting button+aroundNextTimeout d b t = onPress $ within d (pure isPress) (tap t) $ \trig -> do+ runAction $ b^.pressAction+ await (isReleaseOf $ trig^.event.keycode) $ \_ -> do+ runAction $ b^.releaseAction+ pure NoCatch+ pure NoCatch++-- | A 'Button' that, once pressed, will surround the next button with another.+--+-- Think of this as, essentially, a tappable mod. For example, an 'aroundNext+-- KeyCtrl' would, once tapped, then make the next keypress C-<whatever>.+--+-- This differs from 'aroundNext' in that it explicitly releases the modifier+-- immediately after the first event, where `aroundSingle` waits around for the+-- original key that was modified to be released itself.+aroundNextSingle ::+ Button -- ^ The outer 'Button'+ -> Button -- ^ The resulting 'Button'+aroundNextSingle b = onPress $ await isPress $ \_ -> do+ runAction $ b^.pressAction+ -- Wait for the next *event*, regardless of what it is+ await (pure True) $ \_ -> do+ runAction $ b^.releaseAction+ pure NoCatch+ pure NoCatch++-- | Create a new button that performs both a press and release of the input+-- button on just a press or release+tapOn ::+ Switch -- ^ Which 'Switch' should trigger the tap+ -> Button -- ^ The 'Button' to tap+ -> Button -- ^ The tapping 'Button'+tapOn Press b = mkButton (tap b) (pure ())+tapOn Release b = mkButton (pure ()) (tap b)++-- | Create a 'Button' that performs a tap of one button if it is released+-- within an interval. If the interval is exceeded, press the other button (and+-- release it when a release is detected).+tapHold :: Milliseconds -> Button -> Button -> Button+tapHold ms t h = onPress $ withinHeld ms (matchMy Release)+ (press h) -- If we catch timeout before release+ (const $ tap t $> Catch) -- If we catch release before timeout++-- | Create a 'Button' that performs a tap of 1 button if the next event is its+-- own release, or else switches to holding some other button if the next event+-- is a different keypress.+tapNext :: Button -> Button -> Button+tapNext t h = onPress $ hookF InputHook $ \e -> do+ p <- matchMy Release+ if p e+ then tap t $> Catch+ else press h $> NoCatch++-- | Like 'tapNext', except that after some interval it switches anyways+tapHoldNext :: Milliseconds -> Button -> Button -> Maybe Button -> Button+tapHoldNext ms t h mtb = onPress $ within ms (pure $ const True) onTimeout $ \tr -> do+ p <- matchMy Release+ if p $ tr^.event+ then tap t $> Catch+ else press h $> NoCatch+ where+ onTimeout :: MonadK m => m ()+ onTimeout = press $ fromMaybe h mtb++-- | Surround some future button with a before and after tap+beforeAfterNext :: Button -> Button -> Button+beforeAfterNext b a = onPress $ do+ tap b+ await isPress $ \e -> do+ await (isReleaseOf $ e^.keycode) $ \_ -> do+ tap a+ pure NoCatch+ pure NoCatch+++-- | Create a tap-hold style button that makes its decision based on the next+-- detected release in the following manner:+-- 1. It is the release of this button: We are tapping+-- 2. It is of some other button that was pressed *before* this one, ignore.+-- 3. It is of some other button that was pressed *after* this one, we hold.+--+-- It does all of this while holding processing of other buttons, so time will+-- get rolled back like a TapHold button.+tapNextRelease :: Button -> Button -> Button+tapNextRelease t h = onPress $ do+ hold True+ go []+ where+ go :: MonadK m => [Keycode] -> m ()+ go ks = hookF InputHook $ \e -> do+ p <- matchMy Release+ let isRel = isRelease e+ if+ -- If the next event is my own release: we act as if we were tapped+ | p e -> doTap+ -- If the next event is the release of some button that was held after me+ -- we act as if we were held+ | isRel && (e^.keycode `elem` ks) -> doHold e+ -- Else, if it is a press, store the keycode and wait again+ | not isRel -> go ((e^.keycode):ks) $> NoCatch+ -- Else, if it is a release of some button held before me, just ignore+ | otherwise -> go ks $> NoCatch++ -- Behave like a tap is simple: tap the button `t` and release processing+ doTap :: MonadK m => m Catch+ doTap = tap t *> hold False $> Catch++ -- Behave like a hold is not simple: first we release the processing hold,+ -- then we catch the release of ButtonX that triggered this action, and then+ -- we rethrow this release.+ doHold :: MonadK m => KeyEvent -> m Catch+ doHold e = press h *> hold False *> inject e $> Catch++++-- | Create a tap-hold style button that makes its decision based on the next+-- detected release in the following manner:+-- 1. It is the release of this button: We are tapping+-- 2. It is of some other button that was pressed *before* this one, ignore.+-- 3. It is of some other button that was pressed *after* this one, we hold.+--+-- If we encounter the timeout before any other release, we switch to the+-- specified timeout button, or to the hold button if none is specified.+--+-- It does all of this while holding processing of other buttons, so time will+-- get rolled back like a TapHold button.+tapHoldNextRelease :: Milliseconds -> Button -> Button -> Maybe Button -> Button+tapHoldNextRelease ms t h mtb = onPress $ do+ hold True+ go ms []+ where++ go :: MonadK m => Milliseconds -> [Keycode] -> m ()+ go ms' ks = tHookF InputHook ms' onTimeout $ \r -> do+ p <- matchMy Release+ let e = r^.event+ let isRel = isRelease e+ if+ -- If the next event is my own release: act like tapped+ | p e -> onRelSelf+ -- If the next event is another release that was pressed after me+ | isRel && (e^.keycode `elem` ks) -> onRelOther e+ -- If the next event is a press, store and recurse+ | not isRel -> go (ms' - r^.elapsed) (e^.keycode : ks) $> NoCatch+ -- If the next event is a release of some button pressed before me, recurse+ | otherwise -> go (ms' - r^.elapsed) ks $> NoCatch++ onTimeout :: MonadK m => m ()+ onTimeout = press (fromMaybe h mtb) *> hold False++ onRelSelf :: MonadK m => m Catch+ onRelSelf = tap t *> hold False $> Catch++ onRelOther :: MonadK m => KeyEvent -> m Catch+ onRelOther e = press h *> hold False *> inject e $> Catch++-- | Create a button just like tap-release, but also trigger a hold on presses:+-- 1. It is the release of this button: We are tapping+-- 2. It is the press of some other button, we hold+-- 3. It is the release of some other button, ignore.+tapNextPress :: Button -> Button -> Button+tapNextPress t h = onPress go+ where+ go :: MonadK m => m ()+ go = hookF InputHook $ \e -> do+ p <- matchMy Release+ if+ -- If the next event is my own release: we act as if we were tapped+ | p e -> doTap+ -- If the next event is a press: we act as if we were held+ | isPress e -> doHold e+ -- Else, if it is a release of some other button, just ignore+ | otherwise -> go $> NoCatch++ -- Behave like a tap+ doTap :: MonadK m => m Catch+ doTap = tap t $> Catch++ -- Behave like a hold:+ -- We catch the event of ButtonX that triggered this action, and then+ -- we rethrow this event after holding.+ doHold :: MonadK m => KeyEvent -> m Catch+ doHold e = press h *> inject e $> Catch++-- | Create a 'Button' that contains a number of delays and 'Button's. As long+-- as the next press is registered before the timeout, the multiTap descends+-- into its list. The moment a delay is exceeded or immediately upon reaching+-- the last button, that button is pressed.+multiTap :: Button -> [(Milliseconds, Button)] -> Button+multiTap l bs = onPress $ go bs+ where+ go :: [(Milliseconds, Button)] -> AnyK ()+ go [] = press l+ go ((ms, b):bs') = do+ -- This is a bit complicated. What we do is:+ -- 1. We wait for an event+ -- 2A. If it doesn't occur in the interval we press the button from the+ -- list and we are done.+ -- 2B. If we do detect the release of the key that triggered this action,+ -- we must now keep waiting to detect another press.+ -- 2C. If we detect another (unrelated) press event we cancel the+ -- remaining of the multi-tap sequence and trigger a tap on the+ -- current button of the sequence.+ -- 3A. After 2B, if we do not detect a press before the interval is up,+ -- we know a tap occurred, so we tap the current button and we are+ -- done.+ -- 3B. If we detect another press of the same key, then the user is+ -- descending into the buttons tied to this multi-tap, so we recurse+ -- on the remaining buttons.+ -- 3C. If we detect any other (unrelated) press event, then the multi-tap+ -- sequence is cancelled like in 2C. We trigger a tap of the current+ -- button of the sequence.+ let doNext pred onTimeout next ms = tHookF InputHook ms onTimeout $ \t -> do+ pr <- pred+ if | pr (t^.event) -> next (ms - t^.elapsed) $> Catch+ | isPress (t^.event) -> tap b $> NoCatch+ | otherwise -> pure NoCatch+ doNext (matchMy Release)+ (press b)+ (doNext (matchMy Press) (tap b) (\_ -> go bs'))+ ms++-- | Create a 'Button' that performs a series of taps on press. Note that the+-- last button is only released when the tapMacro itself is released.+tapMacro :: [Button] -> Button+tapMacro bs = onPress $ go bs+ where+ go [] = pure ()+ go [b] = press b+ go (b:rst) = tap b >> go rst++-- | Create a 'Button' that performs a series of taps on press,+-- except for the last Button, which is tapped on release.+tapMacroRelease :: [Button] -> Button+tapMacroRelease bs = onPress $ go bs+ where+ go [] = pure ()+ go [b] = awaitMy Release $ tap b >> pure Catch+ go (b:rst) = tap b >> go rst++-- | Switch to a layer for a period of time, then automatically switch back+layerDelay :: Milliseconds -> LayerTag -> Button+layerDelay d t = onPress $ do+ layerOp (PushLayer t)+ after d (layerOp $ PopLayer t)++-- | Switch to a layer for the next button-press and switch back automaically.+--+-- NOTE: liable to change, this is essentially just `aroundNext` and+-- `layerToggle` combined.+layerNext :: LayerTag -> Button+layerNext t = onPress $ do+ layerOp (PushLayer t)+ await isPress (\_ -> whenDone (layerOp $ PopLayer t) $> NoCatch)++-- | Make a button into a sticky-key, i.e. a key that acts like it is+-- pressed for the button after it if that button was pressed in the+-- given timeframe.+stickyKey :: Milliseconds -> Button -> Button+stickyKey ms b = onPress go+ where+ go :: MonadK m => m ()+ go = hookF InputHook $ \e -> do+ p <- matchMy Release+ if | p e -> doTap $> Catch+ -- My own release; we act as if we were tapped+ | not (isRelease e) -> doHold e $> Catch+ -- The press of another button; act like we are held down+ | otherwise -> go $> NoCatch+ -- The release of some other button; ignore these++ doHold :: MonadK m => KeyEvent -> m ()+ doHold e = press b *> inject e++ doTap :: MonadK m => m ()+ doTap =+ within ms+ (pure isPress) -- presses definitely happen after us+ (pure ())+ (\t -> runAction (b^.pressAction)+ *> inject (t^.event)+ *> after 3 (runAction $ b^.releaseAction)+ $> Catch)
+ src/KMonad/Model/Dispatch.hs view
@@ -0,0 +1,114 @@+{-+Module : KMonad.Model.Dispatch+Description : Component for async reading.+Copyright : (c) David Janssen, 2019+License : MIT+Maintainer : janssen.dhj@gmail.com+Stability : experimental+Portability : portable++The 'Dispatch' component of the app-loop solves the following problem: we might+at some point during execution be in the following situation:+- We have set our processing to held+- There is a timer running that might unhold at any point+- We are awaiting a key from the OS++This means we need to be able to:+1. Await events from some kind of rerun buffer+2. Await events from the OS+3. Do both of these things without ever entering a race-condition where we lose+ an event because both 1. and 2. happen at exactly the same time.++The Dispatch component provides the ability to read events from some IO action+while at the same time providing a method to write events into the Dispatch,+sending them to the head of the read-queue, while guaranteeing that no events+ever get lost.++In the sequencing of components, the 'Dispatch' occurs first, which means that+it reads directly from the KeySource. Any component after the 'Dispatch' need+not worry about wether an event is being rerun or not, it simply treats all+events as equal.++-}+module KMonad.Model.Dispatch+ ( -- $env+ Dispatch+ , mkDispatch++ -- $op+ , pull+ , rerun+ )+where++import KMonad.Prelude+import KMonad.Keyboard++import RIO.Seq (Seq(..), (><))+import qualified RIO.Seq as Seq+import qualified RIO.Text as T++--------------------------------------------------------------------------------+-- $env+--+-- The 'Dispatch' environment, describing what values are required to perform+-- the Dispatch operations, and constructors for creating such an environment.++-- | The 'Dispatch' environment+data Dispatch = Dispatch+ { _eventSrc :: IO KeyEvent -- ^ How to read 1 event+ , _readProc :: TMVar (Async KeyEvent) -- ^ Store for reading process+ , _rerunBuf :: TVar (Seq KeyEvent) -- ^ Buffer for rerunning events+ }+makeLenses ''Dispatch++-- | Create a new 'Dispatch' environment+mkDispatch' :: MonadUnliftIO m => m KeyEvent -> m Dispatch+mkDispatch' s = withRunInIO $ \u -> do+ rpc <- newEmptyTMVarIO+ rrb <- newTVarIO Seq.empty+ pure $ Dispatch (u s) rpc rrb++-- | Create a new 'Dispatch' environment in a 'ContT' environment+mkDispatch :: MonadUnliftIO m => m KeyEvent -> ContT r m Dispatch+mkDispatch = lift . mkDispatch'++--------------------------------------------------------------------------------+-- $op+--+-- The supported 'Dispatch' operations.++-- | Return the next event, this will return either (in order of precedence):+-- 1. The next item to be rerun+-- 2. A new item read from the OS+-- 3. Pausing until either 1. or 2. triggers+pull :: (HasLogFunc e) => Dispatch -> RIO e KeyEvent+pull d = do+ -- Check for an unfinished read attempt started previously. If it exists,+ -- fetch it, otherwise, start a new read attempt.+ a <- atomically (tryTakeTMVar $ d^.readProc) >>= \case+ Nothing -> async . liftIO $ d^.eventSrc+ Just a' -> pure a'++ -- First try reading from the rerunBuf, or failing that, from the+ -- read-process. If both fail we enter an STM race.+ atomically ((Left <$> popRerun) `orElse` (Right <$> waitSTM a)) >>= \case+ -- If we take from the rerunBuf, put the running read-process back in place+ Left e' -> do+ logDebug $ "\n" <> display (T.replicate 80 "-")+ <> "\nRerunning event: " <> display e'+ atomically $ putTMVar (d^.readProc) a+ pure e'+ Right e' -> pure e'++ where+ -- Pop the head off the rerun-buffer (or 'retrySTM' if empty)+ popRerun = readTVar (d^.rerunBuf) >>= \case+ Seq.Empty -> retrySTM+ (e :<| b) -> do+ writeTVar (d^.rerunBuf) b+ pure e++-- | Add a list of elements to be rerun.+rerun :: (HasLogFunc e) => Dispatch -> [KeyEvent] -> RIO e ()+rerun d es = atomically $ modifyTVar (d^.rerunBuf) (>< Seq.fromList es)
+ src/KMonad/Model/Hooks.hs view
@@ -0,0 +1,199 @@+{-|+Module : KMonad.Model.Hooks+Description : Component for handling hooks+Copyright : (c) David Janssen, 2019+License : MIT+Maintainer : janssen.dhj@gmail.com+Stability : experimental+Portability : portable++Part of the KMonad deferred-decision mechanics are implemented using hooks,+which will call predicates and actions on future keypresses and/or timer events.+The 'Hooks' component is the concrete implementation of this functionality.++In the sequencing of components, this happens second, right after the+'KMonad.App.Dispatch.Dispatch' component.++-}+module KMonad.Model.Hooks+ ( Hooks+ , mkHooks+ , pull+ , register+ )+where++import KMonad.Prelude++import Data.Time.Clock.System+import Data.Unique++import KMonad.Model.Action hiding (register)+import KMonad.Keyboard+import KMonad.Util++import RIO.Partial (fromJust)++import qualified RIO.HashMap as M++--------------------------------------------------------------------------------+-- $hooks++++-- -- | A 'Hook' contains the 'KeyPred' and 'Callback'+-- newtype Hook = Hook (KeyPred, Callback IO)+-- makeWrapped ''Hook++-- -- | Create a new 'Hook' value+-- mkHook :: MonadUnliftIO m => KeyPred -> Callback m -> m Hook+-- mkHook p c = withRunInIO $ \u -> pure $ Hook (p, (u . c))++--------------------------------------------------------------------------------+-- $env++data Entry = Entry+ { _time :: SystemTime+ , _eHook :: Hook IO+ }+makeLenses ''Entry++instance HasHook Entry IO where hook = eHook++type Store = M.HashMap Unique Entry++-- | The 'Hooks' environment that is required for keeping track of all the+-- different targets and callbacks.+data Hooks = Hooks+ { _eventSrc :: IO KeyEvent -- ^ Where we get our events from+ , _injectTmr :: TMVar Unique -- ^ Used to signal timeouts+ , _hooks :: TVar Store -- ^ Store of hooks+ }+makeLenses ''Hooks++-- | Create a new 'Hooks' environment which reads events from the provided action+mkHooks' :: MonadUnliftIO m => m KeyEvent -> m Hooks+mkHooks' s = withRunInIO $ \u -> do+ itr <- newEmptyTMVarIO+ hks <- newTVarIO M.empty+ pure $ Hooks (u s) itr hks++-- | Create a new 'Hooks' environment, but as a 'ContT' monad to avoid nesting+mkHooks :: MonadUnliftIO m => m KeyEvent -> ContT r m Hooks+mkHooks = lift . mkHooks'++-- | Convert a hook in some UnliftIO monad into an IO version, to store it in Hooks+ioHook :: MonadUnliftIO m => Hook m -> m (Hook IO)+ioHook h = withRunInIO $ \u -> do++ t <- case _hTimeout h of+ Nothing -> pure Nothing+ Just t' -> pure . Just $ Timeout (t'^.delay) (u (_action t'))+ let f e = u $ _keyH h e+ pure $ Hook t f+++--------------------------------------------------------------------------------+-- $op+--+-- The following code deals with simple operations on the environment, like+-- inserting and removing hooks.++-- | Insert a hook, along with the current time, into the store+register :: (HasLogFunc e)+ => Hooks+ -> Hook (RIO e)+ -> RIO e ()+register hs h = do+ -- Insert an entry into the store+ tag <- liftIO newUnique+ e <- Entry <$> liftIO getSystemTime <*> ioHook h+ atomically $ modifyTVar (hs^.hooks) (M.insert tag e)+ -- If the hook has a timeout, start a thread that will signal timeout+ case h^.hTimeout of+ Nothing -> logDebug $ "Registering untimed hook: " <> display (hashUnique tag)+ Just t' -> void . async $ do+ logDebug $ "Registering " <> display (t'^.delay)+ <> "ms hook: " <> display (hashUnique tag)+ threadDelay $ 1000 * fromIntegral (t'^.delay)+ atomically $ putTMVar (hs^.injectTmr) tag++-- | Cancel a hook by removing it from the store+cancelHook :: (HasLogFunc e)+ => Hooks+ -> Unique+ -> RIO e ()+cancelHook hs tag = do+ e <- atomically $ do+ m <- readTVar $ hs^.hooks+ let v = M.lookup tag m+ when (isJust v) $ modifyTVar (hs^.hooks) (M.delete tag)+ pure v+ case e of+ Nothing ->+ logDebug $ "Tried cancelling expired hook: " <> display (hashUnique tag)+ Just e' -> do+ logDebug $ "Cancelling hook: " <> display (hashUnique tag)+ liftIO $ e' ^. hTimeout . to fromJust . action+++--------------------------------------------------------------------------------+-- $run+--+-- The following code deals with how we check hooks against incoming events, and+-- how this updates the 'Hooks' environment.++-- | Run the function stored in a Hook on the event and the elapsed time+runEntry :: MonadIO m => SystemTime -> KeyEvent -> Entry -> m Catch+runEntry t e v = liftIO $ do+ (v^.keyH) $ Trigger ((v^.time) `tDiff` t) e++-- | Run all hooks on the current event and reset the store+runHooks :: (HasLogFunc e)+ => Hooks+ -> KeyEvent+ -> RIO e (Maybe KeyEvent)+runHooks hs e = do+ logDebug "Running hooks"+ m <- atomically $ swapTVar (hs^.hooks) M.empty+ now <- liftIO getSystemTime+ foldMapM (runEntry now e) (M.elems m) >>= \case+ Catch -> pure Nothing+ NoCatch -> pure $ Just e+++--------------------------------------------------------------------------------+-- $loop+--+-- The following code deals with how to use the 'Hooks' component as part of a+-- pull-chain. It contains logic for how to try to pull events from upstream and+-- check them against the hooks, and for how to keep stepping until an unhandled+-- event comes through.++-- | Pull 1 event from the '_eventSrc'. If that action is not caught by any+-- callback, then return it (otherwise return Nothing). At the same time, keep+-- reading the timer-cancellation inject point and handle any cancellation as it+-- comes up.+step :: (HasLogFunc e)+ => Hooks -- ^ The 'Hooks' environment+ -> RIO e (Maybe KeyEvent) -- ^ An action that returns perhaps the next event+step h = do++ -- Asynchronously start reading the next event+ a <- async . liftIO $ h^.eventSrc++ -- Handle any timer event first, and then try to read from the source+ let next = (Left <$> takeTMVar (h^.injectTmr)) `orElse` (Right <$> waitSTM a)++ -- Keep taking and cancelling timers until we encounter a key event, then run+ -- the hooks on that event.+ let read = atomically next >>= \case+ Left t -> cancelHook h t >> read -- We caught a cancellation+ Right e -> runHooks h e -- We caught a real event+ read++-- | Keep stepping until we succesfully get an unhandled 'KeyEvent'+pull :: HasLogFunc e+ => Hooks+ -> RIO e KeyEvent+pull h = step h >>= maybe (pull h) pure
+ src/KMonad/Model/Keymap.hs view
@@ -0,0 +1,124 @@+{-|+Module : KMonad.Model.Keymap+Description : Implementation of mapping key-presses to button actions+Copyright : (c) David Janssen, 2019+License : MIT+Maintainer : janssen.dhj@gmail.com+Stability : experimental+Portability : portable++In KMonad we handle all releases (and some other actions) via callback+mechanisms. It is the button-presses that get handled through a keymap. It is+the 'Keymap' component that manages the keymap state and ensures that+incoming events are mapped to++-}+module KMonad.Model.Keymap+ ( Keymap+ , mkKeymap+ , layerOp+ , lookupKey+ )+where+++import KMonad.Prelude++import KMonad.Model.Action hiding (layerOp)+import KMonad.Model.Button+import KMonad.Keyboard+import KMonad.Model.BEnv++import qualified KMonad.Util.LayerStack as Ls++--------------------------------------------------------------------------------+-- $env+--+++-- | The 'Keymap' environment containing the current keymap+--+-- NOTE: Since the 'Keymap' will never have to deal with anything+-- asynchronously we can simply use 'IORef's here.+data Keymap = Keymap+ { _stack :: IORef (LMap BEnv)+ , _baseL :: IORef LayerTag+ }+makeClassy ''Keymap++-- | Create a 'Keymap' from a 'Keymap' of uninitialized 'Button's and a+-- tag indicating which layer should start as the base.+mkKeymap' :: MonadUnliftIO m+ => LayerTag -- ^ The initial base layer+ -> LMap Button -- ^ The keymap of 'Button's+ -> m Keymap+mkKeymap' n m = do+ envs <- m & Ls.items . itraversed %%@~ \(_, c) b -> initBEnv b c+ Keymap <$> newIORef envs <*> newIORef n++-- | Create a 'Keymap' but do so in the context of a 'ContT' monad to ease nesting.+mkKeymap :: MonadUnliftIO m => LayerTag -> LMap Button -> ContT r m Keymap+mkKeymap n = lift . mkKeymap' n+++--------------------------------------------------------------------------------+-- $op+--+-- The following code describes how we add and remove layers from the+-- 'Keymap'.++-- | Print a header message followed by an enumeration of the layer-stack+debugReport :: HasLogFunc e => Keymap -> Utf8Builder -> RIO e ()+debugReport h hdr = do+ st <- view Ls.stack <$> readIORef (h^.stack)+ let ub = foldMap (\(i, n) -> " " <> display i+ <> ". " <> display n <> "\n")+ (zip ([1..] :: [Int]) st)+ ls <- readIORef (h^.baseL)+ logDebug $ hdr <> "\n" <> ub <> "Base-layer: " <> display ls <> "\n"++-- | Perform operations on the layer-stack+layerOp :: (HasLogFunc e)+ => Keymap -- ^ The 'Keymap' environment+ -> LayerOp -- ^ The 'LayerOp' to perform+ -> RIO e () -- ^ The resulting action+layerOp h o = let km = h^.stack in case o of+ (PushLayer n) -> do+ (readIORef km <&> Ls.pushLayer n) >>= \case+ Left e -> throwIO e+ Right m' -> writeIORef km m'+ debugReport h $ "Pushed layer to stack: " <> display n++ (PopLayer n) -> do+ (readIORef km <&> Ls.popLayer n) >>= \case+ Left (Ls.LayerNotOnStack _) -> do+ debugReport h $ "WARNING: Tried popping layer that was not on stack " <> display n+ Left e -> throwIO e+ Right m' -> do+ writeIORef km m'+ debugReport h $ "Popped layer from stack: " <> display n++ (SetBaseLayer n) -> do+ (readIORef km <&> (view Ls.maps >>> (n `elem`))) >>= \case+ True -> writeIORef (h^.baseL) n+ False -> throwIO $ Ls.LayerDoesNotExist n+ debugReport h $ "Set base layer to: " <> display n+++--------------------------------------------------------------------------------+-- $run+--+-- How we use the 'Keymap' to handle events.++-- | Lookup the 'BEnv' currently mapped to the key press.+lookupKey :: MonadIO m+ => Keymap -- ^ The 'Keymap' to lookup in+ -> Keycode -- ^ The 'Keycode' to lookup+ -> m (Maybe BEnv) -- ^ The resulting action+lookupKey h c = do+ m <- readIORef $ h^.stack+ f <- readIORef $ h^.baseL++ pure $ case m ^? Ls.atKey c of+ Nothing -> m ^? Ls.inLayer f c+ benv -> benv
+ src/KMonad/Model/Sluice.hs view
@@ -0,0 +1,119 @@+{-|+Module : KMonad.Model.Sluice+Description : The component that provides pausing functionality+Copyright : (c) David Janssen, 2019+License : MIT+Maintainer : janssen.dhj@gmail.com+Stability : experimental+Portability : portable++For certain KMonad operations we need to be able to pause and resume processing+of events. This component provides the ability to temporarily pause processing,+and then resume processing and return all events that were caught while paused.++-}+module KMonad.Model.Sluice+ ( Sluice+ , mkSluice+ , block+ , unblock+ , pull+ )+where++import KMonad.Prelude++import KMonad.Keyboard++--------------------------------------------------------------------------------+-- $env++-- | The 'Sluice' environment.+--+-- NOTE: 'Sluice' has no internal multithreading, i.e. its 'pull' action will+-- never be interrupted, therefore we can simply use 'IORef' and sidestep all+-- the STM complications.+data Sluice = Sluice+ { _eventSrc :: IO KeyEvent -- ^ Where we get our 'KeyEvent's from+ , _blocked :: IORef Int -- ^ How many locks have been applied to the sluice+ , _blockBuf :: IORef [KeyEvent] -- ^ Internal buffer to store events while closed+ }+makeLenses ''Sluice++-- | Create a new 'Sluice' environment+mkSluice' :: MonadUnliftIO m => m KeyEvent -> m Sluice+mkSluice' s = withRunInIO $ \u -> do+ bld <- newIORef 0+ buf <- newIORef []+ pure $ Sluice (u s) bld buf++-- | Create a new 'Sluice' environment, but do so in a ContT context+mkSluice :: MonadUnliftIO m => m KeyEvent -> ContT r m Sluice+mkSluice = lift . mkSluice'+++--------------------------------------------------------------------------------+-- $op+--+-- The following code deals with simple operations on the environment, like+-- blocking and unblocking the sluice.++-- | Increase the block-count by 1+block :: HasLogFunc e => Sluice -> RIO e ()+block s = do+ modifyIORef (s^.blocked) (+1)+ readIORef (s^.blocked) >>= \n ->+ logDebug $ "Block level set to: " <> display n++-- | Set the Sluice to unblocked mode, return a list of all the stored events+-- that should be rerun, in the correct order (head was first-in, etc).+--+-- NOTE: After successfully unblocking the 'Sluice' will be empty, it is the+-- caller's responsibility to insert the returned events at an appropriate+-- location in the 'KMonad.App.App'.+--+-- We do this in KMonad by writing the events into the+-- 'KMonad.Model.Dispatch.Dispatch's rerun buffer. (this happens in the+-- "KMonad.App" module.)+unblock :: HasLogFunc e => Sluice -> RIO e [KeyEvent]+unblock s = do+ modifyIORef' (s^.blocked) (\n -> n - 1)+ readIORef (s^.blocked) >>= \case+ 0 -> do+ es <- readIORef (s^.blockBuf)+ writeIORef (s^.blockBuf) []+ logDebug $ "Unblocking input stream, " <>+ if null es+ then "no stored events"+ else "rerunning:\n" <> (display . unlines . map textDisplay $ reverse es)+ pure $ reverse es+ n -> do+ logDebug $ "Block level set to: " <> display n+ pure []+++--------------------------------------------------------------------------------+-- $loop+--+-- The following code deals with how a 'Sluice' fits into the KMonad pull-chain.+-- As long as we are blocked, we do not return any events, but keep storing them+-- internally. When we are unblocked, events simply pass through.+++-- | Try to read from the Sluice, if we are blocked, store the event internally+-- and return Nothing. If we are unblocked, return Just the KeyEvent.+step :: HasLogFunc e => Sluice -> RIO e (Maybe KeyEvent)+step s = do+ e <- liftIO $ s^.eventSrc+ readIORef (s^.blocked) >>= \case+ 0 -> pure $ Just e+ _ -> do+ modifyIORef' (s^.blockBuf) (e:)+ readIORef (s^.blockBuf) >>= \es -> do+ let xs = map ((" - " <>) . textDisplay) es+ logDebug . display . unlines $ "Storing event, current store: ":xs+ pure Nothing++-- | Keep trying to read from the Sluice until an event passes through+pull :: HasLogFunc e => Sluice -> RIO e KeyEvent+pull s = step s >>= maybe (pull s) pure
+ src/KMonad/Parsing.hs view
@@ -0,0 +1,57 @@+-- | A collection of general parsing definitions++module KMonad.Parsing+ ( Parser+ , ParserT+ , ParseError(..)++ , sc+ , hsc+ , lex+ , hlex++ , module Text.Megaparsec+ , module Text.Megaparsec.Char+ )++where++import KMonad.Prelude++import Text.Megaparsec hiding (ParseError)+import Text.Megaparsec.Char+import qualified Text.Megaparsec.Char.Lexer as X+++--------------------------------------------------------------------------------++-- | Parsec type specified down to Void Text+type Parser a = Parsec Void Text a+type ParserT m a = ParsecT Void Text m a++-- | Parsec parse errors under Void Text with an Exception instance+newtype ParseError = ParseError { _parseError :: ParseErrorBundle Text Void}+ deriving Eq++instance Show ParseError where+ show (ParseError e) = "Parse error at " <> errorBundlePretty e++instance Exception ParseError++--------------------------------------------------------------------------------++-- | Horizontal space consumption+hsc :: Parser ()+hsc = X.space space1 empty empty++-- | Horizontal space lexeme+hlex :: Parser a -> Parser a+hlex = X.lexeme hsc++-- | Full space consumption+sc :: Parser ()+sc = X.space space1 (X.skipLineComment ";;") (X.skipBlockComment "#|" "|#")++-- | Full space lexeme+lex :: Parser a -> Parser a+lex = X.lexeme sc
src/KMonad/Prelude.hs view
@@ -1,37 +1,6 @@-{-# OPTIONS_GHC -Wno-dodgy-imports #-}-{-|-Module : KMonad.Prelude-Description : Code that will be imported into every module-Copyright : (c) David Janssen, 2019-License : MIT--Maintainer : janssen.dhj@gmail.com-Stability : experimental-Portability : non-portable (MPTC with FD, FFI to Linux-only c-code)--}- module KMonad.Prelude ( module X ) where -import Control.Lens as X-import Control.Monad.Cont as X-import Data.Acquire as X-import GHC.Conc as X (orElse)-import RIO.Text as X (unlines, lines)--import RIO as X hiding- (-- Not the lens stuff, I want more support for lenses from "Control.Lens"- view, ASetter, ASetter', Lens, Getting, Lens'- , SimpleGetter, lens, over, set, sets, to, (^.)-- -- The following line is required for newer stack releases.- -- This is also the reason for the OPTIONS_GHC pragma- , (^..), (^?), preview, (%~), (.~)-- -- Some stuff I'd rather default to Text- , unlines, lines-- -- Will import these when I need it- , some, many- )+import KMonad.Prelude.Imports as X+import KMonad.Prelude.Definitions as X
+ src/KMonad/Prelude/Definitions.hs view
@@ -0,0 +1,7 @@+-- |++module KMonad.Prelude.Definitions+ ( )+where++import KMonad.Prelude.Imports
+ src/KMonad/Prelude/Imports.hs view
@@ -0,0 +1,27 @@+{-# OPTIONS_GHC -Wno-dodgy-imports #-}++module KMonad.Prelude.Imports+ ( module X )+where++import Control.Lens as X+import Control.Monad.Cont as X+import Data.Acquire as X+import GHC.Conc as X (orElse)+import RIO.Text as X (unlines, lines, unpack, pack)++import RIO as X hiding+ (-- Not the lens stuff, I want more support for lenses from "Control.Lens"+ view, ASetter, ASetter', Lens, Getting, Lens'+ , SimpleGetter, lens, over, set, sets, to, (^.)++ -- The following line is required for newer stack releases.+ -- This is also the reason for the OPTIONS_GHC pragma+ , (^..), (^?), preview, (%~), (.~)++ -- Some stuff I'd rather default to Text+ , unlines, lines++ -- Will import these when I need it+ , some, many+ )
src/KMonad/Util.hs view
@@ -15,6 +15,7 @@ ( -- * Time units and utils -- $time Milliseconds+ , unMS , tDiff -- * Random utility helpers that have no better home@@ -41,7 +42,7 @@ -- -- | Newtype wrapper around 'Int' to add type safety to our time values-newtype Milliseconds = Milliseconds Int+newtype Milliseconds = Milliseconds { unMS :: Int } deriving (Eq, Ord, Num, Real, Enum, Integral, Show, Read, Generic, Display) -- | Calculate how much time has elapsed between 2 time points@@ -72,7 +73,7 @@ -- | Embed the action of using an 'Acquire' in a continuation monad using :: Acquire a -> ContT r (RIO e) a-using dat = ContT $ (\next -> with dat $ \a -> next a)+using dat = ContT (\next -> with dat $ \a -> next a) -- | Log an error message and then rethrow the error@@ -94,7 +95,7 @@ withLaunch :: HasLogFunc e => Text -- ^ The name of this process (for logging) -> RIO e a -- ^ The action to repeat forever- -> ((Async a) -> RIO e b) -- ^ The foreground action to run+ -> (Async a -> RIO e b) -- ^ The foreground action to run -> RIO e b -- ^ The resulting action withLaunch n a f = do logInfo $ "Launching process: " <> display n
+ src/KMonad/Util/LayerStack.hs view
@@ -0,0 +1,155 @@+{-# LANGUAGE ScopedTypeVariables #-}+{-|+Module : KMonad.Util.LayerStack+Description : A container of overlapping mappings+Copyright : (c) David Janssen, 2019+License : MIT+Maintainer : janssen.dhj@gmail.com+Stability : experimental+Portability : portable++A 'LayerStack' is a set of different mappings between keys and values, and+provides functionality for keeping track of a `stack` of these mappings. Lookup+in a 'LayerStack' happens by checking the front-most mapping on the stack, and+if that fails, descending deeper.++A 'LayerStack' has 3 type parameters, in the documentation we will refer to+those as:+ - l: The layer key, which is the identifier for the different layers+ - k: The item key, which is the per-layer identifier for different items+ - a: The item (value), which is the value stored for k in a particular layer++'LayerStack' is used to implement the basic keymap logic in KMonad, where the+configuration for a keyboard is essentially a set of layers. Each layer maps+keycodes to buttons, and the entire layers can be overlayed on top of eachother.++-}+module KMonad.Util.LayerStack+ ( -- * Basic types+ -- $types+ Layer+ , mkLayer+ , LayerStack+ , mkLayerStack+ , items+ , maps+ , stack++ -- * Basic operations on LayerStacks+ -- $ops+ , atKey+ , inLayer+ , pushLayer+ , popLayer++ -- * Things that can go wrong with LayerStacks+ -- $err+ , LayerStackError(..)+ , AsLayerStackError(..)+ )++where++import KMonad.Prelude++import RIO.List (delete)++import qualified RIO.HashMap as M+import qualified RIO.HashSet as S++--------------------------------------------------------------------------------+-- $err++-- | The things that can go wrong with a 'LayerStack'+data LayerStackError l+ = LayerDoesNotExist l -- ^ Requested use of a non-existing layer+ | LayerNotOnStack l -- ^ Requested use of a non-stack layer+ deriving Show+makeClassyPrisms ''LayerStackError++instance (Typeable l, Show l) => Exception (LayerStackError l)++--------------------------------------------------------------------------------+-- $constraints++-- | The type of things that can function as either layer or item keys in a+-- LayerStack.+type CanKey k = (Eq k, Hashable k)++--------------------------------------------------------------------------------+-- $types++-- | A 'Layer' is one of the maps contained inside a 'LayerStack'+newtype Layer k a = Layer { unLayer :: M.HashMap k a}+ deriving (Show, Eq, Ord, Functor, Foldable, Traversable)++-- | Create a new 'Layer' from a 'Foldable' of key-value pairs+mkLayer :: (Foldable t, CanKey k) => t (k, a) -> Layer k a+mkLayer = Layer . M.fromList . toList++-- | A 'LayerStack' is a named collection of maps and a sequence of maps to use+-- for lookup.+data LayerStack l k a = LayerStack+ { _stack :: ![l] -- ^ The current stack of layers+ , _maps :: !(S.HashSet l) -- ^ A set of all 'Layer' names+ , _items :: !(M.HashMap (l, k) a) -- ^ The map of all the bindings+ } deriving (Show, Eq, Functor)+makeLenses ''LayerStack+++-- | Create a new 'LayerStack' from a foldable of foldables.+mkLayerStack :: (Foldable t1, Foldable t2, CanKey k, CanKey l)+ => t1 (l, t2 (k, a)) -- ^ The /alist/ of /alists/ describing the mapping+ -> LayerStack l k a+mkLayerStack nestMaps = let+ -- Create a HashMap l (Layer k a) from the listlikes+ hms = M.fromList . map (over _2 mkLayer) $ toList nestMaps+-- -- Create a HashMap (l, k) a from `hms`+ its = M.fromList $ hms ^@.. ifolded <.> (to unLayer . ifolded)+-- -- Create a HashSet of keys from `its`+ kys = S.fromList . M.keys $ hms+ in LayerStack [] kys its++--------------------------------------------------------------------------------+-- $ops++-- | Return a fold of all the items currently mapped to the item-key+--+-- This can be used with 'toListOf' to get an overview of all the items+-- currently mapped to an item-key, or more usefully, with 'firstOf' to simply+-- try a lookup like this: `stack^? atKey KeyA`+atKey :: (CanKey l, CanKey k) => k -> Fold (LayerStack l k a) a+atKey c = folding $ \m -> m ^.. stack . folded . to (getK m) . folded+ where getK m n = maybe [] pure (M.lookup (n, c) (m^.items))++-- | Try to look up a key in a specific layer, regardless of the stack+inLayer :: (CanKey l, CanKey k) => l -> k -> Fold (LayerStack l k a) a+inLayer l c = folding $ \m -> m ^? items . ix (l, c)++-- | Add a layer to the front of the stack and return the new 'LayerStack'.+--+-- If the 'Layer' does not exist, return a 'LayerStackError'. If the 'Layer' is+-- already on the stack, bring it to the front.+--+pushLayer :: (CanKey l, CanKey k)+ => l+ -> LayerStack l k a+ -> Either (LayerStackError l) (LayerStack l k a)+pushLayer n keymap = if n `elem` keymap^.maps+ then Right $ keymap & stack %~ addFront n+ else Left $ LayerDoesNotExist n+ where addFront a as = case break (a ==) as of+ (frnt, a':rest) -> a':(frnt <> rest)+ (frnt, []) -> a:frnt++-- | Remove a layer from the stack. If the layer index does not exist on the+-- stack, return a 'LayerNotOnStack', if the layer index does not exist at all+-- in the 'LayerStack', return a 'LayerDoesNotExist'.+popLayer :: (CanKey l, CanKey k)+ => l+ -> LayerStack l k a+ -> Either (LayerStackError l) (LayerStack l k a)+popLayer n keymap = if+ | n `elem` keymap^.stack -> Right $ keymap & stack %~ delete n+ | n `elem` keymap^.maps -> Left $ LayerNotOnStack n+ | otherwise -> Left $ LayerDoesNotExist n
+ src/KMonad/Util/MultiMap.hs view
@@ -0,0 +1,85 @@+{-|+Module : KMonad.Util.MultiMap+Description : A `k -> Set v` mapping, with reversing utilities+Copyright : (c) David Janssen, 2019+License : MIT+Maintainer : janssen.dhj@gmail.com+Stability : experimental+Portability : portable++This datastructure represents a `k -> Set v` mapping: that is to say, each key+can have multiple values (but no duplicates). Additionally, we provide some+operations to reverse this mapping.++In KMonad we use this exclusively to easily define multiple names for the same+'KMonad.Keyboard.Keycode' in a reversible manner.++-}+module KMonad.Util.MultiMap+ ( -- * Types+ -- $typ+ MultiMap+ , mkMultiMap+ , fromSingletons++ -- * Operations on MultiMaps+ -- $ops+ , itemed+ , reverse+ )+where++import KMonad.Prelude hiding (reverse)++import qualified RIO.HashMap as M+import qualified RIO.HashSet as S++--------------------------------------------------------------------------------+-- $typ++-- | All the type constraints required for something to function as a MultiMap+type CanMM k v = (Eq k, Ord v, Hashable k, Hashable v)++-- | The 'MultiMap', which describes a one to many (unique) mapping+newtype MultiMap k v = MultiMap { _unMM :: M.HashMap k (S.HashSet v) }+ deriving Show+makeLenses ''MultiMap++instance (CanMM k v) => Semigroup (MultiMap k v) where+ (MultiMap a) <> (MultiMap b) = MultiMap $ M.unionWith (<>) a b+instance (CanMM k v) => Monoid (MultiMap k v) where+ mempty = MultiMap M.empty++type instance Index (MultiMap k v) = k+type instance IxValue (MultiMap k v) = S.HashSet v++instance CanMM k v => Ixed (MultiMap k v)+instance CanMM k v => At (MultiMap k v) where+ at k = unMM . at k++-- | Create a new multimap from a foldable of (k, foldable v) pairs.+mkMultiMap :: (Foldable t1, Foldable t2, CanMM k v)+ => t1 (k, t2 v) -> MultiMap k v+mkMultiMap = foldMap+ ( MultiMap+ . uncurry M.singleton+ . over _2 (S.fromList . toList)+ )++-- | Create a new multimap from a foldable of (k, v) pairs+fromSingletons :: (Foldable t, CanMM k v)+ => t (k, v) -> MultiMap k v+fromSingletons = mkMultiMap . map (over _2 (:[])) . toList++++--------------------------------------------------------------------------------+-- $ops++-- | A fold over all the (k, v) pairs in a 'MultiMap'+itemed :: (CanMM k v) => Fold (MultiMap k v) (k, v)+itemed = folding $ \m -> m ^@.. unMM . ifolded <. folded++-- | Reverse a MultiMap. Note: this is not necessarily a lossless conversion.+reverse :: (CanMM k v, CanMM v k) => MultiMap k v -> MultiMap v k+reverse m = mkMultiMap $ m ^.. itemed . swapped . to (over _2 (:[]))
+ test/KMonad/GestureSpec.hs view
@@ -0,0 +1,41 @@+module KMonad.GestureSpec ( spec ) where++import KMonad.Prelude+import KMonad.Gesture++import Data.Either (fromRight)++import Test.Hspec hiding (around)++r :: Either a b -> b+r = fromRight undefined++spec :: Spec+spec = do++ let abc = tap "a" <> tap "b" <> tap "c"+ let sa = r $ around "S" (tap "a")+ let csa = r $ around "C" sa+ let c = tap "C"+ let sabc = r $ around "S" abc+ let xx = r $ around "C" (sa <> tap "b")++ describe "gesture" $ do++ it "parses \"a b c\" as series of taps" $ do+ prsGesture "a b c" `shouldBe` Right abc++ it "parses \"S-a\" as S held around tap of a" $ do+ prsGesture "S-a" `shouldBe` Right sa++ it "parses \"C-S-a\" as C around S around a" $ do+ prsGesture "C-S-a" `shouldBe` Right csa++ it "parses \"C-( )-C\" as the press and release of C" $ do+ prsGesture "C-( )-C" `shouldBe` Right c++ it "parser \"C-(S-a b)-C\" as C around shifted-a b" $ do+ prsGesture "C-(S-a b)-C" `shouldBe` Right xx++ it "parses \"S-[a b c]\" as S around taps of a b c" $ do+ prsGesture "S-[a b c]" `shouldBe` Right sabc
+ test/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}