{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module      :  ForSyDe.MoC.SDF.Lib
-- Copyright   :  (c) George Ungureanu, KTH/ICT/ESY 2015-2017
-- License     :  BSD-style (see the file LICENSE)
-- 
-- Maintainer  :  ugeorge@kth.se
-- Stability   :  experimental
-- Portability :  portable
--
-- The @SDF@ library implements a DSL of atoms operating according to the synchronous
-- dataflow model of computation, along with helpers and associated patterns.
--
-- This module provides a set of helpers for properly instantiating
-- process network patterns as process constructors.
-- 
-----------------------------------------------------------------------------
module ForSyDe.Atom.MoC.SDF.SDF where

import qualified ForSyDe.Atom.MoC as MoC
import           ForSyDe.Atom.MoC.SDF.Core
import           ForSyDe.Atom.Utility.Tuple

------- DOCTEST SETUP -------

-- $setup
-- >>> import ForSyDe.Atom.MoC.Stream (takeS)

------- DELAY -------

-- | The @delay@ process "delays" a signal with initial events built
-- from a list. It is an instantiation of the 'ForSyDe.Atom.MoC.delay'
-- constructor.
--
-- >>> let s = signal [1,2,3,4,5]
-- >>> delay [0,0,0] s
-- {0,0,0,1,2,3,4,5}
-- 
-- <<fig/moc-sdf-pattern-delay.png>>
delay :: [a]      -- ^ list of initial values
      -> Signal a -- ^ input signal
      -> Signal a -- ^ output signal

delay :: [a] -> Signal a -> Signal a
delay i :: [a]
i = Signal a -> Signal a -> Signal a
forall (e :: * -> *) a.
MoC e =>
Stream (e a) -> Stream (e a) -> Stream (e a)
MoC.delay ([a] -> Signal a
forall a. [a] -> Signal a
signal [a]
i)

-- | Similar to the previous, but this is the raw instantiation of the
-- 'ForSyDe.Atom.MoC.delay' pattern. It appends the contents of one
-- signal at the head of another signal.
--
-- >>> let s1 = signal [0,0,0]
-- >>> let s2 = signal [1,2,3,4,5]
-- >>> delay' s1 s2
-- {0,0,0,1,2,3,4,5}
--
-- <<fig/moc-sdf-pattern-delayp.png>>
delay' :: Signal a  -- ^ signal containing the initial tokens
       -> Signal a   -- ^ input signal
       -> Signal a   -- ^ output signal

delay' :: Signal a -> Signal a -> Signal a
delay' = Signal a -> Signal a -> Signal a
forall (e :: * -> *) a.
MoC e =>
Stream (e a) -> Stream (e a) -> Stream (e a)
MoC.delay

------- COMB -------

-- | @actor@ processes map combnational functions on signals and take
-- care of synchronization between input signals. It instantiates the
-- @comb@ atom pattern (see 'ForSyDe.Atom.MoC.comb22').
--
-- Constructors: @actor[1-4][1-4]@.
--
-- >>> let s1 = signal [1..]
-- >>> let s2 = signal [1,1,1,1,1,1,1]
-- >>> let f [a,b,c] [d,e] = [a+d, c+e] 
-- >>> actor21 ((3,2),2,f) s1 s2
-- {2,4,5,7,8,10}
--
-- Incorrect usage (not covered by @doctest@):
--
-- > λ> actor21 ((3,2),3,f) s1 s2
-- > *** Exception: [MoC.SDF] Wrong production
--
-- <<fig/moc-sdf-pattern-comb.png>>
actor22 :: ((Cons,Cons), (Prod,Prod),
           [a1] -> [a2] -> ([b1], [b2]))
          -- ^ function on lists of values, tupled with consumption /
          -- production rates
       -> Signal a1              -- ^ first input signal
       -> Signal a2              -- ^ second input signal
       -> (Signal b1, Signal b2) -- ^ two output signals
actor11 :: (Cons, Prod,
           [a1] -> [b1])
       -> Signal a1
       -> Signal b1
actor21 :: ((Cons,Cons), Prod,
           [a1] -> [a2] -> [b1])
       -> Signal a1 -> Signal a2
       -> Signal b1
actor31 :: ((Cons,Cons,Cons), Prod,
           [a1] -> [a2] -> [a3] -> [b1])
       -> Signal a1 -> Signal a2 -> Signal a3
       -> Signal b1
actor41 :: ((Cons,Cons,Cons,Cons), Prod,
           [a1] -> [a2] -> [a3] -> [a4] -> [b1])
       -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
       -> Signal b1
actor12 :: (Cons, (Prod,Prod),
           [a1] -> ([b1], [b2]))
       -> Signal a1
       -> (Signal b1, Signal b2)
actor32 :: ((Cons,Cons,Cons), (Prod,Prod),
           [a1] -> [a2] -> [a3] -> ([b1], [b2]))
       -> Signal a1 -> Signal a2 -> Signal a3
       -> (Signal b1, Signal b2)
actor42 :: ((Cons,Cons,Cons,Cons), (Prod,Prod),
           [a1] -> [a2] -> [a3] ->  [a4] -> ([b1], [b2]))
       -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
       -> (Signal b1, Signal b2)
actor13 :: (Cons, (Prod,Prod,Prod),
           [a1] -> ([b1], [b2], [b3]))
       -> Signal a1
       -> (Signal b1, Signal b2, Signal b3)
actor23 :: ((Cons,Cons), (Prod,Prod,Prod),
           [a1] -> [a2] -> ([b1], [b2], [b3]))
       -> Signal a1 -> Signal a2
       -> (Signal b1, Signal b2, Signal b3)
actor33 :: ((Cons,Cons,Cons), (Prod,Prod,Prod),
           [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
       -> Signal a1 -> Signal a2 -> Signal a3
       -> (Signal b1, Signal b2, Signal b3)
actor43 :: ((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)
actor14 :: (Cons, (Prod,Prod,Prod,Prod),
           [a1] -> ([b1], [b2], [b3], [b4]))
       -> Signal a1 -> (Signal b1, Signal b2, Signal b3, Signal b4)
actor24 :: ((Cons,Cons), (Prod,Prod,Prod,Prod),
           [a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
       -> Signal a1 -> Signal a2
       -> (Signal b1, Signal b2, Signal b3, Signal b4)
actor34 :: ((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)
actor44 :: ((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)
       
actor11 :: (Cons, Cons, [a1] -> [b1]) -> Signal a1 -> Signal b1
actor11 cpf :: (Cons, Cons, [a1] -> [b1])
cpf s1 :: Signal a1
s1          = Fun SDF a1 (Ret SDF b1) -> Signal a1 -> Signal b1
forall (e :: * -> *) a b.
MoC e =>
Fun e a (Ret e b) -> Stream (e a) -> Stream (e b)
MoC.comb11 ((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])
cpf) Signal a1
s1
actor21 :: ((Cons, Cons), Cons, [a1] -> [a2] -> [b1])
-> Signal a1 -> Signal a2 -> Signal b1
actor21 cpf :: ((Cons, Cons), Cons, [a1] -> [a2] -> [b1])
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2       = Fun SDF a1 (Fun SDF a2 (Ret SDF b1))
-> Signal a1 -> Signal a2 -> Signal b1
forall (e :: * -> *) a1 a2 b.
MoC e =>
Fun e a1 (Fun e a2 (Ret e b))
-> Stream (e a1) -> Stream (e a2) -> Stream (e b)
MoC.comb21 (((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])
cpf) Signal a1
s1 Signal a2
s2
actor31 :: ((Cons, Cons, Cons), Cons, [a1] -> [a2] -> [a3] -> [b1])
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal b1
actor31 cpf :: ((Cons, Cons, Cons), Cons, [a1] -> [a2] -> [a3] -> [b1])
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3    = Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF b1)))
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal b1
forall (e :: * -> *) a1 a2 a3 b.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e b)))
-> Stream (e a1) -> Stream (e a2) -> Stream (e a3) -> Stream (e b)
MoC.comb31 (((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])
cpf) Signal a1
s1 Signal a2
s2 Signal a3
s3
actor41 :: ((Cons, Cons, Cons, Cons), Cons,
 [a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4 -> Signal b1
actor41 cpf :: ((Cons, Cons, Cons, Cons), Cons,
 [a1] -> [a2] -> [a3] -> [a4] -> [b1])
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 = Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF b1))))
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4 -> Signal b1
forall (e :: * -> *) a1 a2 a3 a4 b.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e b)
MoC.comb41 (((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])
cpf) Signal a1
s1 Signal a2
s2 Signal a3
s3 Signal a4
s4
actor12 :: (Cons, (Cons, Cons), [a1] -> ([b1], [b2]))
-> Signal a1 -> (Signal b1, Signal b2)
actor12 cpf :: (Cons, (Cons, Cons), [a1] -> ([b1], [b2]))
cpf s1 :: Signal a1
s1          = Fun SDF a1 (Ret SDF b1, Ret SDF b2)
-> Signal a1 -> (Signal b1, Signal b2)
forall (e :: * -> *) a b1 b2.
MoC e =>
Fun e a (Ret e b1, Ret e b2)
-> Stream (e a) -> (Stream (e b1), Stream (e b2))
MoC.comb12 ((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]))
cpf) Signal a1
s1
actor22 :: ((Cons, Cons), (Cons, Cons), [a1] -> [a2] -> ([b1], [b2]))
-> Signal a1 -> Signal a2 -> (Signal b1, Signal b2)
actor22 cpf :: ((Cons, Cons), (Cons, Cons), [a1] -> [a2] -> ([b1], [b2]))
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2       = Fun SDF a1 (Fun SDF a2 (Ret SDF b1, Ret SDF b2))
-> Signal a1 -> Signal a2 -> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 b1 b2.
MoC e =>
Fun e a1 (Fun e a2 (Ret e b1, Ret e b2))
-> Stream (e a1) -> Stream (e a2) -> (Stream (e b1), Stream (e b2))
MoC.comb22 (((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]))
cpf) Signal a1
s1 Signal a2
s2
actor32 :: ((Cons, Cons, Cons), (Cons, Cons),
 [a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> Signal a1 -> Signal a2 -> Signal a3 -> (Signal b1, Signal b2)
actor32 cpf :: ((Cons, Cons, Cons), (Cons, Cons),
 [a1] -> [a2] -> [a3] -> ([b1], [b2]))
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3    = Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF b1, Ret SDF b2)))
-> Signal a1 -> Signal a2 -> Signal a3 -> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 b1 b2.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e b1, Ret e b2)))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> (Stream (e b1), Stream (e b2))
MoC.comb32 (((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]))
cpf) Signal a1
s1 Signal a2
s2 Signal a3
s3
actor42 :: ((Cons, Cons, Cons, Cons), (Cons, Cons),
 [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
actor42 cpf :: ((Cons, Cons, Cons, Cons), (Cons, Cons),
 [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 = Fun
  SDF
  a1
  (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF b1, Ret SDF b2))))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b1, Ret e b2))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2))
MoC.comb42 (((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]))
cpf) Signal a1
s1 Signal a2
s2 Signal a3
s3 Signal a4
s4
actor13 :: (Cons, (Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3]))
-> Signal a1 -> (Signal b1, Signal b2, Signal b3)
actor13 cpf :: (Cons, (Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3]))
cpf s1 :: Signal a1
s1          = Fun SDF a1 (Ret SDF b1, Ret SDF b2, Ret SDF b3)
-> Signal a1 -> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a b1 b2 b3.
MoC e =>
Fun e a (Ret e b1, Ret e b2, Ret e b3)
-> Stream (e a) -> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.comb13 ((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]))
cpf) Signal a1
s1
actor23 :: ((Cons, Cons), (Cons, Cons, Cons),
 [a1] -> [a2] -> ([b1], [b2], [b3]))
