data-category-0.8.1: Category theory
LicenseBSD-style (see the file LICENSE)
Maintainersjoerd@w3future.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Category.Fix

Description

 
Synopsis

Documentation

newtype Fix f a b #

Constructors

Fix (f (Fix f) a b) 

Instances

Instances details
Category (f (Fix f)) => Functor (Unwrap (Fix f)) #

The Unwrap functor unwraps Fix f to f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type Dom (Unwrap (Fix f)) :: Type -> Type -> Type #

type Cod (Unwrap (Fix f)) :: Type -> Type -> Type #

type (Unwrap (Fix f)) :% a #

Methods

(%) :: Unwrap (Fix f) -> Dom (Unwrap (Fix f)) a b -> Cod (Unwrap (Fix f)) (Unwrap (Fix f) :% a) (Unwrap (Fix f) :% b) #

Category (f (Fix f)) => Functor (Wrap (Fix f)) #

The Wrap functor wraps Fix around f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type Dom (Wrap (Fix f)) :: Type -> Type -> Type #

type Cod (Wrap (Fix f)) :: Type -> Type -> Type #

type (Wrap (Fix f)) :% a #

Methods

(%) :: Wrap (Fix f) -> Dom (Wrap (Fix f)) a b -> Cod (Wrap (Fix f)) (Wrap (Fix f) :% a) (Wrap (Fix f) :% b) #

Category (f (Fix f)) => Category (Fix f :: Type -> Type -> Type) #

Fix f is the fixed point category for a category combinator f.

Instance details

Defined in Data.Category.Fix

Methods

src :: forall (a :: k) (b :: k). Fix f a b -> Obj (Fix f) a #

tgt :: forall (a :: k) (b :: k). Fix f a b -> Obj (Fix f) b #

(.) :: forall (b :: k) (c :: k) (a :: k). Fix f b c -> Fix f a b -> Fix f a c #

HasBinaryCoproducts (f (Fix f)) => HasBinaryCoproducts (Fix f :: Type -> Type -> Type) #

Fix f inherits its (co)limits from f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type BinaryCoproduct (Fix f) x y :: Kind k #

Methods

inj1 :: forall (x :: k) (y :: k). Obj (Fix f) x -> Obj (Fix f) y -> Fix f x (BinaryCoproduct (Fix f) x y) #

inj2 :: forall (x :: k) (y :: k). Obj (Fix f) x -> Obj (Fix f) y -> Fix f y (BinaryCoproduct (Fix f) x y) #

(|||) :: forall (x :: k) (a :: k) (y :: k). Fix f x a -> Fix f y a -> Fix f (BinaryCoproduct (Fix f) x y) a #

(+++) :: forall (a1 :: k) (b1 :: k) (a2 :: k) (b2 :: k). Fix f a1 b1 -> Fix f a2 b2 -> Fix f (BinaryCoproduct (Fix f) a1 a2) (BinaryCoproduct (Fix f) b1 b2) #

HasBinaryProducts (f (Fix f)) => HasBinaryProducts (Fix f :: Type -> Type -> Type) #

Fix f inherits its (co)limits from f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type BinaryProduct (Fix f) x y :: Kind k #

Methods

proj1 :: forall (x :: k) (y :: k). Obj (Fix f) x -> Obj (Fix f) y -> Fix f (BinaryProduct (Fix f) x y) x #

proj2 :: forall (x :: k) (y :: k). Obj (Fix f) x -> Obj (Fix f) y -> Fix f (BinaryProduct (Fix f) x y) y #

(&&&) :: forall (a :: k) (x :: k) (y :: k). Fix f a x -> Fix f a y -> Fix f a (BinaryProduct (Fix f) x y) #

(***) :: forall (a1 :: k) (b1 :: k) (a2 :: k) (b2 :: k). Fix f a1 b1 -> Fix f a2 b2 -> Fix f (BinaryProduct (Fix f) a1 a2) (BinaryProduct (Fix f) b1 b2) #

HasInitialObject (f (Fix f)) => HasInitialObject (Fix f :: Type -> Type -> Type) #

Fix f inherits its (co)limits from f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type InitialObject (Fix f) :: Kind k #

Methods

initialObject :: Obj (Fix f) (InitialObject (Fix f)) #

initialize :: forall (a :: k). Obj (Fix f) a -> Fix f (InitialObject (Fix f)) a #

HasTerminalObject (f (Fix f)) => HasTerminalObject (Fix f :: Type -> Type -> Type) #

Fix f inherits its (co)limits from f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type TerminalObject (Fix f) :: Kind k #

Methods

terminalObject :: Obj (Fix f) (TerminalObject (Fix f)) #

terminate :: forall (a :: k). Obj (Fix f) a -> Fix f a (TerminalObject (Fix f)) #

CartesianClosed (f (Fix f)) => CartesianClosed (Fix f :: Type -> Type -> Type) #

Fix f inherits its exponentials from f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type Exponential (Fix f) y z :: Kind k #

Methods

