{-# LANGUAGE PostfixOperators, TypeFamilies #-}
{-# OPTIONS_HADDOCK prune #-}
module ForSyDe.Atom.MoC.SDF.SADF (
Signal, Prod, Cons, signal, delay,
kernel11, kernel12, kernel13, kernel14,
kernel21, kernel22, kernel23, kernel24,
kernel31, kernel32, kernel33, kernel34,
kernel41, kernel42, kernel43, kernel44,
detector11, detector12, detector13, detector14,
detector21, detector22, detector23, detector24,
detector31, detector32, detector33, detector34,
detector41, detector42, detector43, detector44,
) where
import ForSyDe.Atom.MoC.SDF.Core
import ForSyDe.Atom.MoC.SDF.SDF (delay)
import ForSyDe.Atom.MoC hiding (delay)
kernel11 :: Signal (Cons, Prod, [a1] -> [b1])
-> Signal a1
-> Signal b1
kernel21 :: Signal ((Cons, Cons), Prod, [a1] -> [a2] -> [b1])
-> Signal a1 -> Signal a2
-> Signal b1
kernel31 :: Signal ((Cons, Cons, Cons), Prod,
[a1] -> [a2] -> [a3] -> [b1])
-> Signal a1 -> Signal a2 -> Signal a3
-> Signal b1
kernel41 :: Signal ((Cons, Cons, Cons, Cons), Prod,
[a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
-> Signal b1
kernel12 :: Signal (Cons, (Prod, Prod), [a1] -> ([b1], [b2]))
-> Signal a1
-> (Signal b1, Signal b2)
kernel22 :: Signal ((Cons, Cons), (Prod, Prod),
[a1] -> [a2] -> ([b1], [b2]))
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2)
kernel32 :: Signal ((Cons, Cons, Cons), (Prod, Prod),
[a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> Signal a1 -> Signal a2 -> Signal a3
-> (Signal b1, Signal b2)
kernel42 :: Signal ((Cons, Cons, Cons, Cons), (Prod, Prod),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
-> (Signal b1, Signal b2)
kernel13 :: Signal (Cons, (Prod, Prod, Prod), [a1] -> ([b1], [b2], [b3]))
-> Signal a1
-> (Signal b1, Signal b2, Signal b3)
kernel23 :: Signal ((Cons, Cons), (Prod, Prod, Prod),
[a1] -> [a2] -> ([b1], [b2], [b3]))
-> Signal a1 -> Signal a2
-> (Signal b1, Signal b2, Signal b3)
kernel33 :: Signal ((Cons, Cons, Cons), (Prod, Prod, Prod),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> Signal a1 -> Signal a2 -> Signal a3
-> (Signal b1, Signal b2, Signal b3)
kernel43 :: Signal ((Cons, Cons, Cons, Cons), (Prod, Prod, Prod),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
-> (Signal b1, Signal b2, Signal b3)
kernel14 :: Signal (Cons, (Prod, Prod, Prod, Prod),
[a1] -> ([b1], [c], [d], [e]))
-> Signal a1
-> (Signal b1, Signal c, Signal d, Signal e)
kernel24 :: Signal ((Cons, Cons), (Prod, Prod, Prod, Prod),
[a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
-> Signal a1 -> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
kernel34 :: Signal ((Cons, Cons, Cons), (Prod, Prod, Prod, Prod),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
-> Signal a1 -> Signal a2 -> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
kernel44 :: Signal ((Cons, Cons, Cons, Cons), (Prod, Prod, Prod, Prod),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
<$$> :: (a -> b) -> Stream (SDF a) -> Stream (SDF b)
(<$$>) = (SDF a -> SDF b) -> Stream (SDF a) -> Stream (SDF b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ((SDF a -> SDF b) -> Stream (SDF a) -> Stream (SDF b))
-> ((a -> b) -> SDF a -> SDF b)
-> (a -> b)
-> Stream (SDF a)
-> Stream (SDF b)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (a -> b) -> SDF a -> SDF b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
kernel11 :: Signal (Cons, Cons, [a1] -> [b1]) -> Signal a1 -> Signal b1
kernel11 sf :: Signal (Cons, Cons, [a1] -> [b1])
sf s1 :: Signal a1
s1 =
((Cons, Cons, [a1] -> [b1]) -> (Cons, [a1] -> (Cons, [b1]))
forall c p a b. (c, p, a -> b) -> (c, a -> (p, b))
scen11 ((Cons, Cons, [a1] -> [b1]) -> (Cons, [a1] -> (Cons, [b1])))
-> Signal (Cons, Cons, [a1] -> [b1])
-> Stream (SDF (Cons, [a1] -> (Cons, [b1])))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal (Cons, Cons, [a1] -> [b1])
sf Stream (SDF (Fun SDF a1 (Cons, [b1])))
-> Signal a1 -> Stream (SDF (Cons, [b1]))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Ret SDF b1)) -> Signal b1
forall (e :: * -> *) b.
MoC e =>
Stream (e (Ret e b)) -> Stream (e b)
-*)
kernel21 :: Signal ((Cons, Cons), Cons, [a1] -> [a2] -> [b1])
-> Signal a1 -> Signal a2 -> Signal b1
kernel21 sf :: Signal ((Cons, Cons), Cons, [a1] -> [a2] -> [b1])
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 =
(((Cons, Cons), Cons, [a1] -> [a2] -> [b1])
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [b1])))
forall c1 c2 p a1 a2 b.
((c1, c2), p, a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> (p, b)))
scen21 (((Cons, Cons), Cons, [a1] -> [a2] -> [b1])
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [b1]))))
-> Signal ((Cons, Cons), Cons, [a1] -> [a2] -> [b1])
-> Stream (SDF (Cons, [a1] -> (Cons, [a2] -> (Cons, [b1]))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal ((Cons, Cons), Cons, [a1] -> [a2] -> [b1])
sf Stream (SDF (Fun SDF a1 (Cons, [a2] -> (Cons, [b1]))))
-> Signal a1 -> Stream (SDF (Cons, [a2] -> (Cons, [b1])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 (Cons, [b1])))
-> Signal a2 -> Stream (SDF (Cons, [b1]))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Ret SDF b1)) -> Signal b1
forall (e :: * -> *) b.
MoC e =>
Stream (e (Ret e b)) -> Stream (e b)
-*)
kernel31 :: Signal ((Cons, Cons, Cons), Cons, [a1] -> [a2] -> [a3] -> [b1])
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal b1
kernel31 sf :: Signal ((Cons, Cons, Cons), Cons, [a1] -> [a2] -> [a3] -> [b1])
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 =
(((Cons, Cons, Cons), Cons, [a1] -> [a2] -> [a3] -> [b1])
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [b1]))))
forall c1 c2 c3 p a1 a2 a3 b.
((c1, c2, c3), p, a1 -> a2 -> a3 -> b)
-> (c1, a1 -> (c2, a2 -> (c3, a3 -> (p, b))))
scen31 (((Cons, Cons, Cons), Cons, [a1] -> [a2] -> [a3] -> [b1])
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [b1])))))
-> Signal ((Cons, Cons, Cons), Cons, [a1] -> [a2] -> [a3] -> [b1])
-> Stream
(SDF (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [b1])))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal ((Cons, Cons, Cons), Cons, [a1] -> [a2] -> [a3] -> [b1])
sf Stream
(SDF (Fun SDF a1 (Cons, [a2] -> (Cons, [a3] -> (Cons, [b1])))))
-> Signal a1
-> Stream (SDF (Cons, [a2] -> (Cons, [a3] -> (Cons, [b1]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 (Cons, [a3] -> (Cons, [b1]))))
-> Signal a2 -> Stream (SDF (Cons, [a3] -> (Cons, [b1])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 (Cons, [b1])))
-> Signal a3 -> Stream (SDF (Cons, [b1]))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream (SDF (Ret SDF b1)) -> Signal b1
forall (e :: * -> *) b.
MoC e =>
Stream (e (Ret e b)) -> Stream (e b)
-*)
kernel41 :: Signal
((Cons, Cons, Cons, Cons), Cons,
[a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4 -> Signal b1
kernel41 sf :: Signal
((Cons, Cons, Cons, Cons), Cons,
[a1] -> [a2] -> [a3] -> [a4] -> [b1])
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 =
(((Cons, Cons, Cons, Cons), Cons,
[a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> (Cons,
[a1]
-> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1])))))
forall c1 c2 c3 c4 p a1 a2 a3 a4 b.
((c1, c2, c3, c4), p, a1 -> a2 -> a3 -> a4 -> b)
-> (c1, a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (p, b)))))
scen41 (((Cons, Cons, Cons, Cons), Cons,
[a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> (Cons,
[a1]
-> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1]))))))
-> Signal
((Cons, Cons, Cons, Cons), Cons,
[a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> Stream
(SDF
(Cons,
[a1]
-> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1]))))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal
((Cons, Cons, Cons, Cons), Cons,
[a1] -> [a2] -> [a3] -> [a4] -> [b1])
sf Stream
(SDF
(Fun
SDF
a1
(Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1]))))))
-> Signal a1
-> Stream
(SDF (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1])))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream
(SDF (Fun SDF a2 (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1])))))
-> Signal a2
-> Stream (SDF (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 (Cons, [a4] -> (Cons, [b1]))))
-> Signal a3 -> Stream (SDF (Cons, [a4] -> (Cons, [b1])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream (SDF (Fun SDF a4 (Cons, [b1])))
-> Signal a4 -> Stream (SDF (Cons, [b1]))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a4
s4 Stream (SDF (Ret SDF b1)) -> Signal b1
forall (e :: * -> *) b.
MoC e =>
Stream (e (Ret e b)) -> Stream (e b)
-*)
kernel12 :: Signal (Cons, (Cons, Cons), [a1] -> ([b1], [b2]))
-> Signal a1 -> (Signal b1, Signal b2)
kernel12 sf :: Signal (Cons, (Cons, Cons), [a1] -> ([b1], [b2]))
sf s1 :: Signal a1
s1 =
((Cons, (Cons, Cons), [a1] -> ([b1], [b2]))
-> (Cons, [a1] -> ((Cons, [b1]), (Cons, [b2])))
forall c p1 p2 a b1 b2.
(c, (p1, p2), a -> (b1, b2)) -> (c, a -> ((p1, b1), (p2, b2)))
scen12 ((Cons, (Cons, Cons), [a1] -> ([b1], [b2]))
-> (Cons, [a1] -> ((Cons, [b1]), (Cons, [b2]))))
-> Signal (Cons, (Cons, Cons), [a1] -> ([b1], [b2]))
-> Stream (SDF (Cons, [a1] -> ((Cons, [b1]), (Cons, [b2]))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal (Cons, (Cons, Cons), [a1] -> ([b1], [b2]))
sf Stream (SDF (Fun SDF a1 ((Cons, [b1]), (Cons, [b2]))))
-> Signal a1 -> Stream (SDF ((Cons, [b1]), (Cons, [b2])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Ret SDF b1, Ret SDF b2)) -> (Signal b1, Signal b2)
forall (e :: * -> *) b1 b2.
MoC e =>
Stream (e (Ret e b1, Ret e b2)) -> (Stream (e b1), Stream (e b2))
-*<)
kernel22 :: Signal ((Cons, Cons), (Cons, Cons), [a1] -> [a2] -> ([b1], [b2]))
-> Signal a1 -> Signal a2 -> (Signal b1, Signal b2)
kernel22 sf :: Signal ((Cons, Cons), (Cons, Cons), [a1] -> [a2] -> ([b1], [b2]))
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 =
(((Cons, Cons), (Cons, Cons), [a1] -> [a2] -> ([b1], [b2]))
-> (Cons, [a1] -> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]))))
forall ctxa ctxb a1 a2 b1 b2.
((ctxa, ctxa), (ctxb, ctxb), a1 -> a2 -> (b1, b2))
-> (ctxa, a1 -> (ctxa, a2 -> ((ctxb, b1), (ctxb, b2))))
scen22 (((Cons, Cons), (Cons, Cons), [a1] -> [a2] -> ([b1], [b2]))
-> (Cons, [a1] -> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2])))))
-> Signal
((Cons, Cons), (Cons, Cons), [a1] -> [a2] -> ([b1], [b2]))
-> Stream
(SDF (Cons, [a1] -> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2])))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal ((Cons, Cons), (Cons, Cons), [a1] -> [a2] -> ([b1], [b2]))
sf Stream
(SDF (Fun SDF a1 (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2])))))
-> Signal a1
-> Stream (SDF (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 ((Cons, [b1]), (Cons, [b2]))))
-> Signal a2 -> Stream (SDF ((Cons, [b1]), (Cons, [b2])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Ret SDF b1, Ret SDF b2)) -> (Signal b1, Signal b2)
forall (e :: * -> *) b1 b2.
MoC e =>
Stream (e (Ret e b1, Ret e b2)) -> (Stream (e b1), Stream (e b2))
-*<)
kernel32 :: Signal
((Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> Signal a1 -> Signal a2 -> Signal a3 -> (Signal b1, Signal b2)
kernel32 sf :: Signal
((Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2]))
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 =
(((Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> (Cons,
[a1]
-> (Cons, [a2] -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2])))))
forall c ctxa ctxb a a1 a2 b1 b2.
((c, ctxa, ctxa), (ctxb, ctxb), a -> a1 -> a2 -> (b1, b2))
-> (c, a -> (ctxa, a1 -> (ctxa, a2 -> ((ctxb, b1), (ctxb, b2)))))
scen32 (((Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> (Cons,
[a1]
-> (Cons, [a2] -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]))))))
-> Signal
((Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> Stream
(SDF
(Cons,
[a1]
-> (Cons, [a2] -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]))))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal
((Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2]))
sf Stream
(SDF
(Fun
SDF
a1
(Cons, [a2] -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]))))))
-> Signal a1
-> Stream
(SDF (Cons, [a2] -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2])))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream
(SDF (Fun SDF a2 (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2])))))
-> Signal a2
-> Stream (SDF (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 ((Cons, [b1]), (Cons, [b2]))))
-> Signal a3 -> Stream (SDF ((Cons, [b1]), (Cons, [b2])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream (SDF (Ret SDF b1, Ret SDF b2)) -> (Signal b1, Signal b2)
forall (e :: * -> *) b1 b2.
MoC e =>
Stream (e (Ret e b1, Ret e b2)) -> (Stream (e b1), Stream (e b2))
-*<)
kernel42 :: Signal
((Cons, Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
kernel42 sf :: Signal
((Cons, Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 =
(((Cons, Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> (Cons,
[a1]
-> (Cons,
[a2]
-> (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]))))))
forall c1 c2 ctxa ctxb a1 a2 a3 a4 b1 b2.
((c1, c2, ctxa, ctxa), (ctxb, ctxb),
a1 -> a2 -> a3 -> a4 -> (b1, b2))
-> (c1,
a1
-> (c2,
a2 -> (ctxa, a3 -> (ctxa, a4 -> ((ctxb, b1), (ctxb, b2))))))
scen42 (((Cons, Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> (Cons,
[a1]
-> (Cons,
[a2]
-> (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2])))))))
-> Signal
((Cons, Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> Stream
(SDF
(Cons,
[a1]
-> (Cons,
[a2]
-> (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2])))))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal
((Cons, Cons, Cons, Cons), (Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
sf Stream
(SDF
(Fun
SDF
a1
(Cons,
[a2]
-> (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2])))))))
-> Signal a1
-> Stream
(SDF
(Cons,
[a2]
-> (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]))))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream
(SDF
(Fun
SDF
a2
(Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]))))))
-> Signal a2
-> Stream
(SDF (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2])))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream
(SDF (Fun SDF a3 (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2])))))
-> Signal a3
-> Stream (SDF (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream (SDF (Fun SDF a4 ((Cons, [b1]), (Cons, [b2]))))
-> Signal a4 -> Stream (SDF ((Cons, [b1]), (Cons, [b2])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a4
s4 Stream (SDF (Ret SDF b1, Ret SDF b2)) -> (Signal b1, Signal b2)
forall (e :: * -> *) b1 b2.
MoC e =>
Stream (e (Ret e b1, Ret e b2)) -> (Stream (e b1), Stream (e b2))
-*<)
kernel13 :: Signal (Cons, (Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3]))
-> Signal a1 -> (Signal b1, Signal b2, Signal b3)
kernel13 sf :: Signal (Cons, (Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3]))
sf s1 :: Signal a1
s1 =
((Cons, (Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3]))
-> (Cons, [a1] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))
forall c p1 p2 p3 a b1 b2 b3.
(c, (p1, p2, p3), a -> (b1, b2, b3))
-> (c, a -> ((p1, b1), (p2, b2), (p3, b3)))
scen13 ((Cons, (Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3]))
-> (Cons, [a1] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
-> Signal (Cons, (Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3]))
-> Stream
(SDF (Cons, [a1] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal (Cons, (Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3]))
sf Stream
(SDF (Fun SDF a1 ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
-> Signal a1
-> Stream (SDF ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Ret SDF b1, Ret SDF b2, Ret SDF b3))
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) b1 b2 b3.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3))
-> (Stream (e b1), Stream (e b2), Stream (e b3))
-*<<)
kernel23 :: Signal
((Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3]))
-> Signal a1 -> Signal a2 -> (Signal b1, Signal b2, Signal b3)
kernel23 sf :: Signal
((Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3]))
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 =
(((Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3]))
-> (Cons,
[a1] -> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
forall c1 c2 p1 p2 p3 a1 a2 b1 b2 b3.
((c1, c2), (p1, p2, p3), a1 -> a2 -> (b1, b2, b3))
-> (c1, a1 -> (c2, a2 -> ((p1, b1), (p2, b2), (p3, b3))))
scen23 (((Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3]))
-> (Cons,
[a1]
-> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))
-> Signal
((Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3]))
-> Stream
(SDF
(Cons,
[a1]
-> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal
((Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3]))
sf Stream
(SDF
(Fun
SDF a1 (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))
-> Signal a1
-> Stream
(SDF (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream
(SDF (Fun SDF a2 ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
-> Signal a2
-> Stream (SDF ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Ret SDF b1, Ret SDF b2, Ret SDF b3))
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) b1 b2 b3.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3))
-> (Stream (e b1), Stream (e b2), Stream (e b3))
-*<<)
kernel33 :: Signal
((Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
kernel33 sf :: Signal
((Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 =
(((Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> (Cons,
[a1]
-> (Cons,
[a2]
-> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))
forall c1 c2 c3 p1 p2 p3 a1 a2 a3 b1 b2 b3.
((c1, c2, c3), (p1, p2, p3), a1 -> a2 -> a3 -> (b1, b2, b3))
-> (c1,
a1 -> (c2, a2 -> (c3, a3 -> ((p1, b1), (p2, b2), (p3, b3)))))
scen33 (((Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> (Cons,
[a1]
-> (Cons,
[a2]
-> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))))
-> Signal
((Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> Stream
(SDF
(Cons,
[a1]
-> (Cons,
[a2]
-> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal
((Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
sf Stream
(SDF
(Fun
SDF
a1
(Cons,
[a2]
-> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))))
-> Signal a1
-> Stream
(SDF
(Cons,
[a2]
-> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream
(SDF
(Fun
SDF a2 (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))
-> Signal a2
-> Stream
(SDF (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream
(SDF (Fun SDF a3 ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
-> Signal a3
-> Stream (SDF ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream (SDF (Ret SDF b1, Ret SDF b2, Ret SDF b3))
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) b1 b2 b3.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3))
-> (Stream (e b1), Stream (e b2), Stream (e b3))
-*<<)
kernel43 :: Signal
((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
kernel43 sf :: Signal
((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 =
(((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
-> (Cons,
[a1]
-> (Cons,
[a2]
-> (Cons,
[a3]
-> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))))
forall c1 c2 c3 c4 p1 p2 p3 a1 a2 a3 a4 b1 b2 b3.
((c1, c2, c3, c4), (p1, p2, p3),
a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
-> (c1,
a1
-> (c2,
a2 -> (c3, a3 -> (c4, a4 -> ((p1, b1), (p2, b2), (p3, b3))))))
scen43 (((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
-> (Cons,
[a1]
-> (Cons,
[a2]
-> (Cons,
[a3]
-> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))))
-> Signal
((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
-> Stream
(SDF
(Cons,
[a1]
-> (Cons,
[a2]
-> (Cons,
[a3]
-> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal
((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
sf Stream
(SDF
(Fun
SDF
a1
(Cons,
[a2]
-> (Cons,
[a3]
-> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))))
-> Signal a1
-> Stream
(SDF
(Cons,
[a2]
-> (Cons,
[a3]
-> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream
(SDF
(Fun
SDF
a2
(Cons,
[a3]
-> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))))
-> Signal a2
-> Stream
(SDF
(Cons,
[a3]
-> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream
(SDF
(Fun
SDF a3 (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))
-> Signal a3
-> Stream
(SDF (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream
(SDF (Fun SDF a4 ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
-> Signal a4
-> Stream (SDF ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a4
s4 Stream (SDF (Ret SDF b1, Ret SDF b2, Ret SDF b3))
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) b1 b2 b3.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3))
-> (Stream (e b1), Stream (e b2), Stream (e b3))
-*<<)
kernel14 :: Signal
(Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [c], [d], [e]))
-> Signal a1 -> (Signal b1, Signal c, Signal d, Signal e)
kernel14 sf :: Signal
(Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [c], [d], [e]))
sf s1 :: Signal a1
s1 =
((Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [c], [d], [e]))
-> (Cons,
[a1] -> ((Cons, [b1]), (Cons, [c]), (Cons, [d]), (Cons, [e])))
forall c p1 p2 p3 p4 a b1 b2 b3 b4.
(c, (p1, p2, p3, p4), a -> (b1, b2, b3, b4))
-> (c, a -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4)))
scen14 ((Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [c], [d], [e]))
-> (Cons,
[a1] -> ((Cons, [b1]), (Cons, [c]), (Cons, [d]), (Cons, [e]))))
-> Signal
(Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [c], [d], [e]))
-> Stream
(SDF
(Cons,
[a1] -> ((Cons, [b1]), (Cons, [c]), (Cons, [d]), (Cons, [e]))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal
(Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [c], [d], [e]))
sf Stream
(SDF
(Fun SDF a1 ((Cons, [b1]), (Cons, [c]), (Cons, [d]), (Cons, [e]))))
-> Signal a1
-> Stream
(SDF ((Cons, [b1]), (Cons, [c]), (Cons, [d]), (Cons, [e])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Ret SDF b1, Ret SDF c, Ret SDF d, Ret SDF e))
-> (Signal b1, Signal c, Signal d, Signal e)
forall (e :: * -> *) b1 b2 b3 b4.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3, Ret e b4))
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
-*<<<)
kernel24 :: Signal
((Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
kernel24 sf :: Signal
((Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 =
(((Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
[a1]
-> (Cons,
[a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))
forall c1 c2 p1 p2 p3 p4 a1 a2 b1 b2 b3 b4.
((c1, c2), (p1, p2, p3, p4), a1 -> a2 -> (b1, b2, b3, b4))
-> (c1, a1 -> (c2, a2 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4))))
scen24 (((Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
[a1]
-> (Cons,
[a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))
-> Signal
((Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
-> Stream
(SDF
(Cons,
[a1]
-> (Cons,
[a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal
((Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
sf Stream
(SDF
(Fun
SDF
a1
(Cons,
[a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))
-> Signal a1
-> Stream
(SDF
(Cons,
[a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream
(SDF
(Fun
SDF a2 ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))
-> Signal a2
-> Stream
(SDF ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) b1 b2 b3 b4.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3, Ret e b4))
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
-*<<<)
kernel34 :: Signal
((Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
kernel34 sf :: Signal
((Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 =
(((Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
[a1]
-> (Cons,
[a2]
-> (Cons,
[a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))
forall c1 c2 c3 p1 p2 p3 p4 a1 a2 a3 b1 b2 b3 b4.
((c1, c2, c3), (p1, p2, p3, p4),
a1 -> a2 -> a3 -> (b1, b2, b3, b4))
-> (c1,
a1
-> (c2,
a2 -> (c3, a3 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4)))))
scen34 (((Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
[a1]
-> (Cons,
[a2]
-> (Cons,
[a3]
-> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))
-> Signal
((Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
-> Stream
(SDF
(Cons,
[a1]
-> (Cons,
[a2]
-> (Cons,
[a3]
-> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal
((Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
sf Stream
(SDF
(Fun
SDF
a1
(Cons,
[a2]
-> (Cons,
[a3]
-> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))
-> Signal a1
-> Stream
(SDF
(Cons,
[a2]
-> (Cons,
[a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream
(SDF
(Fun
SDF
a2
(Cons,
[a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))
-> Signal a2
-> Stream
(SDF
(Cons,
[a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream
(SDF
(Fun
SDF a3 ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))
-> Signal a3
-> Stream
(SDF ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream (SDF (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) b1 b2 b3 b4.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3, Ret e b4))
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
-*<<<)
kernel44 :: Signal
((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
kernel44 sf :: Signal
((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
sf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 =
(((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
[a1]
-> (Cons,
[a2]
-> (Cons,
[a3]
-> (Cons,
[a4]
-> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))
forall c1 c2 c3 c4 p1 p2 p3 p4 a1 a2 a3 a4 b1 b2 b3 b4.
((c1, c2, c3, c4), (p1, p2, p3, p4),
a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
-> (c1,
a1
-> (c2,
a2
-> (c3,
a3 -> (c4, a4 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4))))))
scen44 (((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
[a1]
-> (Cons,
[a2]
-> (Cons,
[a3]
-> (Cons,
[a4]
-> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))))
-> Signal
((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
-> Stream
(SDF
(Cons,
[a1]
-> (Cons,
[a2]
-> (Cons,
[a3]
-> (Cons,
[a4]
-> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))))
forall a b. (a -> b) -> Stream (SDF a) -> Stream (SDF b)
<$$> Signal
((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
[a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
sf Stream
(SDF
(Fun
SDF
a1
(Cons,
[a2]
-> (Cons,
[a3]
-> (Cons,
[a4]
-> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))))
-> Signal a1
-> Stream
(SDF
(Cons,
[a2]
-> (Cons,
[a3]
-> (Cons,
[a4]
-> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream
(SDF
(Fun
SDF
a2
(Cons,
[a3]
-> (Cons,
[a4]
-> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))
-> Signal a2
-> Stream
(SDF
(Cons,
[a3]
-> (Cons,
[a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream
(SDF
(Fun
SDF
a3
(Cons,
[a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))
-> Signal a3
-> Stream
(SDF
(Cons,
[a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream
(SDF
(Fun
SDF a4 ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))
-> Signal a4
-> Stream
(SDF ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a4
s4 Stream (SDF (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) b1 b2 b3 b4.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3, Ret e b4))
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
-*<<<)
detector11 :: Cons
-> (s -> [a1] -> s)
-> (s -> (Prod, [y]))
-> s
-> Signal a1
-> Signal y
detector21 :: (Cons, Cons)
-> (s -> [a1] -> [a2] -> s)
-> (s -> (Prod, [y]))
-> s
-> Signal a1 -> Signal a2
-> Signal y
detector31 :: (Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> s)
-> (s -> (Prod, [y]))
-> s
-> Signal a1 -> Signal a2 -> Signal a3
-> Signal y
detector41 :: (Cons, Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (s -> (Prod, [y]))
-> s
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
-> Signal y
detector12 :: Cons
-> (s -> [a1] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2])))
-> s
-> Signal a1
-> (Signal y1, Signal y2)
detector22 :: (Cons, Cons)
-> (s -> [a1] -> [a2] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2])))
-> s
-> Signal a1
-> Signal a2
-> (Signal y1, Signal y2)
detector32 :: (Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2])))
-> s
-> Signal a1 -> Signal a2 -> Signal a3
-> (Signal y1, Signal y2)
detector42 :: (Cons, Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2])))
-> s
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
-> (Signal y1, Signal y2)
detector13 :: Cons
-> (s -> [a1] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2]), (Prod, [y3])))
-> s
-> Signal a1
-> (Signal y1, Signal y2, Signal y3)
detector23 :: (Cons, Cons)
-> (s -> [a1] -> [a2] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2]), (Prod, [y3])))
-> s
-> Signal a1 -> Signal a2
-> (Signal y1, Signal y2, Signal y3)
detector33 :: (Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2]), (Prod, [y3])))
-> s
-> Signal a1 -> Signal a2 -> Signal a3
-> (Signal y1, Signal y2, Signal y3)
detector43 :: (Cons, Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2]), (Prod, [y3])))
-> s
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
-> (Signal y1, Signal y2, Signal y3)
detector14 :: Cons
-> (s -> [a1] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2]), (Prod, [y3]), (Prod, [y4])))
-> s
-> Signal a1
-> (Signal y1, Signal y2, Signal y3, Signal y4)
detector24 :: (Cons, Cons)
-> (s -> [a1] -> [a2] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2]), (Prod, [y3]), (Prod, [y4])))
-> s
-> Signal a1 -> Signal a2
-> (Signal y1, Signal y2, Signal y3, Signal y4)
detector34 :: (Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2]), (Prod, [y3]), (Prod, [y4])))
-> s
-> Signal a1 -> Signal a2 -> Signal a3
-> (Signal y1, Signal y2, Signal y3, Signal y4)
detector44 :: (Cons, Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (s -> ((Prod, [y1]), (Prod, [y2]), (Prod, [y3]), (Prod, [y4])))
-> s
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
-> (Signal y1, Signal y2, Signal y3, Signal y4)
wrapFromSecond :: (t -> t) -> (t -> t) -> t -> t
wrapFromSecond f :: t -> t
f wrap :: t -> t
wrap s :: t
s = t -> t
wrap (t -> t) -> t -> t
forall a b. (a -> b) -> a -> b
$ t -> t
f t
s
detector11 :: Cons
-> (s -> [a1] -> s)
-> (s -> (Cons, [y]))
-> s
-> Signal a1
-> Signal y
detector11 c :: Cons
c ns :: s -> [a1] -> s
ns od :: s -> (Cons, [y])
od i :: s
i s1 :: Signal a1
s1 = (s -> (Cons, [y])
od (s -> (Cons, [y])) -> Stream (SDF s) -> Stream (SDF (Cons, [y]))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y)) -> Signal y
forall (e :: * -> *) b.
MoC e =>
Stream (e (Ret e b)) -> Stream (e b)
-*)
where g :: Stream (SDF s)
g = (s -> [a1] -> s)
-> (([a1] -> s) -> (Cons, [a1] -> s)) -> s -> (Cons, [a1] -> s)
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> s
ns (Cons -> ([a1] -> s) -> (Cons, [a1] -> s)
forall c a b. c -> (a -> b) -> (c, a -> b)
arg1 Cons
c) (s -> (Cons, [a1] -> s))
-> Stream (SDF s) -> Stream (SDF (Cons, [a1] -> s))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 s)) -> Signal a1 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector21 :: (Cons, Cons)
-> (s -> [a1] -> [a2] -> s)
-> (s -> (Cons, [y]))
-> s
-> Signal a1
-> Signal a2
-> Signal y
detector21 c :: (Cons, Cons)
c ns :: s -> [a1] -> [a2] -> s
ns od :: s -> (Cons, [y])
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 = (s -> (Cons, [y])
od (s -> (Cons, [y])) -> Stream (SDF s) -> Stream (SDF (Cons, [y]))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y)) -> Signal y
forall (e :: * -> *) b.
MoC e =>
Stream (e (Ret e b)) -> Stream (e b)
-*)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> s)
-> (([a1] -> [a2] -> s) -> (Cons, [a1] -> (Cons, [a2] -> s)))
-> s
-> (Cons, [a1] -> (Cons, [a2] -> s))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> s
ns ((Cons, Cons)
-> ([a1] -> [a2] -> s) -> (Cons, [a1] -> (Cons, [a2] -> s))
forall c1 c2 a1 a2 b.
(c1, c2) -> (a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> b))
arg2 (Cons, Cons)
c) (s -> (Cons, [a1] -> (Cons, [a2] -> s)))
-> Stream (SDF s) -> Stream (SDF (Cons, [a1] -> (Cons, [a2] -> s)))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 (Cons, [a2] -> s)))
-> Signal a1 -> Stream (SDF (Cons, [a2] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 s)) -> Signal a2 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector31 :: (Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> s)
-> (s -> (Cons, [y]))
-> s
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal y
detector31 c :: (Cons, Cons, Cons)
c ns :: s -> [a1] -> [a2] -> [a3] -> s
ns od :: s -> (Cons, [y])
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 = (s -> (Cons, [y])
od (s -> (Cons, [y])) -> Stream (SDF s) -> Stream (SDF (Cons, [y]))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y)) -> Signal y
forall (e :: * -> *) b.
MoC e =>
Stream (e (Ret e b)) -> Stream (e b)
-*)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> [a3] -> s)
-> (([a1] -> [a2] -> [a3] -> s)
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
-> s
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s)))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> [a3] -> s
ns ((Cons, Cons, Cons)
-> ([a1] -> [a2] -> [a3] -> s)
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s)))
forall c1 c2 c3 a1 a2 a3 b.
(c1, c2, c3)
-> (a1 -> a2 -> a3 -> b) -> (c1, a1 -> (c2, a2 -> (c3, a3 -> b)))
arg3 (Cons, Cons, Cons)
c) (s -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
-> Stream (SDF s)
-> Stream (SDF (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 (Cons, [a2] -> (Cons, [a3] -> s))))
-> Signal a1 -> Stream (SDF (Cons, [a2] -> (Cons, [a3] -> s)))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 (Cons, [a3] -> s)))
-> Signal a2 -> Stream (SDF (Cons, [a3] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 s)) -> Signal a3 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector41 :: (Cons, Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (s -> (Cons, [y]))
-> s
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> Signal y
detector41 c :: (Cons, Cons, Cons, Cons)
c ns :: s -> [a1] -> [a2] -> [a3] -> [a4] -> s
ns od :: s -> (Cons, [y])
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 = (s -> (Cons, [y])
od (s -> (Cons, [y])) -> Stream (SDF s) -> Stream (SDF (Cons, [y]))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y)) -> Signal y
forall (e :: * -> *) b.
MoC e =>
Stream (e (Ret e b)) -> Stream (e b)
-*)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (([a1] -> [a2] -> [a3] -> [a4] -> s)
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> s
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> [a3] -> [a4] -> s
ns ((Cons, Cons, Cons, Cons)
-> ([a1] -> [a2] -> [a3] -> [a4] -> s)
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall c1 c2 c3 c4 a1 a2 a3 a4 b.
(c1, c2, c3, c4)
-> (a1 -> a2 -> a3 -> a4 -> b)
-> (c1, a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> b))))
arg4 (Cons, Cons, Cons, Cons)
c) (s
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> Stream (SDF s)
-> Stream
(SDF
(Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream
(SDF
(Fun SDF a1 (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> Signal a1
-> Stream (SDF (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 (Cons, [a3] -> (Cons, [a4] -> s))))
-> Signal a2 -> Stream (SDF (Cons, [a3] -> (Cons, [a4] -> s)))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 (Cons, [a4] -> s)))
-> Signal a3 -> Stream (SDF (Cons, [a4] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream (SDF (Fun SDF a4 s)) -> Signal a4 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a4
s4
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector12 :: Cons
-> (s -> [a1] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2])))
-> s
-> Signal a1
-> (Signal y1, Signal y2)
detector12 c :: Cons
c ns :: s -> [a1] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]))
od i :: s
i s1 :: Signal a1
s1 = (s -> ((Cons, [y1]), (Cons, [y2]))
od (s -> ((Cons, [y1]), (Cons, [y2])))
-> Stream (SDF s) -> Stream (SDF ((Cons, [y1]), (Cons, [y2])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2)) -> (Signal y1, Signal y2)
forall (e :: * -> *) b1 b2.
MoC e =>
Stream (e (Ret e b1, Ret e b2)) -> (Stream (e b1), Stream (e b2))
-*<)
where g :: Stream (SDF s)
g = (s -> [a1] -> s)
-> (([a1] -> s) -> (Cons, [a1] -> s)) -> s -> (Cons, [a1] -> s)
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> s
ns (Cons -> ([a1] -> s) -> (Cons, [a1] -> s)
forall c a b. c -> (a -> b) -> (c, a -> b)
arg1 Cons
c) (s -> (Cons, [a1] -> s))
-> Stream (SDF s) -> Stream (SDF (Cons, [a1] -> s))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 s)) -> Signal a1 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector22 :: (Cons, Cons)
-> (s -> [a1] -> [a2] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2])))
-> s
-> Signal a1
-> Signal a2
-> (Signal y1, Signal y2)
detector22 c :: (Cons, Cons)
c ns :: s -> [a1] -> [a2] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]))
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 = (s -> ((Cons, [y1]), (Cons, [y2]))
od (s -> ((Cons, [y1]), (Cons, [y2])))
-> Stream (SDF s) -> Stream (SDF ((Cons, [y1]), (Cons, [y2])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2)) -> (Signal y1, Signal y2)
forall (e :: * -> *) b1 b2.
MoC e =>
Stream (e (Ret e b1, Ret e b2)) -> (Stream (e b1), Stream (e b2))
-*<)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> s)
-> (([a1] -> [a2] -> s) -> (Cons, [a1] -> (Cons, [a2] -> s)))
-> s
-> (Cons, [a1] -> (Cons, [a2] -> s))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> s
ns ((Cons, Cons)
-> ([a1] -> [a2] -> s) -> (Cons, [a1] -> (Cons, [a2] -> s))
forall c1 c2 a1 a2 b.
(c1, c2) -> (a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> b))
arg2 (Cons, Cons)
c) (s -> (Cons, [a1] -> (Cons, [a2] -> s)))
-> Stream (SDF s) -> Stream (SDF (Cons, [a1] -> (Cons, [a2] -> s)))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 (Cons, [a2] -> s)))
-> Signal a1 -> Stream (SDF (Cons, [a2] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 s)) -> Signal a2 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector32 :: (Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2])))
-> s
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal y1, Signal y2)
detector32 c :: (Cons, Cons, Cons)
c ns :: s -> [a1] -> [a2] -> [a3] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]))
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 = (s -> ((Cons, [y1]), (Cons, [y2]))
od (s -> ((Cons, [y1]), (Cons, [y2])))
-> Stream (SDF s) -> Stream (SDF ((Cons, [y1]), (Cons, [y2])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2)) -> (Signal y1, Signal y2)
forall (e :: * -> *) b1 b2.
MoC e =>
Stream (e (Ret e b1, Ret e b2)) -> (Stream (e b1), Stream (e b2))
-*<)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> [a3] -> s)
-> (([a1] -> [a2] -> [a3] -> s)
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
-> s
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s)))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> [a3] -> s
ns ((Cons, Cons, Cons)
-> ([a1] -> [a2] -> [a3] -> s)
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s)))
forall c1 c2 c3 a1 a2 a3 b.
(c1, c2, c3)
-> (a1 -> a2 -> a3 -> b) -> (c1, a1 -> (c2, a2 -> (c3, a3 -> b)))
arg3 (Cons, Cons, Cons)
c) (s -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
-> Stream (SDF s)
-> Stream (SDF (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 (Cons, [a2] -> (Cons, [a3] -> s))))
-> Signal a1 -> Stream (SDF (Cons, [a2] -> (Cons, [a3] -> s)))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 (Cons, [a3] -> s)))
-> Signal a2 -> Stream (SDF (Cons, [a3] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 s)) -> Signal a3 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector42 :: (Cons, Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2])))
-> s
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal y1, Signal y2)
detector42 c :: (Cons, Cons, Cons, Cons)
c ns :: s -> [a1] -> [a2] -> [a3] -> [a4] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]))
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 = (s -> ((Cons, [y1]), (Cons, [y2]))
od (s -> ((Cons, [y1]), (Cons, [y2])))
-> Stream (SDF s) -> Stream (SDF ((Cons, [y1]), (Cons, [y2])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2)) -> (Signal y1, Signal y2)
forall (e :: * -> *) b1 b2.
MoC e =>
Stream (e (Ret e b1, Ret e b2)) -> (Stream (e b1), Stream (e b2))
-*<)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (([a1] -> [a2] -> [a3] -> [a4] -> s)
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> s
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> [a3] -> [a4] -> s
ns ((Cons, Cons, Cons, Cons)
-> ([a1] -> [a2] -> [a3] -> [a4] -> s)
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall c1 c2 c3 c4 a1 a2 a3 a4 b.
(c1, c2, c3, c4)
-> (a1 -> a2 -> a3 -> a4 -> b)
-> (c1, a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> b))))
arg4 (Cons, Cons, Cons, Cons)
c) (s
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> Stream (SDF s)
-> Stream
(SDF
(Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream
(SDF
(Fun SDF a1 (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> Signal a1
-> Stream (SDF (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 (Cons, [a3] -> (Cons, [a4] -> s))))
-> Signal a2 -> Stream (SDF (Cons, [a3] -> (Cons, [a4] -> s)))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 (Cons, [a4] -> s)))
-> Signal a3 -> Stream (SDF (Cons, [a4] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream (SDF (Fun SDF a4 s)) -> Signal a4 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a4
s4
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector13 :: Cons
-> (s -> [a1] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
-> s
-> Signal a1
-> (Signal y1, Signal y2, Signal y3)
detector13 c :: Cons
c ns :: s -> [a1] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]))
od i :: s
i s1 :: Signal a1
s1 = (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]))
od (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
-> Stream (SDF s)
-> Stream (SDF ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2, Ret SDF y3))
-> (Signal y1, Signal y2, Signal y3)
forall (e :: * -> *) b1 b2 b3.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3))
-> (Stream (e b1), Stream (e b2), Stream (e b3))
-*<<)
where g :: Stream (SDF s)
g = (s -> [a1] -> s)
-> (([a1] -> s) -> (Cons, [a1] -> s)) -> s -> (Cons, [a1] -> s)
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> s
ns (Cons -> ([a1] -> s) -> (Cons, [a1] -> s)
forall c a b. c -> (a -> b) -> (c, a -> b)
arg1 Cons
c) (s -> (Cons, [a1] -> s))
-> Stream (SDF s) -> Stream (SDF (Cons, [a1] -> s))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 s)) -> Signal a1 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector23 :: (Cons, Cons)
-> (s -> [a1] -> [a2] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
-> s
-> Signal a1
-> Signal a2
-> (Signal y1, Signal y2, Signal y3)
detector23 c :: (Cons, Cons)
c ns :: s -> [a1] -> [a2] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]))
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 = (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]))
od (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
-> Stream (SDF s)
-> Stream (SDF ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2, Ret SDF y3))
-> (Signal y1, Signal y2, Signal y3)
forall (e :: * -> *) b1 b2 b3.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3))
-> (Stream (e b1), Stream (e b2), Stream (e b3))
-*<<)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> s)
-> (([a1] -> [a2] -> s) -> (Cons, [a1] -> (Cons, [a2] -> s)))
-> s
-> (Cons, [a1] -> (Cons, [a2] -> s))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> s
ns ((Cons, Cons)
-> ([a1] -> [a2] -> s) -> (Cons, [a1] -> (Cons, [a2] -> s))
forall c1 c2 a1 a2 b.
(c1, c2) -> (a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> b))
arg2 (Cons, Cons)
c) (s -> (Cons, [a1] -> (Cons, [a2] -> s)))
-> Stream (SDF s) -> Stream (SDF (Cons, [a1] -> (Cons, [a2] -> s)))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 (Cons, [a2] -> s)))
-> Signal a1 -> Stream (SDF (Cons, [a2] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 s)) -> Signal a2 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector33 :: (Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
-> s
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal y1, Signal y2, Signal y3)
detector33 c :: (Cons, Cons, Cons)
c ns :: s -> [a1] -> [a2] -> [a3] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]))
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 = (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]))
od (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
-> Stream (SDF s)
-> Stream (SDF ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2, Ret SDF y3))
-> (Signal y1, Signal y2, Signal y3)
forall (e :: * -> *) b1 b2 b3.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3))
-> (Stream (e b1), Stream (e b2), Stream (e b3))
-*<<)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> [a3] -> s)
-> (([a1] -> [a2] -> [a3] -> s)
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
-> s
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s)))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> [a3] -> s
ns ((Cons, Cons, Cons)
-> ([a1] -> [a2] -> [a3] -> s)
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s)))
forall c1 c2 c3 a1 a2 a3 b.
(c1, c2, c3)
-> (a1 -> a2 -> a3 -> b) -> (c1, a1 -> (c2, a2 -> (c3, a3 -> b)))
arg3 (Cons, Cons, Cons)
c) (s -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
-> Stream (SDF s)
-> Stream (SDF (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 (Cons, [a2] -> (Cons, [a3] -> s))))
-> Signal a1 -> Stream (SDF (Cons, [a2] -> (Cons, [a3] -> s)))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 (Cons, [a3] -> s)))
-> Signal a2 -> Stream (SDF (Cons, [a3] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 s)) -> Signal a3 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector43 :: (Cons, Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
-> s
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal y1, Signal y2, Signal y3)
detector43 c :: (Cons, Cons, Cons, Cons)
c ns :: s -> [a1] -> [a2] -> [a3] -> [a4] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]))
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 = (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]))
od (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
-> Stream (SDF s)
-> Stream (SDF ((Cons, [y1]), (Cons, [y2]), (Cons, [y3])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2, Ret SDF y3))
-> (Signal y1, Signal y2, Signal y3)
forall (e :: * -> *) b1 b2 b3.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3))
-> (Stream (e b1), Stream (e b2), Stream (e b3))
-*<<)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (([a1] -> [a2] -> [a3] -> [a4] -> s)
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> s
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> [a3] -> [a4] -> s
ns ((Cons, Cons, Cons, Cons)
-> ([a1] -> [a2] -> [a3] -> [a4] -> s)
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall c1 c2 c3 c4 a1 a2 a3 a4 b.
(c1, c2, c3, c4)
-> (a1 -> a2 -> a3 -> a4 -> b)
-> (c1, a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> b))))
arg4 (Cons, Cons, Cons, Cons)
c) (s
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> Stream (SDF s)
-> Stream
(SDF
(Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream
(SDF
(Fun SDF a1 (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> Signal a1
-> Stream (SDF (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 (Cons, [a3] -> (Cons, [a4] -> s))))
-> Signal a2 -> Stream (SDF (Cons, [a3] -> (Cons, [a4] -> s)))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 (Cons, [a4] -> s)))
-> Signal a3 -> Stream (SDF (Cons, [a4] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream (SDF (Fun SDF a4 s)) -> Signal a4 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a4
s4
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector14 :: Cons
-> (s -> [a1] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
-> s
-> Signal a1
-> (Signal y1, Signal y2, Signal y3, Signal y4)
detector14 c :: Cons
c ns :: s -> [a1] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4]))
od i :: s
i s1 :: Signal a1
s1 = (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4]))
od (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
-> Stream (SDF s)
-> Stream
(SDF ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2, Ret SDF y3, Ret SDF y4))
-> (Signal y1, Signal y2, Signal y3, Signal y4)
forall (e :: * -> *) b1 b2 b3 b4.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3, Ret e b4))
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
-*<<<)
where g :: Stream (SDF s)
g = (s -> [a1] -> s)
-> (([a1] -> s) -> (Cons, [a1] -> s)) -> s -> (Cons, [a1] -> s)
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> s
ns (Cons -> ([a1] -> s) -> (Cons, [a1] -> s)
forall c a b. c -> (a -> b) -> (c, a -> b)
arg1 Cons
c) (s -> (Cons, [a1] -> s))
-> Stream (SDF s) -> Stream (SDF (Cons, [a1] -> s))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 s)) -> Signal a1 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector24 :: (Cons, Cons)
-> (s -> [a1] -> [a2] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
-> s
-> Signal a1
-> Signal a2
-> (Signal y1, Signal y2, Signal y3, Signal y4)
detector24 c :: (Cons, Cons)
c ns :: s -> [a1] -> [a2] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4]))
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 = (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4]))
od (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
-> Stream (SDF s)
-> Stream
(SDF ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2, Ret SDF y3, Ret SDF y4))
-> (Signal y1, Signal y2, Signal y3, Signal y4)
forall (e :: * -> *) b1 b2 b3 b4.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3, Ret e b4))
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
-*<<<)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> s)
-> (([a1] -> [a2] -> s) -> (Cons, [a1] -> (Cons, [a2] -> s)))
-> s
-> (Cons, [a1] -> (Cons, [a2] -> s))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> s
ns ((Cons, Cons)
-> ([a1] -> [a2] -> s) -> (Cons, [a1] -> (Cons, [a2] -> s))
forall c1 c2 a1 a2 b.
(c1, c2) -> (a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> b))
arg2 (Cons, Cons)
c) (s -> (Cons, [a1] -> (Cons, [a2] -> s)))
-> Stream (SDF s) -> Stream (SDF (Cons, [a1] -> (Cons, [a2] -> s)))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 (Cons, [a2] -> s)))
-> Signal a1 -> Stream (SDF (Cons, [a2] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 s)) -> Signal a2 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector34 :: (Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
-> s
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal y1, Signal y2, Signal y3, Signal y4)
detector34 c :: (Cons, Cons, Cons)
c ns :: s -> [a1] -> [a2] -> [a3] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4]))
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 = (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4]))
od (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
-> Stream (SDF s)
-> Stream
(SDF ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2, Ret SDF y3, Ret SDF y4))
-> (Signal y1, Signal y2, Signal y3, Signal y4)
forall (e :: * -> *) b1 b2 b3 b4.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3, Ret e b4))
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
-*<<<)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> [a3] -> s)
-> (([a1] -> [a2] -> [a3] -> s)
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
-> s
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s)))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> [a3] -> s
ns ((Cons, Cons, Cons)
-> ([a1] -> [a2] -> [a3] -> s)
-> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s)))
forall c1 c2 c3 a1 a2 a3 b.
(c1, c2, c3)
-> (a1 -> a2 -> a3 -> b) -> (c1, a1 -> (c2, a2 -> (c3, a3 -> b)))
arg3 (Cons, Cons, Cons)
c) (s -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
-> Stream (SDF s)
-> Stream (SDF (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> s))))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream (SDF (Fun SDF a1 (Cons, [a2] -> (Cons, [a3] -> s))))
-> Signal a1 -> Stream (SDF (Cons, [a2] -> (Cons, [a3] -> s)))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 (Cons, [a3] -> s)))
-> Signal a2 -> Stream (SDF (Cons, [a3] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 s)) -> Signal a3 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g
detector44 :: (Cons, Cons, Cons, Cons)
-> (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
-> s
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal y1, Signal y2, Signal y3, Signal y4)
detector44 c :: (Cons, Cons, Cons, Cons)
c ns :: s -> [a1] -> [a2] -> [a3] -> [a4] -> s
ns od :: s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4]))
od i :: s
i s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 = (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4]))
od (s -> ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
-> Stream (SDF s)
-> Stream
(SDF ((Cons, [y1]), (Cons, [y2]), (Cons, [y3]), (Cons, [y4])))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
g Stream (SDF (Ret SDF y1, Ret SDF y2, Ret SDF y3, Ret SDF y4))
-> (Signal y1, Signal y2, Signal y3, Signal y4)
forall (e :: * -> *) b1 b2 b3 b4.
MoC e =>
Stream (e (Ret e b1, Ret e b2, Ret e b3, Ret e b4))
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
-*<<<)
where g :: Stream (SDF s)
g = (s -> [a1] -> [a2] -> [a3] -> [a4] -> s)
-> (([a1] -> [a2] -> [a3] -> [a4] -> s)
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> s
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall t t t. (t -> t) -> (t -> t) -> t -> t
wrapFromSecond s -> [a1] -> [a2] -> [a3] -> [a4] -> s
ns ((Cons, Cons, Cons, Cons)
-> ([a1] -> [a2] -> [a3] -> [a4] -> s)
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall c1 c2 c3 c4 a1 a2 a3 a4 b.
(c1, c2, c3, c4)
-> (a1 -> a2 -> a3 -> a4 -> b)
-> (c1, a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> b))))
arg4 (Cons, Cons, Cons, Cons)
c) (s
-> (Cons,
[a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> Stream (SDF s)
-> Stream
(SDF
(Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
forall (e :: * -> *) a b.
Functor e =>
(a -> b) -> Stream (e a) -> Stream (e b)
-$- Stream (SDF s)
st Stream
(SDF
(Fun SDF a1 (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s)))))
-> Signal a1
-> Stream (SDF (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> s))))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a1
s1 Stream (SDF (Fun SDF a2 (Cons, [a3] -> (Cons, [a4] -> s))))
-> Signal a2 -> Stream (SDF (Cons, [a3] -> (Cons, [a4] -> s)))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a2
s2 Stream (SDF (Fun SDF a3 (Cons, [a4] -> s)))
-> Signal a3 -> Stream (SDF (Cons, [a4] -> s))
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a3
s3 Stream (SDF (Fun SDF a4 s)) -> Signal a4 -> Stream (SDF s)
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a b)) -> Stream (e a) -> Stream (e b)
-*- Signal a4
s4
st :: Stream (SDF s)
st = s -> SDF s
forall a. a -> SDF a
SDF s
i SDF s -> Stream (SDF s) -> Stream (SDF s)
forall e. e -> Stream e -> Stream e
:- Stream (SDF s)
g