-> Signal a1 -> Signal a2 -> (Signal b1, Signal b2, Signal b3)
actor23 cpf :: ((Cons, Cons), (Cons, Cons, Cons),
 [a1] -> [a2] -> ([b1], [b2], [b3]))
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2       = Fun SDF a1 (Fun SDF a2 (Ret SDF b1, Ret SDF b2, Ret SDF b3))
-> Signal a1 -> Signal a2 -> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 b1 b2 b3.
MoC e =>
Fun e a1 (Fun e a2 (Ret e b1, Ret e b2, Ret e b3))
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.comb23 (((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]))
cpf) Signal a1
s1 Signal a2
s2
actor33 :: ((Cons, Cons, Cons), (Cons, Cons, Cons),
 [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
actor33 cpf :: ((Cons, Cons, Cons), (Cons, Cons, Cons),
 [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3    = Fun
  SDF
  a1
  (Fun SDF a2 (Fun SDF a3 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 b1 b2 b3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e b1, Ret e b2, Ret e b3)))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.comb33 (((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]))
cpf) Signal a1
s1 Signal a2
s2 Signal a3
s3
actor43 :: ((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)
actor43 cpf :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 = Fun
  SDF
  a1
  (Fun
     SDF
     a2
     (Fun SDF a3 (Fun SDF a4 (Ret SDF b1, Ret SDF b2, Ret SDF b3))))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2 b3.
MoC e =>
Fun
  e
  a1
  (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b1, Ret e b2, Ret e b3))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.comb43 (((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]))
cpf) Signal a1
s1 Signal a2
s2 Signal a3
s3 Signal a4
s4
actor14 :: (Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3], [b4]))
-> Signal a1 -> (Signal b1, Signal b2, Signal b3, Signal b4)
actor14 cpf :: (Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3], [b4]))
cpf s1 :: Signal a1
s1          = Fun SDF a1 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)
-> Signal a1 -> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a b1 b2 b3 b4.
MoC e =>
Fun e a (Ret e b1, Ret e b2, Ret e b3, Ret e b4)
-> Stream (e a)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.comb14 ((Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [a1] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))
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], [b2], [b3], [b4]))
cpf) Signal a1
s1
actor24 :: ((Cons, Cons), (Cons, Cons, Cons, Cons),
 [a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
actor24 cpf :: ((Cons, Cons), (Cons, Cons, Cons, Cons),
 [a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2       = Fun
  SDF
  a1
  (Fun SDF a2 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 b1 b2 b3 b4.
MoC e =>
Fun e a1 (Fun e a2 (Ret e b1, Ret e b2, Ret e b3, Ret e b4))
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.comb24 (((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]))
cpf) Signal a1
s1 Signal a2
s2
actor34 :: ((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)
actor34 cpf :: ((Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3    = Fun
  SDF
  a1
  (Fun
     SDF
     a2
     (Fun SDF a3 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)))
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 b1 b2 b3 b4.
MoC e =>
Fun
  e a1 (Fun e a2 (Fun e a3 (Ret e b1, Ret e b2, Ret e b3, Ret e b4)))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.comb34 (((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]))
cpf) Signal a1
s1 Signal a2
s2 Signal a3
s3
actor44 :: ((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)
actor44 cpf :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
cpf s1 :: Signal a1
s1 s2 :: Signal a2
s2 s3 :: Signal a3
s3 s4 :: Signal a4
s4 = Fun
  SDF
  a1
  (Fun
     SDF
     a2
     (Fun
        SDF
        a3
        (Fun SDF a4 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2 b3 b4.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun e a3 (Fun e a4 (Ret e b1, Ret e b2, Ret e b3, Ret e b4))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.comb44 (((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]))
cpf) Signal a1
s1 Signal a2
s2 Signal a3
s3 Signal a4
s4

------- RECONFIG -------

-- | @reconfig@ creates an SDF adaptive process where the first signal
-- carries functions and the other carry the arguments. It
-- instantiates the @reconfig@ atom pattern (see
-- 'ForSyDe.Atom.MoC.reconfig22'). According to our SDF definition,
-- the production and consumption rates need to be fixed, so they are
-- passed as parameters to the constructor, whereas the first signal
-- carries adaptive functions only. For the adaptive signal it only
-- makes sense that the consumption rate is always 1.
--
-- Constructors: @reconfig[1-4][1-4]@.
--
-- >>> let f1 a = [sum a]
-- >>> let f2 a = [maximum a]
-- >>> let sf = signal [f1,f2,f1,f2,f1,f2,f1] 
-- >>> let s1 = signal [1..]
-- >>> reconfig11 (4,1) sf s1
-- {10,8,42,16,74,24,106}
--
-- <<fig/moc-sdf-pattern-reconfig.png>>
reconfig22 :: ((Cons,Cons), (Prod,Prod))
           -> Signal ([a1] -> [a2] -> ([b1], [b2]))
           -- ^ function on lists of values, tupled with consumption /
           -- production rates
           -> Signal a1              -- ^ first input signal
           -> Signal a2              -- ^ second input signal
           -> (Signal b1, Signal b2) -- ^ two output signals
reconfig11 :: (Cons, Prod) 
           -> Signal ([a1] -> [b1])
           -> Signal a1
           -> Signal b1
reconfig21 :: ((Cons,Cons), Prod)
           -> Signal ( [a1] -> [a2] -> [b1])
           -> Signal a1 -> Signal a2
           -> Signal b1
reconfig31 :: ((Cons,Cons,Cons), Prod)
           -> Signal ([a1] -> [a2] -> [a3] -> [b1])
           -> Signal a1 -> Signal a2 -> Signal a3
           -> Signal b1
reconfig41 :: ((Cons,Cons,Cons,Cons), Prod)
           -> Signal ([a1] -> [a2] -> [a3] -> [a4] -> [b1])
           -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
           -> Signal b1
reconfig12 :: (Cons, (Prod,Prod))
           -> Signal ([a1] -> ([b1], [b2]))
           -> Signal a1
           -> (Signal b1, Signal b2)
reconfig32 :: ((Cons,Cons,Cons), (Prod,Prod))
           -> Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2]))
           -> Signal a1 -> Signal a2 -> Signal a3
           -> (Signal b1, Signal b2)
reconfig42 :: ((Cons,Cons,Cons,Cons), (Prod,Prod))
           -> Signal ([a1] -> [a2] -> [a3] ->  [a4] -> ([b1], [b2]))
           -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
           -> (Signal b1, Signal b2)
reconfig13 :: (Cons, (Prod,Prod,Prod))
           -> Signal ([a1] -> ([b1], [b2], [b3]))
           -> Signal a1
           -> (Signal b1, Signal b2, Signal b3)
reconfig23 :: ((Cons,Cons), (Prod,Prod,Prod))
           -> Signal ([a1] -> [a2] -> ([b1], [b2], [b3]))
           -> Signal a1 -> Signal a2
           -> (Signal b1, Signal b2, Signal b3)
reconfig33 :: ((Cons,Cons,Cons), (Prod,Prod,Prod))
           -> Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
           -> Signal a1 -> Signal a2 -> Signal a3
           -> (Signal b1, Signal b2, Signal b3)
reconfig43 :: ((Cons,Cons,Cons,Cons), (Prod,Prod,Prod))
           -> Signal ([a1] -> [a2] -> [a3] ->  [a4] -> ([b1], [b2], [b3]))
           -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
           -> (Signal b1, Signal b2, Signal b3)
reconfig14 :: (Cons, (Prod,Prod,Prod,Prod))
           -> Signal ([a1] -> ([b1], [b2], [b3], [b4]))
           -> Signal a1
           -> (Signal b1, Signal b2, Signal b3, Signal b4)
reconfig24 :: ((Cons,Cons), (Prod,Prod,Prod,Prod))
           -> Signal ([a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
           -> Signal a1 -> Signal a2
           -> (Signal b1, Signal b2, Signal b3, Signal b4)
reconfig34 :: ((Cons,Cons,Cons), (Prod,Prod,Prod,Prod))
           -> Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
           -> Signal a1 -> Signal a2 -> Signal a3
           -> (Signal b1, Signal b2, Signal b3, Signal b4)
reconfig44 :: ((Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod))
           -> Signal ([a1] -> [a2] -> [a3] ->  [a4] -> ([b1], [b2], [b3], [b4]))
           -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
           -> (Signal b1, Signal b2, Signal b3, Signal b4)
wrap :: ((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ctxt :: (a, b, c) -> b
ctxt c :: a
c p :: b
p sf :: f (f c)
sf = ((f c -> f b) -> f (f c) -> f (f b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ((f c -> f b) -> f (f c) -> f (f b))
-> ((c -> b) -> f c -> f b) -> (c -> b) -> f (f c) -> f (f b)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (c -> b) -> f c -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap) (\f :: c
f->(a, b, c) -> b
ctxt (a
c,b
p,c
f)) f (f c)
sf
reconfig11 :: (Cons, Cons) -> Signal ([a1] -> [b1]) -> Signal a1 -> Signal b1
reconfig11 (c :: Cons
c,p :: Cons
p) sf :: Signal ([a1] -> [b1])
sf = Stream (SDF (Fun SDF a1 (Ret SDF b1))) -> Signal a1 -> Signal b1
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a (Ret e b))) -> Stream (e a) -> Stream (e b)
MoC.reconfig11 (((Cons, Cons, [a1] -> [b1]) -> (Cons, [a1] -> (Cons, [b1])))
-> Cons
-> Cons
-> Signal ([a1] -> [b1])
-> Stream (SDF (Cons, [a1] -> (Cons, [b1])))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap (Cons, Cons, [a1] -> [b1]) -> (Cons, [a1] -> (Cons, [b1]))
forall c p a b. (c, p, a -> b) -> (c, a -> (p, b))
scen11 Cons
c Cons
p Signal ([a1] -> [b1])
sf)
reconfig12 :: (Cons, (Cons, Cons))
-> Signal ([a1] -> ([b1], [b2]))
-> Signal a1
-> (Signal b1, Signal b2)
reconfig12 (c :: Cons
c,p :: (Cons, Cons)
p) sf :: Signal ([a1] -> ([b1], [b2]))
sf = Stream (SDF (Fun SDF a1 (Ret SDF b1, Ret SDF b2)))
-> Signal a1 -> (Signal b1, Signal b2)
forall (e :: * -> *) a b1 b2.
MoC e =>
Stream (e (Fun e a (Ret e b1, Ret e b2)))
-> Stream (e a) -> (Stream (e b1), Stream (e b2))
MoC.reconfig12 (((Cons, (Cons, Cons), [a1] -> ([b1], [b2]))
 -> (Cons, [a1] -> ((Cons, [b1]), (Cons, [b2]))))
-> Cons
-> (Cons, Cons)
-> Signal ([a1] -> ([b1], [b2]))
-> Stream (SDF (Cons, [a1] -> ((Cons, [b1]), (Cons, [b2]))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap (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
c (Cons, Cons)
p Signal ([a1] -> ([b1], [b2]))
sf)
reconfig13 :: (Cons, (Cons, Cons, Cons))
-> Signal ([a1] -> ([b1], [b2], [b3]))
-> Signal a1
-> (Signal b1, Signal b2, Signal b3)
reconfig13 (c :: Cons
c,p :: (Cons, Cons, Cons)
p) sf :: Signal ([a1] -> ([b1], [b2], [b3]))
sf = Stream (SDF (Fun SDF a1 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))
-> Signal a1 -> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a b1 b2 b3.
MoC e =>
Stream (e (Fun e a (Ret e b1, Ret e b2, Ret e b3)))
-> Stream (e a) -> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.reconfig13 (((Cons, (Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3]))
 -> (Cons, [a1] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
-> Cons
-> (Cons, Cons, Cons)
-> Signal ([a1] -> ([b1], [b2], [b3]))
-> Stream
     (SDF (Cons, [a1] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap (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
c (Cons, Cons, Cons)
p Signal ([a1] -> ([b1], [b2], [b3]))
sf)
reconfig14 :: (Cons, (Cons, Cons, Cons, Cons))
-> Signal ([a1] -> ([b1], [b2], [b3], [b4]))
-> Signal a1
-> (Signal b1, Signal b2, Signal b3, Signal b4)
reconfig14 (c :: Cons
c,p :: (Cons, Cons, Cons, Cons)
p) sf :: Signal ([a1] -> ([b1], [b2], [b3], [b4]))
sf = Stream
  (SDF (Fun SDF a1 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)))
-> Signal a1 -> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a b1 b2 b3 b4.
MoC e =>
Stream (e (Fun e a (Ret e b1, Ret e b2, Ret e b3, Ret e b4)))
-> Stream (e a)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.reconfig14 (((Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3], [b4]))
 -> (Cons,
     [a1] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))
-> Cons
-> (Cons, Cons, Cons, Cons)
-> Signal ([a1] -> ([b1], [b2], [b3], [b4]))
-> Stream
     (SDF
        (Cons,
         [a1] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap (Cons, (Cons, Cons, Cons, Cons), [a1] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [a1] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))
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
c (Cons, Cons, Cons, Cons)
p Signal ([a1] -> ([b1], [b2], [b3], [b4]))
sf)
reconfig21 :: ((Cons, Cons), Cons)
-> Signal ([a1] -> [a2] -> [b1])
-> Signal a1
-> Signal a2
-> Signal b1
reconfig21 (c :: (Cons, Cons)
c,p :: Cons
p) sf :: Signal ([a1] -> [a2] -> [b1])
sf = Stream (SDF (Fun SDF a1 (Fun SDF a2 (Ret SDF b1))))
-> Signal a1 -> Signal a2 -> Signal b1
forall (e :: * -> *) a1 a2 b.
MoC e =>
Stream (e (Fun e a1 (Fun e a2 (Ret e b))))
-> Stream (e a1) -> Stream (e a2) -> Stream (e b)
MoC.reconfig21 ((((Cons, Cons), Cons, [a1] -> [a2] -> [b1])
 -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [b1]))))
-> (Cons, Cons)
-> Cons
-> Signal ([a1] -> [a2] -> [b1])
-> Stream (SDF (Cons, [a1] -> (Cons, [a2] -> (Cons, [b1]))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c Cons
p Signal ([a1] -> [a2] -> [b1])
sf)
reconfig22 :: ((Cons, Cons), (Cons, Cons))
-> Signal ([a1] -> [a2] -> ([b1], [b2]))
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2)
reconfig22 (c :: (Cons, Cons)
c,p :: (Cons, Cons)
p) sf :: Signal ([a1] -> [a2] -> ([b1], [b2]))
sf = Stream (SDF (Fun SDF a1 (Fun SDF a2 (Ret SDF b1, Ret SDF b2))))
-> Signal a1 -> Signal a2 -> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 b1 b2.
MoC e =>
Stream (e (Fun e a1 (Fun e a2 (Ret e b1, Ret e b2))))
-> Stream (e a1) -> Stream (e a2) -> (Stream (e b1), Stream (e b2))
MoC.reconfig22 ((((Cons, Cons), (Cons, Cons), [a1] -> [a2] -> ([b1], [b2]))
 -> (Cons, [a1] -> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2])))))
-> (Cons, Cons)
-> (Cons, Cons)
-> Signal ([a1] -> [a2] -> ([b1], [b2]))
-> Stream
     (SDF (Cons, [a1] -> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2])))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c (Cons, Cons)
p Signal ([a1] -> [a2] -> ([b1], [b2]))
sf)
reconfig23 :: ((Cons, Cons), (Cons, Cons, Cons))
-> Signal ([a1] -> [a2] -> ([b1], [b2], [b3]))
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3)
reconfig23 (c :: (Cons, Cons)
c,p :: (Cons, Cons, Cons)
p) sf :: Signal ([a1] -> [a2] -> ([b1], [b2], [b3]))
sf = Stream
  (SDF
     (Fun SDF a1 (Fun SDF a2 (Ret SDF b1, Ret SDF b2, Ret SDF b3))))
-> Signal a1 -> Signal a2 -> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 b1 b2 b3.
MoC e =>
Stream (e (Fun e a1 (Fun e a2 (Ret e b1, Ret e b2, Ret e b3))))
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.reconfig23 ((((Cons, Cons), (Cons, Cons, Cons),
  [a1] -> [a2] -> ([b1], [b2], [b3]))
 -> (Cons,
     [a1]
     -> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))
-> (Cons, Cons)
-> (Cons, Cons, Cons)
-> Signal ([a1] -> [a2] -> ([b1], [b2], [b3]))
-> Stream
     (SDF
        (Cons,
         [a1]
         -> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c (Cons, Cons, Cons)
p Signal ([a1] -> [a2] -> ([b1], [b2], [b3]))
sf)
reconfig24 :: ((Cons, Cons), (Cons, Cons, Cons, Cons))
-> Signal ([a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
reconfig24 (c :: (Cons, Cons)
c,p :: (Cons, Cons, Cons, Cons)
p) sf :: Signal ([a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
sf = Stream
  (SDF
     (Fun
        SDF
        a1
        (Fun SDF a2 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))))
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 b1 b2 b3 b4.
MoC e =>
Stream
  (e (Fun e a1 (Fun e a2 (Ret e b1, Ret e b2, Ret e b3, Ret e b4))))
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.reconfig24 ((((Cons, Cons), (Cons, Cons, Cons, Cons),
  [a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
 -> (Cons,
     [a1]
     -> (Cons,
         [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))
-> (Cons, Cons)
-> (Cons, Cons, Cons, Cons)
-> Signal ([a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
-> Stream
     (SDF
        (Cons,
         [a1]
         -> (Cons,
             [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c (Cons, Cons, Cons, Cons)
p Signal ([a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
sf)
reconfig31 :: ((Cons, Cons, Cons), Cons)
-> Signal ([a1] -> [a2] -> [a3] -> [b1])
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal b1
reconfig31 (c :: (Cons, Cons, Cons)
c,p :: Cons
p) sf :: Signal ([a1] -> [a2] -> [a3] -> [b1])
sf = Stream (SDF (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF b1)))))
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal b1
forall (e :: * -> *) a1 a2 a3 b.
MoC e =>
Stream (e (Fun e a1 (Fun e a2 (Fun e a3 (Ret e b)))))
-> Stream (e a1) -> Stream (e a2) -> Stream (e a3) -> Stream (e b)
MoC.reconfig31 ((((Cons, Cons, Cons), Cons, [a1] -> [a2] -> [a3] -> [b1])
 -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [b1])))))
-> (Cons, Cons, Cons)
-> Cons
-> Signal ([a1] -> [a2] -> [a3] -> [b1])
-> Stream
     (SDF (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [b1])))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c Cons
p Signal ([a1] -> [a2] -> [a3] -> [b1])
sf)
reconfig32 :: ((Cons, Cons, Cons), (Cons, Cons))
-> Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2)
reconfig32 (c :: (Cons, Cons, Cons)
c,p :: (Cons, Cons)
p) sf :: Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2]))
sf = Stream
  (SDF
     (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF b1, Ret SDF b2)))))
-> Signal a1 -> Signal a2 -> Signal a3 -> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 b1 b2.
MoC e =>
Stream (e (Fun e a1 (Fun e a2 (Fun e a3 (Ret e b1, Ret e b2)))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> (Stream (e b1), Stream (e b2))
MoC.reconfig32 ((((Cons, Cons, Cons), (Cons, Cons),
  [a1] -> [a2] -> [a3] -> ([b1], [b2]))
 -> (Cons,
     [a1]
     -> (Cons, [a2] -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]))))))
-> (Cons, Cons, Cons)
-> (Cons, Cons)
-> Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> Stream
     (SDF
        (Cons,
         [a1]
         -> (Cons, [a2] -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]))))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c (Cons, Cons)
p Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2]))
sf)
reconfig33 :: ((Cons, Cons, Cons), (Cons, Cons, Cons))
-> Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
reconfig33 (c :: (Cons, Cons, Cons)
c,p :: (Cons, Cons, Cons)
p) sf :: Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
sf = Stream
  (SDF
     (Fun
        SDF
        a1
        (Fun SDF a2 (Fun SDF a3 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))))
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 b1 b2 b3.
MoC e =>
Stream
  (e (Fun e a1 (Fun e a2 (Fun e a3 (Ret e b1, Ret e b2, Ret e b3)))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.reconfig33 ((((Cons, Cons, Cons), (Cons, Cons, Cons),
  [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
 -> (Cons,
     [a1]
     -> (Cons,
         [a2]
         -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))))
-> (Cons, Cons, Cons)
-> (Cons, Cons, Cons)
-> Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> Stream
     (SDF
        (Cons,
         [a1]
         -> (Cons,
             [a2]
             -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c (Cons, Cons, Cons)
p Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
sf)
reconfig34 :: ((Cons, Cons, Cons), (Cons, Cons, Cons, Cons))
-> Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
reconfig34 (c :: (Cons, Cons, Cons)
c,p :: (Cons, Cons, Cons, Cons)
p) sf :: Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
sf = Stream
  (SDF
     (Fun
        SDF
        a1
        (Fun
           SDF
           a2
           (Fun SDF a3 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)))))
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 b1 b2 b3 b4.
MoC e =>
Stream
  (e (Fun
        e
        a1
        (Fun e a2 (Fun e a3 (Ret e b1, Ret e b2, Ret e b3, Ret e b4)))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.reconfig34 ((((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]))))))
-> (Cons, Cons, Cons)
-> (Cons, Cons, Cons, Cons)
-> Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
-> Stream
     (SDF
        (Cons,
         [a1]
         -> (Cons,
             [a2]
             -> (Cons,
                 [a3]
                 -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c (Cons, Cons, Cons, Cons)
p Signal ([a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
sf)
reconfig41 :: ((Cons, Cons, Cons, Cons), Cons)
-> Signal ([a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> Signal b1
reconfig41 (c :: (Cons, Cons, Cons, Cons)
c,p :: Cons
p) sf :: Signal ([a1] -> [a2] -> [a3] -> [a4] -> [b1])
sf = Stream
  (SDF
     (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF b1))))))
-> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4 -> Signal b1
forall (e :: * -> *) a1 a2 a3 a4 b.
MoC e =>
Stream (e (Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b))))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e b)
MoC.reconfig41 ((((Cons, Cons, Cons, Cons), Cons,
  [a1] -> [a2] -> [a3] -> [a4] -> [b1])
 -> (Cons,
     [a1]
     -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1]))))))
