box-0.0.1.5: boxes

Safe HaskellNone
LanguageHaskell2010

Box.Control

Synopsis

Documentation

data ControlComm Source #

Instances
Eq ControlComm Source # 
Instance details

Defined in Box.Control

Data ControlComm Source # 
Instance details

Defined in Box.Control

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ControlComm -> c ControlComm #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ControlComm #

toConstr :: ControlComm -> Constr #

dataTypeOf :: ControlComm -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ControlComm) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ControlComm) #

gmapT :: (forall b. Data b => b -> b) -> ControlComm -> ControlComm #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ControlComm -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ControlComm -> r #

gmapQ :: (forall d. Data d => d -> u) -> ControlComm -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ControlComm -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ControlComm -> m ControlComm #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ControlComm -> m ControlComm #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ControlComm -> m ControlComm #

Read ControlComm Source # 
Instance details

Defined in Box.Control

Show ControlComm Source # 
Instance details

Defined in Box.Control

Generic ControlComm Source # 
Instance details

Defined in Box.Control

Associated Types

type Rep ControlComm :: Type -> Type #

type Rep ControlComm Source # 
Instance details

Defined in Box.Control

type Rep ControlComm = D1 (MetaData "ControlComm" "Box.Control" "box-0.0.1.5-20i6lBtrzQS4oHqC1d1Lmo" False) (((C1 (MetaCons "Ready" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Check" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Died" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Stop" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Kill" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "ShutDown" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Start" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Reset" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "On" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) :+: C1 (MetaCons "Log" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))))

controlBox :: ControlConfig -> IO a -> Box (STM IO) ControlComm ControlComm -> IO Bool Source #

an effect that can be started and stopped committer is an existence test controlBox :: (MonadConc m) => ControlConfig -> m () -> ControlBox m

testBox :: IO Bool Source #

send Start, wait for a Ready signal, run action, wait x secs, then send Quit