{-# LANGUAGE PostfixOperators #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module      :  ForSyDe.MoC.DE.Lib
-- Copyright   :  (c) George Ungureanu, KTH/ICT/E 2015-2016
-- License     :  BSD-style (see the file LICENSE)
-- 
-- Maintainer  :  ugeorge@kth.se
-- Stability   :  experimental
-- Portability :  portable
--
-- This module provides a set of helpers for properly instantiating
-- process network patterns as process constructors.
-- 
-----------------------------------------------------------------------------
module ForSyDe.Atom.MoC.DE.Lib where

import qualified ForSyDe.Atom.MoC as MoC
import           ForSyDe.Atom.MoC.DE.Core
import           ForSyDe.Atom.MoC.TimeStamp
import           ForSyDe.Atom.Utility.Tuple

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

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

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

-- | The @delay@ process "delays" a signal with one
-- event. Instantiates the 'ForSyDe.Atom.MoC.delay' pattern defined in
-- "ForSyDe.Atom.MoC".
--
-- >>> let s = readSignal "{1@0, 2@2, 3@6, 4@8, 5@9}" :: Signal Int
-- >>> delay 3 0 s
-- {0@0s,1@3s,2@5s,3@9s,4@11s,5@12s}
-- 
-- <<fig/moc-de-pattern-delay.png>>
delay :: (Num t, Ord t, Eq t) => t        -- ^ time delay
      -> a          -- ^ initial value
      -> SignalBase t a   -- ^ input signal
      -> SignalBase t a   -- ^ output signal

delay :: t -> a -> SignalBase t a -> SignalBase t a
delay t :: t
t v :: a
v = SignalBase t a -> SignalBase t a -> SignalBase t a
forall (e :: * -> *) a.
MoC e =>
Stream (e a) -> Stream (e a) -> Stream (e a)
MoC.delay ((t, a) -> SignalBase t a
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t
t, a
v))

-- | Similar to the previous, but this is the raw instantiation of the
-- 'ForSyDe.Atom.MoC.delay' pattern from "ForSyDe.Atom.MoC". It
-- "borrows" the first event from one signal and appends it at the
-- head of another signal.
--
-- >>> let s1 = readSignal "{1@0, 2@2, 3@6, 4@8, 5@9}" :: Signal Int
-- >>> let s2 = readSignal "{3@0, 4@4, 5@5, 6@8, 7@9}" :: Signal Int
-- >>> delay' s1 s2
-- {1@0s,3@2s,4@6s,5@7s,6@10s,7@11s}
--
-- <<fig/moc-de-pattern-delayp.png>>
delay' :: (Num t, Ord t, Eq t) => SignalBase t a  -- ^ signal "borrowing" the initial event
      -> SignalBase t a   -- ^ input signal
      -> SignalBase t a   -- ^ output signal

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

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

-- | @comb@ processes map combinatorial functions on signals and take
-- care of synchronization between input signals. It instantiates the
-- @comb@ pattern (see 'ForSyDe.Atom.MoC.comb22' defined in
-- "ForSyDe.Atom.MoC").
-- 
-- Constructors: @comb[1-4][1-4]@.
--
-- >>> let s1 = infinite 1
-- >>> let s2 = readSignal "{1@0, 2@2, 3@6, 4@8, 5@9}" :: Signal Int
-- >>> comb11 (+1) s2
-- {2@0s,3@2s,4@6s,5@8s,6@9s}
-- >>> comb22 (\a b-> (a+b,a-b)) s1 s2
-- ({2@0s,3@2s,4@6s,5@8s,6@9s},{0@0s,-1@2s,-2@6s,-3@8s,-4@9s})
--
-- <<fig/moc-de-pattern-comb.png>>
comb22 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> (b1, b2)) -- ^ function on values
       -> SignalBase t a1                 -- ^ first input signal
       -> SignalBase t a2                 -- ^ second input signal
       -> (SignalBase t b1, SignalBase t b2)       -- ^ two output signals
comb11 :: (Num t, Ord t, Eq t) => (a1 -> b1)
       -> SignalBase t a1 -> SignalBase t b1                                
comb12 :: (Num t, Ord t, Eq t) => (a1 -> (b1, b2))
       -> SignalBase t a1 -> (SignalBase t b1, SignalBase t b2)                          
comb13 :: (Num t, Ord t, Eq t) => (a1 -> (b1, b2, b3))
       -> SignalBase t a1 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)                      
comb14 :: (Num t, Ord t, Eq t) => (a1 -> (b1, b2, b3, b4))
       -> SignalBase t a1 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)                  
comb21 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> b1)
       -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t b1                          
comb23 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> (b1, b2, b3))
       -> SignalBase t a1 -> SignalBase t a2 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)                
comb24 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> (b1, b2, b3, b4))
       -> SignalBase t a1 -> SignalBase t a2 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)            
comb31 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> a3 -> b1)
       -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t b1                    
comb32 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> a3 -> (b1, b2))
       -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> (SignalBase t b1, SignalBase t b2)              
comb33 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> a3 -> (b1, b2, b3))
       -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)          
comb34 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> a3 -> (b1, b2, b3, b4))
       -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)     
comb41 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> a3 -> a4 -> b1)
       -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 -> SignalBase t b1              
comb42 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> a3 -> a4 -> (b1, b2))
       -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 -> (SignalBase t b1, SignalBase t b2)        
comb43 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
       -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)    
comb44 :: (Num t, Ord t, Eq t) => (a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
       -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)