-> (Cons, Cons, Cons, Cons)
-> Cons
-> Signal ([a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> Stream
     (SDF
        (Cons,
         [a1]
         -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1]))))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c Cons
p Signal ([a1] -> [a2] -> [a3] -> [a4] -> [b1])
sf)
reconfig42 :: ((Cons, Cons, Cons, Cons), (Cons, Cons))
-> Signal ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
reconfig42 (c :: (Cons, Cons, Cons, Cons)
c,p :: (Cons, Cons)
p) sf :: Signal ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
sf = Stream
  (SDF
     (Fun
        SDF
        a1
        (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF b1, Ret SDF b2))))))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2.
MoC e =>
Stream
  (e (Fun
        e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b1, Ret e b2))))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2))
MoC.reconfig42 ((((Cons, Cons, Cons, Cons), (Cons, Cons),
  [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
 -> (Cons,
     [a1]
     -> (Cons,
         [a2]
         -> (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2])))))))
-> (Cons, Cons, Cons, Cons)
-> (Cons, Cons)
-> Signal ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> Stream
     (SDF
        (Cons,
         [a1]
         -> (Cons,
             [a2]
             -> (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2])))))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c (Cons, Cons)
p Signal ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
sf)
reconfig43 :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons))
-> Signal ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
reconfig43 (c :: (Cons, Cons, Cons, Cons)
c,p :: (Cons, Cons, Cons)
p) sf :: Signal ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
sf = Stream
  (SDF
     (Fun
        SDF
        a1
        (Fun
           SDF
           a2
           (Fun SDF a3 (Fun SDF a4 (Ret SDF b1, Ret SDF b2, Ret SDF b3))))))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2 b3.
MoC e =>
Stream
  (e (Fun
        e
        a1
        (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b1, Ret e b2, Ret e b3))))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.reconfig43 ((((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])))))))
-> (Cons, Cons, Cons, Cons)
-> (Cons, Cons, Cons)
-> Signal ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
-> Stream
     (SDF
        (Cons,
         [a1]
         -> (Cons,
             [a2]
             -> (Cons,
                 [a3]
                 -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))))
forall (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c (Cons, Cons, Cons)
p Signal ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
sf)
reconfig44 :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons))
-> Signal
     ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
reconfig44 (c :: (Cons, Cons, Cons, Cons)
c,p :: (Cons, Cons, Cons, Cons)
p) sf :: Signal ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
sf = Stream
  (SDF
     (Fun
        SDF
        a1
        (Fun
           SDF
           a2
           (Fun
              SDF
              a3
              (Fun SDF a4 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))))))
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2 b3 b4.
MoC e =>
Stream
  (e (Fun
        e
        a1
        (Fun
           e
           a2
           (Fun e a3 (Fun e a4 (Ret e b1, Ret e b2, Ret e b3, Ret e b4))))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.reconfig44 ((((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])))))))
-> (Cons, Cons, Cons, Cons)
-> (Cons, Cons, Cons, Cons)
-> Signal
     ([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 (f :: * -> *) (f :: * -> *) a b c b.
(Functor f, Functor f) =>
((a, b, c) -> b) -> a -> b -> f (f c) -> f (f b)
wrap ((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)
c (Cons, Cons, Cons, Cons)
p Signal ([a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
sf)

------- CONSTANT -------

-- | A signal generator which repeats the initial tokens
-- indefinitely. It is actually an instantiation of the @stated0X@
-- constructor (check 'ForSyDe.Atom.MoC.stated22').
--
-- Constructors: @constant[1-4]@.
--
-- >>> let (s1, s2) = constant2 ([1,2,3],[2,1])
-- >>> takeS 7 s1
-- {1,2,3,1,2,3,1}
-- >>> takeS 5 s2
-- {2,1,2,1,2}
--
-- <<fig/moc-sdf-pattern-constant.png>>
constant2 :: ([b1], [b2])           -- ^ values to be repeated
          -> (Signal b1, Signal b2) -- ^ generated signals
constant1 :: ([b1])
          -> (Signal b1)                                  
constant3 :: ([b1], [b2], [b3])
          -> (Signal b1, Signal b2, Signal b3)                      
constant4 :: ([b1], [b2], [b3], [b4])
          -> (Signal b1, Signal b2, Signal b3, Signal b4)

constant1 :: [b1] -> Signal b1
constant1 i :: [b1]
i = Fun SDF b1 (Ret SDF b1) -> Signal b1 -> Signal b1
forall (e :: * -> *) a.
MoC e =>
Fun e a (Ret e a) -> Stream (e a) -> Stream (e a)
MoC.stated01 (Cons -> Cons -> ([b1] -> [b1]) -> (Cons, [b1] -> (Cons, [b1]))
forall c p a b. c -> p -> (a -> b) -> (c, a -> (p, b))
MoC.ctxt11  1         1        [b1] -> [b1]
forall a. a -> a
id) ([b1] -> Signal b1
forall a. [a] -> Signal a
signal  [b1]
i)
constant2 :: ([b1], [b2]) -> (Signal b1, Signal b2)
constant2 i :: ([b1], [b2])
i = Fun SDF b1 (Fun SDF b2 (Ret SDF b1, Ret SDF b2))
-> (Signal b1, Signal b2) -> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1, Ret e a2))
-> (Stream (e a1), Stream (e a2)) -> (Stream (e a1), Stream (e a2))
MoC.stated02 ((Cons, Cons)
-> (Cons, Cons)
-> ([b1] -> [b2] -> ([b1], [b2]))
-> (Cons, [b1] -> (Cons, [b2] -> ((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))))
MoC.ctxt22 (1,1)     (1,1)     (,)) (([b1], [b2]) -> (Signal b1, Signal b2)
forall a1 a2. ([a1], [a2]) -> (Signal a1, Signal a2)
signal2 ([b1], [b2])
i)
constant3 :: ([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
constant3 i :: ([b1], [b2], [b3])
i = Fun
  SDF
  b1
  (Fun SDF b2 (Fun SDF b3 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))
-> (Signal b1, Signal b2, Signal b3)
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1, Ret e a2, Ret e a3)))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
MoC.stated03 ((Cons, Cons, Cons)
-> (Cons, Cons, Cons)
-> ([b1] -> [b2] -> [b3] -> ([b1], [b2], [b3]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons, [b3] -> ((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)))))
MoC.ctxt33 (1,1,1)   (1,1,1)   (,,)) (([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
forall a1 a2 a3.
([a1], [a2], [a3]) -> (Signal a1, Signal a2, Signal a3)
signal3 ([b1], [b2], [b3])
i)
constant4 :: ([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
constant4 i :: ([b1], [b2], [b3], [b4])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun SDF b4 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun e a3 (Fun e a4 (Ret e a1, Ret e a2, Ret e a3, Ret e a4))))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
MoC.stated04 ((Cons, Cons, Cons, Cons)
-> (Cons, Cons, Cons, Cons)
-> ([b1] -> [b2] -> [b3] -> [b4] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [b4]
                -> ((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))))))
