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

ConCat.Chain

Description

Category of linear operation sequences

Documentation

data Chain :: (* -> * -> *) -> * -> * -> * where Source #

Constructors

Nil :: Ok k a => Chain k a a 
(:<) :: Ok3 k a b c => (a `k` b) -> Chain k b c -> Chain k a c infixr 5 

Instances

Instances details
AssociativePCat k => AssociativePCat (Chain k) Source # 
Instance details

Defined in ConCat.Chain

Methods

lassocP :: Ok3 (Chain k) a b c => Chain k (Prod (Chain k) a (Prod (Chain k) b c)) (Prod (Chain k) (Prod (Chain k) a b) c) Source #

rassocP :: Ok3 (Chain k) a b c => Chain k (Prod (Chain k) (Prod (Chain k) a b) c) (Prod (Chain k) a (Prod (Chain k) b c)) Source #

BraidedPCat k => BraidedPCat (Chain k) Source # 
Instance details

Defined in ConCat.Chain

Methods

swapP :: Ok2 (Chain k) a b => Chain k (Prod (Chain k) a b) (Prod (Chain k) b a) Source #

Category (Chain k) Source # 
Instance details

Defined in ConCat.Chain

Associated Types

type Ok (Chain k) :: Type -> Constraint Source #

Methods

id :: Ok (Chain k) a => Chain k a a Source #

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

(MonoidalPCat k, BraidedPCat k) => MonoidalPCat (Chain k) Source # 
Instance details

Defined in ConCat.Chain

Methods

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

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

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

ProductCat k => ProductCat (Chain k) Source # 
Instance details

Defined in ConCat.Chain

Methods

exl :: Ok2 (Chain k) a b => Chain k (Prod (Chain k) a b) a Source #

exr :: Ok2 (Chain k) a b => Chain k (Prod (Chain k) a b) b Source #

dup :: Ok (Chain k) a => Chain k a (Prod (Chain k) a a) Source #

TerminalCat k => TerminalCat (Chain k) Source # 
Instance details

Defined in ConCat.Chain

Methods

it :: Ok (Chain k) a => Chain k a (Unit (Chain k)) Source #

(BraidedPCat k, MProductCat k, TerminalCat k) => UnitCat (Chain k) Source # 
Instance details

Defined in ConCat.Chain

Methods

lunit :: Ok (Chain k) a => Chain k a (Prod (Chain k) (Unit (Chain k)) a) Source #

lcounit :: Ok (Chain k) a => Chain k (Prod (Chain k) (Unit (Chain k)) a) a Source #

runit :: Ok (Chain k) a => Chain k a (Prod (Chain k) a (Unit (Chain k))) Source #

rcounit :: Ok (Chain k) a => Chain k (Prod (Chain k) a (Unit (Chain k))) a Source #

(OkProd k, NumCat k a) => NumCat (Chain k) a Source # 
Instance details

Defined in ConCat.Chain

Methods

negateC :: Chain k a a Source #

addC :: Chain k (Prod (Chain k) a a) a Source #

subC :: Chain k (Prod (Chain k) a a) a Source #

mulC :: Chain k (Prod (Chain k) a a) a Source #

powIC :: Chain k (Prod (Chain k) a Int) a Source #

Show2 k => Show (Chain k a b) Source # 
Instance details

Defined in ConCat.Chain

Methods

showsPrec :: Int -> Chain k a b -> ShowS Source #

show :: Chain k a b -> String Source #

showList :: [Chain k a b] -> ShowS Source #

type Ok (Chain k) Source # 
Instance details

Defined in ConCat.Chain

type Ok (Chain k) = Ok k

evalChain :: Category k => Chain k a b -> a `k` b Source #

pureChain :: Ok2 k a b => (a `k` b) -> Chain k a b Source #

toList :: forall k z a b. (forall u v. (u `k` v) -> z) -> Chain k a b -> [z] Source #

(++*) :: Ok3 k a b c => Chain k a b -> Chain k b c -> Chain k a c infixr 5 Source #

data Exists2 k Source #

Constructors

forall a b. Exists2 (a `k` b) 

Instances

Instances details
Show2 k => Show (Exists2 k) Source # 
Instance details

Defined in ConCat.Chain