circuitflow-0.3.0.1
Safe HaskellNone
LanguageHaskell2010

Pipeline.Internal.Backend.Network

Synopsis

Documentation

class Network n where #

Network typeclass

Methods

startNetwork #

Arguments

:: InitialPipes inS inT 
=> Circuit inS inT outS outT nin

The Circuit used to create the network

-> IO (n inS inT outS outT)

The created network

Starts a network with the given Circuit as specification.

stopNetwork :: n inS inT outS outT -> IO () #

Stops the given network

read #

Arguments

:: n inputsS inputsT outputsS outputsT

The network to retrieve inputs from

-> IO (JobUUID, Either TaskError (HList' outputsS outputsT))

The identifier for the output and the output values | Write a set of inputs into the network

This will read from the outputs of the network.

This is a blocking call, therefore if there are no outputs to be read then the program will deadlock.

write #

Arguments

:: JobUUID

A unique identifier for the input values

-> HList' inputsS inputsT

The input values

-> n inputsS inputsT outputsS outputsT

The network to input the values in to

-> IO () 

Instances

Instances details
Network BasicNetwork # 
Instance details

Defined in Pipeline.Internal.Backend.BasicNetwork

Methods

startNetwork :: forall (inS :: [Type -> Type]) (inT :: [Type]) (outS :: [Type -> Type]) (outT :: [Type]) (nin :: Nat). InitialPipes inS inT => Circuit inS inT outS outT nin -> IO (BasicNetwork inS inT outS outT) #

stopNetwork :: forall (inS :: [Type -> Type]) (inT :: [Type]) (outS :: [Type -> Type]) (outT :: [Type]). BasicNetwork inS inT outS outT -> IO () #

read :: forall (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]). BasicNetwork inputsS inputsT outputsS outputsT -> IO (JobUUID, Either TaskError (HList' outputsS outputsT)) #

write :: forall (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]). JobUUID -> HList' inputsS inputsT -> BasicNetwork inputsS inputsT outputsS outputsT -> IO () #

class InitialPipes (inputsS :: [Type -> Type]) (inputsT :: [Type]) where #

Used to build a list of pipes from a list of types.

Methods

initialPipes :: IO (PipeList inputsS inputsT) #

Instances

Instances details
InitialPipes ('[] :: [Type -> Type]) ('[] :: [Type]) # 
Instance details

Defined in Pipeline.Internal.Backend.Network

Methods

initialPipes :: IO (PipeList '[] '[]) #

(InitialPipes fs as, Eq (f a)) => InitialPipes (f ': fs) (a ': as) # 
Instance details

Defined in Pipeline.Internal.Backend.Network

Methods

initialPipes :: IO (PipeList (f ': fs) (a ': as)) #

newtype N n asS asT a b c d e #

Constructors

N 

Fields

  • unN :: n asS asT a b -> IO (n asS asT c d)
     

class (IFunctor5 iF, Network n) => BuildNetworkAlg n iF where #

The accumulating fold to build the network.

Methods

buildNetworkAlg :: iF (N n asS asT) bsS bsT csS csT nbs -> IO (N n asS asT bsS bsT csS csT nbs) #

Instances

Instances details
BuildNetworkAlg BasicNetwork Map # 
Instance details

Defined in Pipeline.Internal.Backend.BasicNetwork

Methods

buildNetworkAlg :: forall (asS :: [Type -> Type]) (asT :: [Type]) (bsS :: [Type -> Type]) (bsT :: [Type]) (csS :: [Type -> Type]) (csT :: [Type]) (nbs :: k). Map (N BasicNetwork asS asT) bsS bsT csS csT nbs -> IO (N BasicNetwork asS asT bsS bsT csS csT nbs) #

BuildNetworkAlg BasicNetwork Task # 
Instance details

Defined in Pipeline.Internal.Backend.BasicNetwork

Methods

buildNetworkAlg :: forall (asS :: [Type -> Type]) (asT :: [Type]) (bsS :: [Type -> Type]) (bsT :: [Type]) (csS :: [Type -> Type]) (csT :: [Type]) (nbs :: k). Task (N BasicNetwork asS asT) bsS bsT csS csT nbs -> IO (N BasicNetwork asS asT bsS bsT csS csT nbs) #

BuildNetworkAlg BasicNetwork DropR # 
Instance details

Defined in Pipeline.Internal.Backend.BasicNetwork

Methods

buildNetworkAlg :: forall (asS :: [Type -> Type]) (asT :: [Type]) (bsS :: [Type -> Type]) (bsT :: [Type]) (csS :: [Type -> Type]) (csT :: [Type]) (nbs :: k). DropR (N BasicNetwork asS asT) bsS bsT csS csT nbs -> IO (N BasicNetwork asS asT bsS bsT csS csT nbs) #

BuildNetworkAlg BasicNetwork DropL # 
Instance details

Defined in Pipeline.Internal.Backend.BasicNetwork

Methods

buildNetworkAlg :: forall (asS :: [Type -> Type]) (asT :: [Type]) (bsS :: [Type -> Type]) (bsT :: [Type]) (csS :: [Type -> Type]) (csT :: [Type]) (nbs :: k). DropL (N BasicNetwork asS asT) bsS bsT csS csT nbs -> IO (N BasicNetwork asS asT bsS bsT csS csT nbs) #

BuildNetworkAlg BasicNetwork Swap # 
Instance details

Defined in Pipeline.Internal.Backend.BasicNetwork

Methods

buildNetworkAlg :: forall (asS :: [Type -> Type]) (asT :: [Type]) (bsS :: [Type -> Type]) (bsT :: [Type]) (csS :: [Type -> Type]) (csT :: [Type]) (nbs :: k). Swap (N BasicNetwork asS asT) bsS bsT csS csT nbs -> IO (N BasicNetwork asS asT bsS bsT csS csT nbs) #

BuildNetworkAlg BasicNetwork Beside # 
Instance details

Defined in Pipeline.Internal.Backend.BasicNetwork

Methods

buildNetworkAlg :: forall (asS :: [Type -> Type]) (asT :: [Type]) (bsS :: [Type -> Type]) (bsT :: [Type]) (csS :: [Type -> Type]) (csT :: [Type]) (nbs :: k). Beside (N BasicNetwork asS asT) bsS bsT csS csT nbs -> IO (N BasicNetwork asS asT bsS bsT csS csT nbs) #

BuildNetworkAlg BasicNetwork Then # 
Instance details

Defined in Pipeline.Internal.Backend.BasicNetwork

Methods

buildNetworkAlg :: forall (asS :: [Type -> Type]) (asT :: [Type]) (bsS :: [Type -> Type]) (bsT :: [Type]) (csS :: [Type -> Type]) (csT :: [Type]) (nbs :: k). Then (N BasicNetwork asS asT) bsS bsT csS csT nbs -> IO (N BasicNetwork asS asT bsS bsT csS csT nbs) #

BuildNetworkAlg BasicNetwork Replicate # 
Instance details

Defined in Pipeline.Internal.Backend.BasicNetwork

Methods

buildNetworkAlg :: forall (asS :: [Type -> Type]) (asT :: [Type]) (bsS :: [Type -> Type]) (bsT :: [Type]) (csS :: [Type -> Type]) (csT :: [Type]) (nbs :: k). Replicate (N BasicNetwork asS asT) bsS bsT csS csT nbs -> IO (N BasicNetwork asS asT bsS bsT csS csT nbs) #

BuildNetworkAlg BasicNetwork Id # 
Instance details

Defined in Pipeline.Internal.Backend.BasicNetwork

Methods

buildNetworkAlg :: forall (asS :: [Type -> Type]) (asT :: [Type]) (bsS :: [Type -> Type]) (bsT :: [Type]) (csS :: [Type -> Type]) (csT :: [Type]) (nbs :: k). Id (N BasicNetwork asS asT) bsS bsT csS csT nbs -> IO (N BasicNetwork asS asT bsS bsT csS csT nbs) #

(BuildNetworkAlg n iF, BuildNetworkAlg n iG) => BuildNetworkAlg n (iF :+: iG :: ([Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> k -> Type) -> [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> k -> Type) # 
Instance details

Defined in Pipeline.Internal.Backend.Network

Methods

buildNetworkAlg :: forall (asS :: [Type -> Type]) (asT :: [Type]) (bsS :: [Type -> Type]) (bsT :: [Type]) (csS :: [Type -> Type]) (csT :: [Type]) (nbs :: k0). (iF :+: iG) (N n asS asT) bsS bsT csS csT nbs -> IO (N n asS asT bsS bsT csS csT nbs) #