MoC.ctxt44 (1,1,1,1) (1,1,1,1) (,,,)) (([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall a1 a2 a3 a4.
([a1], [a2], [a3], [a4])
-> (Signal a1, Signal a2, Signal a3, Signal a4)
signal4 ([b1], [b2], [b3], [b4])
i)

------- GENERATE -------

-- | A signal generator based on a function and a kernel value. It
-- is actually an instantiation of the @stated0X@ constructor
-- (check 'ForSyDe.Atom.MoC.stated22').
--
-- Constructors: @generate[1-4]@.
--
-- >>> let f a b = ([sum a, sum a],[sum b, sum b, sum b])
-- >>> let (s1,s2) = generate2 ((2,3),(2,3),f) ([1,1],[2,2,2])
-- >>> takeS 7 s1
-- {1,1,2,2,4,4,8}
-- >>> takeS 8 s2
-- {2,2,2,6,6,6,18,18}
--
-- <<fig/moc-sdf-pattern-generate.png>>
generate2 :: ((Cons,Cons), (Prod,Prod),
              [b1] -> [b2] -> ([b1], [b2]))
             -- ^ function to generate next value, tupled with
             -- consumption / production rates
             -> ([b1], [b2])
             -- ^ values of initial tokens
             -> (Signal b1, Signal b2)
             -- ^ generated signals
generate1 :: (Cons, Prod,
              [b1] -> [b1])
          -> [b1]
          -> Signal b1                                
generate3 :: ((Cons,Cons,Cons), (Prod,Prod,Prod),
              [b1] -> [b2] -> [b3] -> ([b1], [b2], [b3]))
          -> ([b1], [b2], [b3])
          -> (Signal b1, Signal b2, Signal b3)                      
generate4 :: ((Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
              [b1] -> [b2] -> [b3] -> [b4] -> ([b1], [b2], [b3], [b4]))
          -> ([b1], [b2], [b3], [b4])
          -> (Signal b1, Signal b2, Signal b3, Signal b4) 

generate1 :: (Cons, Cons, [b1] -> [b1]) -> [b1] -> Signal b1
generate1 cpf :: (Cons, Cons, [b1] -> [b1])
cpf i :: [b1]
i = Fun SDF b1 (Ret SDF b1) -> Signal b1 -> Signal b1
forall (e :: * -> *) a.
MoC e =>
Fun e a (Ret e a) -> Stream (e a) -> Stream (e a)
MoC.stated01 ((Cons, Cons, [b1] -> [b1]) -> (Cons, [b1] -> (Cons, [b1]))
forall c p a b. (c, p, a -> b) -> (c, a -> (p, b))
scen11 (Cons, Cons, [b1] -> [b1])
cpf) ([b1] -> Signal b1
forall a. [a] -> Signal a
signal  [b1]
i)
generate2 :: ((Cons, Cons), (Cons, Cons), [b1] -> [b2] -> ([b1], [b2]))
-> ([b1], [b2]) -> (Signal b1, Signal b2)
generate2 cpf :: ((Cons, Cons), (Cons, Cons), [b1] -> [b2] -> ([b1], [b2]))
cpf i :: ([b1], [b2])
i = Fun SDF b1 (Fun SDF b2 (Ret SDF b1, Ret SDF b2))
-> (Signal b1, Signal b2) -> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1, Ret e a2))
-> (Stream (e a1), Stream (e a2)) -> (Stream (e a1), Stream (e a2))
MoC.stated02 (((Cons, Cons), (Cons, Cons), [b1] -> [b2] -> ([b1], [b2]))
-> (Cons, [b1] -> (Cons, [b2] -> ((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), [b1] -> [b2] -> ([b1], [b2]))
cpf) (([b1], [b2]) -> (Signal b1, Signal b2)
forall a1 a2. ([a1], [a2]) -> (Signal a1, Signal a2)
signal2 ([b1], [b2])
i)
generate3 :: ((Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> ([b1], [b2], [b3]))
-> ([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
generate3 cpf :: ((Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> ([b1], [b2], [b3]))
cpf i :: ([b1], [b2], [b3])
i = Fun
  SDF
  b1
  (Fun SDF b2 (Fun SDF b3 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))
-> (Signal b1, Signal b2, Signal b3)
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1, Ret e a2, Ret e a3)))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
MoC.stated03 (((Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> ([b1], [b2], [b3]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons, [b3] -> ((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),
 [b1] -> [b2] -> [b3] -> ([b1], [b2], [b3]))
cpf) (([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
forall a1 a2 a3.
([a1], [a2], [a3]) -> (Signal a1, Signal a2, Signal a3)
signal3 ([b1], [b2], [b3])
i)
generate4 :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> ([b1], [b2], [b3], [b4]))
-> ([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
generate4 cpf :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> ([b1], [b2], [b3], [b4]))
cpf i :: ([b1], [b2], [b3], [b4])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun SDF b4 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun e a3 (Fun e a4 (Ret e a1, Ret e a2, Ret e a3, Ret e a4))))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
MoC.stated04 (((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [b4]
                -> ((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),
 [b1] -> [b2] -> [b3] -> [b4] -> ([b1], [b2], [b3], [b4]))
cpf) (([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall a1 a2 a3 a4.
([a1], [a2], [a3], [a4])
-> (Signal a1, Signal a2, Signal a3, Signal a4)
signal4 ([b1], [b2], [b3], [b4])
i)

------- STATED -------

-- | @stated@ is a state machine without an output decoder. It is an
-- instantiation of the @state@ MoC constructor (see
-- 'ForSyDe.Atom.MoC.stated22').
--
-- Constructors: @stated[1-4][1-4]@.
--
-- >>> let f [a] [b,c] = [a+b+c]
-- >>> let s = signal [1,2,3,4,5,6,7]  
-- >>> stated11 ((1,2),1,f) [1] s
-- {1,4,11,22}
--
-- <<fig/moc-sdf-pattern-stated.png>>
stated22 :: ((Cons,Cons,Cons,Cons), (Prod,Prod),
             [b1] -> [b2] -> [a1] -> [a2] -> ([b1], [b2]))
         -- ^ next state function, tupled with
         -- consumption / production rates
         -> ([b1], [b2])
         -- ^ initial state partitions of values
         -> Signal a1
         -- ^ first input signal
         -> Signal a2
         -- ^ second input signal
         -> (Signal b1, Signal b2)
         -- ^ output signals
stated11 :: ((Cons,Cons), Prod,
             [b1] -> [a1] -> [b1])
         ->  [b1]
         -> Signal a1
         -> Signal b1
stated12 :: ((Cons,Cons,Cons), (Prod,Prod),
             [b1] -> [b2] -> [a1] -> ([b1], [b2]))
         -> ([b1], [b2])
         -> Signal a1
         -> (Signal b1, Signal b2)
stated13 :: ((Cons,Cons,Cons,Cons), (Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [a1] -> ([b1], [b2], [b3]))
         -> ([b1], [b2], [b3])
         -> Signal a1
         -> (Signal b1, Signal b2, Signal b3)
stated14 :: ((Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [b4] -> [a1]
             -> ([b1], [b2], [b3], [b4]))
         -> ([b1], [b2], [b3], [b4])
         -> Signal a1
         -> (Signal b1, Signal b2, Signal b3, Signal b4)
stated21 :: ((Cons,Cons,Cons), Prod,
             [b1] -> [a1] -> [a2] -> [b1])
         ->  [b1]
         -> Signal a1 -> Signal a2
         -> Signal b1
stated23 :: ((Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
         -> ([b1], [b2], [b3])
         -> Signal a1 -> Signal a2
         -> (Signal b1, Signal b2, Signal b3)
stated24 :: ((Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> [a2]
             -> ([b1], [b2], [b3], [b4]))
         -> ([b1], [b2], [b3], [b4])
         -> Signal a1 -> Signal a2
         -> (Signal b1, Signal b2, Signal b3, Signal b4)
stated31 :: ((Cons,Cons,Cons,Cons), Prod,
             [b1] -> [a1] -> [a2] -> [a3] -> [b1])
         ->  [b1]
         -> Signal a1 -> Signal a2 -> Signal a3
         -> Signal b1
stated32 :: ((Cons,Cons,Cons,Cons,Cons), (Prod,Prod),
             [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
         -> ([b1], [b2])
         -> Signal a1 -> Signal a2 -> Signal a3
         -> (Signal b1, Signal b2)
stated33 :: ((Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3]
             -> ([b1], [b2], [b3]))
         -> ([b1], [b2], [b3])
         -> Signal a1 -> Signal a2 -> Signal a3
         -> (Signal b1, Signal b2, Signal b3)
stated34 :: ((Cons,Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> [a2] -> [a3]
             -> ([b1], [b2], [b3], [b4]))
         -> ([b1], [b2], [b3], [b4])
         -> Signal a1 -> Signal a2 -> Signal a3
         -> (Signal b1, Signal b2, Signal b3, Signal b4)
stated41 :: ((Cons,Cons,Cons,Cons,Cons), Prod,
             [b1] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
         ->  [b1]
         -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
         -> Signal b1
stated42 :: ((Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod),
             [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> [a4]
             -> ([b1], [b2]))
         -> ([b1], [b2])
         -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
         -> (Signal b1, Signal b2)
stated43 :: ((Cons,Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> [a4]
             -> ([b1], [b2], [b3]))
         -> ([b1], [b2], [b3])
         -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
         -> (Signal b1, Signal b2, Signal b3)
stated44 :: ((Cons,Cons,Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> [a2] -> [a3]
             -> [a4] -> ([b1], [b2], [b3], [b4]))
         -> ([b1], [b2], [b3], [b4])
         -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
         -> (Signal b1, Signal b2, Signal b3, Signal b4)
           
stated11 :: ((Cons, Cons), Cons, [b1] -> [a1] -> [b1])
-> [b1] -> Signal a1 -> Signal b1
stated11 ns :: ((Cons, Cons), Cons, [b1] -> [a1] -> [b1])
ns i :: [b1]
i = Fun SDF b1 (Fun SDF a1 (Ret SDF b1))
-> Signal b1 -> Signal a1 -> Signal b1
forall (e :: * -> *) a1 a2.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1))
-> Stream (e a1) -> Stream (e a2) -> Stream (e a1)
MoC.stated11 (((Cons, Cons), Cons, [b1] -> [a1] -> [b1])
-> (Cons, [b1] -> (Cons, [a1] -> (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, [b1] -> [a1] -> [b1])
ns) ([b1] -> Signal b1
forall a. [a] -> Signal a
signal  [b1]
i)
stated12 :: ((Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> ([b1], [b2]))
-> ([b1], [b2]) -> Signal a1 -> (Signal b1, Signal b2)
stated12 ns :: ((Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> ([b1], [b2]))
ns i :: ([b1], [b2])
i = Fun SDF b1 (Fun SDF b2 (Fun SDF a1 (Ret SDF b1, Ret SDF b2)))
-> (Signal b1, Signal b2) -> Signal a1 -> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1, Ret e a2)))
-> (Stream (e a1), Stream (e a2))
-> Stream (e a3)
-> (Stream (e a1), Stream (e a2))
MoC.stated12 (((Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> ([b1], [b2]))
-> (Cons,
    [b1]
    -> (Cons, [b2] -> (Cons, [a1] -> ((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),
 [b1] -> [b2] -> [a1] -> ([b1], [b2]))
ns) (([b1], [b2]) -> (Signal b1, Signal b2)
forall a1 a2. ([a1], [a2]) -> (Signal a1, Signal a2)
signal2 ([b1], [b2])
i)
stated13 :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> ([b1], [b2], [b3]))
-> ([b1], [b2], [b3])
-> Signal a1
-> (Signal b1, Signal b2, Signal b3)
stated13 ns :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> ([b1], [b2], [b3]))
ns i :: ([b1], [b2], [b3])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun SDF b3 (Fun SDF a1 (Ret SDF b1, Ret SDF b2, Ret SDF b3))))
-> (Signal b1, Signal b2, Signal b3)
-> Signal a1
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4.
MoC e =>
Fun
  e
  a1
  (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1, Ret e a2, Ret e a3))))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
-> Stream (e a4)
-> (Stream (e a1), Stream (e a2), Stream (e a3))
MoC.stated13 (((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> ([b1], [b2], [b3]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons, [a1] -> ((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),
 [b1] -> [b2] -> [b3] -> [a1] -> ([b1], [b2], [b3]))
ns) (([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
forall a1 a2 a3.
([a1], [a2], [a3]) -> (Signal a1, Signal a2, Signal a3)
signal3 ([b1], [b2], [b3])
i)
stated14 :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> ([b1], [b2], [b3], [b4]))
-> ([b1], [b2], [b3], [b4])
-> Signal a1
-> (Signal b1, Signal b2, Signal b3, Signal b4)
stated14 ns :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> ([b1], [b2], [b3], [b4]))
ns i :: ([b1], [b2], [b3], [b4])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           b4
           (Fun SDF a1 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)))))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
-> Signal a1
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 a5.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun e a4 (Fun e a5 (Ret e a1, Ret e a2, Ret e a3, Ret e a4)))))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
-> Stream (e a5)
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
MoC.stated14 (((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [b4]
                -> (Cons,
                    [a1]
                    -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))))
forall c1 c2 c3 c4 c5 p1 p2 p3 p4 a1 a2 a3 a4 a5 b1 b2 b3 b4.
((c1, c2, c3, c4, c5), (p1, p2, p3, p4),
 a1 -> a2 -> a3 -> a4 -> a5 -> (b1, b2, b3, b4))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4 -> (c5, a5 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4)))))))
scen54 ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> ([b1], [b2], [b3], [b4]))
ns) (([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall a1 a2 a3 a4.
([a1], [a2], [a3], [a4])
-> (Signal a1, Signal a2, Signal a3, Signal a4)
signal4 ([b1], [b2], [b3], [b4])
i)
stated21 :: ((Cons, Cons, Cons), Cons, [b1] -> [a1] -> [a2] -> [b1])
-> [b1] -> Signal a1 -> Signal a2 -> Signal b1
stated21 ns :: ((Cons, Cons, Cons), Cons, [b1] -> [a1] -> [a2] -> [b1])
ns i :: [b1]
i = Fun SDF b1 (Fun SDF a1 (Fun SDF a2 (Ret SDF b1)))
-> Signal b1 -> Signal a1 -> Signal a2 -> Signal b1
forall (e :: * -> *) a1 a2 a3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1)))
-> Stream (e a1) -> Stream (e a2) -> Stream (e a3) -> Stream (e a1)
MoC.stated21 (((Cons, Cons, Cons), Cons, [b1] -> [a1] -> [a2] -> [b1])
-> (Cons, [b1] -> (Cons, [a1] -> (Cons, [a2] -> (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, [b1] -> [a1] -> [a2] -> [b1])
ns) ([b1] -> Signal b1
forall a. [a] -> Signal a
signal  [b1]
i)
stated22 :: ((Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> ([b1], [b2]))
-> ([b1], [b2]) -> Signal a1 -> Signal a2 -> (Signal b1, Signal b2)
stated22 ns :: ((Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> ([b1], [b2]))
ns i :: ([b1], [b2])
i = Fun
  SDF
  b1
  (Fun SDF b2 (Fun SDF a1 (Fun SDF a2 (Ret SDF b1, Ret SDF b2))))
-> (Signal b1, Signal b2)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2)
forall (e :: * -> *) st1 st2 a1 a2.
MoC e =>
Fun e st1 (Fun e st2 (Fun e a1 (Fun e a2 (Ret e st1, Ret e st2))))
-> (Stream (e st1), Stream (e st2))
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e st1), Stream (e st2))
MoC.stated22 (((Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> ([b1], [b2]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons, [a1] -> (Cons, [a2] -> ((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),
 [b1] -> [b2] -> [a1] -> [a2] -> ([b1], [b2]))
ns) (([b1], [b2]) -> (Signal b1, Signal b2)
forall a1 a2. ([a1], [a2]) -> (Signal a1, Signal a2)
signal2 ([b1], [b2])
i)
stated23 :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
-> ([b1], [b2], [b3])
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3)
stated23 ns :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
ns i :: ([b1], [b2], [b3])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun SDF a1 (Fun SDF a2 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))))
-> (Signal b1, Signal b2, Signal b3)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 a5.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1, Ret e a2, Ret e a3)))))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
-> Stream (e a4)
-> Stream (e a5)
-> (Stream (e a1), Stream (e a2), Stream (e a3))
MoC.stated23 (((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [a1]
                -> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))))
forall c1 c2 c3 c4 c5 p1 p2 p3 a1 a2 a3 a4 a5 b1 b2 b3.
((c1, c2, c3, c4, c5), (p1, p2, p3),
 a1 -> a2 -> a3 -> a4 -> a5 -> (b1, b2, b3))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3 -> (c4, a4 -> (c5, a5 -> ((p1, b1), (p2, b2), (p3, b3)))))))
scen53 ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
ns) (([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
forall a1 a2 a3.
([a1], [a2], [a3]) -> (Signal a1, Signal a2, Signal a3)
signal3 ([b1], [b2], [b3])
i)
stated24 :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> ([b1], [b2], [b3], [b4]))
-> ([b1], [b2], [b3], [b4])
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
stated24 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> ([b1], [b2], [b3], [b4]))
ns i :: ([b1], [b2], [b3], [b4])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           b4
           (Fun
              SDF
              a1
              (Fun SDF a2 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))))))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun
           e
           a4
           (Fun e a5 (Fun e a6 (Ret e a1, Ret e a2, Ret e a3, Ret e a4))))))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
-> Stream (e a5)
-> Stream (e a6)
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
MoC.stated24 (((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [b4]
                -> (Cons,
                    [a1]
                    -> (Cons,
                        [a2]
                        -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))))
forall c1 c2 c3 c4 c5 c6 p1 p2 p3 p4 a1 a2 a3 a4 a5 a6 b1 b2 b3 b4.
((c1, c2, c3, c4, c5, c6), (p1, p2, p3, p4),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> (b1, b2, b3, b4))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4
                -> (c5,
                    a5 -> (c6, a6 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4))))))))
scen64 ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> ([b1], [b2], [b3], [b4]))
ns) (([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall a1 a2 a3 a4.
([a1], [a2], [a3], [a4])
-> (Signal a1, Signal a2, Signal a3, Signal a4)
signal4 ([b1], [b2], [b3], [b4])
i)
stated31 :: ((Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [b1])
-> [b1] -> Signal a1 -> Signal a2 -> Signal a3 -> Signal b1
stated31 ns :: ((Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [b1])
ns i :: [b1]
i = Fun SDF b1 (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF b1))))
-> Signal b1 -> Signal a1 -> Signal a2 -> Signal a3 -> Signal b1
forall (e :: * -> *) a1 a2 a3 a4.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a1)
MoC.stated31 (((Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [b1])
-> (Cons,
    [b1]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (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,
 [b1] -> [a1] -> [a2] -> [a3] -> [b1])
ns) ([b1] -> Signal b1
forall a. [a] -> Signal a
signal  [b1]
i)
stated32 :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> ([b1], [b2])
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2)
stated32 ns :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
ns i :: ([b1], [b2])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF b1, Ret SDF b2)))))
-> (Signal b1, Signal b2)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 a4 a5.
MoC e =>
Fun
  e
  a1
  (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1, Ret e a2)))))
-> (Stream (e a1), Stream (e a2))
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> (Stream (e a1), Stream (e a2))
MoC.stated32 (((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [a1]
            -> (Cons, [a2] -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2])))))))
forall c1 c2 c3 ctxa ctxb a1 a2 a3 a4 a5 b1 b2.
((c1, c2, c3, ctxa, ctxa), (ctxb, ctxb),
 a1 -> a2 -> a3 -> a4 -> a5 -> (b1, b2))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3 -> (ctxa, a4 -> (ctxa, a5 -> ((ctxb, b1), (ctxb, b2)))))))
scen52 ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
ns) (([b1], [b2]) -> (Signal b1, Signal b2)
forall a1 a2. ([a1], [a2]) -> (Signal a1, Signal a2)
signal2 ([b1], [b2])
i)
stated33 :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> ([b1], [b2], [b3])
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
stated33 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
ns i :: ([b1], [b2], [b3])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           a1
           (Fun SDF a2 (Fun SDF a3 (Ret SDF b1, Ret SDF b2, Ret SDF b3))))))
-> (Signal b1, Signal b2, Signal b3)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun e a4 (Fun e a5 (Fun e a6 (Ret e a1, Ret e a2, Ret e a3))))))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
-> Stream (e a4)
-> Stream (e a5)
-> Stream (e a6)
-> (Stream (e a1), Stream (e a2), Stream (e a3))
MoC.stated33 (((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [a1]
                -> (Cons,
                    [a2]
                    -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))))))
forall c1 c2 c3 c4 c5 c6 p1 p2 p3 a1 a2 a3 a4 a5 a6 b1 b2 b3.
((c1, c2, c3, c4, c5, c6), (p1, p2, p3),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> (b1, b2, b3))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4 -> (c5, a5 -> (c6, a6 -> ((p1, b1), (p2, b2), (p3, b3))))))))
scen63 ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
ns) (([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
forall a1 a2 a3.
([a1], [a2], [a3]) -> (Signal a1, Signal a2, Signal a3)
signal3 ([b1], [b2], [b3])
i)
stated34 :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> ([b1], [b2], [b3], [b4]))
-> ([b1], [b2], [b3], [b4])
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
stated34 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> ([b1], [b2], [b3], [b4]))
ns i :: ([b1], [b2], [b3], [b4])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           b4
           (Fun
              SDF
              a1
              (Fun
                 SDF
                 a2
                 (Fun SDF a3 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)))))))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6 a7.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun
           e
           a4
           (Fun
              e
              a5
              (Fun e a6 (Fun e a7 (Ret e a1, Ret e a2, Ret e a3, Ret e a4)))))))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
-> Stream (e a5)
-> Stream (e a6)
-> Stream (e a7)
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
MoC.stated34 (((Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [b4]
                -> (Cons,
                    [a1]
                    -> (Cons,
                        [a2]
                        -> (Cons,
                            [a3]
                            -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))))))
forall c1 c2 c3 c4 c5 c6 c7 p1 p2 p3 p4 a1 a2 a3 a4 a5 a6 a7 b1 b2
       b3 b4.
((c1, c2, c3, c4, c5, c6, c7), (p1, p2, p3, p4),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> (b1, b2, b3, b4))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4
                -> (c5,
                    a5
                    -> (c6,
                        a6 -> (c7, a7 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4)))))))))
scen74 ((Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> ([b1], [b2], [b3], [b4]))
ns) (([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall a1 a2 a3 a4.
([a1], [a2], [a3], [a4])
-> (Signal a1, Signal a2, Signal a3, Signal a4)
signal4 ([b1], [b2], [b3], [b4])
i)
stated41 :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> [b1]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> Signal b1
stated41 ns :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
ns i :: [b1]
i = Fun
  SDF
  b1
  (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF b1)))))