comb11 :: (a1 -> b1) -> SignalBase t a1 -> SignalBase t b1
comb11 = (a1 -> b1) -> SignalBase t a1 -> SignalBase t b1
forall (e :: * -> *) a b.
MoC e =>
Fun e a (Ret e b) -> Stream (e a) -> Stream (e b)
MoC.comb11 
comb12 :: (a1 -> (b1, b2))
-> SignalBase t a1 -> (SignalBase t b1, SignalBase t b2)
comb12 = (a1 -> (b1, b2))
-> SignalBase t a1 -> (SignalBase t b1, SignalBase t 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 
comb13 :: (a1 -> (b1, b2, b3))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
comb13 = (a1 -> (b1, b2, b3))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 
comb14 :: (a1 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
comb14 = (a1 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 
comb21 :: (a1 -> a2 -> b1)
-> SignalBase t a1 -> SignalBase t a2 -> SignalBase t b1
comb21 = (a1 -> a2 -> b1)
-> SignalBase t a1 -> SignalBase t a2 -> SignalBase t 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 
comb22 :: (a1 -> a2 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2)
comb22 = (a1 -> a2 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t 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 
comb23 :: (a1 -> a2 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
comb23 = (a1 -> a2 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 
comb24 :: (a1 -> a2 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
comb24 = (a1 -> a2 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 
comb31 :: (a1 -> a2 -> a3 -> b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t b1
comb31 = (a1 -> a2 -> a3 -> b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t 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 
comb32 :: (a1 -> a2 -> a3 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2)
comb32 = (a1 -> a2 -> a3 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t 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 
comb33 :: (a1 -> a2 -> a3 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
comb33 = (a1 -> a2 -> a3 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 
comb34 :: (a1 -> a2 -> a3 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
comb34 = (a1 -> a2 -> a3 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 
comb41 :: (a1 -> a2 -> a3 -> a4 -> b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t b1
comb41 = (a1 -> a2 -> a3 -> a4 -> b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t 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 
comb42 :: (a1 -> a2 -> a3 -> a4 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2)
comb42 = (a1 -> a2 -> a3 -> a4 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t 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 
comb43 :: (a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
comb43 = (a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 
comb44 :: (a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
comb44 = (a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 

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

-- | @reconfig@ creates a DE 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' defined in "ForSyDe.Atom.MoC").
--
-- Constructors: @reconfig[1-4][1-4]@.
--
-- >>> let sf = signal [(0,(+1)),(2,(*2)),(5,(+1)),(7,(*2))]
-- >>> let s1 = signal [(0,1),(3,2),(5,3),(9,4)]
-- >>> reconfig11 sf s1
-- {2@0,2@2,4@3,4@5,6@7,8@9}
--
-- <<fig/moc-de-pattern-reconfig.png>>
reconfig22 :: (Num t, Ord t, Eq t) => SignalBase t (a1 -> a2 -> (b1, b2))
           -- ^ signal carrying functions
           -> SignalBase t a1
           -- ^ first input signal carrying arguments
           -> SignalBase t a2
           -- ^ second input signal carrying arguments
           -> (SignalBase t b1, SignalBase t b2)
           -- ^ two output signals
reconfig11 :: (Num t, Ord t, Eq t) => SignalBase t (a1 -> b1)
           -> SignalBase t a1 -> SignalBase t b1
reconfig12 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> (b1, b2))
           -> SignalBase t a1 -> (SignalBase t b1, SignalBase t b2)
reconfig13 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> (b1, b2, b3))
           -> SignalBase t a1 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
reconfig14 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> (b1, b2, b3, b4))
           -> SignalBase t a1 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)
reconfig21 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> b1)
           -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t b1
reconfig23 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> (b1, b2, b3))
           -> SignalBase t a1 -> SignalBase t a2 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
reconfig24 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> (b1, b2, b3, b4))
           -> SignalBase t a1 -> SignalBase t a2 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)
reconfig31 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> a3 -> b1)
           -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t b1
reconfig32 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> a3 -> (b1, b2))
           -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> (SignalBase t b1, SignalBase t b2)
reconfig33 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> a3 -> (b1, b2, b3))
           -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
reconfig34 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> a3 -> (b1, b2, b3, b4))
           -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)
reconfig41 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> a3 -> a4 -> b1)
           -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 -> SignalBase t b1
reconfig42 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> a3 -> a4 -> (b1, b2))
           -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 -> (SignalBase t b1, SignalBase t b2)
reconfig43 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
           -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
reconfig44 :: (Num t, Ord t, Eq t) => SignalBase t(a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
           -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)

reconfig11 :: SignalBase t (a1 -> b1) -> SignalBase t a1 -> SignalBase t b1
reconfig11 = SignalBase t (a1 -> b1) -> SignalBase t a1 -> SignalBase t b1
forall (e :: * -> *) a b.
MoC e =>
Stream (e (Fun e a (Ret e b))) -> Stream (e a) -> Stream (e b)
MoC.reconfig11 
reconfig12 :: SignalBase t (a1 -> (b1, b2))
-> SignalBase t a1 -> (SignalBase t b1, SignalBase t b2)
reconfig12 = SignalBase t (a1 -> (b1, b2))
-> SignalBase t a1 -> (SignalBase t b1, SignalBase t 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 
reconfig13 :: SignalBase t (a1 -> (b1, b2, b3))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
reconfig13 = SignalBase t (a1 -> (b1, b2, b3))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 
reconfig14 :: SignalBase t (a1 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
reconfig14 = SignalBase t (a1 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 
reconfig21 :: SignalBase t (a1 -> a2 -> b1)
-> SignalBase t a1 -> SignalBase t a2 -> SignalBase t b1
reconfig21 = SignalBase t (a1 -> a2 -> b1)
-> SignalBase t a1 -> SignalBase t a2 -> SignalBase t 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 
reconfig22 :: SignalBase t (a1 -> a2 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2)
reconfig22 = SignalBase t (a1 -> a2 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t 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 
reconfig23 :: SignalBase t (a1 -> a2 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
reconfig23 = SignalBase t (a1 -> a2 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 
reconfig24 :: SignalBase t (a1 -> a2 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
reconfig24 = SignalBase t (a1 -> a2 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 
reconfig31 :: SignalBase t (a1 -> a2 -> a3 -> b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t b1
reconfig31 = SignalBase t (a1 -> a2 -> a3 -> b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t 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 
reconfig32 :: SignalBase t (a1 -> a2 -> a3 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2)
reconfig32 = SignalBase t (a1 -> a2 -> a3 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t 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 
reconfig33 :: SignalBase t (a1 -> a2 -> a3 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
reconfig33 = SignalBase t (a1 -> a2 -> a3 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 
reconfig34 :: SignalBase t (a1 -> a2 -> a3 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
reconfig34 = SignalBase t (a1 -> a2 -> a3 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 
reconfig41 :: SignalBase t (a1 -> a2 -> a3 -> a4 -> b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t b1
reconfig41 = SignalBase t (a1 -> a2 -> a3 -> a4 -> b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t 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 
reconfig42 :: SignalBase t (a1 -> a2 -> a3 -> a4 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2)
reconfig42 = SignalBase t (a1 -> a2 -> a3 -> a4 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t 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 
reconfig43 :: SignalBase t (a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
reconfig43 = SignalBase t (a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 
reconfig44 :: SignalBase t (a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
reconfig44 = SignalBase t (a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 

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

-- | A signal generator which keeps a value constant. As compared with
-- the 'ForSyDe.Atom.MoC.SY.SY', it just constructs an infinite signal
-- with constant value (i.e. a signal with one event starting from
-- time 0).
--
-- Constructors: @constant[1-4]@.
--
-- >>> constant1 2
-- {2@0}
--
-- <<fig/moc-de-pattern-constant.png>>
constant2 :: (Num t, Ord t, Eq t) => (b1, b2)         -- ^ values to be repeated
          -> (SignalBase t b1, SignalBase t b2) -- ^ generated signals
constant1 :: (Num t, Ord t, Eq t) => b1 -> SignalBase t b1                                
constant3 :: (Num t, Ord t, Eq t) => (b1, b2, b3) -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
constant4 :: (Num t, Ord t, Eq t) => (b1, b2, b3, b4) -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)

constant1 :: b1 -> SignalBase t b1
constant1 = b1 -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => a -> SignalBase t a
infinite
constant2 :: (b1, b2) -> (SignalBase t b1, SignalBase t b2)
constant2 = (b1 -> SignalBase t b1, b2 -> SignalBase t b2)
-> (b1, b2) -> (SignalBase t b1, SignalBase t b2)
forall a1 b1 a2 b2. (a1 -> b1, a2 -> b2) -> (a1, a2) -> (b1, b2)
($$) (b1 -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => a -> SignalBase t a
infinite,b2 -> SignalBase t b2
forall t a. (Num t, Ord t, Eq t) => a -> SignalBase t a
infinite)
constant3 :: (b1, b2, b3) -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
constant3 = (b1 -> SignalBase t b1, b2 -> SignalBase t b2,
 b3 -> SignalBase t b3)
-> (b1, b2, b3)
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
forall t1 a t2 b t3 c.
(t1 -> a, t2 -> b, t3 -> c) -> (t1, t2, t3) -> (a, b, c)
($$$) (b1 -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => a -> SignalBase t a
infinite,b2 -> SignalBase t b2
forall t a. (Num t, Ord t, Eq t) => a -> SignalBase t a
infinite,b3 -> SignalBase t b3
forall t a. (Num t, Ord t, Eq t) => a -> SignalBase t a
infinite)
constant4 :: (b1, b2, b3, b4)
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
constant4 = (b1 -> SignalBase t b1, b2 -> SignalBase t b2,
 b3 -> SignalBase t b3, b4 -> SignalBase t b4)
-> (b1, b2, b3, b4)
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
forall t1 a t2 b t3 c t4 d.
(t1 -> a, t2 -> b, t3 -> c, t4 -> d)
-> (t1, t2, t3, t4) -> (a, b, c, d)
($$$$) (b1 -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => a -> SignalBase t a
infinite,b2 -> SignalBase t b2
forall t a. (Num t, Ord t, Eq t) => a -> SignalBase t a
infinite,b3 -> SignalBase t b3
forall t a. (Num t, Ord t, Eq t) => a -> SignalBase t a
infinite,b4 -> SignalBase t b4
forall t a. (Num t, Ord t, Eq t) => a -> SignalBase t a
infinite)

------- 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' defined in "ForSyDe.Atom.MoC").
--
-- Constructors: @generate[1-4]@.
--
-- >>> let (s1,s2) = generate2 (\a b -> (a+1,b+2)) ((3,1),(1,2))
-- >>> takeS 5 s1
-- {1@0,2@3,2@4,2@5,3@6}
-- >>> takeS 7 s2
-- {2@0,4@1,6@2,8@3,10@4,12@5,14@6}
--
-- <<fig/moc-de-pattern-generate.png>>
generate2 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> (b1, b2))
          -- ^ function to generate next value
          -> ((t, b1), (t, b2))
          -- ^ kernel values tupled with their generation rate.
          -> (SignalBase t b1, SignalBase t b2) -- ^ generated signals
generate1 :: (Num t, Ord t, Eq t) => (b1 -> b1) -> (t, b1)
          -> SignalBase t b1                                
generate3 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> (b1, b2, b3))
          -> ((t, b1), (t, b2), (t, b3))
          -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)                      
generate4 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> b4 -> (b1, b2, b3, b4))
          -> ((t, b1), (t, b2), (t, b3), (t, b4))
          -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)                  

generate1 :: (b1 -> b1) -> (t, b1) -> SignalBase t b1
generate1 ns :: b1 -> b1
ns i :: (t, b1)
i = Fun (DE t) b1 (Ret (DE t) b1) -> SignalBase t b1 -> SignalBase t b1
forall (e :: * -> *) a.
MoC e =>
Fun e a (Ret e a) -> Stream (e a) -> Stream (e a)
MoC.stated01 Fun (DE t) b1 (Ret (DE t) b1)
b1 -> b1
ns ((t, b1) -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit  (t, b1)
i)
generate2 :: (b1 -> b2 -> (b1, b2))
-> ((t, b1), (t, b2)) -> (SignalBase t b1, SignalBase t b2)
generate2 ns :: b1 -> b2 -> (b1, b2)
ns i :: ((t, b1), (t, b2))
i = Fun (DE t) b1 (Fun (DE t) b2 (Ret (DE t) b1, Ret (DE t) b2))
-> (SignalBase t b1, SignalBase t b2)
-> (SignalBase t b1, SignalBase t 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 Fun (DE t) b1 (Fun (DE t) b2 (Ret (DE t) b1, Ret (DE t) b2))
b1 -> b2 -> (b1, b2)
ns (((t, b1), (t, b2)) -> (SignalBase t b1, SignalBase t b2)
forall t a1 a2.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2)) -> (SignalBase t a1, SignalBase t a2)
unit2 ((t, b1), (t, b2))
i)
generate3 :: (b1 -> b2 -> b3 -> (b1, b2, b3))
-> ((t, b1), (t, b2), (t, b3))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
generate3 ns :: b1 -> b2 -> b3 -> (b1, b2, b3)
ns i :: ((t, b1), (t, b2), (t, b3))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun (DE t) b3 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun (DE t) b3 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))
b1 -> b2 -> b3 -> (b1, b2, b3)
ns (((t, b1), (t, b2), (t, b3))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
forall t a1 a2 a3.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
unit3 ((t, b1), (t, b2), (t, b3))
i)
generate4 :: (b1 -> b2 -> b3 -> b4 -> (b1, b2, b3, b4))
-> ((t, b1), (t, b2), (t, b3), (t, b4))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
generate4 ns :: b1 -> b2 -> b3 -> b4 -> (b1, b2, b3, b4)
ns i :: ((t, b1), (t, b2), (t, b3), (t, b4))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))
b1 -> b2 -> b3 -> b4 -> (b1, b2, b3, b4)
ns (((t, b1), (t, b2), (t, b3), (t, b4))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
forall t a1 a2 a3 a4.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3), (t, a4))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
unit4 ((t, b1), (t, b2), (t, b3), (t, 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' defined in "ForSyDe.Atom.MoC").
--
-- Constructors: @stated[1-4][1-4]@.
--
-- >>> let s = readSignal "{1@0, 2@2, 3@6, 4@8, 5@9}" :: Signal Int  
-- >>> takeS 7 $ stated11 (+) (6,1) s
-- {1@0s,2@6s,3@8s,5@12s,7@14s,8@15s,10@18s}
--
-- <<fig/moc-de-pattern-stated.png>>
stated22 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> a1 -> a2 -> (b1, b2))
            -- ^ next state function
           -> ((t, b1), (t, b2))
           -- ^ initial state values tupled with their initial delay
            -> SignalBase t a1
            -- ^ first input signal
            -> SignalBase t a2
            -- ^ second input signal
            -> (SignalBase t b1, SignalBase t b2) -- ^ output signals
stated11 :: (Num t, Ord t, Eq t) => (b1 -> a1 -> b1)
         -> (t, b1)
         -> SignalBase t a1
         -> SignalBase t b1 
stated12 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> a1 -> (b1, b2))
         -> ((t, b1), (t, b2))
         -> SignalBase t a1
         -> (SignalBase t b1, SignalBase t b2) 
stated13 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> a1 -> (b1, b2, b3))
         -> ((t, b1), (t, b2), (t, b3))
         -> SignalBase t a1
         -> (SignalBase t b1, SignalBase t b2, SignalBase t b3) 
stated14 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> b4 -> a1 -> (b1, b2, b3, b4))
         -> ((t, b1), (t, b2), (t, b3), (t, b4))
         -> SignalBase t a1
         -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4) 
stated21 :: (Num t, Ord t, Eq t) => (b1 -> a1 -> a2 -> b1)
         -> (t, b1)
         -> SignalBase t a1 -> SignalBase t a2
         -> SignalBase t b1 
stated23 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> a1 -> a2 -> (b1, b2, b3))
         -> ((t, b1), (t, b2), (t, b3))
         -> SignalBase t a1 -> SignalBase t a2
         -> (SignalBase t b1, SignalBase t b2, SignalBase t b3) 
stated24 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> (b1, b2, b3, b4))
         -> ((t, b1), (t, b2), (t, b3), (t, b4))
         -> SignalBase t a1 -> SignalBase t a2
         -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4) 
stated31 :: (Num t, Ord t, Eq t) => (b1 -> a1 -> a2 -> a3 -> b1)
         -> (t, b1)
         -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
         -> SignalBase t b1 
stated32 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> a1 -> a2 -> a3 -> (b1, b2))
         -> ((t, b1), (t, b2))
         -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
         -> (SignalBase t b1, SignalBase t b2) 
stated33 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> (b1, b2, b3))
         -> ((t, b1), (t, b2), (t, b3))
         -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
         -> (SignalBase t b1, SignalBase t b2, SignalBase t b3) 
stated34 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> (b1, b2, b3, b4))
         -> ((t, b1), (t, b2), (t, b3), (t, b4))
         -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
         -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4) 
stated41 :: (Num t, Ord t, Eq t) => (b1 -> a1 -> a2 -> a3 -> a4 -> b1)
         -> (t, b1)
         -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
         -> SignalBase t b1 
stated42 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> a1 -> a2 -> a3 -> a4 -> (b1, b2))
         -> ((t, b1), (t, b2))
         -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
         -> (SignalBase t b1, SignalBase t b2) 
stated43 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
         -> ((t, b1), (t, b2), (t, b3))
         -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
         -> (SignalBase t b1, SignalBase t b2, SignalBase t b3) 
stated44 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
         -> ((t, b1), (t, b2), (t, b3), (t, b4))
         -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
         -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)

stated11 :: (b1 -> a1 -> b1) -> (t, b1) -> SignalBase t a1 -> SignalBase t b1
stated11 ns :: b1 -> a1 -> b1
ns i :: (t, b1)
i = Fun (DE t) b1 (Fun (DE t) a1 (Ret (DE t) b1))
-> SignalBase t b1 -> SignalBase t a1 -> SignalBase t 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 Fun (DE t) b1 (Fun (DE t) a1 (Ret (DE t) b1))
b1 -> a1 -> b1
ns ((t, b1) -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit  (t, b1)
i)
stated12 :: (b1 -> b2 -> a1 -> (b1, b2))
-> ((t, b1), (t, b2))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2)
stated12 ns :: b1 -> b2 -> a1 -> (b1, b2)
ns i :: ((t, b1), (t, b2))
i = Fun
  (DE t)
  b1
  (Fun (DE t) b2 (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2)))
-> (SignalBase t b1, SignalBase t b2)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun (DE t) b2 (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2)))
b1 -> b2 -> a1 -> (b1, b2)
ns (((t, b1), (t, b2)) -> (SignalBase t b1, SignalBase t b2)
forall t a1 a2.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2)) -> (SignalBase t a1, SignalBase t a2)
unit2 ((t, b1), (t, b2))
i)
stated13 :: (b1 -> b2 -> b3 -> a1 -> (b1, b2, b3))
-> ((t, b1), (t, b2), (t, b3))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
stated13 ns :: b1 -> b2 -> b3 -> a1 -> (b1, b2, b3)
ns i :: ((t, b1), (t, b2), (t, b3))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))))
b1 -> b2 -> b3 -> a1 -> (b1, b2, b3)
ns (((t, b1), (t, b2), (t, b3))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
forall t a1 a2 a3.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
unit3 ((t, b1), (t, b2), (t, b3))
i)
stated14 :: (b1 -> b2 -> b3 -> b4 -> a1 -> (b1, b2, b3, b4))
-> ((t, b1), (t, b2), (t, b3), (t, b4))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
stated14 ns :: b1 -> b2 -> b3 -> b4 -> a1 -> (b1, b2, b3, b4)
ns i :: ((t, b1), (t, b2), (t, b3), (t, b4))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))))
b1 -> b2 -> b3 -> b4 -> a1 -> (b1, b2, b3, b4)
ns (((t, b1), (t, b2), (t, b3), (t, b4))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
forall t a1 a2 a3 a4.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3), (t, a4))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
unit4 ((t, b1), (t, b2), (t, b3), (t, b4))
i)
stated21 :: (b1 -> a1 -> a2 -> b1)
-> (t, b1) -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t b1
stated21 ns :: b1 -> a1 -> a2 -> b1
ns i :: (t, b1)
i = Fun (DE t) b1 (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1)))
-> SignalBase t b1
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t 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 Fun (DE t) b1 (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1)))
b1 -> a1 -> a2 -> b1
ns ((t, b1) -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit  (t, b1)
i)
stated22 :: (b1 -> b2 -> a1 -> a2 -> (b1, b2))
-> ((t, b1), (t, b2))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2)
stated22 ns :: b1 -> b2 -> a1 -> a2 -> (b1, b2)
ns i :: ((t, b1), (t, b2))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2))))
-> (SignalBase t b1, SignalBase t b2)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2))))
b1 -> b2 -> a1 -> a2 -> (b1, b2)
ns (((t, b1), (t, b2)) -> (SignalBase t b1, SignalBase t b2)
forall t a1 a2.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2)) -> (SignalBase t a1, SignalBase t a2)
unit2 ((t, b1), (t, b2))
i)
stated23 :: (b1 -> b2 -> b3 -> a1 -> a2 -> (b1, b2, b3))
-> ((t, b1), (t, b2), (t, b3))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
stated23 ns :: b1 -> b2 -> b3 -> a1 -> a2 -> (b1, b2, b3)
ns i :: ((t, b1), (t, b2), (t, b3))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))))
b1 -> b2 -> b3 -> a1 -> a2 -> (b1, b2, b3)
ns (((t, b1), (t, b2), (t, b3))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
forall t a1 a2 a3.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
unit3 ((t, b1), (t, b2), (t, b3))
i)
stated24 :: (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> (b1, b2, b3, b4))
-> ((t, b1), (t, b2), (t, b3), (t, b4))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
stated24 ns :: b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> (b1, b2, b3, b4)
ns i :: ((t, b1), (t, b2), (t, b3), (t, b4))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))))
b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> (b1, b2, b3, b4)
ns (((t, b1), (t, b2), (t, b3), (t, b4))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
forall t a1 a2 a3 a4.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3), (t, a4))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
unit4 ((t, b1), (t, b2), (t, b3), (t, b4))
i)
stated31 :: (b1 -> a1 -> a2 -> a3 -> b1)
-> (t, b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t b1
stated31 ns :: b1 -> a1 -> a2 -> a3 -> b1
ns i :: (t, b1)
i = Fun
  (DE t)
  b1
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1))))
-> SignalBase t b1
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t 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 Fun
  (DE t)
  b1
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1))))
b1 -> a1 -> a2 -> a3 -> b1
ns ((t, b1) -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit  (t, b1)
i)
stated32 :: (b1 -> b2 -> a1 -> a2 -> a3 -> (b1, b2))
-> ((t, b1), (t, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2)
stated32 ns :: b1 -> b2 -> a1 -> a2 -> a3 -> (b1, b2)
ns i :: ((t, b1), (t, b2))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        a1
        (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2)))))
