module Ribosome.Test.SocketTmux where
import Chiasma.Command.Pane (sendKeys)
import Chiasma.Data.CodecError (CodecError)
import Chiasma.Data.SendKeysParams (Key (Lit))
import Chiasma.Effect.Codec (NativeCommandCodecE)
import Chiasma.Effect.TmuxApi (Tmux)
import Chiasma.Effect.TmuxClient (NativeTmux)
import Chiasma.Tmux (withTmux)
import Exon (exon)
import Hedgehog.Internal.Property (Failure)
import Path (Abs, File, Path, reldir, relfile, (</>))
import Path.IO (doesPathExist)
import Polysemy.Chronos (ChronosTime)
import qualified Polysemy.Test as Test
import Polysemy.Test (Hedgehog, Test, UnitTest, assert)
import Ribosome.Host.Data.NvimSocket (NvimSocket (NvimSocket))
import Ribosome.Host.Data.RpcHandler (RpcHandler)
import Ribosome.Host.Interpreter.Handlers (withHandlers)
import Ribosome.Host.Path (pathText)
import Ribosome.Socket (SocketHandlerEffects, interpretPluginSocket)
import Ribosome.Test.Data.TestConfig (TmuxTestConfig)
import Ribosome.Test.Embed (TestEffects, testPluginEmbed)
import Ribosome.Test.TmuxCommon (TmuxStack, runTmuxNvim)
import Ribosome.Test.Wait (assertWait)
import Ribosome.Data.CustomConfig (CustomConfig (CustomConfig))
type TmuxHandlerStack =
SocketHandlerEffects ++ Reader (CustomConfig ()) : Reader NvimSocket : TmuxStack
type SocketTmuxWith r =
TestEffects ++ r ++ TmuxHandlerStack
type SocketTmux =
SocketTmuxWith '[]
nvimCmdline :: Path Abs File -> Text
nvimCmdline :: Path Abs File -> Text
nvimCmdline Path Abs File
socket =
[exon|nvim --listen #{pathText socket} -n -u NONE -i NONE --clean|]
withSocketTmuxNvim ::
Members [Test, Hedgehog IO, ChronosTime, Error Failure, Race, Embed IO] r =>
Members [NativeTmux, NativeCommandCodecE, Stop CodecError] r =>
InterpreterFor (Reader NvimSocket) r
withSocketTmuxNvim :: forall (r :: EffectRow).
(Members
'[Test, Hedgehog IO, ChronosTime, Error Failure, Race, Embed IO] r,
Members '[NativeTmux, NativeCommandCodecE, Stop CodecError] r) =>
InterpreterFor (Reader NvimSocket) r
withSocketTmuxNvim Sem (Reader NvimSocket : r) a
sem = do
Path Abs Dir
dir <- Path Rel Dir -> Sem r (Path Abs Dir)
forall (r :: EffectRow).
Member Test r =>
Path Rel Dir -> Sem r (Path Abs Dir)
Test.tempDir [reldir|tmux-test|]
let socket :: Path Abs File
socket = Path Abs Dir
dir Path Abs Dir -> Path Rel File -> Path Abs File
forall b t. Path b Dir -> Path Rel t -> Path b t
</> [relfile|nvim-socket|]
Sem (Resumable CodecError Tmux : r) () -> Sem r ()
forall (command :: * -> *) err i o resource (r :: EffectRow).
Members '[ScopedTmux resource i o, Codec command i o !! err] r =>
InterpreterFor (TmuxApi command !! err) r
withTmux do
forall err (eff :: (* -> *) -> * -> *) (r :: EffectRow).
Members '[Resumable err eff, Stop err] r =>
InterpreterFor eff r
restop @CodecError @Tmux (Sem (Tmux : Resumable CodecError Tmux : r) ()
-> Sem (Resumable CodecError Tmux : r) ())
-> Sem (Tmux : Resumable CodecError Tmux : r) ()
-> Sem (Resumable CodecError Tmux : r) ()
forall a b. (a -> b) -> a -> b
$ PaneId -> [Key] -> Sem (Tmux : Resumable CodecError Tmux : r) ()
forall (r :: EffectRow).
Member Tmux r =>
PaneId -> [Key] -> Sem r ()
sendKeys PaneId
0 [Text -> Key
Lit (Path Abs File -> Text
nvimCmdline Path Abs File
socket)]
Sem r (Path Abs File) -> (Path Abs File -> Sem r ()) -> Sem r ()
forall (m :: * -> *) t d (r :: EffectRow) a b.
(Monad m, HasCallStack,
Members
'[Hedgehog m, Time t d, Race, Error Failure, Embed IO] r) =>
Sem r a -> (a -> Sem r b) -> Sem r b
assertWait (Path Abs File -> Sem r (Path Abs File)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Path Abs File
socket) (Bool -> Sem r ()
forall (m :: * -> *) (r :: EffectRow).
(Monad m, HasCallStack, Member (Hedgehog m) r) =>
Bool -> Sem r ()
assert (Bool -> Sem r ())
-> (Path Abs File -> Sem r Bool) -> Path Abs File -> Sem r ()
forall (m :: * -> *) b c a.
Monad m =>
(b -> m c) -> (a -> m b) -> a -> m c
<=< Path Abs File -> Sem r Bool
forall (m :: * -> *) b t. MonadIO m => Path b t -> m Bool
doesPathExist)
NvimSocket -> Sem (Reader NvimSocket : r) a -> Sem r a
forall i (r :: EffectRow) a. i -> Sem (Reader i : r) a -> Sem r a
runReader (Path Abs File -> NvimSocket
NvimSocket Path Abs File
socket) Sem (Reader NvimSocket : r) a
sem
runSocketTmuxTestConf ::
HasCallStack =>
TmuxTestConfig ->
Sem TmuxHandlerStack () ->
UnitTest
runSocketTmuxTestConf :: HasCallStack =>
TmuxTestConfig -> Sem TmuxHandlerStack () -> UnitTest
runSocketTmuxTestConf TmuxTestConfig
conf =
HasCallStack => TmuxTestConfig -> Sem TmuxStack () -> UnitTest
TmuxTestConfig -> Sem TmuxStack () -> UnitTest
runTmuxNvim TmuxTestConfig
conf (Sem
'[NativeTmux, NativeTmux, Resumable TmuxError NativeTmux,
NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> UnitTest)
-> (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> Sem
'[NativeTmux, NativeTmux, Resumable TmuxError NativeTmux,
NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
())
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> UnitTest
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
'[Reader NvimSocket, NativeTmux, NativeTmux,
Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> Sem
'[NativeTmux, NativeTmux, Resumable TmuxError NativeTmux,
NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
forall (r :: EffectRow).
(Members
'[Test, Hedgehog IO, ChronosTime, Error Failure, Race, Embed IO] r,
Members '[NativeTmux, NativeCommandCodecE, Stop CodecError] r) =>
InterpreterFor (Reader NvimSocket) r
withSocketTmuxNvim (Sem
'[Reader NvimSocket, NativeTmux, NativeTmux,
Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> Sem
'[NativeTmux, NativeTmux, Resumable TmuxError NativeTmux,
NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
())
-> (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> Sem
'[Reader NvimSocket, NativeTmux, NativeTmux,
Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
())
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> Sem
'[NativeTmux, NativeTmux, Resumable TmuxError NativeTmux,
NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
CustomConfig ()
-> Sem
'[Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> Sem
'[Reader NvimSocket, NativeTmux, NativeTmux,
Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
forall i (r :: EffectRow) a. i -> Sem (Reader i : r) a -> Sem r a
runReader (() -> CustomConfig ()
forall c. c -> CustomConfig c
CustomConfig ()) (Sem
'[Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> Sem
'[Reader NvimSocket, NativeTmux, NativeTmux,
Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
())
-> (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> Sem
'[Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
())
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> Sem
'[Reader NvimSocket, NativeTmux, NativeTmux,
Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> Sem
'[Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
forall c (r :: EffectRow).
(Members (BasicPluginStack c) r, Member (Reader NvimSocket) r) =>
InterpretersFor SocketHandlerEffects r
interpretPluginSocket
runSocketTmuxTest ::
HasCallStack =>
Sem TmuxHandlerStack () ->
UnitTest
runSocketTmuxTest :: HasCallStack => Sem TmuxHandlerStack () -> UnitTest
runSocketTmuxTest =
HasCallStack =>
TmuxTestConfig -> Sem TmuxHandlerStack () -> UnitTest
TmuxTestConfig -> Sem TmuxHandlerStack () -> UnitTest
runSocketTmuxTestConf TmuxTestConfig
forall a. Default a => a
def
runSocketTmuxGuiTest ::
HasCallStack =>
Sem TmuxHandlerStack () ->
UnitTest
runSocketTmuxGuiTest :: HasCallStack => Sem TmuxHandlerStack () -> UnitTest
runSocketTmuxGuiTest =
HasCallStack =>
TmuxTestConfig -> Sem TmuxHandlerStack () -> UnitTest
TmuxTestConfig -> Sem TmuxHandlerStack () -> UnitTest
runSocketTmuxTestConf (TmuxTestConfig
forall a. Default a => a
def TmuxTestConfig
-> (TmuxTestConfig -> TmuxTestConfig) -> TmuxTestConfig
forall a b. a -> (a -> b) -> b
& IsLabel
"tmux"
((TmuxTestConfig -> Identity TmuxTestConfig)
-> TmuxTestConfig -> Identity TmuxTestConfig)
(TmuxTestConfig -> Identity TmuxTestConfig)
-> TmuxTestConfig -> Identity TmuxTestConfig
#tmux ((TmuxTestConfig -> Identity TmuxTestConfig)
-> TmuxTestConfig -> Identity TmuxTestConfig)
-> ((Bool -> Identity Bool)
-> TmuxTestConfig -> Identity TmuxTestConfig)
-> (Bool -> Identity Bool)
-> TmuxTestConfig
-> Identity TmuxTestConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IsLabel
"gui"
((Bool -> Identity Bool)
-> TmuxTestConfig -> Identity TmuxTestConfig)
(Bool -> Identity Bool)
-> TmuxTestConfig -> Identity TmuxTestConfig
#gui ((Bool -> Identity Bool)
-> TmuxTestConfig -> Identity TmuxTestConfig)
-> Bool -> TmuxTestConfig -> TmuxTestConfig
forall s t a b. ASetter s t a b -> b -> s -> t
.~ Bool
True)
testPluginSocketTmuxConf ::
∀ r .
HasCallStack =>
Members TmuxHandlerStack (r ++ TmuxHandlerStack) =>
TmuxTestConfig ->
InterpretersFor r TmuxHandlerStack ->
[RpcHandler (r ++ TmuxHandlerStack)] ->
Sem (SocketTmuxWith r) () ->
UnitTest
testPluginSocketTmuxConf :: forall (r :: EffectRow).
(HasCallStack, Members TmuxHandlerStack (r ++ TmuxHandlerStack)) =>
TmuxTestConfig
-> InterpretersFor r TmuxHandlerStack
-> [RpcHandler (r ++ TmuxHandlerStack)]
-> Sem (SocketTmuxWith r) ()
-> UnitTest
testPluginSocketTmuxConf TmuxTestConfig
conf InterpretersFor r TmuxHandlerStack
effs [RpcHandler (r ++ TmuxHandlerStack)]
handlers =
HasCallStack =>
TmuxTestConfig -> Sem TmuxHandlerStack () -> UnitTest
TmuxTestConfig -> Sem TmuxHandlerStack () -> UnitTest
runSocketTmuxTestConf TmuxTestConfig
conf (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
-> UnitTest)
-> (Sem
(Stop Report
: Stop RpcError : Scratch : Settings : Rpc
: Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
())
-> Sem
(Stop Report
: Stop RpcError : Scratch : Settings : Rpc
: Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> UnitTest
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
InterpretersFor r TmuxHandlerStack
effs (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
())
-> (Sem
(Stop Report
: Stop RpcError : Scratch : Settings : Rpc
: Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
())
-> Sem
(Stop Report
: Stop RpcError : Scratch : Settings : Rpc
: Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO]
()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
[RpcHandler
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])]
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
forall (r :: EffectRow) a.
Members
'[Resumable Report Handlers, Resumable RpcError Rpc, Log,
Error BootError]
r =>
[RpcHandler r] -> Sem r a -> Sem r a
withHandlers [RpcHandler
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])]
[RpcHandler (r ++ TmuxHandlerStack)]
handlers (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
())
-> (Sem
(Stop Report
: Stop RpcError : Scratch : Settings : Rpc
: Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
())
-> Sem
(Stop Report
: Stop RpcError : Scratch : Settings : Rpc
: Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Stop Report
: Stop RpcError : Scratch : Settings : Rpc
: Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Resumable Report Handlers, Log,
DataLog LogReport, Resumable RpcError Rpc,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Process RpcMessage (Either Text RpcMessage), UserError,
Reader (CustomConfig ()), Reader NvimSocket, NativeTmux,
NativeTmux, Resumable TmuxError NativeTmux, NativeCommandCodecE,
Resumable CodecError (NativeCodec (Panes Pane)), Reader TmuxNative,
Stop CodecError, Error CodecError, Stop RenderError,
Error RenderError, Stop TmuxError, Error TmuxError, Error Text,
Reader PluginName, Log, Tagged "stderr" Log, Tagged "file" Log,
Reader LogConfig, Reader HostConfig, ChronosTime, Log,
Mask Restoration, Mask Restoration, GatesIO, Race, Async,
Error BootError, Test, Fail, Error TestError, Hedgehog IO,
Error Failure, Embed IO, Resource, Final IO])
()
forall er (r :: EffectRow).
(Members (HostDeps er) r, Members BuiltinHandlersDeps r,
Members '[Resumable SettingError Settings, Error TestError] r) =>
InterpretersFor
'[Stop Report, Stop RpcError, Scratch, Settings, Rpc] r
testPluginEmbed
testPluginSocketTmux ::
∀ r .
HasCallStack =>
Members TmuxHandlerStack (r ++ TmuxHandlerStack) =>
InterpretersFor r TmuxHandlerStack ->
[RpcHandler (r ++ TmuxHandlerStack)] ->
Sem (SocketTmuxWith r) () ->
UnitTest
testPluginSocketTmux :: forall (r :: EffectRow).
(HasCallStack, Members TmuxHandlerStack (r ++ TmuxHandlerStack)) =>
InterpretersFor r TmuxHandlerStack
-> [RpcHandler (r ++ TmuxHandlerStack)]
-> Sem (SocketTmuxWith r) ()
-> UnitTest
testPluginSocketTmux =
forall (r :: EffectRow).
(HasCallStack, Members TmuxHandlerStack (r ++ TmuxHandlerStack)) =>
TmuxTestConfig
-> InterpretersFor r TmuxHandlerStack
-> [RpcHandler (r ++ TmuxHandlerStack)]
-> Sem (SocketTmuxWith r) ()
-> UnitTest
testPluginSocketTmuxConf @r TmuxTestConfig
forall a. Default a => a
def
testHandlersSocketTmux ::
HasCallStack =>
[RpcHandler TmuxHandlerStack] ->
Sem SocketTmux () ->
UnitTest
testHandlersSocketTmux :: HasCallStack =>
[RpcHandler TmuxHandlerStack] -> Sem SocketTmux () -> UnitTest
testHandlersSocketTmux =
forall (r :: EffectRow).
(HasCallStack, Members TmuxHandlerStack (r ++ TmuxHandlerStack)) =>
InterpretersFor r TmuxHandlerStack
-> [RpcHandler (r ++ TmuxHandlerStack)]
-> Sem (SocketTmuxWith r) ()
-> UnitTest
testPluginSocketTmux @'[] forall a. a -> a
InterpretersFor '[] TmuxHandlerStack
id
testSocketTmux ::
HasCallStack =>
Sem SocketTmux () ->
UnitTest
testSocketTmux :: HasCallStack => Sem SocketTmux () -> UnitTest
testSocketTmux =
HasCallStack =>
[RpcHandler TmuxHandlerStack] -> Sem SocketTmux () -> UnitTest
[RpcHandler TmuxHandlerStack] -> Sem SocketTmux () -> UnitTest
testHandlersSocketTmux [RpcHandler TmuxHandlerStack]
forall a. Monoid a => a
mempty
testPluginSocketTmuxGui ::
∀ r .
HasCallStack =>
Members TmuxHandlerStack (r ++ TmuxHandlerStack) =>
InterpretersFor r TmuxHandlerStack ->
[RpcHandler (r ++ TmuxHandlerStack)] ->
Sem (SocketTmuxWith r) () ->
UnitTest
testPluginSocketTmuxGui :: forall (r :: EffectRow).
(HasCallStack, Members TmuxHandlerStack (r ++ TmuxHandlerStack)) =>
InterpretersFor r TmuxHandlerStack
-> [RpcHandler (r ++ TmuxHandlerStack)]
-> Sem (SocketTmuxWith r) ()
-> UnitTest
testPluginSocketTmuxGui =
forall (r :: EffectRow).
(HasCallStack, Members TmuxHandlerStack (r ++ TmuxHandlerStack)) =>
TmuxTestConfig
-> InterpretersFor r TmuxHandlerStack
-> [RpcHandler (r ++ TmuxHandlerStack)]
-> Sem (SocketTmuxWith r) ()
-> UnitTest
testPluginSocketTmuxConf @r (TmuxTestConfig
forall a. Default a => a
def TmuxTestConfig
-> (TmuxTestConfig -> TmuxTestConfig) -> TmuxTestConfig
forall a b. a -> (a -> b) -> b
& IsLabel
"tmux"
((TmuxTestConfig -> Identity TmuxTestConfig)
-> TmuxTestConfig -> Identity TmuxTestConfig)
(TmuxTestConfig -> Identity TmuxTestConfig)
-> TmuxTestConfig -> Identity TmuxTestConfig
#tmux ((TmuxTestConfig -> Identity TmuxTestConfig)
-> TmuxTestConfig -> Identity TmuxTestConfig)
-> ((Bool -> Identity Bool)
-> TmuxTestConfig -> Identity TmuxTestConfig)
-> (Bool -> Identity Bool)
-> TmuxTestConfig
-> Identity TmuxTestConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IsLabel
"gui"
((Bool -> Identity Bool)
-> TmuxTestConfig -> Identity TmuxTestConfig)
(Bool -> Identity Bool)
-> TmuxTestConfig -> Identity TmuxTestConfig
#gui ((Bool -> Identity Bool)
-> TmuxTestConfig -> Identity TmuxTestConfig)
-> Bool -> TmuxTestConfig -> TmuxTestConfig
forall s t a b. ASetter s t a b -> b -> s -> t
.~ Bool
True)
testHandlersSocketTmuxGui ::
HasCallStack =>
[RpcHandler TmuxHandlerStack] ->
Sem SocketTmux () ->
UnitTest
testHandlersSocketTmuxGui :: HasCallStack =>
[RpcHandler TmuxHandlerStack] -> Sem SocketTmux () -> UnitTest
testHandlersSocketTmuxGui =
forall (r :: EffectRow).
(HasCallStack, Members TmuxHandlerStack (r ++ TmuxHandlerStack)) =>
InterpretersFor r TmuxHandlerStack
-> [RpcHandler (r ++ TmuxHandlerStack)]
-> Sem (SocketTmuxWith r) ()
-> UnitTest
testPluginSocketTmuxGui @'[] forall a. a -> a
InterpretersFor '[] TmuxHandlerStack
id
testSocketTmuxGui ::
HasCallStack =>
Sem SocketTmux () ->
UnitTest
testSocketTmuxGui :: HasCallStack => Sem SocketTmux () -> UnitTest
testSocketTmuxGui =
HasCallStack =>
[RpcHandler TmuxHandlerStack] -> Sem SocketTmux () -> UnitTest
[RpcHandler TmuxHandlerStack] -> Sem SocketTmux () -> UnitTest
testHandlersSocketTmuxGui [RpcHandler TmuxHandlerStack]
forall a. Monoid a => a
mempty