-> Signal b1
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> Signal b1
forall (e :: * -> *) a1 a2 a3 a4 a5.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1)))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> Stream (e a1)
MoC.stated41 (((Cons, Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> (Cons,
    [b1]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
ns) ([b1] -> Signal b1
forall a. [a] -> Signal a
signal  [b1]
i)
stated42 :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> ([b1], [b2])
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
stated42 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
ns i :: ([b1], [b2])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        a1
        (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF b1, Ret SDF b2))))))
-> (Signal b1, Signal b2)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun e a3 (Fun e a4 (Fun e a5 (Fun e a6 (Ret e a1, Ret e a2))))))
-> (Stream (e a1), Stream (e a2))
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> Stream (e a6)
-> (Stream (e a1), Stream (e a2))
MoC.stated42 (((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [a1]
            -> (Cons,
                [a2]
                -> (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]))))))))
forall c1 c2 c3 c4 ctxa ctxb a1 a2 a3 a4 a5 a6 b1 b2.
((c1, c2, c3, c4, ctxa, ctxa), (ctxb, ctxb),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> (b1, b2))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4 -> (ctxa, a5 -> (ctxa, a6 -> ((ctxb, b1), (ctxb, b2))))))))
scen62 ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
ns) (([b1], [b2]) -> (Signal b1, Signal b2)
forall a1 a2. ([a1], [a2]) -> (Signal a1, Signal a2)
signal2 ([b1], [b2])
i)
stated43 :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3]))
-> ([b1], [b2], [b3])
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
stated43 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3]))
ns i :: ([b1], [b2], [b3])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           a1
           (Fun
              SDF
              a2
              (Fun SDF a3 (Fun SDF a4 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))))))
-> (Signal b1, Signal b2, Signal b3)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6 a7.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun
           e
           a4
           (Fun e a5 (Fun e a6 (Fun e a7 (Ret e a1, Ret e a2, Ret e a3)))))))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
-> Stream (e a4)
-> Stream (e a5)
-> Stream (e a6)
-> Stream (e a7)
-> (Stream (e a1), Stream (e a2), Stream (e a3))
MoC.stated43 (((Cons, Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [a1]
                -> (Cons,
                    [a2]
                    -> (Cons,
                        [a3]
                        -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))))))
forall c1 c2 c3 c4 c5 c6 c7 p1 p2 p3 a1 a2 a3 a4 a5 a6 a7 b1 b2 b3.
((c1, c2, c3, c4, c5, c6, c7), (p1, p2, p3),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> (b1, b2, b3))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4
                -> (c5,
                    a5 -> (c6, a6 -> (c7, a7 -> ((p1, b1), (p2, b2), (p3, b3)))))))))
scen73 ((Cons, Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3]))
ns) (([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
forall a1 a2 a3.
([a1], [a2], [a3]) -> (Signal a1, Signal a2, Signal a3)
signal3 ([b1], [b2], [b3])
i)
stated44 :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3], [b4]))
-> ([b1], [b2], [b3], [b4])
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
stated44 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3], [b4]))
ns i :: ([b1], [b2], [b3], [b4])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           b4
           (Fun
              SDF
              a1
              (Fun
                 SDF
                 a2
                 (Fun
                    SDF
                    a3
                    (Fun SDF a4 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))))))))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6 a7 a8.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun
           e
           a4
           (Fun
              e
              a5
              (Fun
                 e
                 a6
                 (Fun e a7 (Fun e a8 (Ret e a1, Ret e a2, Ret e a3, Ret e a4))))))))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
-> Stream (e a5)
-> Stream (e a6)
-> Stream (e a7)
-> Stream (e a8)
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
MoC.stated44 (((Cons, Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [b4]
                -> (Cons,
                    [a1]
                    -> (Cons,
                        [a2]
                        -> (Cons,
                            [a3]
                            -> (Cons,
                                [a4]
                                -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))))))
forall c1 c2 c3 c4 c5 c6 c7 c8 p1 p2 p3 p4 a1 a2 a3 a4 a5 a6 a7 a8
       b1 b2 b3 b4.
((c1, c2, c3, c4, c5, c6, c7, c8), (p1, p2, p3, p4),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> (b1, b2, b3, b4))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4
                -> (c5,
                    a5
                    -> (c6,
                        a6
                        -> (c7,
                            a7 -> (c8, a8 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4))))))))))
scen84 ((Cons, Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3], [b4]))
ns) (([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall a1 a2 a3 a4.
([a1], [a2], [a3], [a4])
-> (Signal a1, Signal a2, Signal a3, Signal a4)
signal4 ([b1], [b2], [b3], [b4])
i)

------- STATE -------

-- | @state@ is a state machine without an output decoder. It is an
-- instantiation of the @stated@ MoC constructor (see
-- 'ForSyDe.Atom.MoC.state22').
--
-- Constructors: @state[1-4][1-4]@.
--
-- >>> let f [a] [b,c] = [a+b+c]
-- >>> let s = signal [1,2,3,4,5,6,7]  
-- >>> state11 ((1,2),1,f) [1] s
-- {4,11,22}
--
-- <<fig/moc-sdf-pattern-state.png>>
state22 :: ((Cons,Cons,Cons,Cons), (Prod,Prod),
            [b1] -> [b2] -> [a1] -> [a2] -> ([b1], [b2]))
        -- ^ next state function, tupled with consumption /
        -- production rates
        -> ([b1], [b2])
        -- ^ initial partitions of values
        -> Signal a1
        -- ^ first input signal
        -> Signal a2
        -- ^ second input signal
        -> (Signal b1, Signal b2)
        -- ^ output signals
state11 :: ((Cons,Cons), Prod,
             [b1] -> [a1] -> [b1])
        ->  [b1]
        -> Signal a1
        -> Signal b1
state12 :: ((Cons,Cons,Cons), (Prod,Prod),
             [b1] -> [b2] -> [a1] -> ([b1], [b2]))
        -> ([b1], [b2])
        -> Signal a1
        -> (Signal b1, Signal b2)
state13 :: ((Cons,Cons,Cons,Cons), (Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [a1] -> ([b1], [b2], [b3]))
        -> ([b1], [b2], [b3])
        -> Signal a1
        -> (Signal b1, Signal b2, Signal b3)
state14 :: ((Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> ([b1], [b2], [b3], [b4]))
         -> ([b1], [b2], [b3], [b4])
        -> Signal a1
        -> (Signal b1, Signal b2, Signal b3, Signal b4)
state21 :: ((Cons,Cons,Cons), Prod,
             [b1] -> [a1] -> [a2] -> [b1])
        ->  [b1]
        -> Signal a1 -> Signal a2
        -> Signal b1
state23 :: ((Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
        -> ([b1], [b2], [b3])
        -> Signal a1 -> Signal a2
        -> (Signal b1, Signal b2, Signal b3)
state24 :: ((Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
        -> ([b1], [b2], [b3], [b4])
        -> Signal a1 -> Signal a2
        -> (Signal b1, Signal b2, Signal b3, Signal b4)
state31 :: ((Cons,Cons,Cons,Cons), Prod,
             [b1] -> [a1] -> [a2] -> [a3] -> [b1])
         ->  [b1]
        -> Signal a1 -> Signal a2 -> Signal a3
        -> Signal b1
state32 :: ((Cons,Cons,Cons,Cons,Cons), (Prod,Prod),
             [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
        -> ([b1], [b2])
        -> Signal a1 -> Signal a2 -> Signal a3
        -> (Signal b1, Signal b2)
state33 :: ((Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
        -> ([b1], [b2], [b3])
        -> Signal a1 -> Signal a2 -> Signal a3
        -> (Signal b1, Signal b2, Signal b3)
state34 :: ((Cons,Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
        -> ([b1], [b2], [b3], [b4])
        -> Signal a1 -> Signal a2 -> Signal a3
        -> (Signal b1, Signal b2, Signal b3, Signal b4)
state41 :: ((Cons,Cons,Cons,Cons,Cons), Prod,
             [b1] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
        ->  [b1]
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> Signal b1
state42 :: ((Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod),
             [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
        -> ([b1], [b2])
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> (Signal b1, Signal b2)
state43 :: ((Cons,Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
        -> ([b1], [b2], [b3])
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> (Signal b1, Signal b2, Signal b3)
state44 :: ((Cons,Cons,Cons,Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
        -> ([b1], [b2], [b3], [b4])
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> (Signal b1, Signal b2, Signal b3, Signal b4)
           
state11 :: ((Cons, Cons), Cons, [b1] -> [a1] -> [b1])
-> [b1] -> Signal a1 -> Signal b1
state11 ns :: ((Cons, Cons), Cons, [b1] -> [a1] -> [b1])
ns i :: [b1]
i = Fun SDF b1 (Fun SDF a1 (Ret SDF b1))
-> Signal b1 -> Signal a1 -> Signal b1
forall (e :: * -> *) a1 a2 b.
(MoC e,
 Fun e a1 (Fun e a2 (Ret e a1)) ~ Fun e a1 (Fun e a2 (Ret e b))) =>
Fun e a1 (Fun e a2 (Ret e b))
-> Stream (e a1) -> Stream (e a2) -> Stream (e b)
MoC.state11 (((Cons, Cons), Cons, [b1] -> [a1] -> [b1])
-> (Cons, [b1] -> (Cons, [a1] -> (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, [b1] -> [a1] -> [b1])
ns) ([b1] -> Signal b1
forall a. [a] -> Signal a
signal  [b1]
i)
state12 :: ((Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> ([b1], [b2]))
-> ([b1], [b2]) -> Signal a1 -> (Signal b1, Signal b2)
state12 ns :: ((Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> ([b1], [b2]))
ns i :: ([b1], [b2])
i = Fun SDF b1 (Fun SDF b2 (Fun SDF a1 (Ret SDF b1, Ret SDF b2)))
-> (Signal b1, Signal b2) -> Signal a1 -> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1, Ret e a2)))
-> (Stream (e a1), Stream (e a2))
-> Stream (e a3)
-> (Stream (e a1), Stream (e a2))
MoC.state12 (((Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> ([b1], [b2]))
-> (Cons,
    [b1]
    -> (Cons, [b2] -> (Cons, [a1] -> ((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),
 [b1] -> [b2] -> [a1] -> ([b1], [b2]))
ns) (([b1], [b2]) -> (Signal b1, Signal b2)
forall a1 a2. ([a1], [a2]) -> (Signal a1, Signal a2)
signal2 ([b1], [b2])
i)
state13 :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> ([b1], [b2], [b3]))
-> ([b1], [b2], [b3])
-> Signal a1
-> (Signal b1, Signal b2, Signal b3)
state13 ns :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> ([b1], [b2], [b3]))
ns i :: ([b1], [b2], [b3])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun SDF b3 (Fun SDF a1 (Ret SDF b1, Ret SDF b2, Ret SDF b3))))
-> (Signal b1, Signal b2, Signal b3)
-> Signal a1
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4.
MoC e =>
Fun
  e
  a1
  (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1, Ret e a2, Ret e a3))))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
-> Stream (e a4)
-> (Stream (e a1), Stream (e a2), Stream (e a3))
MoC.state13 (((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> ([b1], [b2], [b3]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons, [a1] -> ((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),
 [b1] -> [b2] -> [b3] -> [a1] -> ([b1], [b2], [b3]))
ns) (([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
forall a1 a2 a3.
([a1], [a2], [a3]) -> (Signal a1, Signal a2, Signal a3)
signal3 ([b1], [b2], [b3])
i)
state14 :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> ([b1], [b2], [b3], [b4]))
-> ([b1], [b2], [b3], [b4])
-> Signal a1
-> (Signal b1, Signal b2, Signal b3, Signal b4)
state14 ns :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> ([b1], [b2], [b3], [b4]))
ns i :: ([b1], [b2], [b3], [b4])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           b4
           (Fun SDF a1 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)))))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
-> Signal a1
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 a5.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun e a4 (Fun e a5 (Ret e a1, Ret e a2, Ret e a3, Ret e a4)))))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
-> Stream (e a5)
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
MoC.state14 (((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [b4]
                -> (Cons,
                    [a1]
                    -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))))
forall c1 c2 c3 c4 c5 p1 p2 p3 p4 a1 a2 a3 a4 a5 b1 b2 b3 b4.
((c1, c2, c3, c4, c5), (p1, p2, p3, p4),
 a1 -> a2 -> a3 -> a4 -> a5 -> (b1, b2, b3, b4))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4 -> (c5, a5 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4)))))))
scen54 ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [b4] -> [a1] -> ([b1], [b2], [b3], [b4]))
ns) (([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall a1 a2 a3 a4.
([a1], [a2], [a3], [a4])
-> (Signal a1, Signal a2, Signal a3, Signal a4)
signal4 ([b1], [b2], [b3], [b4])
i)
state21 :: ((Cons, Cons, Cons), Cons, [b1] -> [a1] -> [a2] -> [b1])
-> [b1] -> Signal a1 -> Signal a2 -> Signal b1
state21 ns :: ((Cons, Cons, Cons), Cons, [b1] -> [a1] -> [a2] -> [b1])
ns i :: [b1]
i = Fun SDF b1 (Fun SDF a1 (Fun SDF a2 (Ret SDF b1)))
-> Signal b1 -> Signal a1 -> Signal a2 -> Signal b1
forall (e :: * -> *) a1 a2 a3 b.
(MoC e,
 Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1)))
 ~ Fun e a1 (Fun e a2 (Fun e a3 (Ret e b)))) =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e b)))
-> Stream (e a1) -> Stream (e a2) -> Stream (e a3) -> Stream (e b)
MoC.state21 (((Cons, Cons, Cons), Cons, [b1] -> [a1] -> [a2] -> [b1])
-> (Cons, [b1] -> (Cons, [a1] -> (Cons, [a2] -> (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, [b1] -> [a1] -> [a2] -> [b1])
ns) ([b1] -> Signal b1
forall a. [a] -> Signal a
signal  [b1]
i)
state22 :: ((Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> ([b1], [b2]))
-> ([b1], [b2]) -> Signal a1 -> Signal a2 -> (Signal b1, Signal b2)
state22 ns :: ((Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> ([b1], [b2]))
ns i :: ([b1], [b2])
i = Fun
  SDF
  b1
  (Fun SDF b2 (Fun SDF a1 (Fun SDF a2 (Ret SDF b1, Ret SDF b2))))
-> (Signal b1, Signal b2)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2)
forall (e :: * -> *) st1 st2 a1 a2.
MoC e =>
Fun e st1 (Fun e st2 (Fun e a1 (Fun e a2 (Ret e st1, Ret e st2))))
-> (Stream (e st1), Stream (e st2))
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e st1), Stream (e st2))
MoC.state22 (((Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> ([b1], [b2]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons, [a1] -> (Cons, [a2] -> ((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),
 [b1] -> [b2] -> [a1] -> [a2] -> ([b1], [b2]))
ns) (([b1], [b2]) -> (Signal b1, Signal b2)
forall a1 a2. ([a1], [a2]) -> (Signal a1, Signal a2)
signal2 ([b1], [b2])
i)
state23 :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
-> ([b1], [b2], [b3])
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3)
state23 ns :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
ns i :: ([b1], [b2], [b3])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun SDF a1 (Fun SDF a2 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))))
-> (Signal b1, Signal b2, Signal b3)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 a5.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1, Ret e a2, Ret e a3)))))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
-> Stream (e a4)
-> Stream (e a5)
-> (Stream (e a1), Stream (e a2), Stream (e a3))
MoC.state23 (((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [a1]
                -> (Cons, [a2] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))))
forall c1 c2 c3 c4 c5 p1 p2 p3 a1 a2 a3 a4 a5 b1 b2 b3.
((c1, c2, c3, c4, c5), (p1, p2, p3),
 a1 -> a2 -> a3 -> a4 -> a5 -> (b1, b2, b3))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3 -> (c4, a4 -> (c5, a5 -> ((p1, b1), (p2, b2), (p3, b3)))))))