-> (SignalBase t b1, SignalBase t b2)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        a1
        (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2)))))
b1 -> b2 -> a1 -> a2 -> a3 -> (b1, b2)
ns (((t, b1), (t, b2)) -> (SignalBase t b1, SignalBase t b2)
forall t a1 a2.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2)) -> (SignalBase t a1, SignalBase t a2)
unit2 ((t, b1), (t, b2))
i)
stated33 :: (b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> (b1, b2, b3))
-> ((t, b1), (t, b2), (t, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
stated33 ns :: b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> (b1, b2, b3)
ns i :: ((t, b1), (t, b2), (t, b3))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun
              (DE t)
              a2
              (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun
              (DE t)
              a2
              (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))))))
b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> (b1, b2, b3)
ns (((t, b1), (t, b2), (t, b3))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
forall t a1 a2 a3.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
unit3 ((t, b1), (t, b2), (t, b3))
i)
stated34 :: (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> (b1, b2, b3, b4))
-> ((t, b1), (t, b2), (t, b3), (t, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
stated34 ns :: b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> (b1, b2, b3, b4)
ns i :: ((t, b1), (t, b2), (t, b3), (t, b4))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Fun
                    (DE t)
                    a3
                    (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Fun
                    (DE t)
                    a3
                    (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))))))
