constrained-categories-0.4.0.0: Constrained clones of the category-theory type classes, using ConstraintKinds.

Copyright(c) 2016 Justus Sagemüller
LicenseGPL v3 (see COPYING)
Maintainer(@) sagemueller $ geo.uni-koeln.de
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Category.Constrained.Reified

Contents

Description

GADTs that mirror the class hierarchy from Category to (at the moment) Cartesian, reifying all the available “free” composition operations.

These can be used as a “trivial base case“ for all kinds of categories: it turns out these basic operations are often not so trivial to implement, or only possible with stronger constraints than you'd like. For instance, the category of affine mappings can only be implemented directly as a category on vector spaces, because the identity mapping has zero constant offset.

By leaving the free compositions reified to runtime syntax trees, this problem can be avoided. In other applications, you may not need these cases, but can still benefit from them for optimisation (composition with id is always trivial, and so on).

Synopsis

Reified versions of the category classes

data ReCategory (k :: * -> * -> *) (α :: *) (β :: *) where Source #

Constructors

ReCategory :: k α β -> ReCategory k α β 
CategoryId :: Object k α => ReCategory k α α 
CategoryCompo :: Object k β => ReCategory k α β -> ReCategory k β γ -> ReCategory k α γ 
Instances
HasAgent k => HasAgent (ReCategory k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type AgentVal (ReCategory k) a v :: Type Source #

Methods

alg :: (Object (ReCategory k) a, Object (ReCategory k) b) => (forall q. Object (ReCategory k) q => AgentVal (ReCategory k) q a -> AgentVal (ReCategory k) q b) -> ReCategory k a b Source #

($~) :: (Object (ReCategory k) a, Object (ReCategory k) b, Object (ReCategory k) c) => ReCategory k b c -> AgentVal (ReCategory k) a b -> AgentVal (ReCategory k) a c Source #

Category k => Category (ReCategory k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type Object (ReCategory k) o :: Constraint Source #

Methods

id :: Object (ReCategory k) a => ReCategory k a a Source #

(.) :: (Object (ReCategory k) a, Object (ReCategory k) b, Object (ReCategory k) c) => ReCategory k b c -> ReCategory k a b -> ReCategory k a c Source #

Category k => CRCategory (ReCategory k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Associated Types

type SpecificCat (ReCategory k) :: Type -> Type -> Type Source #

Methods

fromSpecific :: SpecificCat (ReCategory k) α β -> ReCategory k α β Source #

match_concrete :: ReCategory k α β -> Maybe (SpecificCat (ReCategory k) α β) Source #

match_id :: ReCategory k α β -> IdPattern (ReCategory k) α β Source #

match_compose :: ReCategory k α β -> CompoPattern (ReCategory k) α β Source #

Category k => EnhancedCat (ReCategory k) k Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Methods

arr :: (Object k b, Object k c, Object (ReCategory k) b, Object (ReCategory k) c) => k b c -> ReCategory k b c Source #

type SpecificCat (ReCategory k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

type SpecificCat (ReCategory k) = k
type Object (ReCategory k) α Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type Object (ReCategory k) α = Object k α
type AgentVal (ReCategory k) α ω Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type AgentVal (ReCategory k) α ω = GenericAgent (ReCategory k) α ω

data ReCartesian (k :: * -> * -> *) (α :: *) (β :: *) where Source #

Constructors

ReCartesian :: k α β -> ReCartesian k α β 
CartesianId :: Object k α => ReCartesian k α α 
CartesianCompo :: Object k β => ReCartesian k α β -> ReCartesian k β γ -> ReCartesian k α γ 
CartesianSwap :: (ObjectPair k α β, ObjectPair k β α) => ReCartesian k (α, β) (β, α) 
CartesianAttachUnit :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReCartesian k α (α, u) 
CartesianDetachUnit :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReCartesian k (α, u) α 
CartesianRegroup :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReCartesian k (α, (β, γ)) ((α, β), γ) 
CartesianRegroup_ :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReCartesian k ((α, β), γ) (α, (β, γ)) 
Instances
(HasAgent k, Cartesian k) => HasAgent (ReCartesian k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type AgentVal (ReCartesian k) a v :: Type Source #

Methods

alg :: (Object (ReCartesian k) a, Object (ReCartesian k) b) => (forall q. Object (ReCartesian k) q => AgentVal (ReCartesian k) q a -> AgentVal (ReCartesian k) q b) -> ReCartesian k a b Source #

($~) :: (Object (ReCartesian k) a, Object (ReCartesian k) b, Object (ReCartesian k) c) => ReCartesian k b c -> AgentVal (ReCartesian k) a b -> AgentVal (ReCartesian k) a c Source #

Cartesian k => Cartesian (ReCartesian k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type PairObjects (ReCartesian k) a b :: Constraint Source #

type UnitObject (ReCartesian k) :: Type Source #

Methods

swap :: (ObjectPair (ReCartesian k) a b, ObjectPair (ReCartesian k) b a) => ReCartesian k (a, b) (b, a) Source #

attachUnit :: (unit ~ UnitObject (ReCartesian k), ObjectPair (ReCartesian k) a unit) => ReCartesian k a (a, unit) Source #

detachUnit :: (unit ~ UnitObject (ReCartesian k), ObjectPair (ReCartesian k) a unit) => ReCartesian k (a, unit) a Source #

regroup :: (ObjectPair (ReCartesian k) a b, ObjectPair (ReCartesian k) b c, ObjectPair (ReCartesian k) a (b, c), ObjectPair (ReCartesian k) (a, b) c) => ReCartesian k (a, (b, c)) ((a, b), c) Source #

regroup' :: (ObjectPair (ReCartesian k) a b, ObjectPair (ReCartesian k) b c, ObjectPair (ReCartesian k) a (b, c), ObjectPair (ReCartesian k) (a, b) c) => ReCartesian k ((a, b), c) (a, (b, c)) Source #

Cartesian k => Category (ReCartesian k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type Object (ReCartesian k) o :: Constraint Source #

Methods

id :: Object (ReCartesian k) a => ReCartesian k a a Source #

(.) :: (Object (ReCartesian k) a, Object (ReCartesian k) b, Object (ReCartesian k) c) => ReCartesian k b c -> ReCartesian k a b -> ReCartesian k a c Source #

Cartesian k => CRCartesian (ReCartesian k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Methods

match_swap :: ReCartesian k α β -> SwapPattern (ReCartesian k) α β Source #

match_attachUnit :: ReCartesian k α β -> AttachUnitPattern (ReCartesian k) α β Source #

match_detachUnit :: ReCartesian k α β -> DetachUnitPattern (ReCartesian k) α β Source #

match_regroup :: ReCartesian k α β -> RegroupPattern (ReCartesian k) α β Source #

match_regroup' :: ReCartesian k α β -> Regroup'Pattern (ReCartesian k) α β Source #

Cartesian k => CRCategory (ReCartesian k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Associated Types

type SpecificCat (ReCartesian k) :: Type -> Type -> Type Source #

Methods

fromSpecific :: SpecificCat (ReCartesian k) α β -> ReCartesian k α β Source #

match_concrete :: ReCartesian k α β -> Maybe (SpecificCat (ReCartesian k) α β) Source #

match_id :: ReCartesian k α β -> IdPattern (ReCartesian k) α β Source #

match_compose :: ReCartesian k α β -> CompoPattern (ReCartesian k) α β Source #

Cartesian k => EnhancedCat (ReCartesian k) k Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Methods

arr :: (Object k b, Object k c, Object (ReCartesian k) b, Object (ReCartesian k) c) => k b c -> ReCartesian k b c Source #

type UnitObject (ReCartesian k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type SpecificCat (ReCartesian k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

type Object (ReCartesian k) a Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type Object (ReCartesian k) a = Object k a
type AgentVal (ReCartesian k) α ω Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type AgentVal (ReCartesian k) α ω = GenericAgent (ReCartesian k) α ω
type PairObjects (ReCartesian k) α β Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type PairObjects (ReCartesian k) α β = PairObjects k α β

data ReMorphism (k :: * -> * -> *) (α :: *) (β :: *) where Source #

Constructors

ReMorphism :: k α β -> ReMorphism k α β 
MorphismId :: Object k α => ReMorphism k α α 
MorphismCompo :: Object k β => ReMorphism k α β -> ReMorphism k β γ -> ReMorphism k α γ 
MorphismSwap :: (ObjectPair k α β, ObjectPair k β α) => ReMorphism k (α, β) (β, α) 
MorphismAttachUnit :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReMorphism k α (α, u) 
MorphismDetachUnit :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReMorphism k (α, u) α 
MorphismRegroup :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReMorphism k (α, (β, γ)) ((α, β), γ) 
MorphismRegroup_ :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReMorphism k ((α, β), γ) (α, (β, γ)) 
MorphismPar :: (ObjectPair k α γ, ObjectPair k β δ) => ReMorphism k α β -> ReMorphism k γ δ -> ReMorphism k (α, γ) (β, δ) 
Instances
(HasAgent k, Morphism k) => HasAgent (ReMorphism k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type AgentVal (ReMorphism k) a v :: Type Source #

Methods

alg :: (Object (ReMorphism k) a, Object (ReMorphism k) b) => (forall q. Object (ReMorphism k) q => AgentVal (ReMorphism k) q a -> AgentVal (ReMorphism k) q b) -> ReMorphism k a b Source #

($~) :: (Object (ReMorphism k) a, Object (ReMorphism k) b, Object (ReMorphism k) c) => ReMorphism k b c -> AgentVal (ReMorphism k) a b -> AgentVal (ReMorphism k) a c Source #

Morphism k => Cartesian (ReMorphism k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type PairObjects (ReMorphism k) a b :: Constraint Source #

type UnitObject (ReMorphism k) :: Type Source #

Methods

swap :: (ObjectPair (ReMorphism k) a b, ObjectPair (ReMorphism k) b a) => ReMorphism k (a, b) (b, a) Source #

attachUnit :: (unit ~ UnitObject (ReMorphism k), ObjectPair (ReMorphism k) a unit) => ReMorphism k a (a, unit) Source #

detachUnit :: (unit ~ UnitObject (ReMorphism k), ObjectPair (ReMorphism k) a unit) => ReMorphism k (a, unit) a Source #

regroup :: (ObjectPair (ReMorphism k) a b, ObjectPair (ReMorphism k) b c, ObjectPair (ReMorphism k) a (b, c), ObjectPair (ReMorphism k) (a, b) c) => ReMorphism k (a, (b, c)) ((a, b), c) Source #

regroup' :: (ObjectPair (ReMorphism k) a b, ObjectPair (ReMorphism k) b c, ObjectPair (ReMorphism k) a (b, c), ObjectPair (ReMorphism k) (a, b) c) => ReMorphism k ((a, b), c) (a, (b, c)) Source #

Morphism k => Category (ReMorphism k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type Object (ReMorphism k) o :: Constraint Source #

Methods

id :: Object (ReMorphism k) a => ReMorphism k a a Source #

(.) :: (Object (ReMorphism k) a, Object (ReMorphism k) b, Object (ReMorphism k) c) => ReMorphism k b c -> ReMorphism k a b -> ReMorphism k a c Source #

Morphism k => Morphism (ReMorphism k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Methods

first :: (ObjectPair (ReMorphism k) b d, ObjectPair (ReMorphism k) c d) => ReMorphism k b c -> ReMorphism k (b, d) (c, d) Source #

second :: (ObjectPair (ReMorphism k) d b, ObjectPair (ReMorphism k) d c) => ReMorphism k b c -> ReMorphism k (d, b) (d, c) Source #

(***) :: (ObjectPair (ReMorphism k) b b', ObjectPair (ReMorphism k) c c') => ReMorphism k b c -> ReMorphism k b' c' -> ReMorphism k (b, b') (c, c') Source #

Morphism k => CRMorphism (ReMorphism k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Methods

match_par :: ReMorphism k α β -> ParPattern (ReMorphism k) α β Source #

Morphism k => CRCartesian (ReMorphism k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Methods

match_swap :: ReMorphism k α β -> SwapPattern (ReMorphism k) α β Source #

match_attachUnit :: ReMorphism k α β -> AttachUnitPattern (ReMorphism k) α β Source #

match_detachUnit :: ReMorphism k α β -> DetachUnitPattern (ReMorphism k) α β Source #

match_regroup :: ReMorphism k α β -> RegroupPattern (ReMorphism k) α β Source #

match_regroup' :: ReMorphism k α β -> Regroup'Pattern (ReMorphism k) α β Source #

Morphism k => CRCategory (ReMorphism k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Associated Types

type SpecificCat (ReMorphism k) :: Type -> Type -> Type Source #

Methods

fromSpecific :: SpecificCat (ReMorphism k) α β -> ReMorphism k α β Source #

match_concrete :: ReMorphism k α β -> Maybe (SpecificCat (ReMorphism k) α β) Source #

match_id :: ReMorphism k α β -> IdPattern (ReMorphism k) α β Source #

match_compose :: ReMorphism k α β -> CompoPattern (ReMorphism k) α β Source #

Morphism k => EnhancedCat (ReMorphism k) k Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Methods

arr :: (Object k b, Object k c, Object (ReMorphism k) b, Object (ReMorphism k) c) => k b c -> ReMorphism k b c Source #

type UnitObject (ReMorphism k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type SpecificCat (ReMorphism k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

type SpecificCat (ReMorphism k) = k
type Object (ReMorphism k) a Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type Object (ReMorphism k) a = Object k a
type AgentVal (ReMorphism k) α ω Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type AgentVal (ReMorphism k) α ω = GenericAgent (ReMorphism k) α ω
type PairObjects (ReMorphism k) α β Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type PairObjects (ReMorphism k) α β = PairObjects k α β

data RePreArrow (k :: * -> * -> *) (α :: *) (β :: *) where Source #

Constructors

RePreArrow :: k α β -> RePreArrow k α β 
PreArrowId :: Object k α => RePreArrow k α α 
PreArrowCompo :: Object k β => RePreArrow k α β -> RePreArrow k β γ -> RePreArrow k α γ 
PreArrowSwap :: (ObjectPair k α β, ObjectPair k β α) => RePreArrow k (α, β) (β, α) 
PreArrowAttachUnit :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => RePreArrow k α (α, u) 
PreArrowDetachUnit :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => RePreArrow k (α, u) α 
PreArrowRegroup :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => RePreArrow k (α, (β, γ)) ((α, β), γ) 
PreArrowRegroup_ :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => RePreArrow k ((α, β), γ) (α, (β, γ)) 
PreArrowPar :: (ObjectPair k α γ, ObjectPair k β δ) => RePreArrow k α β -> RePreArrow k γ δ -> RePreArrow k (α, γ) (β, δ) 
PreArrowFanout :: (Object k α, ObjectPair k β γ) => RePreArrow k α β -> RePreArrow k α γ -> RePreArrow k α (β, γ) 
PreArrowTerminal :: Object k α => RePreArrow k α (UnitObject k) 
PreArrowFst :: ObjectPair k α β => RePreArrow k (α, β) α 
PreArrowSnd :: ObjectPair k α β => RePreArrow k (α, β) β 
Instances
(HasAgent k, PreArrow k) => HasAgent (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type AgentVal (RePreArrow k) a v :: Type Source #

Methods

alg :: (Object (RePreArrow k) a, Object (RePreArrow k) b) => (forall q. Object (RePreArrow k) q => AgentVal (RePreArrow k) q a -> AgentVal (RePreArrow k) q b) -> RePreArrow k a b Source #

($~) :: (Object (RePreArrow k) a, Object (RePreArrow k) b, Object (RePreArrow k) c) => RePreArrow k b c -> AgentVal (RePreArrow k) a b -> AgentVal (RePreArrow k) a c Source #

PreArrow k => Cartesian (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type PairObjects (RePreArrow k) a b :: Constraint Source #

type UnitObject (RePreArrow k) :: Type Source #

Methods

swap :: (ObjectPair (RePreArrow k) a b, ObjectPair (RePreArrow k) b a) => RePreArrow k (a, b) (b, a) Source #

attachUnit :: (unit ~ UnitObject (RePreArrow k), ObjectPair (RePreArrow k) a unit) => RePreArrow k a (a, unit) Source #

detachUnit :: (unit ~ UnitObject (RePreArrow k), ObjectPair (RePreArrow k) a unit) => RePreArrow k (a, unit) a Source #

regroup :: (ObjectPair (RePreArrow k) a b, ObjectPair (RePreArrow k) b c, ObjectPair (RePreArrow k) a (b, c), ObjectPair (RePreArrow k) (a, b) c) => RePreArrow k (a, (b, c)) ((a, b), c) Source #

regroup' :: (ObjectPair (RePreArrow k) a b, ObjectPair (RePreArrow k) b c, ObjectPair (RePreArrow k) a (b, c), ObjectPair (RePreArrow k) (a, b) c) => RePreArrow k ((a, b), c) (a, (b, c)) Source #

PreArrow k => Category (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type Object (RePreArrow k) o :: Constraint Source #

Methods

id :: Object (RePreArrow k) a => RePreArrow k a a Source #

(.) :: (Object (RePreArrow k) a, Object (RePreArrow k) b, Object (RePreArrow k) c) => RePreArrow k b c -> RePreArrow k a b -> RePreArrow k a c Source #

PreArrow k => PreArrow (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Methods

(&&&) :: (Object (RePreArrow k) b, ObjectPair (RePreArrow k) c c') => RePreArrow k b c -> RePreArrow k b c' -> RePreArrow k b (c, c') Source #

terminal :: Object (RePreArrow k) b => RePreArrow k b (UnitObject (RePreArrow k)) Source #

fst :: ObjectPair (RePreArrow k) x y => RePreArrow k (x, y) x Source #

snd :: ObjectPair (RePreArrow k) x y => RePreArrow k (x, y) y Source #

PreArrow k => Morphism (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Methods

first :: (ObjectPair (RePreArrow k) b d, ObjectPair (RePreArrow k) c d) => RePreArrow k b c -> RePreArrow k (b, d) (c, d) Source #

second :: (ObjectPair (RePreArrow k) d b, ObjectPair (RePreArrow k) d c) => RePreArrow k b c -> RePreArrow k (d, b) (d, c) Source #

(***) :: (ObjectPair (RePreArrow k) b b', ObjectPair (RePreArrow k) c c') => RePreArrow k b c -> RePreArrow k b' c' -> RePreArrow k (b, b') (c, c') Source #

PreArrow k => CRPreArrow (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Methods

match_fan :: RePreArrow k α β -> FanPattern (RePreArrow k) α β Source #

match_fst :: RePreArrow k α β -> FstPattern (RePreArrow k) α β Source #

match_snd :: RePreArrow k α β -> SndPattern (RePreArrow k) α β Source #

match_terminal :: RePreArrow k α β -> TerminalPattern (RePreArrow k) α β Source #

PreArrow k => CRMorphism (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Methods

match_par :: RePreArrow k α β -> ParPattern (RePreArrow k) α β Source #

PreArrow k => CRCartesian (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Methods

match_swap :: RePreArrow k α β -> SwapPattern (RePreArrow k) α β Source #

match_attachUnit :: RePreArrow k α β -> AttachUnitPattern (RePreArrow k) α β Source #

match_detachUnit :: RePreArrow k α β -> DetachUnitPattern (RePreArrow k) α β Source #

match_regroup :: RePreArrow k α β -> RegroupPattern (RePreArrow k) α β Source #

match_regroup' :: RePreArrow k α β -> Regroup'Pattern (RePreArrow k) α β Source #

PreArrow k => CRCategory (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Associated Types

type SpecificCat (RePreArrow k) :: Type -> Type -> Type Source #

Methods

fromSpecific :: SpecificCat (RePreArrow k) α β -> RePreArrow k α β Source #

match_concrete :: RePreArrow k α β -> Maybe (SpecificCat (RePreArrow k) α β) Source #

match_id :: RePreArrow k α β -> IdPattern (RePreArrow k) α β Source #

match_compose :: RePreArrow k α β -> CompoPattern (RePreArrow k) α β Source #

PreArrow k => EnhancedCat (RePreArrow k) k Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Methods

arr :: (Object k b, Object k c, Object (RePreArrow k) b, Object (RePreArrow k) c) => k b c -> RePreArrow k b c Source #

type UnitObject (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type SpecificCat (RePreArrow k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

type SpecificCat (RePreArrow k) = k
type Object (RePreArrow k) a Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type Object (RePreArrow k) a = Object k a
type AgentVal (RePreArrow k) α ω Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type AgentVal (RePreArrow k) α ω = GenericAgent (RePreArrow k) α ω
type PairObjects (RePreArrow k) α β Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type PairObjects (RePreArrow k) α β = PairObjects k α β

data ReWellPointed (k :: * -> * -> *) (α :: *) (β :: *) where Source #

Constructors

ReWellPointed :: k α β -> ReWellPointed k α β 
WellPointedId :: Object k α => ReWellPointed k α α 
WellPointedCompo :: Object k β => ReWellPointed k α β -> ReWellPointed k β γ -> ReWellPointed k α γ 
WellPointedSwap :: (ObjectPair k α β, ObjectPair k β α) => ReWellPointed k (α, β) (β, α) 
WellPointedAttachUnit :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReWellPointed k α (α, u) 
WellPointedDetachUnit :: (Object k α, UnitObject k ~ u, ObjectPair k α u) => ReWellPointed k (α, u) α 
WellPointedRegroup :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReWellPointed k (α, (β, γ)) ((α, β), γ) 
WellPointedRegroup_ :: (ObjectPair k α β, ObjectPair k β γ, ObjectPair k α (β, γ), ObjectPair k (α, β) γ) => ReWellPointed k ((α, β), γ) (α, (β, γ)) 
WellPointedPar :: (ObjectPair k α γ, ObjectPair k β δ) => ReWellPointed k α β -> ReWellPointed k γ δ -> ReWellPointed k (α, γ) (β, δ) 
WellPointedFanout :: (Object k α, ObjectPair k β γ) => ReWellPointed k α β -> ReWellPointed k α γ -> ReWellPointed k α (β, γ) 
WellPointedTerminal :: Object k α => ReWellPointed k α (UnitObject k) 
WellPointedFst :: ObjectPair k α β => ReWellPointed k (α, β) α 
WellPointedSnd :: ObjectPair k α β => ReWellPointed k (α, β) β 
WellPointedConst :: (Object k ν, ObjectPoint k α) => α -> ReWellPointed k ν α 
Instances
(HasAgent k, WellPointed k) => HasAgent (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type AgentVal (ReWellPointed k) a v :: Type Source #

WellPointed k => Cartesian (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type PairObjects (ReWellPointed k) a b :: Constraint Source #

type UnitObject (ReWellPointed k) :: Type Source #

Methods

swap :: (ObjectPair (ReWellPointed k) a b, ObjectPair (ReWellPointed k) b a) => ReWellPointed k (a, b) (b, a) Source #

attachUnit :: (unit ~ UnitObject (ReWellPointed k), ObjectPair (ReWellPointed k) a unit) => ReWellPointed k a (a, unit) Source #

detachUnit :: (unit ~ UnitObject (ReWellPointed k), ObjectPair (ReWellPointed k) a unit) => ReWellPointed k (a, unit) a Source #

regroup :: (ObjectPair (ReWellPointed k) a b, ObjectPair (ReWellPointed k) b c, ObjectPair (ReWellPointed k) a (b, c), ObjectPair (ReWellPointed k) (a, b) c) => ReWellPointed k (a, (b, c)) ((a, b), c) Source #

regroup' :: (ObjectPair (ReWellPointed k) a b, ObjectPair (ReWellPointed k) b c, ObjectPair (ReWellPointed k) a (b, c), ObjectPair (ReWellPointed k) (a, b) c) => ReWellPointed k ((a, b), c) (a, (b, c)) Source #

WellPointed k => Category (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type Object (ReWellPointed k) o :: Constraint Source #

WellPointed k => WellPointed (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Associated Types

type PointObject (ReWellPointed k) x :: Constraint Source #

WellPointed k => PreArrow (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

WellPointed k => Morphism (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Methods

first :: (ObjectPair (ReWellPointed k) b d, ObjectPair (ReWellPointed k) c d) => ReWellPointed k b c -> ReWellPointed k (b, d) (c, d) Source #

second :: (ObjectPair (ReWellPointed k) d b, ObjectPair (ReWellPointed k) d c) => ReWellPointed k b c -> ReWellPointed k (d, b) (d, c) Source #

(***) :: (ObjectPair (ReWellPointed k) b b', ObjectPair (ReWellPointed k) c c') => ReWellPointed k b c -> ReWellPointed k b' c' -> ReWellPointed k (b, b') (c, c') Source #

WellPointed k => CRWellPointed (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Methods

match_const :: ReWellPointed k α β -> ConstPattern (ReWellPointed k) α β Source #

WellPointed k => CRPreArrow (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Methods

match_fan :: ReWellPointed k α β -> FanPattern (ReWellPointed k) α β Source #

match_fst :: ReWellPointed k α β -> FstPattern (ReWellPointed k) α β Source #

match_snd :: ReWellPointed k α β -> SndPattern (ReWellPointed k) α β Source #

match_terminal :: ReWellPointed k α β -> TerminalPattern (ReWellPointed k) α β Source #

WellPointed k => CRMorphism (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Methods

match_par :: ReWellPointed k α β -> ParPattern (ReWellPointed k) α β Source #

WellPointed k => CRCartesian (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Methods

match_swap :: ReWellPointed k α β -> SwapPattern (ReWellPointed k) α β Source #

match_attachUnit :: ReWellPointed k α β -> AttachUnitPattern (ReWellPointed k) α β Source #

match_detachUnit :: ReWellPointed k α β -> DetachUnitPattern (ReWellPointed k) α β Source #

match_regroup :: ReWellPointed k α β -> RegroupPattern (ReWellPointed k) α β Source #

match_regroup' :: ReWellPointed k α β -> Regroup'Pattern (ReWellPointed k) α β Source #

WellPointed k => CRCategory (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

Associated Types

type SpecificCat (ReWellPointed k) :: Type -> Type -> Type Source #

Methods

fromSpecific :: SpecificCat (ReWellPointed k) α β -> ReWellPointed k α β Source #

match_concrete :: ReWellPointed k α β -> Maybe (SpecificCat (ReWellPointed k) α β) Source #

match_id :: ReWellPointed k α β -> IdPattern (ReWellPointed k) α β Source #

match_compose :: ReWellPointed k α β -> CompoPattern (ReWellPointed k) α β Source #

WellPointed k => EnhancedCat (ReWellPointed k) k Source # 
Instance details

Defined in Control.Category.Constrained.Reified

Methods

arr :: (Object k b, Object k c, Object (ReWellPointed k) b, Object (ReWellPointed k) c) => k b c -> ReWellPointed k b c Source #

type UnitObject (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type SpecificCat (ReWellPointed k) Source # 
Instance details

Defined in Control.Category.Constrained.Reified.PolyPattern

type Object (ReWellPointed k) a Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type Object (ReWellPointed k) a = Object k a
type PointObject (ReWellPointed k) α Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type AgentVal (ReWellPointed k) α ω Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type PairObjects (ReWellPointed k) α β Source # 
Instance details

Defined in Control.Category.Constrained.Reified

type PairObjects (ReWellPointed k) α β = PairObjects k α β