scen53 ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
ns) (([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
forall a1 a2 a3.
([a1], [a2], [a3]) -> (Signal a1, Signal a2, Signal a3)
signal3 ([b1], [b2], [b3])
i)
state24 :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> ([b1], [b2], [b3], [b4]))
-> ([b1], [b2], [b3], [b4])
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
state24 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> ([b1], [b2], [b3], [b4]))
ns i :: ([b1], [b2], [b3], [b4])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           b4
           (Fun
              SDF
              a1
              (Fun SDF a2 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))))))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun
           e
           a4
           (Fun e a5 (Fun e a6 (Ret e a1, Ret e a2, Ret e a3, Ret e a4))))))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
-> Stream (e a5)
-> Stream (e a6)
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
MoC.state24 (((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [b4]
                -> (Cons,
                    [a1]
                    -> (Cons,
                        [a2]
                        -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))))
forall c1 c2 c3 c4 c5 c6 p1 p2 p3 p4 a1 a2 a3 a4 a5 a6 b1 b2 b3 b4.
((c1, c2, c3, c4, c5, c6), (p1, p2, p3, p4),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> (b1, b2, b3, b4))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4
                -> (c5,
                    a5 -> (c6, a6 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4))))))))
scen64 ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> ([b1], [b2], [b3], [b4]))
ns) (([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall a1 a2 a3 a4.
([a1], [a2], [a3], [a4])
-> (Signal a1, Signal a2, Signal a3, Signal a4)
signal4 ([b1], [b2], [b3], [b4])
i)
state31 :: ((Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [b1])
-> [b1] -> Signal a1 -> Signal a2 -> Signal a3 -> Signal b1
state31 ns :: ((Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [b1])
ns i :: [b1]
i = Fun SDF b1 (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF b1))))
-> Signal b1 -> Signal a1 -> Signal a2 -> Signal a3 -> Signal b1
forall (e :: * -> *) a1 a2 a3 a4 b.
(MoC e,
 Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1))))
 ~ Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b))))) =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e b)
MoC.state31 (((Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [b1])
-> (Cons,
    [b1]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (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,
 [b1] -> [a1] -> [a2] -> [a3] -> [b1])
ns) ([b1] -> Signal b1
forall a. [a] -> Signal a
signal  [b1]
i)
state32 :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> ([b1], [b2])
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2)
state32 ns :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
ns i :: ([b1], [b2])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF b1, Ret SDF b2)))))
-> (Signal b1, Signal b2)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 a4 a5.
MoC e =>
Fun
  e
  a1
  (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1, Ret e a2)))))
-> (Stream (e a1), Stream (e a2))
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> (Stream (e a1), Stream (e a2))
MoC.state32 (((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [a1]
            -> (Cons, [a2] -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2])))))))
forall c1 c2 c3 ctxa ctxb a1 a2 a3 a4 a5 b1 b2.
((c1, c2, c3, ctxa, ctxa), (ctxb, ctxb),
 a1 -> a2 -> a3 -> a4 -> a5 -> (b1, b2))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3 -> (ctxa, a4 -> (ctxa, a5 -> ((ctxb, b1), (ctxb, b2)))))))
scen52 ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
ns) (([b1], [b2]) -> (Signal b1, Signal b2)
forall a1 a2. ([a1], [a2]) -> (Signal a1, Signal a2)
signal2 ([b1], [b2])
i)
state33 :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> ([b1], [b2], [b3])
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
state33 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
ns i :: ([b1], [b2], [b3])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           a1
           (Fun SDF a2 (Fun SDF a3 (Ret SDF b1, Ret SDF b2, Ret SDF b3))))))
-> (Signal b1, Signal b2, Signal b3)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun e a4 (Fun e a5 (Fun e a6 (Ret e a1, Ret e a2, Ret e a3))))))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
-> Stream (e a4)
-> Stream (e a5)
-> Stream (e a6)
-> (Stream (e a1), Stream (e a2), Stream (e a3))
MoC.state33 (((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [a1]
                -> (Cons,
                    [a2]
                    -> (Cons, [a3] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]))))))))
forall c1 c2 c3 c4 c5 c6 p1 p2 p3 a1 a2 a3 a4 a5 a6 b1 b2 b3.
((c1, c2, c3, c4, c5, c6), (p1, p2, p3),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> (b1, b2, b3))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4 -> (c5, a5 -> (c6, a6 -> ((p1, b1), (p2, b2), (p3, b3))))))))
scen63 ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1] -> [b2] -> [b3] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
ns) (([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
forall a1 a2 a3.
([a1], [a2], [a3]) -> (Signal a1, Signal a2, Signal a3)
signal3 ([b1], [b2], [b3])
i)
state34 :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> ([b1], [b2], [b3], [b4]))
-> ([b1], [b2], [b3], [b4])
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
state34 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> ([b1], [b2], [b3], [b4]))
ns i :: ([b1], [b2], [b3], [b4])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           b4
           (Fun
              SDF
              a1
              (Fun
                 SDF
                 a2
                 (Fun SDF a3 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)))))))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6 a7.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun
           e
           a4
           (Fun
              e
              a5
              (Fun e a6 (Fun e a7 (Ret e a1, Ret e a2, Ret e a3, Ret e a4)))))))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
-> Stream (e a5)
-> Stream (e a6)
-> Stream (e a7)
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
MoC.state34 (((Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [b4]
                -> (Cons,
                    [a1]
                    -> (Cons,
                        [a2]
                        -> (Cons,
                            [a3]
                            -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))))))
forall c1 c2 c3 c4 c5 c6 c7 p1 p2 p3 p4 a1 a2 a3 a4 a5 a6 a7 b1 b2
       b3 b4.
((c1, c2, c3, c4, c5, c6, c7), (p1, p2, p3, p4),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> (b1, b2, b3, b4))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4
                -> (c5,
                    a5
                    -> (c6,
                        a6 -> (c7, a7 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4)))))))))
scen74 ((Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> ([b1], [b2], [b3], [b4]))
ns) (([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall a1 a2 a3 a4.
([a1], [a2], [a3], [a4])
-> (Signal a1, Signal a2, Signal a3, Signal a4)
signal4 ([b1], [b2], [b3], [b4])
i)
state41 :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> [b1]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> Signal b1
state41 ns :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
ns i :: [b1]
i = Fun
  SDF
  b1
  (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF b1)))))
-> Signal b1
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> Signal b1
forall (e :: * -> *) a1 a2 a3 a4 a5 b.
(MoC e,
 Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1)))))
 ~ Fun
     e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e b)))))) =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e b)))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> Stream (e b)
MoC.state41 (((Cons, Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> (Cons,
    [b1]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [b1] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
ns) ([b1] -> Signal b1
forall a. [a] -> Signal a
signal  [b1]
i)
state42 :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> ([b1], [b2])
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
state42 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
ns i :: ([b1], [b2])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        a1
        (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF b1, Ret SDF b2))))))
-> (Signal b1, Signal b2)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun e a3 (Fun e a4 (Fun e a5 (Fun e a6 (Ret e a1, Ret e a2))))))
-> (Stream (e a1), Stream (e a2))
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> Stream (e a6)
-> (Stream (e a1), Stream (e a2))
MoC.state42 (((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [a1]
            -> (Cons,
                [a2]
                -> (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]))))))))
forall c1 c2 c3 c4 ctxa ctxb a1 a2 a3 a4 a5 a6 b1 b2.
((c1, c2, c3, c4, ctxa, ctxa), (ctxb, ctxb),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> (b1, b2))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4 -> (ctxa, a5 -> (ctxa, a6 -> ((ctxb, b1), (ctxb, b2))))))))
scen62 ((Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [b1] -> [b2] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
ns) (([b1], [b2]) -> (Signal b1, Signal b2)
forall a1 a2. ([a1], [a2]) -> (Signal a1, Signal a2)
signal2 ([b1], [b2])
i)
state43 :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3]))
-> ([b1], [b2], [b3])
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
state43 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3]))
ns i :: ([b1], [b2], [b3])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           a1
           (Fun
              SDF
              a2
              (Fun SDF a3 (Fun SDF a4 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))))))
-> (Signal b1, Signal b2, Signal b3)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6 a7.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun
           e
           a4
           (Fun e a5 (Fun e a6 (Fun e a7 (Ret e a1, Ret e a2, Ret e a3)))))))
-> (Stream (e a1), Stream (e a2), Stream (e a3))
-> Stream (e a4)
-> Stream (e a5)
-> Stream (e a6)
-> Stream (e a7)
-> (Stream (e a1), Stream (e a2), Stream (e a3))
MoC.state43 (((Cons, Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [a1]
                -> (Cons,
                    [a2]
                    -> (Cons,
                        [a3]
                        -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))))))
forall c1 c2 c3 c4 c5 c6 c7 p1 p2 p3 a1 a2 a3 a4 a5 a6 a7 b1 b2 b3.
((c1, c2, c3, c4, c5, c6, c7), (p1, p2, p3),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> (b1, b2, b3))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4
                -> (c5,
                    a5 -> (c6, a6 -> (c7, a7 -> ((p1, b1), (p2, b2), (p3, b3)))))))))
scen73 ((Cons, Cons, Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3]))
ns) (([b1], [b2], [b3]) -> (Signal b1, Signal b2, Signal b3)
forall a1 a2 a3.
([a1], [a2], [a3]) -> (Signal a1, Signal a2, Signal a3)
signal3 ([b1], [b2], [b3])
i)
state44 :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3], [b4]))
-> ([b1], [b2], [b3], [b4])
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
state44 ns :: ((Cons, Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3], [b4]))
ns i :: ([b1], [b2], [b3], [b4])
i = Fun
  SDF
  b1
  (Fun
     SDF
     b2
     (Fun
        SDF
        b3
        (Fun
           SDF
           b4
           (Fun
              SDF
              a1
              (Fun
                 SDF
                 a2
                 (Fun
                    SDF
                    a3
                    (Fun SDF a4 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))))))))
-> (Signal b1, Signal b2, Signal b3, Signal b4)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 a5 a6 a7 a8.
MoC e =>
Fun
  e
  a1
  (Fun
     e
     a2
     (Fun
        e
        a3
        (Fun
           e
           a4
           (Fun
              e
              a5
              (Fun
                 e
                 a6
                 (Fun e a7 (Fun e a8 (Ret e a1, Ret e a2, Ret e a3, Ret e a4))))))))
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
-> Stream (e a5)
-> Stream (e a6)
-> Stream (e a7)
-> Stream (e a8)
-> (Stream (e a1), Stream (e a2), Stream (e a3), Stream (e a4))
MoC.state44 (((Cons, Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [b1]
    -> (Cons,
        [b2]
        -> (Cons,
            [b3]
            -> (Cons,
                [b4]
                -> (Cons,
                    [a1]
                    -> (Cons,
                        [a2]
                        -> (Cons,
                            [a3]
                            -> (Cons,
                                [a4]
                                -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4]))))))))))
forall c1 c2 c3 c4 c5 c6 c7 c8 p1 p2 p3 p4 a1 a2 a3 a4 a5 a6 a7 a8
       b1 b2 b3 b4.
((c1, c2, c3, c4, c5, c6, c7, c8), (p1, p2, p3, p4),
 a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> (b1, b2, b3, b4))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4
                -> (c5,
                    a5
                    -> (c6,
                        a6
                        -> (c7,
                            a7 -> (c8, a8 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4))))))))))
scen84 ((Cons, Cons, Cons, Cons, Cons, Cons, Cons, Cons),
 (Cons, Cons, Cons, Cons),
 [b1]
 -> [b2]
 -> [b3]
 -> [b4]
 -> [a1]
 -> [a2]
 -> [a3]
 -> [a4]
 -> ([b1], [b2], [b3], [b4]))
ns) (([b1], [b2], [b3], [b4])
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall a1 a2 a3 a4.
([a1], [a2], [a3], [a4])
-> (Signal a1, Signal a2, Signal a3, Signal a4)
signal4 ([b1], [b2], [b3], [b4])
i)

------- MOORE -------

-- | @moore@ processes model Moore state machines. It is an
-- instantiation of the @moore@ MoC constructor (see
-- 'ForSyDe.Atom.MoC.moore22').
--
-- Constructors: @moore[1-4][1-4]@.
--
-- >>> let ns [a] [b,c] = [a+b+c]
-- >>> let od [a]       = [a+1,a*2]
-- >>> let s = signal [1,2,3,4,5,6,7]  
-- >>> moore11 ((1,2),1,ns) (1,2,od) [1] s
-- {2,2,5,8,12,22,23,44}
--
-- <<fig/moc-sdf-pattern-moore.png>>
moore22 :: ((Cons,Cons,Cons), Prod, [st] -> [a1] -> [a2] -> [st])
        -- ^ next state function, tupled with consumption / production
        -- rates
        -> (Cons, (Prod,Prod), [st] -> ([b1], [b2]))
        -- ^ output decoder, tupled with consumption / production
        -- rates
        -> [st]
        -- ^ initial state values
        -> Signal a1 -> Signal a2
        -> (Signal b1, Signal b2)
moore11 :: ((Cons,Cons), Prod, [st] -> [a1] -> [st])
        -> (Cons, Prod, [st] -> [b1])
        -> [st]
        -> Signal a1
        -> Signal b1 
moore12 :: ((Cons,Cons), Prod, [st] -> [a1] -> [st])
        -> (Cons, (Prod,Prod), [st] -> ([b1], [b2]))
        -> [st]
        -> Signal a1
        -> (Signal b1, Signal b2) 
moore13 :: ((Cons,Cons), Prod, [st] -> [a1] -> [st])
        -> ( Cons, (Prod,Prod,Prod), [st] -> ([b1], [b2], [b3]))
        -> [st]
        -> Signal a1
        -> (Signal b1, Signal b2, Signal b3) 
moore14 :: ((Cons,Cons), Prod, [st] -> [a1] -> [st])
        -> ( Cons , (Prod,Prod,Prod,Prod),
             [st] -> ([b1], [b2], [b3], [b4]))
        -> [st]
        -> Signal a1
        -> (Signal b1, Signal b2, Signal b3, Signal b4)
moore21 :: ((Cons,Cons,Cons), Prod, [st] -> [a1] -> [a2] -> [st])
        -> ( Cons, Prod, [st] -> [b1])
        -> [st]
        -> Signal a1 -> Signal a2
        -> Signal b1 
moore23 :: ((Cons,Cons,Cons), Prod, [st] -> [a1] -> [a2] -> [st])
        -> ( Cons, (Prod,Prod,Prod), [st] -> ([b1], [b2], [b3]))
        -> [st]
        -> Signal a1 -> Signal a2
        -> (Signal b1, Signal b2, Signal b3) 
moore24 :: ((Cons,Cons,Cons), Prod, [st] -> [a1] -> [a2] -> [st])
        -> (Cons, (Prod,Prod,Prod,Prod),
             [st] -> ([b1], [b2], [b3], [b4]))
        -> [st]
        -> Signal a1 -> Signal a2
        -> (Signal b1, Signal b2, Signal b3, Signal b4)