apply :: forall (y :: k) (z :: k). Obj (Fix f) y -> Obj (Fix f) z -> Fix f (BinaryProduct (Fix f) (Exponential (Fix f) y z) y) z #

tuple :: forall (y :: k) (z :: k). Obj (Fix f) y -> Obj (Fix f) z -> Fix f z (Exponential (Fix f) y (BinaryProduct (Fix f) z y)) #

(^^^) :: forall (z1 :: k) (z2 :: k) (y2 :: k) (y1 :: k). Fix f z1 z2 -> Fix f y2 y1 -> Fix f (Exponential (Fix f) y1 z1) (Exponential (Fix f) y2 z2) #

(TensorProduct t, Cod t ~ f (Fix f)) => TensorProduct (WrapTensor (Fix f) t) #

Fix f inherits tensor products from f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type Unit (WrapTensor (Fix f) t) #

Methods

unitObject :: WrapTensor (Fix f) t -> Obj (Cod (WrapTensor (Fix f) t)) (Unit (WrapTensor (Fix f) t)) #

leftUnitor :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k (WrapTensor (Fix f) t :% (Unit (WrapTensor (Fix f) t), a)) a #

leftUnitorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k a (WrapTensor (Fix f) t :% (Unit (WrapTensor (Fix f) t), a)) #

rightUnitor :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k (WrapTensor (Fix f) t :% (a, Unit (WrapTensor (Fix f) t))) a #

rightUnitorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k a (WrapTensor (Fix f) t :% (a, Unit (WrapTensor (Fix f) t))) #

associator :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> Obj k b -> Obj k c -> k (WrapTensor (Fix f) t :% (WrapTensor (Fix f) t :% (a, b), c)) (WrapTensor (Fix f) t :% (a, WrapTensor (Fix f) t :% (b, c))) #

associatorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> Obj k b -> Obj k c -> k (WrapTensor (Fix f) t :% (a, WrapTensor (Fix f) t :% (b, c))) (WrapTensor (Fix f) t :% (WrapTensor (Fix f) t :% (a, b), c)) #