b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> (b1, b2, b3, b4)
ns (((t, b1), (t, b2), (t, b3), (t, b4))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
forall t a1 a2 a3 a4.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3), (t, a4))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
unit4 ((t, b1), (t, b2), (t, b3), (t, b4))
i)
stated41 :: (b1 -> a1 -> a2 -> a3 -> a4 -> b1)
-> (t, b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t b1
stated41 ns :: b1 -> a1 -> a2 -> a3 -> a4 -> b1
ns i :: (t, b1)
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1)))))
-> SignalBase t b1
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1)))))
b1 -> a1 -> a2 -> a3 -> a4 -> b1
ns ((t, b1) -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit  (t, b1)
i)
stated42 :: (b1 -> b2 -> a1 -> a2 -> a3 -> a4 -> (b1, b2))
-> ((t, b1), (t, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2)
stated42 ns :: b1 -> b2 -> a1 -> a2 -> a3 -> a4 -> (b1, b2)
ns i :: ((t, b1), (t, b2))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        a1
        (Fun
           (DE t)
           a2
           (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2))))))
-> (SignalBase t b1, SignalBase t b2)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        a1
        (Fun
           (DE t)
           a2
           (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2))))))
b1 -> b2 -> a1 -> a2 -> a3 -> a4 -> (b1, b2)
ns (((t, b1), (t, b2)) -> (SignalBase t b1, SignalBase t b2)
forall t a1 a2.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2)) -> (SignalBase t a1, SignalBase t a2)
unit2 ((t, b1), (t, b2))
i)
stated43 :: (b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
-> ((t, b1), (t, b2), (t, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
stated43 ns :: b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3)
ns i :: ((t, b1), (t, b2), (t, b3))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun
              (DE t)
              a2
              (Fun
                 (DE t)
                 a3
                 (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun
              (DE t)
              a2
              (Fun
                 (DE t)
                 a3
                 (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))))))
b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3)
ns (((t, b1), (t, b2), (t, b3))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
forall t a1 a2 a3.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
unit3 ((t, b1), (t, b2), (t, b3))
i)
stated44 :: (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
-> ((t, b1), (t, b2), (t, b3), (t, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
stated44 ns :: b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4)
ns i :: ((t, b1), (t, b2), (t, b3), (t, b4))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Fun
                    (DE t)
                    a3
                    (Fun
                       (DE t)
                       a4
                       (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Fun
                    (DE t)
                    a3
                    (Fun
                       (DE t)
                       a4
                       (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))))))
b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4)
ns (((t, b1), (t, b2), (t, b3), (t, b4))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
forall t a1 a2 a3 a4.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3), (t, a4))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
unit4 ((t, b1), (t, b2), (t, b3), (t, b4))
i)

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

-- | @state@ is a state machine without an output decoder, and the
-- state non-transparent. It is an instantiation of the @state@ MoC
-- constructor (see 'ForSyDe.Atom.MoC.state22' defined in
-- "ForSyDe.Atom.MoC").
--
-- Constructors: @state[1-4][1-4]@.
--
-- >>> let s = readSignal "{1@0, 2@2, 3@6, 4@8, 5@9}" :: Signal Int  
-- >>> takeS 7 $ state11 (+) (6,1) s
-- {2@0s,3@2s,5@6s,7@8s,8@9s,10@12s,12@14s}
--
-- <<fig/moc-de-pattern-state.png>>                   
state22 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> a1 -> a2 -> (b1, b2))
           -- ^ next state function
           -> ((t, b1), (t, b2))
           -- ^ initial state values tupled with their initial delay
           -> SignalBase t a1
           -- ^ first input signal
           -> SignalBase t a2
           -- ^ second input signal
           -> (SignalBase t b1, SignalBase t b2) -- ^ output signals
state11 :: (Num t, Ord t, Eq t) => (b1 -> a1 -> b1)
        -> (t, b1)
        -> SignalBase t a1
        -> SignalBase t b1                                
state12 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> a1 -> (b1, b2)) 
        -> ((t, b1), (t, b2))
        -> SignalBase t a1
        -> (SignalBase t b1, SignalBase t b2)                          
state13 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> a1 -> (b1, b2, b3)) 
        -> ((t, b1), (t, b2), (t, b3))
        -> SignalBase t a1
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)                      
state14 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> b4 -> a1 -> (b1, b2, b3, b4)) 
        -> ((t, b1), (t, b2), (t, b3), (t, b4))
        -> SignalBase t a1 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)                  
state21 :: (Num t, Ord t, Eq t) => (b1 -> a1 -> a2 -> b1)
        -> (t, b1)
        -> SignalBase t a1 -> SignalBase t a2
        -> SignalBase t b1                          
state23 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> a1 -> a2 -> (b1, b2, b3)) 
        -> ((t, b1), (t, b2), (t, b3))
        -> SignalBase t a1 -> SignalBase t a2 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)                
state24 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> (b1, b2, b3, b4)) 
        -> ((t, b1), (t, b2), (t, b3), (t, b4))
        -> SignalBase t a1 -> SignalBase t a2 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)                     
state31 :: (Num t, Ord t, Eq t) => (b1 -> a1 -> a2 -> a3 -> b1)
        -> (t, b1)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
        -> SignalBase t b1                    