moore31 :: ((Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [st])
        -> ( Cons, Prod, [st] -> [b1])
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3
        -> Signal b1 
moore32 :: ((Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [st])
        -> ( Cons, (Prod,Prod), [st] -> ([b1], [b2]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3
        -> (Signal b1, Signal b2) 
moore33 :: ((Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [st])
        -> ( Cons, (Prod,Prod,Prod), [st] -> ([b1], [b2], [b3]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3
        -> (Signal b1, Signal b2, Signal b3) 
moore34 :: ((Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [st])
        -> ( Cons, (Prod,Prod,Prod,Prod),
             [st] -> ([b1], [b2], [b3], [b4]))
        -> [st] -> Signal a1 -> Signal a2 -> Signal a3
        -> (Signal b1, Signal b2, Signal b3, Signal b4)
moore41 :: ((Cons,Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
        -> ( Cons, Prod, [st] -> [b1])
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> Signal b1 
moore42 :: ((Cons,Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
        -> ( Cons, (Prod,Prod), [st] -> ([b1], [b2]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> (Signal b1, Signal b2) 
moore43 :: ((Cons,Cons,Cons,Cons,Cons), Prod,
            [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
        -> ( Cons, (Prod,Prod,Prod), [st] -> ([b1], [b2], [b3]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> (Signal b1, Signal b2, Signal b3) 
moore44 :: ((Cons,Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
        -> (Cons, (Prod,Prod,Prod,Prod),
             [st] -> ([b1], [b2], [b3], [b4]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> (Signal b1, Signal b2, Signal b3, Signal b4)

moore11 :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, Cons, [st] -> [b1]) -> [st] -> Signal a1 -> Signal b1
moore11 ns :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns od :: (Cons, Cons, [st] -> [b1])
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Ret SDF st))
-> Fun SDF st (Ret SDF b1)
-> Stream (SDF st)
-> Signal a1
-> Signal b1
forall (e :: * -> *) a1 a2 b.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1))
-> Fun e a1 (Ret e b)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e b)
MoC.moore11 (((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [st])))
forall c1 c2 p a1 a2 b.
((c1, c2), p, a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> (p, b)))
scen21 ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns) ((Cons, Cons, [st] -> [b1]) -> (Cons, [st] -> (Cons, [b1]))
forall c p a b. (c, p, a -> b) -> (c, a -> (p, b))
scen11 (Cons, Cons, [st] -> [b1])
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore12 :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, (Cons, Cons), [st] -> ([b1], [b2]))
-> [st]
-> Signal a1
-> (Signal b1, Signal b2)
moore12 ns :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns od :: (Cons, (Cons, Cons), [st] -> ([b1], [b2]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Ret SDF st))
-> Fun SDF st (Ret SDF b1, Ret SDF b2)
-> Stream (SDF st)
-> Signal a1
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 b1 b2.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1))
-> Fun e a1 (Ret e b1, Ret e b2)
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2))
MoC.moore12 (((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [st])))
forall c1 c2 p a1 a2 b.
((c1, c2), p, a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> (p, b)))
scen21 ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns) ((Cons, (Cons, Cons), [st] -> ([b1], [b2]))
-> (Cons, [st] -> ((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), [st] -> ([b1], [b2]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore13 :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
-> [st]
-> Signal a1
-> (Signal b1, Signal b2, Signal b3)
moore13 ns :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns od :: (Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Ret SDF st))
-> Fun SDF st (Ret SDF b1, Ret SDF b2, Ret SDF b3)
-> Stream (SDF st)
-> Signal a1
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 b1 b2 b3.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1))
-> Fun e a1 (Ret e b1, Ret e b2, Ret e b3)
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.moore13 (((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [st])))
forall c1 c2 p a1 a2 b.
((c1, c2), p, a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> (p, b)))
scen21 ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns) ((Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
-> (Cons, [st] -> ((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), [st] -> ([b1], [b2], [b3]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore14 :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, (Cons, Cons, Cons, Cons),
    [st] -> ([b1], [b2], [b3], [b4]))
-> [st]
-> Signal a1
-> (Signal b1, Signal b2, Signal b3, Signal b4)
moore14 ns :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns od :: (Cons, (Cons, Cons, Cons, Cons), [st] -> ([b1], [b2], [b3], [b4]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Ret SDF st))
-> Fun SDF st (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)
-> Stream (SDF st)
-> Signal a1
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 b1 b2 b3 b4.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1))
-> Fun e a1 (Ret e b1, Ret e b2, Ret e b3, Ret e b4)
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.moore14 (((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [st])))
forall c1 c2 p a1 a2 b.
((c1, c2), p, a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> (p, b)))
scen21 ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns) ((Cons, (Cons, Cons, Cons, Cons), [st] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [st] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))
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), [st] -> ([b1], [b2], [b3], [b4]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore21 :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, Cons, [st] -> [b1])
-> [st]
-> Signal a1
-> Signal a2
-> Signal b1
moore21 ns :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
ns od :: (Cons, Cons, [st] -> [b1])
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Ret SDF st)))
-> Fun SDF st (Ret SDF b1)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal b1
forall (e :: * -> *) a1 a2 a3 b.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1)))
-> Fun e a1 (Ret e b)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e b)
MoC.moore21 (((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [st]))))
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, [st] -> [a1] -> [a2] -> [st])
ns) ((Cons, Cons, [st] -> [b1]) -> (Cons, [st] -> (Cons, [b1]))
forall c p a b. (c, p, a -> b) -> (c, a -> (p, b))
scen11 (Cons, Cons, [st] -> [b1])
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore22 :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, (Cons, Cons), [st] -> ([b1], [b2]))
-> [st]
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2)
moore22 ns :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
ns od :: (Cons, (Cons, Cons), [st] -> ([b1], [b2]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Ret SDF st)))
-> Fun SDF st (Ret SDF b1, Ret SDF b2)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2)
forall (e :: * -> *) st a1 a2 b1 b2.
MoC e =>
Fun e st (Fun e a1 (Fun e a2 (Ret e st)))
-> Fun e st (Ret e b1, Ret e b2)
-> Stream (e st)
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2))
MoC.moore22 (((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [st]))))
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, [st] -> [a1] -> [a2] -> [st])
ns) ((Cons, (Cons, Cons), [st] -> ([b1], [b2]))
-> (Cons, [st] -> ((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), [st] -> ([b1], [b2]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore23 :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
-> [st]
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3)
moore23 ns :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
ns od :: (Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Ret SDF st)))
-> Fun SDF st (Ret SDF b1, Ret SDF b2, Ret SDF b3)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 b1 b2 b3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1)))
-> Fun e a1 (Ret e b1, Ret e b2, Ret e b3)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.moore23 (((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [st]))))
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, [st] -> [a1] -> [a2] -> [st])
ns) ((Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
-> (Cons, [st] -> ((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), [st] -> ([b1], [b2], [b3]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore24 :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, (Cons, Cons, Cons, Cons),
    [st] -> ([b1], [b2], [b3], [b4]))
-> [st]
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
moore24 ns :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
ns od :: (Cons, (Cons, Cons, Cons, Cons), [st] -> ([b1], [b2], [b3], [b4]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Ret SDF st)))
-> Fun SDF st (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 b1 b2 b3 b4.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1)))
-> Fun e a1 (Ret e b1, Ret e b2, Ret e b3, Ret e b4)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.moore24 (((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [st]))))
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, [st] -> [a1] -> [a2] -> [st])
ns) ((Cons, (Cons, Cons, Cons, Cons), [st] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [st] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))
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), [st] -> ([b1], [b2], [b3], [b4]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore31 :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons, Cons, [st] -> [b1])
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal b1
moore31 ns :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns od :: (Cons, Cons, [st] -> [b1])
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF st))))
-> Fun SDF st (Ret SDF b1)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal b1
forall (e :: * -> *) a1 a2 a3 a4 b.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1))))
-> Fun e a1 (Ret e b)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e b)
MoC.moore31 (((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons,
    [st]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [st])))))
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,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns) ((Cons, Cons, [st] -> [b1]) -> (Cons, [st] -> (Cons, [b1]))
forall c p a b. (c, p, a -> b) -> (c, a -> (p, b))
scen11 (Cons, Cons, [st] -> [b1])
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore32 :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons, (Cons, Cons), [st] -> ([b1], [b2]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2)
moore32 ns :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns od :: (Cons, (Cons, Cons), [st] -> ([b1], [b2]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF st))))
-> Fun SDF st (Ret SDF b1, Ret SDF b2)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1))))
-> Fun e a1 (Ret e b1, Ret e b2)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2))
MoC.moore32 (((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons,
    [st]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [st])))))
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,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns) ((Cons, (Cons, Cons), [st] -> ([b1], [b2]))
-> (Cons, [st] -> ((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), [st] -> ([b1], [b2]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore33 :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
moore33 ns :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns od :: (Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF st))))
-> Fun SDF st (Ret SDF b1, Ret SDF b2, Ret SDF b3)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2 b3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1))))
-> Fun e a1 (Ret e b1, Ret e b2, Ret e b3)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.moore33 (((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons,
    [st]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [st])))))
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,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns) ((Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
-> (Cons, [st] -> ((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), [st] -> ([b1], [b2], [b3]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore34 :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons, (Cons, Cons, Cons, Cons),
    [st] -> ([b1], [b2], [b3], [b4]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
moore34 ns :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns od :: (Cons, (Cons, Cons, Cons, Cons), [st] -> ([b1], [b2], [b3], [b4]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF st))))
-> Fun SDF st (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2 b3 b4.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1))))
-> Fun e a1 (Ret e b1, Ret e b2, Ret e b3, Ret e b4)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.moore34 (((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons,
    [st]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [st])))))
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,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns) ((Cons, (Cons, Cons, Cons, Cons), [st] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [st] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))
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), [st] -> ([b1], [b2], [b3], [b4]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore41 :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons, Cons, [st] -> [b1])
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> Signal b1
moore41 ns :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns od :: (Cons, Cons, [st] -> [b1])
od i :: [st]
i = Fun
  SDF
  st
  (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF st)))))
-> Fun SDF st (Ret SDF b1)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> Signal b1
forall (e :: * -> *) a1 a2 a3 a4 a5 b.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1)))))
-> Fun e a1 (Ret e b)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> Stream (e b)
MoC.moore41 (((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [st]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns) ((Cons, Cons, [st] -> [b1]) -> (Cons, [st] -> (Cons, [b1]))
forall c p a b. (c, p, a -> b) -> (c, a -> (p, b))
scen11 (Cons, Cons, [st] -> [b1])
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore42 :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons, (Cons, Cons), [st] -> ([b1], [b2]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
moore42 ns :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns od :: (Cons, (Cons, Cons), [st] -> ([b1], [b2]))
od i :: [st]
i = Fun
  SDF
  st
  (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF st)))))
