circuitflow-0.3.0.1
Safe HaskellNone
LanguageHaskell2010

Pipeline.Internal.Core.CircuitAST

Contents

Synopsis

Documentation

type Circuit = IFix5 CircuitF #

The core type for a Circuit. It takes 5 different type arguments

Circuit (inputsStorageTypes  :: [Type -> Type]) (inputsTypes  :: [Type])
        (outputsStorageTypes :: [Type -> Type]) (outputsTypes :: [Type])
        (nInputs :: Nat)

inputStorageTypes is a type-list of storage types, for example '[VariableStore, CSVStore].

inputTypes is a type-list of the types stored in the storage, for example '[Int, [(String, Float)]].

outputsStorageTypes and inputTypes mirror the examples above, but for the outputs instead.

nInputs is a type-level Nat that is the length of all input lists.

Constructors

data Id (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where #

Constructors

Id :: DataStore' '[inputS] '[inputT] => Id iF '[inputS] '[inputT] '[inputS] '[inputT] N1 

Instances

Instances details
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) #

IFunctor5 Id # 
Instance details

Defined in Pipeline.Internal.Core.CircuitAST

Methods

imap5 :: forall f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> g' a b c d e) -> Id f' a b c d e -> Id g' a b c d e #

imapM5 :: forall m f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). Monad m => (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> m (g' a b c d e)) -> Id f' a b c d e -> m (Id g' a b c d e) #

data Replicate (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where #

Constructors

Replicate :: DataStore' '[f] '[a] => Replicate iF '[f] '[a] [f, f] '[a, a] N1 

Instances

Instances details
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) #

IFunctor5 Replicate # 
Instance details

Defined in Pipeline.Internal.Core.CircuitAST

Methods

imap5 :: forall f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> g' a b c d e) -> Replicate f' a b c d e -> Replicate g' a b c d e #

imapM5 :: forall m f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). Monad m => (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> m (g' a b c d e)) -> Replicate f' a b c d e -> m (Replicate g' a b c d e) #

data Then (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where #

Constructors

Then :: (DataStore' fs as, DataStore' gs bs, DataStore' hs cs) => iF fs as gs bs nfs -> iF gs bs hs cs ngs -> Then iF fs as hs cs nfs 

Instances

Instances details
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) #

IFunctor5 Then # 
Instance details

Defined in Pipeline.Internal.Core.CircuitAST

Methods

imap5 :: forall f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> g' a b c d e) -> Then f' a b c d e -> Then g' a b c d e #

imapM5 :: forall m f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). Monad m => (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> m (g' a b c d e)) -> Then f' a b c d e -> m (Then g' a b c d e) #

data Beside (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where #

Constructors

Beside :: (DataStore' fs as, DataStore' gs bs, DataStore' hs cs, DataStore' is ds, IsNat nfs, IsNat nhs, nfs ~ Length fs, Length fs ~ Length as, Length gs ~ Length bs, Length hs ~ Length cs, Length is ~ Length ds, Take (Length as) (as :++ cs) ~ as, Take (Length as) (fs :++ hs) ~ fs, Drop (Length as) (as :++ cs) ~ cs, Drop (Length as) (fs :++ hs) ~ hs, AppendP gs bs is ds) => iF fs as gs bs nfs -> iF hs cs is ds nhs -> Beside iF (fs :++ hs) (as :++ cs) (gs :++ is) (bs :++ ds) (nfs :+ nhs) 

Instances

Instances details
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) #

IFunctor5 Beside # 
Instance details

Defined in Pipeline.Internal.Core.CircuitAST

Methods

imap5 :: forall f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> g' a b c d e) -> Beside f' a b c d e -> Beside g' a b c d e #

imapM5 :: forall m f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). Monad m => (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> m (g' a b c d e)) -> Beside f' a b c d e -> m (Beside g' a b c d e) #

data Swap (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where #

Constructors

Swap :: DataStore' '[f, g] '[a, b] => Swap iF '[f, g] '[a, b] '[g, f] '[b, a] N2 

Instances

Instances details
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) #

IFunctor5 Swap # 
Instance details

Defined in Pipeline.Internal.Core.CircuitAST

Methods

imap5 :: forall f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> g' a b c d e) -> Swap f' a b c d e -> Swap g' a b c d e #

imapM5 :: forall m f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). Monad m => (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> m (g' a b c d e)) -> Swap f' a b c d e -> m (Swap g' a b c d e) #

data DropL (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where #

Constructors

DropL :: DataStore' '[f, g] '[a, b] => DropL iF '[f, g] '[a, b] '[g] '[b] N2 

Instances

Instances details
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) #

IFunctor5 DropL # 
Instance details

Defined in Pipeline.Internal.Core.CircuitAST

Methods

imap5 :: forall f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> g' a b c d e) -> DropL f' a b c d e -> DropL g' a b c d e #

imapM5 :: forall m f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). Monad m => (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> m (g' a b c d e)) -> DropL f' a b c d e -> m (DropL g' a b c d e) #

data DropR (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where #

Constructors

DropR :: DataStore' '[f, g] '[a, b] => DropR iF '[f, g] '[a, b] '[f] '[a] N2 

Instances

Instances details
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) #

IFunctor5 DropR # 
Instance details

Defined in Pipeline.Internal.Core.CircuitAST

Methods

imap5 :: forall f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> g' a b c d e) -> DropR f' a b c d e -> DropR g' a b c d e #

imapM5 :: forall m f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). Monad m => (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> m (g' a b c d e)) -> DropR f' a b c d e -> m (DropR g' a b c d e) #

data Task (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where #

Constructors

Task :: ((Length outputsS := 'Succ 'Zero) ~ 'True, outputsS ~ '[g'], outputsT ~ '[b'], DataStore' inputsS inputsT, DataStore g' b', Eq (g' b')) => (HList' inputsS inputsT -> g' b' -> ExceptT SomeException IO ()) -> Task iF inputsS inputsT outputsS outputsT (Length inputsS) 

Instances

Instances details
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) #

IFunctor5 Task # 
Instance details

Defined in Pipeline.Internal.Core.CircuitAST

Methods

imap5 :: forall f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> g' a b c d e) -> Task f' a b c d e -> Task g' a b c d e #

imapM5 :: forall m f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). Monad m => (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> m (g' a b c d e)) -> Task f' a b c d e -> m (Task g' a b c d e) #

data Map (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where #

Constructors

Map :: (DataStore' '[f] '[[a]], DataStore g [b], Eq (g [b]), Eq a) => Circuit '[Var] '[a] '[Var] '[b] N1 -> Map iF '[f] '[[a]] '[g] '[[b]] N1 

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) #

IFunctor5 Map # 
Instance details

Defined in Pipeline.Internal.Core.CircuitAST

Methods

imap5 :: forall f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> g' a b c d e) -> Map f' a b c d e -> Map g' a b c d e #

imapM5 :: forall m f' g' (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). Monad m => (forall (a :: k) (b :: k) (c :: k) (d :: k) (e :: k). f' a b c d e -> m (g' a b c d e)) -> Map f' a b c d e -> m (Map g' a b c d e) #