state32 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> a1 -> a2 -> a3 -> (b1, b2)) 
        -> ((t, b1), (t, b2))
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 
        -> (SignalBase t b1, SignalBase t b2)              
state33 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> (b1, b2, b3)) 
        -> ((t, b1), (t, b2), (t, b3))
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)          
state34 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> (b1, b2, b3, b4)) 
        -> ((t, b1), (t, b2), (t, b3), (t, b4))
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)     
state41 :: (Num t, Ord t, Eq t) => (b1 -> a1 -> a2 -> a3 -> a4 -> b1)
        -> (t, b1)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
        -> SignalBase t b1
state42 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> a1 -> a2 -> a3 -> a4 -> (b1, b2)) 
        -> ((t, b1), (t, b2))
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 
        -> (SignalBase t b1, SignalBase t b2)        
state43 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3)) 
        -> ((t, b1), (t, b2), (t, b3))
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)    
state44 :: (Num t, Ord t, Eq t) => (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4)) 
        -> ((t, b1), (t, b2), (t, b3), (t, b4))
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)

state11 :: (b1 -> a1 -> b1) -> (t, b1) -> SignalBase t a1 -> SignalBase t b1
state11 ns :: b1 -> a1 -> b1
ns i :: (t, b1)
i = Fun (DE t) b1 (Fun (DE t) a1 (Ret (DE t) b1))
-> SignalBase t b1 -> SignalBase t a1 -> SignalBase t 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 Fun (DE t) b1 (Fun (DE t) a1 (Ret (DE t) b1))
b1 -> a1 -> b1
ns ((t, b1) -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit  (t, b1)
i)
state12 :: (b1 -> b2 -> a1 -> (b1, b2))
-> ((t, b1), (t, b2))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2)
state12 ns :: b1 -> b2 -> a1 -> (b1, b2)
ns i :: ((t, b1), (t, b2))
i = Fun
  (DE t)
  b1
  (Fun (DE t) b2 (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2)))
-> (SignalBase t b1, SignalBase t b2)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun (DE t) b2 (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2)))
b1 -> b2 -> a1 -> (b1, b2)
ns (((t, b1), (t, b2)) -> (SignalBase t b1, SignalBase t b2)
forall t a1 a2.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2)) -> (SignalBase t a1, SignalBase t a2)
unit2 ((t, b1), (t, b2))
i)
state13 :: (b1 -> b2 -> b3 -> a1 -> (b1, b2, b3))
-> ((t, b1), (t, b2), (t, b3))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
state13 ns :: b1 -> b2 -> b3 -> a1 -> (b1, b2, b3)
ns i :: ((t, b1), (t, b2), (t, b3))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))))
b1 -> b2 -> b3 -> a1 -> (b1, b2, b3)
ns (((t, b1), (t, b2), (t, b3))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
forall t a1 a2 a3.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
unit3 ((t, b1), (t, b2), (t, b3))
i)
state14 :: (b1 -> b2 -> b3 -> b4 -> a1 -> (b1, b2, b3, b4))
-> ((t, b1), (t, b2), (t, b3), (t, b4))
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
state14 ns :: b1 -> b2 -> b3 -> b4 -> a1 -> (b1, b2, b3, b4)
ns i :: ((t, b1), (t, b2), (t, b3), (t, b4))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))))
b1 -> b2 -> b3 -> b4 -> a1 -> (b1, b2, b3, b4)
ns (((t, b1), (t, b2), (t, b3), (t, b4))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
forall t a1 a2 a3 a4.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3), (t, a4))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
unit4 ((t, b1), (t, b2), (t, b3), (t, b4))
i)
state21 :: (b1 -> a1 -> a2 -> b1)
-> (t, b1) -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t b1
state21 ns :: b1 -> a1 -> a2 -> b1
ns i :: (t, b1)
i = Fun (DE t) b1 (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1)))
-> SignalBase t b1
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t 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 Fun (DE t) b1 (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1)))
b1 -> a1 -> a2 -> b1
ns ((t, b1) -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit  (t, b1)
i)
state22 :: (b1 -> b2 -> a1 -> a2 -> (b1, b2))
-> ((t, b1), (t, b2))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2)
state22 ns :: b1 -> b2 -> a1 -> a2 -> (b1, b2)
ns i :: ((t, b1), (t, b2))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2))))
-> (SignalBase t b1, SignalBase t b2)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2))))
b1 -> b2 -> a1 -> a2 -> (b1, b2)
ns (((t, b1), (t, b2)) -> (SignalBase t b1, SignalBase t b2)
forall t a1 a2.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2)) -> (SignalBase t a1, SignalBase t a2)
unit2 ((t, b1), (t, b2))
i)
state23 :: (b1 -> b2 -> b3 -> a1 -> a2 -> (b1, b2, b3))
-> ((t, b1), (t, b2), (t, b3))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
state23 ns :: b1 -> b2 -> b3 -> a1 -> a2 -> (b1, b2, b3)
ns i :: ((t, b1), (t, b2), (t, b3))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))))
b1 -> b2 -> b3 -> a1 -> a2 -> (b1, b2, b3)
ns (((t, b1), (t, b2), (t, b3))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
forall t a1 a2 a3.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
unit3 ((t, b1), (t, b2), (t, b3))
i)
state24 :: (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> (b1, b2, b3, b4))
-> ((t, b1), (t, b2), (t, b3), (t, b4))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
state24 ns :: b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> (b1, b2, b3, b4)
ns i :: ((t, b1), (t, b2), (t, b3), (t, b4))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))))
b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> (b1, b2, b3, b4)
ns (((t, b1), (t, b2), (t, b3), (t, b4))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
forall t a1 a2 a3 a4.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3), (t, a4))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
unit4 ((t, b1), (t, b2), (t, b3), (t, b4))
i)
state31 :: (b1 -> a1 -> a2 -> a3 -> b1)
-> (t, b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t b1
state31 ns :: b1 -> a1 -> a2 -> a3 -> b1
ns i :: (t, b1)
i = Fun
  (DE t)
  b1
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1))))
-> SignalBase t b1
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t 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 Fun
  (DE t)
  b1
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1))))
b1 -> a1 -> a2 -> a3 -> b1
ns ((t, b1) -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit  (t, b1)
i)
state32 :: (b1 -> b2 -> a1 -> a2 -> a3 -> (b1, b2))
-> ((t, b1), (t, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2)
state32 ns :: b1 -> b2 -> a1 -> a2 -> a3 -> (b1, b2)
ns i :: ((t, b1), (t, b2))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        a1
        (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2)))))
-> (SignalBase t b1, SignalBase t b2)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        a1
        (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2)))))
b1 -> b2 -> a1 -> a2 -> a3 -> (b1, b2)
ns (((t, b1), (t, b2)) -> (SignalBase t b1, SignalBase t b2)
forall t a1 a2.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2)) -> (SignalBase t a1, SignalBase t a2)
unit2 ((t, b1), (t, b2))
i)
state33 :: (b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> (b1, b2, b3))
-> ((t, b1), (t, b2), (t, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
state33 ns :: b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> (b1, b2, b3)
ns i :: ((t, b1), (t, b2), (t, b3))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun
              (DE t)
              a2
              (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun
              (DE t)
              a2
              (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))))))
b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> (b1, b2, b3)
ns (((t, b1), (t, b2), (t, b3))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
forall t a1 a2 a3.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
unit3 ((t, b1), (t, b2), (t, b3))
i)
state34 :: (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> (b1, b2, b3, b4))
-> ((t, b1), (t, b2), (t, b3), (t, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
state34 ns :: b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> (b1, b2, b3, b4)
ns i :: ((t, b1), (t, b2), (t, b3), (t, b4))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Fun
                    (DE t)
                    a3
                    (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Fun
                    (DE t)
                    a3
                    (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))))))
b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> (b1, b2, b3, b4)
ns (((t, b1), (t, b2), (t, b3), (t, b4))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
forall t a1 a2 a3 a4.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3), (t, a4))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
unit4 ((t, b1), (t, b2), (t, b3), (t, b4))
i)
state41 :: (b1 -> a1 -> a2 -> a3 -> a4 -> b1)
-> (t, b1)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t b1
state41 ns :: b1 -> a1 -> a2 -> a3 -> a4 -> b1
ns i :: (t, b1)
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1)))))
-> SignalBase t b1
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1)))))
b1 -> a1 -> a2 -> a3 -> a4 -> b1
ns ((t, b1) -> SignalBase t b1
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit  (t, b1)
i)
state42 :: (b1 -> b2 -> a1 -> a2 -> a3 -> a4 -> (b1, b2))
-> ((t, b1), (t, b2))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2)
state42 ns :: b1 -> b2 -> a1 -> a2 -> a3 -> a4 -> (b1, b2)
ns i :: ((t, b1), (t, b2))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        a1
        (Fun
           (DE t)
           a2
           (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2))))))
