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

ConCat.AdditiveFun

Description

Additive maps

Synopsis

Documentation

class Additive1 (h :: Type -> Type) where Source #

Instances

Instances details
Additive1 Product 
Instance details

Defined in ConCat.Category

Additive1 Sum 
Instance details

Defined in ConCat.Category

Additive1 Par1 
Instance details

Defined in ConCat.Category

Additive1 Pair Source # 
Instance details

Defined in ConCat.Pair

Additive1 (U1 :: Type -> Type) 
Instance details

Defined in ConCat.Category

KnownNat n => Additive1 (Vector n) 
Instance details

Defined in ConCat.Category

(AddF f, AddF g) => Additive1 (f :*: g) 
Instance details

Defined in ConCat.Category

Methods

additive1 :: Sat Additive a |- Sat Additive ((f :*: g) a) Source #

Additive1 ((->) a) 
Instance details

Defined in ConCat.Category

Methods

additive1 :: Sat Additive a0 |- Sat Additive (a -> a0) Source #

(AddF f, AddF g) => Additive1 (g :.: f) 
Instance details

Defined in ConCat.Category

Methods

additive1 :: Sat Additive a |- Sat Additive ((g :.: f) a) Source #

newtype a -+> b infixr 1 Source #

Additive homomorphisms

Constructors

AddFun (a -> b) 

Instances

Instances details
BraidedPCat (-+>) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

swapP :: Ok2 (-+>) a b => Prod (-+>) a b -+> Prod (-+>) b a Source #

Category (-+>) Source # 
Instance details

Defined in ConCat.AdditiveFun

Associated Types

type Ok (-+>) :: Type -> Constraint Source #

Methods

id :: Ok (-+>) a => a -+> a Source #

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

CoproductPCat (-+>) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

inlP :: Ok2 (-+>) a b => a -+> CoprodP (-+>) a b Source #

inrP :: Ok2 (-+>) a b => b -+> CoprodP (-+>) a b Source #

jamP :: Ok (-+>) a => CoprodP (-+>) a a -+> a Source #

CoterminalCat (-+>) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

ti :: Ok (-+>) a => Counit (-+>) -+> a Source #

MonoidalPCat (-+>) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

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

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

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

OkAdd (-+>) Source # 
Instance details

Defined in ConCat.AdditiveFun

ProductCat (-+>) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

exl :: Ok2 (-+>) a b => Prod (-+>) a b -+> a Source #

exr :: Ok2 (-+>) a b => Prod (-+>) a b -+> b Source #

dup :: Ok (-+>) a => a -+> Prod (-+>) a a Source #

TerminalCat (-+>) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

it :: Ok (-+>) a => a -+> Unit (-+>) Source #

UnitCat (-+>) Source # 
Instance details

Defined in ConCat.AdditiveFun

Ok (-+>) b => ConstCat (-+>) b Source # 
Instance details

Defined in ConCat.AdditiveFun

(Functor h, Additive1 h) => FunctorCat (-+>) h Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

fmapC :: Ok2 (-+>) a b => (a -+> b) -> h a -+> h b Source #

unzipC :: Ok2 (-+>) a b => h (a :* b) -+> (h a :* h b) Source #

(Summable h, Additive1 h) => IxCoproductPCat (-+>) h Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

inPF :: Ok (-+>) a => h (a -+> h a) Source #

joinPF :: Ok2 (-+>) a b => h (b -+> a) -> h b -+> a Source #

jamPF :: Ok (-+>) a => h a -+> a Source #

(Zip h, Additive1 h) => IxMonoidalPCat (-+>) h Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

crossF :: Ok2 (-+>) a b => h (a -+> b) -> h a -+> h b Source #

(Representable h, Zip h, Pointed h, Additive1 h) => IxProductCat (-+>) h Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

exF :: Ok (-+>) a => h (h a -+> a) Source #

forkF :: Ok2 (-+>) a b => h (a -+> b) -> a -+> h b Source #

replF :: Ok (-+>) a => a -+> h a Source #

(Additive a, MinMaxCat (->) a) => MinMaxCat (-+>) a Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

minC :: Prod (-+>) a a -+> a Source #

maxC :: Prod (-+>) a a -+> a Source #

Additive1 h => OkFunctor (-+>) h Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

okFunctor :: Ok' (-+>) a |- Ok' (-+>) (h a) Source #

Additive1 h => OkIxProd (-+>) h Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

okIxProd :: Ok' (-+>) a |- Ok' (-+>) (h a) Source #

Representable f => RepresentableCat (-+>) f Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

tabulateC :: Ok (-+>) a => (Rep f -> a) -+> f a Source #

indexC :: Ok (-+>) a => f a -+> (Rep f -> a) Source #

Num s => ScalarCat (-+>) s Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

scale :: s -> s -+> s Source #

(Zip h, OkFunctor (-+>) h) => ZapCat (-+>) h Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

zapC :: Ok2 (-+>) a b => h (a -+> b) -> h a -+> h b Source #

(Zip h, Additive1 h) => ZipCat (-+>) h Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

zipC :: Ok2 (-+>) a b => (h a :* h b) -+> h (a :* b) Source #

(Summable h, Additive a) => AddCat (-+>) h a Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

sumAC :: h a -+> a Source #

(Additive a, Additive1 h, MinMaxFFunctorCat (->) h a) => MinMaxFFunctorCat (-+>) h a Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

minimumCF :: h a -> a :* (h a -+> a) Source #

maximumCF :: h a -> a :* (h a -+> a) Source #

(Pointed h, Additive1 h, Additive a) => PointedCat (-+>) h a Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

pointC :: a -+> h a Source #

(Traversable t, Applicative f) => TraversableCat (-+>) t f Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

sequenceAC :: Ok (-+>) a => t (f a) -+> f (t a) Source #

RepCat (->) a r => RepCat (-+>) (a :: Type) (r :: Type) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

reprC :: a -+> r Source #

abstC :: r -+> a Source #

CoerceCat (->) a b => CoerceCat (-+>) (a :: Type) (b :: Type) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

coerceC :: a -+> b Source #

(OkCAR (a -+> b), IfCat (:>) (Rep (a -+> b))) => IfCat (:>) (a -+> b) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

ifC :: IfT (:>) (a -+> b) Source #

Additive b => Additive (a -+> b) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

zero :: a -+> b Source #

(^+^) :: (a -+> b) -> (a -+> b) -> a -+> b Source #

HasRep (a -+> b) Source # 
Instance details

Defined in ConCat.AdditiveFun

Associated Types

type Rep (a -+> b) Source #

Methods

repr :: (a -+> b) -> Rep (a -+> b) Source #

abst :: Rep (a -+> b) -> a -+> b Source #

OkCAR (a -+> b) => GenBuses (a -+> b) Source # 
Instance details

Defined in ConCat.AdditiveFun

Methods

genBuses' :: Template u v -> [Source] -> BusesM (Buses (a -+> b)) Source #

ty :: Ty Source #

unflattenB' :: State [Source] (Buses (a -+> b)) Source #

type Ok (-+>) Source # 
Instance details

Defined in ConCat.AdditiveFun

type Rep (a -+> b) Source # 
Instance details

Defined in ConCat.AdditiveFun

type Rep (a -+> b) = a -> b

addFun :: (a -> b) -> a -> b Source #

addFun' :: (a -> b) -> a -> b Source #

unAddFun :: (a -+> b) -> a -> b Source #