-> Fun SDF st (Ret SDF b1, Ret SDF b2)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 a4 a5 b1 b2.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1)))))
-> Fun e a1 (Ret e b1, Ret e b2)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> (Stream (e b1), Stream (e b2))
MoC.moore42 (((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [st]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns) ((Cons, (Cons, Cons), [st] -> ([b1], [b2]))
-> (Cons, [st] -> ((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), [st] -> ([b1], [b2]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore43 :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
moore43 ns :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns od :: (Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
od i :: [st]
i = Fun
  SDF
  st
  (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF st)))))
-> Fun SDF st (Ret SDF b1, Ret SDF b2, Ret SDF b3)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 a5 b1 b2 b3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1)))))
-> Fun e a1 (Ret e b1, Ret e b2, Ret e b3)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.moore43 (((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [st]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns) ((Cons, (Cons, Cons, Cons), [st] -> ([b1], [b2], [b3]))
-> (Cons, [st] -> ((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), [st] -> ([b1], [b2], [b3]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
moore44 :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons, (Cons, Cons, Cons, Cons),
    [st] -> ([b1], [b2], [b3], [b4]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
moore44 ns :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns od :: (Cons, (Cons, Cons, Cons, Cons), [st] -> ([b1], [b2], [b3], [b4]))
od i :: [st]
i = Fun
  SDF
  st
  (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF st)))))
-> Fun SDF st (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 a5 b1 b2 b3 b4.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1)))))
-> Fun e a1 (Ret e b1, Ret e b2, Ret e b3, Ret e b4)
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.moore44 (((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [st]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns) ((Cons, (Cons, Cons, Cons, Cons), [st] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [st] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))
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), [st] -> ([b1], [b2], [b3], [b4]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)


------- MEALY -------

-- | @mealy@ processes model Mealy state machines. It is an
-- instantiation of the @mealy@ MoC constructor
-- (see 'ForSyDe.Atom.MoC.mealy22').
--
-- Constructors: @mealy[1-4][1-4]@.
--
-- >>> let ns [a] [b,c] = [a+b+c]
-- >>> let od [a] [b]   = [a+b,a*b]
-- >>> let s = signal [1,2,3,4,5,6,7]  
-- >>> mealy11 ((1,2),1,ns) ((1,1),2,od) [1] s
-- {2,1,6,8,14,33,26,88}
--
-- <<fig/moc-sdf-pattern-mealy.png>>
mealy22 :: ((Cons,Cons,Cons), Prod, [st] -> [a1] -> [a2] -> [st])
        -- ^ next state function, tupled with consumption / production
        -- rates
        -> ((Cons,Cons,Cons), (Prod,Prod),
            [st] -> [a1] -> [a2] -> ([b1], [b2]))
        -- ^ outpt decoder, tupled with consumption / production rates
        -> [st]
        -- ^ initial state values
        -> Signal a1 -> Signal a2
        -> (Signal b1, Signal b2)           
mealy11 :: ((Cons,Cons), Prod, [st] -> [a1] -> [st])
        -> ((Cons,Cons), Prod, [st] -> [a1] -> [b1])
        -> [st]
        -> Signal a1
        -> Signal b1 
mealy12 :: ((Cons,Cons), Prod, [st] -> [a1] -> [st])
        -> ((Cons,Cons), (Prod,Prod), [st] -> [a1] -> ([b1], [b2]))
        -> [st]
        -> Signal a1
        -> (Signal b1, Signal b2) 
mealy13 :: ((Cons,Cons), Prod, [st] -> [a1] -> [st])
        -> ((Cons,Cons), (Prod,Prod,Prod),
             [st] -> [a1] -> ([b1], [b2], [b3]))
        -> [st]
        -> Signal a1
        -> (Signal b1, Signal b2, Signal b3) 
mealy14 :: ((Cons,Cons), Prod, [st] -> [a1] -> [st])
        -> ((Cons,Cons), (Prod,Prod,Prod,Prod),
             [st] -> [a1] -> ([b1], [b2], [b3], [b4]))
        -> [st]
        -> Signal a1
        -> (Signal b1, Signal b2, Signal b3, Signal b4)
mealy21 :: ((Cons,Cons,Cons), Prod, [st] -> [a1] -> [a2] -> [st])
        -> ((Cons,Cons,Cons), Prod, [st] -> [a1] -> [a2] -> [b1])
        -> [st]
        -> Signal a1 -> Signal a2
        -> Signal b1 
mealy23 :: ((Cons,Cons,Cons), Prod, [st] -> [a1] -> [a2] -> [st])
        -> ((Cons,Cons,Cons), (Prod,Prod,Prod),
             [st] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
        -> [st]
        -> Signal a1 -> Signal a2
        -> (Signal b1, Signal b2, Signal b3) 
mealy24 :: ((Cons,Cons,Cons), Prod, [st] -> [a1] -> [a2] -> [st])
        -> ((Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [st] -> [a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
        -> [st]
        -> Signal a1 -> Signal a2
        -> (Signal b1, Signal b2, Signal b3, Signal b4)
mealy31 :: ((Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [st])
        -> ((Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [b1])
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3
        -> Signal b1 
mealy32 :: ((Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [st])
        -> ((Cons,Cons,Cons,Cons), (Prod,Prod),
             [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3
        -> (Signal b1, Signal b2) 
mealy33 :: ((Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [st])
        -> ((Cons,Cons,Cons,Cons), (Prod,Prod,Prod),
             [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3
        -> (Signal b1, Signal b2, Signal b3) 
mealy34 :: ((Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [st])
        -> ((Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3
        -> (Signal b1, Signal b2, Signal b3, Signal b4)
mealy41 :: ((Cons,Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
        -> ((Cons,Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> Signal b1 
mealy42 :: ((Cons,Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
        -> ((Cons,Cons,Cons,Cons,Cons), (Prod,Prod),
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> (Signal b1, Signal b2) 
mealy43 :: ((Cons,Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
        -> ((Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod),
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> (Signal b1, Signal b2, Signal b3) 
mealy44 :: ((Cons,Cons,Cons,Cons,Cons), Prod,
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
        -> ((Cons,Cons,Cons,Cons,Cons), (Prod,Prod,Prod,Prod),
             [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
        -> [st]
        -> Signal a1 -> Signal a2 -> Signal a3 -> Signal a4
        -> (Signal b1, Signal b2, Signal b3, Signal b4)

mealy11 :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> ((Cons, Cons), Cons, [st] -> [a1] -> [b1])
-> [st]
-> Signal a1
-> Signal b1
mealy11 ns :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns od :: ((Cons, Cons), Cons, [st] -> [a1] -> [b1])
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Ret SDF st))
-> Fun SDF st (Fun SDF a1 (Ret SDF b1))
-> Stream (SDF st)
-> Signal a1
-> Signal b1
forall (e :: * -> *) a1 a2 b.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1))
-> Fun e a1 (Fun e a2 (Ret e b))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e b)
MoC.mealy11 (((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [st])))
forall c1 c2 p a1 a2 b.
((c1, c2), p, a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> (p, b)))
scen21 ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns) (((Cons, Cons), Cons, [st] -> [a1] -> [b1])
-> (Cons, [st] -> (Cons, [a1] -> (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, [st] -> [a1] -> [b1])
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy12 :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> ((Cons, Cons), (Cons, Cons), [st] -> [a1] -> ([b1], [b2]))
-> [st]
-> Signal a1
-> (Signal b1, Signal b2)
mealy12 ns :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns od :: ((Cons, Cons), (Cons, Cons), [st] -> [a1] -> ([b1], [b2]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Ret SDF st))
-> Fun SDF st (Fun SDF a1 (Ret SDF b1, Ret SDF b2))
-> Stream (SDF st)
-> Signal a1
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 b1 b2.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1))
-> Fun e a1 (Fun e a2 (Ret e b1, Ret e b2))
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2))
MoC.mealy12 (((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [st])))
forall c1 c2 p a1 a2 b.
((c1, c2), p, a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> (p, b)))
scen21 ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns) (((Cons, Cons), (Cons, Cons), [st] -> [a1] -> ([b1], [b2]))
-> (Cons, [st] -> (Cons, [a1] -> ((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), [st] -> [a1] -> ([b1], [b2]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy13 :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> ((Cons, Cons), (Cons, Cons, Cons),
    [st] -> [a1] -> ([b1], [b2], [b3]))
-> [st]
-> Signal a1
-> (Signal b1, Signal b2, Signal b3)
mealy13 ns :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns od :: ((Cons, Cons), (Cons, Cons, Cons),
 [st] -> [a1] -> ([b1], [b2], [b3]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Ret SDF st))
-> Fun SDF st (Fun SDF a1 (Ret SDF b1, Ret SDF b2, Ret SDF b3))
-> Stream (SDF st)
-> Signal a1
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 b1 b2 b3.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1))
-> Fun e a1 (Fun e a2 (Ret e b1, Ret e b2, Ret e b3))
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.mealy13 (((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [st])))
forall c1 c2 p a1 a2 b.
((c1, c2), p, a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> (p, b)))
scen21 ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns) (((Cons, Cons), (Cons, Cons, Cons),
 [st] -> [a1] -> ([b1], [b2], [b3]))
-> (Cons,
    [st] -> (Cons, [a1] -> ((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),
 [st] -> [a1] -> ([b1], [b2], [b3]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy14 :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> ((Cons, Cons), (Cons, Cons, Cons, Cons),
    [st] -> [a1] -> ([b1], [b2], [b3], [b4]))
-> [st]
-> Signal a1
-> (Signal b1, Signal b2, Signal b3, Signal b4)
mealy14 ns :: ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns od :: ((Cons, Cons), (Cons, Cons, Cons, Cons),
 [st] -> [a1] -> ([b1], [b2], [b3], [b4]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Ret SDF st))
-> Fun
     SDF
     st
     (Fun SDF a1 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))
-> Stream (SDF st)
-> Signal a1
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 b1 b2 b3 b4.
MoC e =>
Fun e a1 (Fun e a2 (Ret e a1))
-> Fun e a1 (Fun e a2 (Ret e b1, Ret e b2, Ret e b3, Ret e b4))
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.mealy14 (((Cons, Cons), Cons, [st] -> [a1] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [st])))
forall c1 c2 p a1 a2 b.
((c1, c2), p, a1 -> a2 -> b) -> (c1, a1 -> (c2, a2 -> (p, b)))
scen21 ((Cons, Cons), Cons, [st] -> [a1] -> [st])
ns) (((Cons, Cons), (Cons, Cons, Cons, Cons),
 [st] -> [a1] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [st]
    -> (Cons,
        [a1] -> ((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),
 [st] -> [a1] -> ([b1], [b2], [b3], [b4]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy21 :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [b1])
-> [st]
-> Signal a1
-> Signal a2
-> Signal b1
mealy21 ns :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
ns od :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [b1])
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Ret SDF st)))
-> Fun SDF st (Fun SDF a1 (Fun SDF a2 (Ret SDF b1)))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal b1
forall (e :: * -> *) a1 a2 a3 b.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1)))
-> Fun e a1 (Fun e a2 (Fun e a3 (Ret e b)))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e b)
MoC.mealy21 (((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [st]))))
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, [st] -> [a1] -> [a2] -> [st])
ns) (((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [b1])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [a2] -> (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, [st] -> [a1] -> [a2] -> [b1])
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy22 :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> ((Cons, Cons, Cons), (Cons, Cons),
    [st] -> [a1] -> [a2] -> ([b1], [b2]))
-> [st]
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2)
mealy22 ns :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
ns od :: ((Cons, Cons, Cons), (Cons, Cons),
 [st] -> [a1] -> [a2] -> ([b1], [b2]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Ret SDF st)))
-> Fun SDF st (Fun SDF a1 (Fun SDF a2 (Ret SDF b1, Ret SDF b2)))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2)
forall (e :: * -> *) st a1 a2 b1 b2.
MoC e =>
Fun e st (Fun e a1 (Fun e a2 (Ret e st)))
-> Fun e st (Fun e a1 (Fun e a2 (Ret e b1, Ret e b2)))
-> Stream (e st)
-> Stream (e a1)
-> Stream (e a2)
-> (Stream (e b1), Stream (e b2))
MoC.mealy22 (((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [st]))))
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, [st] -> [a1] -> [a2] -> [st])
ns) (((Cons, Cons, Cons), (Cons, Cons),
 [st] -> [a1] -> [a2] -> ([b1], [b2]))
-> (Cons,
    [st]
    -> (Cons, [a1] -> (Cons, [a2] -> ((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),
 [st] -> [a1] -> [a2] -> ([b1], [b2]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy23 :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> ((Cons, Cons, Cons), (Cons, Cons, Cons),
    [st] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
-> [st]
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3)
mealy23 ns :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
ns od :: ((Cons, Cons, Cons), (Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Ret SDF st)))
-> Fun
     SDF
     st
     (Fun SDF a1 (Fun SDF a2 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 b1 b2 b3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1)))
-> Fun e a1 (Fun e a2 (Fun e a3 (Ret e b1, Ret e b2, Ret e b3)))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.mealy23 (((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [st]))))
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, [st] -> [a1] -> [a2] -> [st])
ns) (((Cons, Cons, Cons), (Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> ((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),
 [st] -> [a1] -> [a2] -> ([b1], [b2], [b3]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy24 :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> ((Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
    [st] -> [a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
-> [st]
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
mealy24 ns :: ((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
ns od :: ((Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Ret SDF st)))
-> Fun
     SDF
     st
     (Fun
        SDF
        a1
        (Fun SDF a2 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 b1 b2 b3 b4.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Ret e a1)))
-> Fun
     e a1 (Fun e a2 (Fun e a3 (Ret e b1, Ret e b2, Ret e b3, Ret e b4)))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.mealy24 (((Cons, Cons, Cons), Cons, [st] -> [a1] -> [a2] -> [st])
-> (Cons, [st] -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [st]))))
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, [st] -> [a1] -> [a2] -> [st])
ns) (((Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons,
            [a2] -> ((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),
 [st] -> [a1] -> [a2] -> ([b1], [b2], [b3], [b4]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy31 :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> ((Cons, Cons, Cons, Cons), Cons,
    [st] -> [a1] -> [a2] -> [a3] -> [b1])
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal b1
mealy31 ns :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns od :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [b1])
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF st))))
-> Fun SDF st (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF b1))))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal b1
forall (e :: * -> *) a1 a2 a3 a4 b.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1))))
-> Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e b)
MoC.mealy31 (((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons,
    [st]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [st])))))
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,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns) (((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [b1])
-> (Cons,
    [st]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (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,
 [st] -> [a1] -> [a2] -> [a3] -> [b1])
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy32 :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> ((Cons, Cons, Cons, Cons), (Cons, Cons),
    [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2)
mealy32 ns :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns od :: ((Cons, Cons, Cons, Cons), (Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF st))))
-> Fun
     SDF
     st
     (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF b1, Ret SDF b2))))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1))))
-> Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b1, Ret e b2))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2))
MoC.mealy32 (((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons,
    [st]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [st])))))
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,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns) (((Cons, Cons, Cons, Cons), (Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> ((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),
 [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy33 :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
    [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
mealy33 ns :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns od :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF st))))
-> Fun
     SDF
     st
     (Fun
        SDF
        a1
        (Fun SDF a2 (Fun SDF a3 (Ret SDF b1, Ret SDF b2, Ret SDF b3))))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2 b3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1))))
-> Fun
     e
     a1
     (Fun e a2 (Fun e a3 (Fun e a4 (Ret e b1, Ret e b2, Ret e b3))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.mealy33 (((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons,
    [st]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [st])))))
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,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns) (((Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons,
            [a2]
            -> (Cons, [a3] -> ((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),
 [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy34 :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
    [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
mealy34 ns :: ((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns od :: ((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
od i :: [st]
i = Fun SDF st (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Ret SDF st))))
-> Fun
     SDF
     st
     (Fun
        SDF
        a1
        (Fun
           SDF
           a2
           (Fun SDF a3 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4))))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 b1 b2 b3 b4.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Ret e a1))))
-> Fun
     e
     a1
     (Fun
        e
        a2
        (Fun e a3 (Fun e a4 (Ret e b1, Ret e b2, Ret e b3, Ret e b4))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.mealy34 (((Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
-> (Cons,
    [st]
    -> (Cons, [a1] -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [st])))))
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,
 [st] -> [a1] -> [a2] -> [a3] -> [st])
ns) (((Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons,
            [a2]
            -> (Cons,
                [a3]
                -> ((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),
 [st] -> [a1] -> [a2] -> [a3] -> ([b1], [b2], [b3], [b4]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy41 :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> ((Cons, Cons, Cons, Cons, Cons), Cons,
    [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> Signal b1
mealy41 ns :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns od :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
od i :: [st]
i = Fun
  SDF
  st
  (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF st)))))
-> Fun
     SDF
     st
     (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF b1)))))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> Signal b1
forall (e :: * -> *) a1 a2 a3 a4 a5 b.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1)))))
-> Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e b)))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> Stream (e b)
MoC.mealy41 (((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [st]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns) (((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [b1]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [b1])
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy42 :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
    [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
mealy42 ns :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns od :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
od i :: [st]
i = Fun
  SDF
  st
  (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF st)))))
-> Fun
     SDF
     st
     (Fun
        SDF
        a1
        (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF b1, Ret SDF b2)))))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2)
forall (e :: * -> *) a1 a2 a3 a4 a5 b1 b2.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1)))))
-> Fun
     e
     a1
     (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e b1, Ret e b2)))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> (Stream (e b1), Stream (e b2))
MoC.mealy42 (((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [st]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns) (((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons,
            [a2]
            -> (Cons, [a3] -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2])))))))
forall c1 c2 c3 ctxa ctxb a1 a2 a3 a4 a5 b1 b2.
((c1, c2, c3, ctxa, ctxa), (ctxb, ctxb),
 a1 -> a2 -> a3 -> a4 -> a5 -> (b1, b2))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3 -> (ctxa, a4 -> (ctxa, a5 -> ((ctxb, b1), (ctxb, b2)))))))
scen52 ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy43 :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
    [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
mealy43 ns :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns od :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
od i :: [st]
i = Fun
  SDF
  st
  (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF st)))))
-> Fun
     SDF
     st
     (Fun
        SDF
        a1
        (Fun
           SDF
           a2
           (Fun SDF a3 (Fun SDF a4 (Ret SDF b1, Ret SDF b2, Ret SDF b3)))))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3)
forall (e :: * -> *) a1 a2 a3 a4 a5 b1 b2 b3.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1)))))
-> Fun
     e
     a1
     (Fun
        e
        a2
        (Fun e a3 (Fun e a4 (Fun e a5 (Ret e b1, Ret e b2, Ret e b3)))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> (Stream (e b1), Stream (e b2), Stream (e b3))
MoC.mealy43 (((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [st]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns) (((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons,
            [a2]
            -> (Cons,
                [a3]
                -> (Cons, [a4] -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3])))))))
forall c1 c2 c3 c4 c5 p1 p2 p3 a1 a2 a3 a4 a5 b1 b2 b3.
((c1, c2, c3, c4, c5), (p1, p2, p3),
 a1 -> a2 -> a3 -> a4 -> a5 -> (b1, b2, b3))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3 -> (c4, a4 -> (c5, a5 -> ((p1, b1), (p2, b2), (p3, b3)))))))
scen53 ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)
mealy44 :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
    [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
-> [st]
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
mealy44 ns :: ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns od :: ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
od i :: [st]
i = Fun
  SDF
  st
  (Fun SDF a1 (Fun SDF a2 (Fun SDF a3 (Fun SDF a4 (Ret SDF st)))))
-> Fun
     SDF
     st
     (Fun
        SDF
        a1
        (Fun
           SDF
           a2
           (Fun
              SDF
              a3
              (Fun SDF a4 (Ret SDF b1, Ret SDF b2, Ret SDF b3, Ret SDF b4)))))
-> Stream (SDF st)
-> Signal a1
-> Signal a2
-> Signal a3
-> Signal a4
-> (Signal b1, Signal b2, Signal b3, Signal b4)
forall (e :: * -> *) a1 a2 a3 a4 a5 b1 b2 b3 b4.
MoC e =>
Fun e a1 (Fun e a2 (Fun e a3 (Fun e a4 (Fun e a5 (Ret e a1)))))
-> Fun
     e
     a1
     (Fun
        e
        a2
        (Fun
           e
           a3
           (Fun e a4 (Fun e a5 (Ret e b1, Ret e b2, Ret e b3, Ret e b4)))))
-> Stream (e a1)
-> Stream (e a2)
-> Stream (e a3)
-> Stream (e a4)
-> Stream (e a5)
-> (Stream (e b1), Stream (e b2), Stream (e b3), Stream (e b4))
MoC.mealy44 (((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons, [a2] -> (Cons, [a3] -> (Cons, [a4] -> (Cons, [st]))))))
forall c1 c2 c3 c4 c5 p a1 a2 a3 a4 a5 b.
((c1, c2, c3, c4, c5), p, a1 -> a2 -> a3 -> a4 -> a5 -> b)
-> (c1,
    a1 -> (c2, a2 -> (c3, a3 -> (c4, a4 -> (c5, a5 -> (p, b))))))
scen51 ((Cons, Cons, Cons, Cons, Cons), Cons,
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> [st])
ns) (((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
-> (Cons,
    [st]
    -> (Cons,
        [a1]
        -> (Cons,
            [a2]
            -> (Cons,
                [a3]
                -> (Cons,
                    [a4]
                    -> ((Cons, [b1]), (Cons, [b2]), (Cons, [b3]), (Cons, [b4])))))))
forall c1 c2 c3 c4 c5 p1 p2 p3 p4 a1 a2 a3 a4 a5 b1 b2 b3 b4.
((c1, c2, c3, c4, c5), (p1, p2, p3, p4),
 a1 -> a2 -> a3 -> a4 -> a5 -> (b1, b2, b3, b4))
-> (c1,
    a1
    -> (c2,
        a2
        -> (c3,
            a3
            -> (c4,
                a4 -> (c5, a5 -> ((p1, b1), (p2, b2), (p3, b3), (p4, b4)))))))
scen54 ((Cons, Cons, Cons, Cons, Cons), (Cons, Cons, Cons, Cons),
 [st] -> [a1] -> [a2] -> [a3] -> [a4] -> ([b1], [b2], [b3], [b4]))
od) ([st] -> Stream (SDF st)
forall a. [a] -> Signal a
signal [st]
i)