-> (SignalBase t b1, SignalBase t b2)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        a1
        (Fun
           (DE t)
           a2
           (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2))))))
b1 -> b2 -> a1 -> a2 -> a3 -> a4 -> (b1, b2)
ns (((t, b1), (t, b2)) -> (SignalBase t b1, SignalBase t b2)
forall t a1 a2.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2)) -> (SignalBase t a1, SignalBase t a2)
unit2 ((t, b1), (t, b2))
i)
state43 :: (b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
-> ((t, b1), (t, b2), (t, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
state43 ns :: b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3)
ns i :: ((t, b1), (t, b2), (t, b3))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun
              (DE t)
              a2
              (Fun
                 (DE t)
                 a3
                 (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           a1
           (Fun
              (DE t)
              a2
              (Fun
                 (DE t)
                 a3
                 (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))))))
b1 -> b2 -> b3 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3)
ns (((t, b1), (t, b2), (t, b3))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
forall t a1 a2 a3.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
unit3 ((t, b1), (t, b2), (t, b3))
i)
state44 :: (b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
-> ((t, b1), (t, b2), (t, b3), (t, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
state44 ns :: b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4)
ns i :: ((t, b1), (t, b2), (t, b3), (t, b4))
i = Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Fun
                    (DE t)
                    a3
                    (Fun
                       (DE t)
                       a4
                       (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))))))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  b1
  (Fun
     (DE t)
     b2
     (Fun
        (DE t)
        b3
        (Fun
           (DE t)
           b4
           (Fun
              (DE t)
              a1
              (Fun
                 (DE t)
                 a2
                 (Fun
                    (DE t)
                    a3
                    (Fun
                       (DE t)
                       a4
                       (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))))))
b1 -> b2 -> b3 -> b4 -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4)
ns (((t, b1), (t, b2), (t, b3), (t, b4))
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
forall t a1 a2 a3 a4.
(Num t, Ord t, Eq t) =>
((t, a1), (t, a2), (t, a3), (t, a4))
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
unit4 ((t, b1), (t, b2), (t, b3), (t, b4))
i)


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

-- | @moore@ processes model Moore state machines. It is an
-- instantiation of the @moore@ MoC constructor (see
-- 'ForSyDe.Atom.MoC.moore22' defined in "ForSyDe.Atom.MoC").
--
-- Constructors: @moore[1-4][1-4]@
--
-- >>> let s = readSignal "{1@0, 2@2, 3@6, 4@8, 5@9}" :: Signal Int  
-- >>> takeS 7 $ moore11 (+) (+1) (6,1) s
-- {2@0s,3@6s,4@8s,6@12s,8@14s,9@15s,11@18s}
--
-- <<fig/moc-de-pattern-moore.png>>          
moore22 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> st)
           -- ^ next state function
           -> (st -> (b1, b2))
           -- ^ output decoder
           -> (t, st)
           -- ^ initial state: tag and value
           -> SignalBase t a1 -> SignalBase t a2 -> (SignalBase t b1, SignalBase t b2)
moore11 :: (Num t, Ord t, Eq t) => (st -> a1 -> st)
        -> (st -> b1)
        -> (t, st)
        -> SignalBase t a1
        -> SignalBase t b1                                
moore12 :: (Num t, Ord t, Eq t) => (st -> a1 -> st)
        -> (st -> (b1, b2))
        -> (t, st)
        -> SignalBase t a1
        -> (SignalBase t b1, SignalBase t b2)                          
moore13 :: (Num t, Ord t, Eq t) => (st -> a1 -> st)
        -> (st -> (b1, b2, b3))
        -> (t, st)
        -> SignalBase t a1
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)                      
moore14 :: (Num t, Ord t, Eq t) => (st -> a1 -> st)
        -> (st -> (b1, b2, b3, b4))
        -> (t, st)
        -> SignalBase t a1
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)                  
moore21 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> st)
        -> (st -> b1)
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2
        -> SignalBase t b1                          
moore23 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> st)
        -> (st -> (b1, b2, b3))
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)                
moore24 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> st)
        -> (st -> (b1, b2, b3, b4))
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)                     
moore31 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> st)
        -> (st -> b1)
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
        -> SignalBase t b1                    
moore32 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> st)
        -> (st -> (b1, b2))
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
        -> (SignalBase t b1, SignalBase t b2)              
moore33 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> st)
        -> (st -> (b1, b2, b3))
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)          
moore34 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> st)
        -> (st -> (b1, b2, b3, b4))
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)     
moore41 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> a4 -> st)
        -> (st -> b1)
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
        -> SignalBase t b1              
moore42 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> a4 -> st)
        -> (st -> (b1, b2))
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
        -> (SignalBase t b1, SignalBase t b2)        
moore43 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> a4 -> st)
        -> (st -> (b1, b2, b3))
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)    
moore44 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> a4 -> st)
        -> (st -> (b1, b2, b3, b4))
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)

moore11 :: (st -> a1 -> st)
-> (st -> b1) -> (t, st) -> SignalBase t a1 -> SignalBase t b1
moore11 ns :: st -> a1 -> st
ns od :: st -> b1
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
-> Fun (DE t) st (Ret (DE t) b1)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
st -> a1 -> st
ns Fun (DE t) st (Ret (DE t) b1)
st -> b1
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore12 :: (st -> a1 -> st)
-> (st -> (b1, b2))
-> (t, st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2)
moore12 ns :: st -> a1 -> st
ns od :: st -> (b1, b2)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
-> Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2)
-> Stream (DE t st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
st -> a1 -> st
ns Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2)
st -> (b1, b2)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore13 :: (st -> a1 -> st)
-> (st -> (b1, b2, b3))
-> (t, st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
moore13 ns :: st -> a1 -> st
ns od :: st -> (b1, b2, b3)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
-> Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)
-> Stream (DE t st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
st -> a1 -> st
ns Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)
st -> (b1, b2, b3)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore14 :: (st -> a1 -> st)
-> (st -> (b1, b2, b3, b4))
-> (t, st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
moore14 ns :: st -> a1 -> st
ns od :: st -> (b1, b2, b3, b4)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
-> Fun
     (DE t)
     st
     (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)
-> Stream (DE t st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
st -> a1 -> st
ns Fun
  (DE t)
  st
  (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)
st -> (b1, b2, b3, b4)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore21 :: (st -> a1 -> a2 -> st)
-> (st -> b1)
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t b1
moore21 ns :: st -> a1 -> a2 -> st
ns od :: st -> b1
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
-> Fun (DE t) st (Ret (DE t) b1)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
st -> a1 -> a2 -> st
ns Fun (DE t) st (Ret (DE t) b1)
st -> b1
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore22 :: (st -> a1 -> a2 -> st)
-> (st -> (b1, b2))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2)
moore22 ns :: st -> a1 -> a2 -> st
ns od :: st -> (b1, b2)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
-> Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
st -> a1 -> a2 -> st
ns Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2)
st -> (b1, b2)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore23 :: (st -> a1 -> a2 -> st)
-> (st -> (b1, b2, b3))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
moore23 ns :: st -> a1 -> a2 -> st
ns od :: st -> (b1, b2, b3)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
-> Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
st -> a1 -> a2 -> st
ns Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)
st -> (b1, b2, b3)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore24 :: (st -> a1 -> a2 -> st)
-> (st -> (b1, b2, b3, b4))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
moore24 ns :: st -> a1 -> a2 -> st
ns od :: st -> (b1, b2, b3, b4)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
-> Fun
     (DE t)
     st
     (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
st -> a1 -> a2 -> st
ns Fun
  (DE t)
  st
  (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)
st -> (b1, b2, b3, b4)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore31 :: (st -> a1 -> a2 -> a3 -> st)
-> (st -> b1)
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t b1
moore31 ns :: st -> a1 -> a2 -> a3 -> st
ns od :: st -> b1
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
-> Fun (DE t) st (Ret (DE t) b1)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t 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 Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
st -> a1 -> a2 -> a3 -> st
ns Fun (DE t) st (Ret (DE t) b1)
st -> b1
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore32 :: (st -> a1 -> a2 -> a3 -> st)
-> (st -> (b1, b2))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2)
moore32 ns :: st -> a1 -> a2 -> a3 -> st
ns od :: st -> (b1, b2)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
-> Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
st -> a1 -> a2 -> a3 -> st
ns Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2)
st -> (b1, b2)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore33 :: (st -> a1 -> a2 -> a3 -> st)
-> (st -> (b1, b2, b3))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
moore33 ns :: st -> a1 -> a2 -> a3 -> st
ns od :: st -> (b1, b2, b3)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
-> Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
st -> a1 -> a2 -> a3 -> st
ns Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)
st -> (b1, b2, b3)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore34 :: (st -> a1 -> a2 -> a3 -> st)
-> (st -> (b1, b2, b3, b4))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
moore34 ns :: st -> a1 -> a2 -> a3 -> st
ns od :: st -> (b1, b2, b3, b4)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
-> Fun
     (DE t)
     st
     (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
st -> a1 -> a2 -> a3 -> st
ns Fun
  (DE t)
  st
  (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)
st -> (b1, b2, b3, b4)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore41 :: (st -> a1 -> a2 -> a3 -> a4 -> st)
-> (st -> b1)
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t b1
moore41 ns :: st -> a1 -> a2 -> a3 -> a4 -> st
ns od :: st -> b1
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
-> Fun (DE t) st (Ret (DE t) b1)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t 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 Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
st -> a1 -> a2 -> a3 -> a4 -> st
ns Fun (DE t) st (Ret (DE t) b1)
st -> b1
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore42 :: (st -> a1 -> a2 -> a3 -> a4 -> st)
-> (st -> (b1, b2))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2)
moore42 ns :: st -> a1 -> a2 -> a3 -> a4 -> st
ns od :: st -> (b1, b2)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
-> Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
st -> a1 -> a2 -> a3 -> a4 -> st
ns Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2)
st -> (b1, b2)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore43 :: (st -> a1 -> a2 -> a3 -> a4 -> st)
-> (st -> (b1, b2, b3))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
moore43 ns :: st -> a1 -> a2 -> a3 -> a4 -> st
ns od :: st -> (b1, b2, b3)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
-> Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
st -> a1 -> a2 -> a3 -> a4 -> st
ns Fun (DE t) st (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)
st -> (b1, b2, b3)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
moore44 :: (st -> a1 -> a2 -> a3 -> a4 -> st)
-> (st -> (b1, b2, b3, b4))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
moore44 ns :: st -> a1 -> a2 -> a3 -> a4 -> st
ns od :: st -> (b1, b2, b3, b4)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
-> Fun
     (DE t)
     st
     (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
st -> a1 -> a2 -> a3 -> a4 -> st
ns Fun
  (DE t)
  st
  (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)
st -> (b1, b2, b3, b4)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)

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

