concat-examples-0.3.0.0: Some examples of compiling to categories
Safe HaskellSafe-Inferred
LanguageHaskell2010

ConCat.Synchronous

Description

Synchronous stream transformers as Mealy machines

Synopsis

Documentation

data Mealy con a b Source #

Synchronous stream transformer represented as Mealy machine.

Constructors

forall s.con s => Mealy ((a :* s) -> b :* s) s 

Instances

Instances details
(CartCon con, BottomCat (->) a b) => BottomCat (Mealy con :: Type -> Type -> Type) (a :: Type) (b :: Type) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

bottomC :: Mealy con a b Source #

(CartCon con, RepCat (->) a r) => RepCat (Mealy con :: Type -> Type -> Type) (a :: Type) (r :: Type) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

reprC :: Mealy con a r Source #

abstC :: Mealy con r a Source #

CartCon con => BoolCat (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

notC :: Mealy con (BoolOf (Mealy con)) (BoolOf (Mealy con)) Source #

andC :: Mealy con (Prod (Mealy con) (BoolOf (Mealy con)) (BoolOf (Mealy con))) (BoolOf (Mealy con)) Source #

orC :: Mealy con (Prod (Mealy con) (BoolOf (Mealy con)) (BoolOf (Mealy con))) (BoolOf (Mealy con)) Source #

xorC :: Mealy con (Prod (Mealy con) (BoolOf (Mealy con)) (BoolOf (Mealy con))) (BoolOf (Mealy con)) Source #

CartCon con => BraidedPCat (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

swapP :: Ok2 (Mealy con) a b => Mealy con (Prod (Mealy con) a b) (Prod (Mealy con) b a) Source #

CartCon con => BraidedSCat (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

swapS :: Ok2 (Mealy con) a b => Mealy con (Coprod (Mealy con) a b) (Coprod (Mealy con) b a) Source #

CartCon con => Category (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

Associated Types

type Ok (Mealy con) :: Type -> Constraint Source #

Methods

id :: Ok (Mealy con) a => Mealy con a a Source #

(.) :: forall b c a. Ok3 (Mealy con) a b c => Mealy con b c -> Mealy con a b -> Mealy con a c Source #

CartCon con => CoproductCat (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

inl :: Ok2 (Mealy con) a b => Mealy con a (Coprod (Mealy con) a b) Source #

inr :: Ok2 (Mealy con) a b => Mealy con b (Coprod (Mealy con) a b) Source #

jam :: Ok (Mealy con) a => Mealy con (Coprod (Mealy con) a a) a Source #

CartCon con => MonoidalPCat (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

(***) :: Ok4 (Mealy con) a b c d => Mealy con a c -> Mealy con b d -> Mealy con (Prod (Mealy con) a b) (Prod (Mealy con) c d) Source #

first :: forall a a' b. Ok3 (Mealy con) a b a' => Mealy con a a' -> Mealy con (Prod (Mealy con) a b) (Prod (Mealy con) a' b) Source #

second :: Ok3 (Mealy con) a b b' => Mealy con b b' -> Mealy con (Prod (Mealy con) a b) (Prod (Mealy con) a b') Source #

CartCon con => MonoidalSCat (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

(+++) :: Ok4 (Mealy con) a b c d => Mealy con c a -> Mealy con d b -> Mealy con (Coprod (Mealy con) c d) (Coprod (Mealy con) a b) Source #

left :: forall a a' b. Oks (Mealy con) '[a, b, a'] => Mealy con a a' -> Mealy con (Coprod (Mealy con) a b) (Coprod (Mealy con) a' b) Source #

right :: Oks (Mealy con) '[a, b, b'] => Mealy con b b' -> Mealy con (Coprod (Mealy con) a b) (Coprod (Mealy con) a b') Source #

CartCon con => ProductCat (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

exl :: Ok2 (Mealy con) a b => Mealy con (Prod (Mealy con) a b) a Source #

exr :: Ok2 (Mealy con) a b => Mealy con (Prod (Mealy con) a b) b Source #

dup :: Ok (Mealy con) a => Mealy con a (Prod (Mealy con) a a) Source #

CartCon con => TerminalCat (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

it :: Ok (Mealy con) a => Mealy con a (Unit (Mealy con)) Source #

CartCon con => UnitCat (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

Methods

lunit :: Ok (Mealy con) a => Mealy con a (Prod (Mealy con) (Unit (Mealy con)) a) Source #

lcounit :: Ok (Mealy con) a => Mealy con (Prod (Mealy con) (Unit (Mealy con)) a) a Source #

runit :: Ok (Mealy con) a => Mealy con a (Prod (Mealy con) a (Unit (Mealy con))) Source #

rcounit :: Ok (Mealy con) a => Mealy con (Prod (Mealy con) a (Unit (Mealy con))) a Source #

CartCon con => ConstCat (Mealy con) b Source # 
Instance details

Defined in ConCat.Synchronous

Methods

const :: Ok (Mealy con) a => b -> Mealy con a (ConstObj (Mealy con) b) Source #

unitArrow :: b -> Mealy con (Unit (Mealy con)) (ConstObj (Mealy con) b) Source #

(CartCon con, Enum a) => EnumCat (Mealy con) a Source # 
Instance details

Defined in ConCat.Synchronous

Methods

succC :: Mealy con a a Source #

predC :: Mealy con a a Source #

(CartCon con, Eq a) => EqCat (Mealy con) a Source # 
Instance details

Defined in ConCat.Synchronous

Methods

equal :: Mealy con (Prod (Mealy con) a a) (BoolOf (Mealy con)) Source #

notEqual :: Mealy con (Prod (Mealy con) a a) (BoolOf (Mealy con)) Source #

(CartCon con, Floating a) => FloatingCat (Mealy con) a Source # 
Instance details

Defined in ConCat.Synchronous

Methods

expC :: Mealy con a a Source #

logC :: Mealy con a a Source #

cosC :: Mealy con a a Source #

sinC :: Mealy con a a Source #

sqrtC :: Mealy con a a Source #

tanhC :: Mealy con a a Source #

(CartCon con, Fractional a) => FractionalCat (Mealy con) a Source # 
Instance details

Defined in ConCat.Synchronous

Methods

recipC :: Mealy con a a Source #

divideC :: Mealy con (Prod (Mealy con) a a) a Source #

CartCon con => IfCat (Mealy con) a Source # 
Instance details

Defined in ConCat.Synchronous

Methods

ifC :: IfT (Mealy con) a Source #

(CartCon con, Num a) => NumCat (Mealy con) a Source # 
Instance details

Defined in ConCat.Synchronous

Methods

negateC :: Mealy con a a Source #

addC :: Mealy con (Prod (Mealy con) a a) a Source #

subC :: Mealy con (Prod (Mealy con) a a) a Source #

mulC :: Mealy con (Prod (Mealy con) a a) a Source #

powIC :: Mealy con (Prod (Mealy con) a Int) a Source #

(CartCon con, Ord a) => OrdCat (Mealy con) a Source # 
Instance details

Defined in ConCat.Synchronous

Methods

lessThan :: Mealy con (Prod (Mealy con) a a) (BoolOf (Mealy con)) Source #

greaterThan :: Mealy con (Prod (Mealy con) a a) (BoolOf (Mealy con)) Source #

lessThanOrEqual :: Mealy con (Prod (Mealy con) a a) (BoolOf (Mealy con)) Source #

greaterThanOrEqual :: Mealy con (Prod (Mealy con) a a) (BoolOf (Mealy con)) Source #

(CartCon con, RealFracCat (->) a b) => RealFracCat (Mealy con) a b Source # 
Instance details

Defined in ConCat.Synchronous

Methods

floorC :: Mealy con a b Source #

ceilingC :: Mealy con a b Source #

truncateC :: Mealy con a b Source #

type Ok (Mealy con) Source # 
Instance details

Defined in ConCat.Synchronous

type Ok (Mealy con) = Yes1 :: Type -> Constraint

sapply :: Mealy con a b -> [a] -> [b] Source #

Semantic function

type CartCon con = (con (), OpCon (:*) (Sat con)) Source #

arr :: con () => (a -> b) -> Mealy con a b Source #

type X s a b = (a :* s) -> b :* s Source #

op2 :: forall con a b c d e f. CartCon con => (forall s t. (con s, con t) => X s a b -> X t c d -> X (s :* t) e f) -> Mealy con a b -> Mealy con c d -> Mealy con e f Source #

delay :: con a => a -> Mealy con a a Source #

scanl :: con b => (b -> a -> b) -> b -> Mealy con a b Source #

scan :: (Monoid m, con m) => Mealy con m m Source #

type Stream = [] Source #

newtype StreamX a b Source #

Constructors

StreamX (Stream a -> Stream b) 

fixSX :: StreamX (a :* b) b -> StreamX a b Source #

fibL2 :: Num a => [a] Source #

fibL3 :: Num a => [a] Source #