Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Circuit = IFix5 CircuitF
- type CircuitF = Id :+: (Replicate :+: (Then :+: (Beside :+: (Swap :+: (DropL :+: (DropR :+: (Task :+: Map)))))))
- data Id (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where
- Id :: DataStore' '[inputS] '[inputT] => Id iF '[inputS] '[inputT] '[inputS] '[inputT] N1
- data Replicate (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where
- Replicate :: DataStore' '[f] '[a] => Replicate iF '[f] '[a] [f, f] '[a, a] N1
- data Then (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where
- 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
- data Beside (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where
- 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)
- data Swap (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where
- Swap :: DataStore' '[f, g] '[a, b] => Swap iF '[f, g] '[a, b] '[g, f] '[b, a] N2
- data DropL (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where
- DropL :: DataStore' '[f, g] '[a, b] => DropL iF '[f, g] '[a, b] '[g] '[b] N2
- data DropR (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where
- DropR :: DataStore' '[f, g] '[a, b] => DropR iF '[f, g] '[a, b] '[f] '[a] N2
- data Task (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where
- data Map (iF :: [Type -> Type] -> [Type] -> [Type -> Type] -> [Type] -> Nat -> Type) (inputsS :: [Type -> Type]) (inputsT :: [Type]) (outputsS :: [Type -> Type]) (outputsT :: [Type]) (ninputs :: Nat) where
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.
type CircuitF = Id :+: (Replicate :+: (Then :+: (Beside :+: (Swap :+: (DropL :+: (DropR :+: (Task :+: Map))))))) #
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 #
Id :: DataStore' '[inputS] '[inputT] => Id iF '[inputS] '[inputT] '[inputS] '[inputT] N1 |
Instances
BuildNetworkAlg BasicNetwork Id # | |
Defined in Pipeline.Internal.Backend.BasicNetwork | |
IFunctor5 Id # | |
Defined in Pipeline.Internal.Core.CircuitAST 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 #
Replicate :: DataStore' '[f] '[a] => Replicate iF '[f] '[a] [f, f] '[a, a] N1 |
Instances
BuildNetworkAlg BasicNetwork Replicate # | |
Defined in Pipeline.Internal.Backend.BasicNetwork | |
IFunctor5 Replicate # | |
Defined in Pipeline.Internal.Core.CircuitAST 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 #
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
BuildNetworkAlg BasicNetwork Then # | |
Defined in Pipeline.Internal.Backend.BasicNetwork | |
IFunctor5 Then # | |
Defined in Pipeline.Internal.Core.CircuitAST 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 #
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
BuildNetworkAlg BasicNetwork Beside # | |
Defined in Pipeline.Internal.Backend.BasicNetwork | |
IFunctor5 Beside # | |
Defined in Pipeline.Internal.Core.CircuitAST 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 #
Swap :: DataStore' '[f, g] '[a, b] => Swap iF '[f, g] '[a, b] '[g, f] '[b, a] N2 |
Instances
BuildNetworkAlg BasicNetwork Swap # | |
Defined in Pipeline.Internal.Backend.BasicNetwork | |
IFunctor5 Swap # | |
Defined in Pipeline.Internal.Core.CircuitAST 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 #
DropL :: DataStore' '[f, g] '[a, b] => DropL iF '[f, g] '[a, b] '[g] '[b] N2 |
Instances
BuildNetworkAlg BasicNetwork DropL # | |
Defined in Pipeline.Internal.Backend.BasicNetwork | |
IFunctor5 DropL # | |
Defined in Pipeline.Internal.Core.CircuitAST 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 #
DropR :: DataStore' '[f, g] '[a, b] => DropR iF '[f, g] '[a, b] '[f] '[a] N2 |
Instances
BuildNetworkAlg BasicNetwork DropR # | |
Defined in Pipeline.Internal.Backend.BasicNetwork | |
IFunctor5 DropR # | |
Defined in Pipeline.Internal.Core.CircuitAST 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 #
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
BuildNetworkAlg BasicNetwork Task # | |
Defined in Pipeline.Internal.Backend.BasicNetwork | |
IFunctor5 Task # | |
Defined in Pipeline.Internal.Core.CircuitAST 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 #
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
BuildNetworkAlg BasicNetwork Map # | |
Defined in Pipeline.Internal.Backend.BasicNetwork | |
IFunctor5 Map # | |
Defined in Pipeline.Internal.Core.CircuitAST 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) # |