-- | @mealy@ processes model Mealy state machines. It is an
-- instantiation of the @mealy@ MoC constructor (see
-- 'ForSyDe.Atom.MoC.mealy22' defined in "ForSyDe.Atom.MoC").
--
-- Constructors: @mealy[1-4][1-4]@
--
-- >>> let s = readSignal "{1@0, 2@2, 3@6, 4@8, 5@9}" :: Signal Int  
-- >>> takeS 7 $ mealy11 (+) (-) (6,1) s
-- {0@0s,-1@2s,-1@6s,-1@8s,-2@9s,0@12s,2@14s}
--
-- <<fig/moc-de-pattern-mealy.png>>
mealy22 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> st)
        -- ^ next state function
        -> (st -> a1 -> a2 -> (b1, b2))
        -- ^ outpt decoder
        -> (t, st)
        -- ^ initial state: tag and value
        -> SignalBase t a1 -> SignalBase t a2
        -> (SignalBase t b1, SignalBase t b2)
mealy11 :: (Num t, Ord t, Eq t) => (st -> a1 -> st) 
        -> (st -> a1 -> b1) 
        -> (t, st)
        -> SignalBase t a1
        -> SignalBase t b1                                
mealy12 :: (Num t, Ord t, Eq t) => (st -> a1 -> st) 
        -> (st -> a1 -> (b1, b2)) 
        -> (t, st)
        -> SignalBase t a1 
        -> (SignalBase t b1, SignalBase t b2)                          
mealy13 :: (Num t, Ord t, Eq t) => (st -> a1 -> st) 
        -> (st -> a1 -> (b1, b2, b3)) 
        -> (t, st)
        -> SignalBase t a1 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)                      
mealy14 :: (Num t, Ord t, Eq t) => (st -> a1 -> st) 
        -> (st -> a1 -> (b1, b2, b3, b4)) 
        -> (t, st)
        -> SignalBase t a1 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)                  
mealy21 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> st) 
        -> (st -> a1 -> a2 -> b1) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2
        -> SignalBase t b1                          
mealy23 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> st) 
        -> (st -> a1 -> a2 -> (b1, b2, b3)) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)                
mealy24 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> st) 
        -> (st -> a1 -> a2 -> (b1, b2, b3, b4)) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)                     
mealy31 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> st) 
        -> (st -> a1 -> a2 -> a3 -> b1) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
        -> SignalBase t b1  
mealy32 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> st) 
        -> (st -> a1 -> a2 -> a3 -> (b1, b2)) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 
        -> (SignalBase t b1, SignalBase t b2)              
mealy33 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> st) 
        -> (st -> a1 -> a2 -> a3 -> (b1, b2, b3)) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)          
mealy34 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> st) 
        -> (st -> a1 -> a2 -> a3 -> (b1, b2, b3, b4)) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)     
mealy41 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> a4 -> st) 
        -> (st -> a1 -> a2 -> a3 -> a4 -> b1) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
        -> SignalBase t b1
mealy42 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> a4 -> st) 
        -> (st -> a1 -> a2 -> a3 -> a4 -> (b1, b2)) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 
        -> (SignalBase t b1, SignalBase t b2)        
mealy43 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> a4 -> st) 
        -> (st -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3)) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3)    
mealy44 :: (Num t, Ord t, Eq t) => (st -> a1 -> a2 -> a3 -> a4 -> st) 
        -> (st -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4)) 
        -> (t, st)
        -> SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4 
        -> (SignalBase t b1, SignalBase t b2, SignalBase t b3, SignalBase t b4)

mealy11 :: (st -> a1 -> st)
-> (st -> a1 -> b1)
-> (t, st)
-> SignalBase t a1
-> SignalBase t b1
mealy11 ns :: st -> a1 -> st
ns od :: st -> a1 -> b1
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
-> Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) b1))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
st -> a1 -> st
ns Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) b1))
st -> a1 -> b1
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy12 :: (st -> a1 -> st)
-> (st -> a1 -> (b1, b2))
-> (t, st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2)
mealy12 ns :: st -> a1 -> st
ns od :: st -> a1 -> (b1, b2)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
-> Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2))
-> Stream (DE t st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
st -> a1 -> st
ns Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2))
st -> a1 -> (b1, b2)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy13 :: (st -> a1 -> st)
-> (st -> a1 -> (b1, b2, b3))
-> (t, st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
mealy13 ns :: st -> a1 -> st
ns od :: st -> a1 -> (b1, b2, b3)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
-> Fun
     (DE t)
     st
     (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))
-> Stream (DE t st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
st -> a1 -> st
ns Fun
  (DE t)
  st
  (Fun (DE t) a1 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))
st -> a1 -> (b1, b2, b3)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy14 :: (st -> a1 -> st)
-> (st -> a1 -> (b1, b2, b3, b4))
-> (t, st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
mealy14 ns :: st -> a1 -> st
ns od :: st -> a1 -> (b1, b2, b3, b4)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
-> Fun
     (DE t)
     st
     (Fun
        (DE t)
        a1
        (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))
-> Stream (DE t st)
-> SignalBase t a1
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Ret (DE t) st))
st -> a1 -> st
ns Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))
st -> a1 -> (b1, b2, b3, b4)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy21 :: (st -> a1 -> a2 -> st)
-> (st -> a1 -> a2 -> b1)
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t b1
mealy21 ns :: st -> a1 -> a2 -> st
ns od :: st -> a1 -> a2 -> b1
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
-> Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1)))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
st -> a1 -> a2 -> st
ns Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1)))
st -> a1 -> a2 -> b1
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy22 :: (st -> a1 -> a2 -> st)
-> (st -> a1 -> a2 -> (b1, b2))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2)
mealy22 ns :: st -> a1 -> a2 -> st
ns od :: st -> a1 -> a2 -> (b1, b2)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
-> Fun
     (DE t)
     st
     (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2)))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
st -> a1 -> a2 -> st
ns Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2)))
st -> a1 -> a2 -> (b1, b2)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy23 :: (st -> a1 -> a2 -> st)
-> (st -> a1 -> a2 -> (b1, b2, b3))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
mealy23 ns :: st -> a1 -> a2 -> st
ns od :: st -> a1 -> a2 -> (b1, b2, b3)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
-> Fun
     (DE t)
     st
     (Fun
        (DE t)
        a1
        (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
st -> a1 -> a2 -> st
ns Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))
st -> a1 -> a2 -> (b1, b2, b3)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy24 :: (st -> a1 -> a2 -> st)
-> (st -> a1 -> a2 -> (b1, b2, b3, b4))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
mealy24 ns :: st -> a1 -> a2 -> st
ns od :: st -> a1 -> a2 -> (b1, b2, b3, b4)
od i :: (t, st)
i = Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
-> Fun
     (DE t)
     st
     (Fun
        (DE t)
        a1
        (Fun
           (DE t)
           a2
           (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun (DE t) st (Fun (DE t) a1 (Fun (DE t) a2 (Ret (DE t) st)))
st -> a1 -> a2 -> st
ns Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun
        (DE t)
        a2
        (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))
st -> a1 -> a2 -> (b1, b2, b3, b4)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy31 :: (st -> a1 -> a2 -> a3 -> st)
-> (st -> a1 -> a2 -> a3 -> b1)
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t b1
mealy31 ns :: st -> a1 -> a2 -> a3 -> st
ns od :: st -> a1 -> a2 -> a3 -> b1
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
-> Fun
     (DE t)
     st
     (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1))))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t 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 Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