type Dom (Unwrap (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type Dom (Unwrap (Fix f)) = Fix f
type Dom (Wrap (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type Dom (Wrap (Fix f)) = f (Fix f)
type Cod (Unwrap (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type Cod (Unwrap (Fix f)) = f (Fix f)
type Cod (Wrap (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type Cod (Wrap (Fix f)) = Fix f
type (Unwrap (Fix f)) :% a # 
Instance details

Defined in Data.Category.Fix

type (Unwrap (Fix f)) :% a = a
type (Wrap (Fix f)) :% a # 
Instance details

Defined in Data.Category.Fix

type (Wrap (Fix f)) :% a = a
type InitialObject (Fix f :: Type -> Type -> Type) # 
Instance details

Defined in Data.Category.Fix

type InitialObject (Fix f :: Type -> Type -> Type) = InitialObject (f (Fix f))
type TerminalObject (Fix f :: Type -> Type -> Type) # 
Instance details

Defined in Data.Category.Fix

type TerminalObject (Fix f :: Type -> Type -> Type) = TerminalObject (f (Fix f))
type BinaryCoproduct (Fix f :: Type -> Type -> Type) (x :: Kind (Fix f)) (y :: Kind (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type BinaryCoproduct (Fix f :: Type -> Type -> Type) (x :: Kind (Fix f)) (y :: Kind (Fix f)) = BinaryCoproduct (f (Fix f)) x y
type BinaryProduct (Fix f :: Type -> Type -> Type) (x :: Kind (Fix f)) (y :: Kind (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type BinaryProduct (Fix f :: Type -> Type -> Type) (x :: Kind (Fix f)) (y :: Kind (Fix f)) = BinaryProduct (f (Fix f)) x y
type Exponential (Fix f :: Type -> Type -> Type) (x :: Kind (Fix f)) (y :: Kind (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type Exponential (Fix f :: Type -> Type -> Type) (x :: Kind (Fix f)) (y :: Kind (Fix f)) = Exponential (f (Fix f)) x y
type Unit (WrapTensor (Fix f) t) # 
Instance details

Defined in Data.Category.Fix

type Unit (WrapTensor (Fix f) t) = Unit t

data Wrap (f :: * -> * -> *) #

Constructors

Wrap 

Instances

Instances details
Category (f (Fix f)) => Functor (Wrap (Fix f)) #

The Wrap functor wraps Fix around f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type Dom (Wrap (Fix f)) :: Type -> Type -> Type #

type Cod (Wrap (Fix f)) :: Type -> Type -> Type #

type (Wrap (Fix f)) :% a #

Methods

(%) :: Wrap (Fix f) -> Dom (Wrap (Fix f)) a b -> Cod (Wrap (Fix f)) (Wrap (Fix f) :% a) (Wrap (Fix f) :% b) #

(TensorProduct t, Cod t ~ f (Fix f)) => TensorProduct (WrapTensor (Fix f) t) #

Fix f inherits tensor products from f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type Unit (WrapTensor (Fix f) t) #

Methods

unitObject :: WrapTensor (Fix f) t -> Obj (Cod (WrapTensor (Fix f) t)) (Unit (WrapTensor (Fix f) t)) #

leftUnitor :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k (WrapTensor (Fix f) t :% (Unit (WrapTensor (Fix f) t), a)) a #

leftUnitorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k a (WrapTensor (Fix f) t :% (Unit (WrapTensor (Fix f) t), a)) #

rightUnitor :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k (WrapTensor (Fix f) t :% (a, Unit (WrapTensor (Fix f) t))) a #

rightUnitorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k a (WrapTensor (Fix f) t :% (a, Unit (WrapTensor (Fix f) t))) #

associator :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> Obj k b -> Obj k c -> k (WrapTensor (Fix f) t :% (WrapTensor (Fix f) t :% (a, b), c)) (WrapTensor (Fix f) t :% (a, WrapTensor (Fix f) t :% (b, c))) #

associatorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> Obj k b -> Obj k c -> k (WrapTensor (Fix f) t :% (a, WrapTensor (Fix f) t :% (b, c))) (WrapTensor (Fix f) t :% (WrapTensor (Fix f) t :% (a, b), c)) #

type Dom (Wrap (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type Dom (Wrap (Fix f)) = f (Fix f)
type Cod (Wrap (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type Cod (Wrap (Fix f)) = Fix f
type (Wrap (Fix f)) :% a # 
Instance details

Defined in Data.Category.Fix

type (Wrap (Fix f)) :% a = a
type Unit (WrapTensor (Fix f) t) # 
Instance details

Defined in Data.Category.Fix

type Unit (WrapTensor (Fix f) t) = Unit t

data Unwrap (f :: * -> * -> *) #

Constructors

Unwrap 

Instances

Instances details
Category (f (Fix f)) => Functor (Unwrap (Fix f)) #

The Unwrap functor unwraps Fix f to f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type Dom (Unwrap (Fix f)) :: Type -> Type -> Type #

type Cod (Unwrap (Fix f)) :: Type -> Type -> Type #

type (Unwrap (Fix f)) :% a #

Methods

(%) :: Unwrap (Fix f) -> Dom (Unwrap (Fix f)) a b -> Cod (Unwrap (Fix f)) (Unwrap (Fix f) :% a) (Unwrap (Fix f) :% b) #

(TensorProduct t, Cod t ~ f (Fix f)) => TensorProduct (WrapTensor (Fix f) t) #

Fix f inherits tensor products from f (Fix f).

Instance details

Defined in Data.Category.Fix

Associated Types

type Unit (WrapTensor (Fix f) t) #

Methods

unitObject :: WrapTensor (Fix f) t -> Obj (Cod (WrapTensor (Fix f) t)) (Unit (WrapTensor (Fix f) t)) #

leftUnitor :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k (WrapTensor (Fix f) t :% (Unit (WrapTensor (Fix f) t), a)) a #

leftUnitorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k a (WrapTensor (Fix f) t :% (Unit (WrapTensor (Fix f) t), a)) #

rightUnitor :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k (WrapTensor (Fix f) t :% (a, Unit (WrapTensor (Fix f) t))) a #

rightUnitorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> k a (WrapTensor (Fix f) t :% (a, Unit (WrapTensor (Fix f) t))) #

associator :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> Obj k b -> Obj k c -> k (WrapTensor (Fix f) t :% (WrapTensor (Fix f) t :% (a, b), c)) (WrapTensor (Fix f) t :% (a, WrapTensor (Fix f) t :% (b, c))) #

associatorInv :: Cod (WrapTensor (Fix f) t) ~ k => WrapTensor (Fix f) t -> Obj k a -> Obj k b -> Obj k c -> k (WrapTensor (Fix f) t :% (a, WrapTensor (Fix f) t :% (b, c))) (WrapTensor (Fix f) t :% (WrapTensor (Fix f) t :% (a, b), c)) #

type Dom (Unwrap (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type Dom (Unwrap (Fix f)) = Fix f
type Cod (Unwrap (Fix f)) # 
Instance details

Defined in Data.Category.Fix

type Cod (Unwrap (Fix f)) = f (Fix f)
type (Unwrap (Fix f)) :% a # 
Instance details

Defined in Data.Category.Fix

type (Unwrap (Fix f)) :% a = a
type Unit (WrapTensor (Fix f) t) # 
Instance details

Defined in Data.Category.Fix

type Unit (WrapTensor (Fix f) t) = Unit t

type WrapTensor f t = (Wrap f :.: t) :.: (Unwrap f :***: Unwrap f) #

type Omega = Fix ((:>>:) Unit) #

Take the Omega category, add a new disctinct object, and an arrow from that object to every object in Omega, and you get Omega again.

type Z = I1 () #

type S n = I2 n #

pattern Z :: Obj Omega Z #

pattern S :: Omega a b -> Omega (S a) (S b) #

z2s :: Obj Omega n -> Omega Z (S n) #