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

ConCat.Free.Affine

Description

A category of local approximations (and probably other uses)

Documentation

data Affine s a b Source #

Constructors

Affine (L s a b) b 

Instances

Instances details
(OkCAR (Affine s a b), IfCat (:>) (Rep (Affine s a b))) => IfCat (:>) (Affine s a b) Source # 
Instance details

Defined in ConCat.Free.Affine

Methods

ifC :: IfT (:>) (Affine s a b) Source #

BraidedPCat (Affine s) Source # 
Instance details

Defined in ConCat.Free.Affine

Methods

swapP :: Ok2 (Affine s) a b => Affine s (Prod (Affine s) a b) (Prod (Affine s) b a) Source #

Category (Affine s) Source # 
Instance details

Defined in ConCat.Free.Affine

Associated Types

type Ok (Affine s) :: Type -> Constraint Source #

Methods

id :: Ok (Affine s) a => Affine s a a Source #

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

MonoidalPCat (Affine s) Source # 
Instance details

Defined in ConCat.Free.Affine

Methods

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

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

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

ProductCat (Affine s) Source # 
Instance details

Defined in ConCat.Free.Affine

Methods

exl :: Ok2 (Affine s) a b => Affine s (Prod (Affine s) a b) a Source #

exr :: Ok2 (Affine s) a b => Affine s (Prod (Affine s) a b) b Source #

dup :: Ok (Affine s) a => Affine s a (Prod (Affine s) a a) Source #

Ok2 (L s) a b => Additive (Affine s a b) Source # 
Instance details

Defined in ConCat.Free.Affine

Methods

zero :: Affine s a b Source #

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

HasRep (Affine s a b) Source # 
Instance details

Defined in ConCat.Free.Affine

Associated Types

type Rep (Affine s a b) Source #

Methods

repr :: Affine s a b -> Rep (Affine s a b) Source #

abst :: Rep (Affine s a b) -> Affine s a b Source #

OkCAR (Affine s a b) => GenBuses (Affine s a b) Source # 
Instance details

Defined in ConCat.Free.Affine

Methods

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

ty :: Ty Source #

unflattenB' :: State [Source] (Buses (Affine s a b)) Source #

type Ok (Affine s) Source # 
Instance details

Defined in ConCat.Free.Affine

type Ok (Affine s) = Ok (L s)
type Rep (Affine s a b) Source # 
Instance details

Defined in ConCat.Free.Affine

type Rep (Affine s a b) = L s a b :* b

linearA :: forall s a b. Ok2 (L s) a b => L s a b -> Affine s a b Source #

applyA :: forall s a b. Ok2 (L s) a b => Affine s a b -> a -> b Source #

add :: forall s a. (HasV s a, Zip (V s a), Num s) => a -> a -> a Source #