st -> a1 -> a2 -> a3 -> st
ns Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1))))
st -> a1 -> a2 -> a3 -> b1
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy32 :: (st -> a1 -> a2 -> a3 -> st)
-> (st -> a1 -> a2 -> a3 -> (b1, b2))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2)
mealy32 ns :: st -> a1 -> a2 -> a3 -> st
ns od :: st -> a1 -> a2 -> a3 -> (b1, b2)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
-> Fun
     (DE t)
     st
     (Fun
        (DE t)
        a1
        (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2))))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
st -> a1 -> a2 -> a3 -> st
ns Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2))))
st -> a1 -> a2 -> a3 -> (b1, b2)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy33 :: (st -> a1 -> a2 -> a3 -> st)
-> (st -> a1 -> a2 -> a3 -> (b1, b2, b3))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
mealy33 ns :: st -> a1 -> a2 -> a3 -> st
ns od :: st -> a1 -> a2 -> a3 -> (b1, b2, b3)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
-> Fun
     (DE t)
     st
     (Fun
        (DE t)
        a1
        (Fun
           (DE t)
           a2
           (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
st -> a1 -> a2 -> a3 -> st
ns Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun
        (DE t)
        a2
        (Fun (DE t) a3 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3))))
st -> a1 -> a2 -> a3 -> (b1, b2, b3)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy34 :: (st -> a1 -> a2 -> a3 -> st)
-> (st -> a1 -> a2 -> a3 -> (b1, b2, b3, b4))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
mealy34 ns :: st -> a1 -> a2 -> a3 -> st
ns od :: st -> a1 -> a2 -> a3 -> (b1, b2, b3, b4)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
-> Fun
     (DE t)
     st
     (Fun
        (DE t)
        a1
        (Fun
           (DE t)
           a2
           (Fun
              (DE t)
              a3
              (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  st
  (Fun (DE t) a1 (Fun (DE t) a2 (Fun (DE t) a3 (Ret (DE t) st))))
st -> a1 -> a2 -> a3 -> st
ns Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun
        (DE t)
        a2
        (Fun
           (DE t)
           a3
           (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4))))
st -> a1 -> a2 -> a3 -> (b1, b2, b3, b4)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy41 :: (st -> a1 -> a2 -> a3 -> a4 -> st)
-> (st -> a1 -> a2 -> a3 -> a4 -> b1)
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t b1
mealy41 ns :: st -> a1 -> a2 -> a3 -> a4 -> st
ns od :: st -> a1 -> a2 -> a3 -> a4 -> b1
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
-> Fun
     (DE t)
     st
     (Fun
        (DE t)
        a1
        (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1)))))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> SignalBase t 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 Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
st -> a1 -> a2 -> a3 -> a4 -> st
ns Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1)))))
st -> a1 -> a2 -> a3 -> a4 -> b1
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy42 :: (st -> a1 -> a2 -> a3 -> a4 -> st)
-> (st -> a1 -> a2 -> a3 -> a4 -> (b1, b2))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2)
mealy42 ns :: st -> a1 -> a2 -> a3 -> a4 -> st
ns od :: st -> a1 -> a2 -> a3 -> a4 -> (b1, b2)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
-> Fun
     (DE t)
     st
     (Fun
        (DE t)
        a1
        (Fun
           (DE t)
           a2
           (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2)))))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t 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 Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
st -> a1 -> a2 -> a3 -> a4 -> st
ns Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun
        (DE t)
        a2
        (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2)))))
st -> a1 -> a2 -> a3 -> a4 -> (b1, b2)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy43 :: (st -> a1 -> a2 -> a3 -> a4 -> st)
-> (st -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
mealy43 ns :: st -> a1 -> a2 -> a3 -> a4 -> st
ns od :: st -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
-> Fun
     (DE t)
     st
     (Fun
        (DE t)
        a1
        (Fun
           (DE t)
           a2
           (Fun
              (DE t)
              a3
              (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t 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 Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
st -> a1 -> a2 -> a3 -> a4 -> st
ns Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun
        (DE t)
        a2
        (Fun
           (DE t)
           a3
           (Fun (DE t) a4 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3)))))
st -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)
mealy44 :: (st -> a1 -> a2 -> a3 -> a4 -> st)
-> (st -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
-> (t, st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
mealy44 ns :: st -> a1 -> a2 -> a3 -> a4 -> st
ns od :: st -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4)
od i :: (t, st)
i = Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
-> Fun
     (DE t)
     st
     (Fun
        (DE t)
        a1
        (Fun
           (DE t)
           a2
           (Fun
              (DE t)
              a3
              (Fun
                 (DE t)
                 a4
                 (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))))
-> Stream (DE t st)
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t 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 Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun (DE t) a2 (Fun (DE t) a3 (Fun (DE t) a4 (Ret (DE t) st)))))
st -> a1 -> a2 -> a3 -> a4 -> st
ns Fun
  (DE t)
  st
  (Fun
     (DE t)
     a1
     (Fun
        (DE t)
        a2
        (Fun
           (DE t)
           a3
           (Fun
              (DE t)
              a4
              (Ret (DE t) b1, Ret (DE t) b2, Ret (DE t) b3, Ret (DE t) b4)))))
st -> a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4)
od ((t, st) -> Stream (DE t st)
forall t a. (Num t, Ord t, Eq t) => (t, a) -> SignalBase t a
unit (t, st)
i)

------- SYNC -------

-- | @sync@ synchronizes multiple signals, so that they have the same
-- set of tags, and consequently, the same number of events. It
-- instantiates the @comb@ atom pattern (see 'ForSyDe.Atom.MoC.comb22'
-- defined in "ForSyDe.Atom.MoC").
--
-- Constructors: @sync[1-4]@
--
-- >>> let s1 = readSignal "{1@0, 2@2, 3@6, 4@8,  5@9}"  :: Signal Int
-- >>> let s2 = readSignal "{1@0, 2@5, 3@6, 4@10, 5@12}" :: Signal Int
-- >>> sync2 s1 s2
-- ({1@0s,2@2s,2@5s,3@6s,4@8s,5@9s,5@10s,5@12s},{1@0s,1@2s,2@5s,3@6s,3@8s,3@9s,4@10s,5@12s})
--
-- <<fig/moc-de-pattern-sync.png>>
sync2 :: (Num t, Ord t, Eq t) => SignalBase t a1                    -- ^ first input signal
      -> SignalBase t a2                    -- ^ second input signal
      -> (SignalBase t a1, SignalBase t a2)       -- ^ two output signals
sync3 :: (Num t, Ord t, Eq t) => SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3
      -> (SignalBase t a1, SignalBase t a2, SignalBase t a3)             
sync4 :: (Num t, Ord t, Eq t) => SignalBase t a1 -> SignalBase t a2 -> SignalBase t a3 -> SignalBase t a4
      -> (SignalBase t a1, SignalBase t a2, SignalBase t a3, SignalBase t a4)

sync2 :: SignalBase t a1
-> SignalBase t a2 -> (SignalBase t a1, SignalBase t a2)
sync2 = (a1 -> a2 -> (a1, a2))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t a1, SignalBase t a2)
forall t a1 a2 b1 b2.
(Num t, Ord t, Eq t) =>
(a1 -> a2 -> (b1, b2))
-> SignalBase t a1
-> SignalBase t a2
-> (SignalBase t b1, SignalBase t b2)
comb22 (,)
sync3 :: SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
sync3 = (a1 -> a2 -> a3 -> (a1, a2, a3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3)
forall t a1 a2 a3 b1 b2 b3.
(Num t, Ord t, Eq t) =>
(a1 -> a2 -> a3 -> (b1, b2, b3))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3)
comb33 (,,)
sync4 :: SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
sync4 = (a1 -> a2 -> a3 -> a4 -> (a1, a2, a3, a4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t a1, SignalBase t a2, SignalBase t a3,
    SignalBase t a4)
forall t a1 a2 a3 a4 b1 b2 b3 b4.
(Num t, Ord t, Eq t) =>
(a1 -> a2 -> a3 -> a4 -> (b1, b2, b3, b4))
-> SignalBase t a1
-> SignalBase t a2
-> SignalBase t a3
-> SignalBase t a4
-> (SignalBase t b1, SignalBase t b2, SignalBase t b3,
    SignalBase t b4)
comb44 (,,,)