free-categories-0.2.0.2: free categories

Copyright(c) Eitan Chatav 2019
Maintainereitan@morphism.tech
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

Data.Quiver

Description

A quiver is a directed graph where loops and multiple arrows between vertices are allowed, a multidigraph. A Haskell quiver is a higher kinded type,

p :: k -> k -> Type
  • where vertices are types x :: k,
  • and arrows from x to y are terms p :: p x y.

Many Haskell typeclasses are constraints on quivers, such as Category, Bifunctor, Profunctor, and Arrow.

Synopsis

Documentation

newtype IQ c x y Source #

The identity functor on quivers.

Constructors

IQ 

Fields

Instances
QFunctor (IQ :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qmap :: (forall (x :: k) (y :: k). p x y -> q x y) -> IQ p x y -> IQ q x y Source #

QMonad (IQ :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qjoin :: IQ (IQ p) x y -> IQ p x y Source #

qbind :: (forall (x :: k) (y :: k). p x y -> IQ q x y) -> IQ p x y -> IQ q x y Source #

QPointed (IQ :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qsingle :: p x y -> IQ p x y Source #

QTraversable (IQ :: (k -> k -> Type) -> k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qtraverse :: Applicative m => (forall (x :: k0) (y :: k0). p x y -> m (q x y)) -> IQ p x y -> m (IQ q x y) Source #

QFoldable (IQ :: (k -> k -> Type) -> k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qfoldMap :: Category q => (forall (x :: k0) (y :: k0). p x y -> q x y) -> IQ p x y -> q x y Source #

qfold :: Category q => IQ q x y -> q x y Source #

qfoldr :: (forall (x :: k0) (y :: k0) (z :: k1). p x y -> q y z -> q x z) -> q y z -> IQ p x y -> q x z Source #

qfoldl :: (forall (x :: k0) (y :: k1) (z :: k1). q x y -> p y z -> q x z) -> q x y -> IQ p y z -> q x z Source #

qtoMonoid :: Monoid m => (forall (x :: k0) (y :: k0). p x y -> m) -> IQ p x y -> m Source #

qtoList :: (forall (x :: k0) (y :: k0). p x y -> a) -> IQ p x y -> [a] Source #

qtraverse_ :: (Applicative m, Category q) => (forall (x :: k0) (y :: k0). p x y -> m (q x y)) -> IQ p x y -> m (q x y) Source #

Category c => Category (IQ c :: k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver

Methods

id :: IQ c a a #

(.) :: IQ c b c0 -> IQ c a b -> IQ c a c0 #

Eq (c x y) => Eq (IQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(==) :: IQ c x y -> IQ c x y -> Bool #

(/=) :: IQ c x y -> IQ c x y -> Bool #

Ord (c x y) => Ord (IQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

compare :: IQ c x y -> IQ c x y -> Ordering #

(<) :: IQ c x y -> IQ c x y -> Bool #

(<=) :: IQ c x y -> IQ c x y -> Bool #

(>) :: IQ c x y -> IQ c x y -> Bool #

(>=) :: IQ c x y -> IQ c x y -> Bool #

max :: IQ c x y -> IQ c x y -> IQ c x y #

min :: IQ c x y -> IQ c x y -> IQ c x y #

Show (c x y) => Show (IQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

showsPrec :: Int -> IQ c x y -> ShowS #

show :: IQ c x y -> String #

showList :: [IQ c x y] -> ShowS #

(Category c, x ~ y) => Semigroup (IQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(<>) :: IQ c x y -> IQ c x y -> IQ c x y #

sconcat :: NonEmpty (IQ c x y) -> IQ c x y #

stimes :: Integral b => b -> IQ c x y -> IQ c x y #

(Category c, x ~ y) => Monoid (IQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

mempty :: IQ c x y #

mappend :: IQ c x y -> IQ c x y -> IQ c x y #

mconcat :: [IQ c x y] -> IQ c x y #

newtype OpQ c x y Source #

Reverse all the arrows in a quiver.

Constructors

OpQ 

Fields

Instances
QFunctor (OpQ :: (k2 -> k1 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qmap :: (forall (x :: k) (y :: k). p x y -> q x y) -> OpQ p x y -> OpQ q x y Source #

Category c => Category (OpQ c :: k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver

Methods

id :: OpQ c a a #

(.) :: OpQ c b c0 -> OpQ c a b -> OpQ c a c0 #

Eq (c y x) => Eq (OpQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(==) :: OpQ c x y -> OpQ c x y -> Bool #

(/=) :: OpQ c x y -> OpQ c x y -> Bool #

Ord (c y x) => Ord (OpQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

compare :: OpQ c x y -> OpQ c x y -> Ordering #

(<) :: OpQ c x y -> OpQ c x y -> Bool #

(<=) :: OpQ c x y -> OpQ c x y -> Bool #

(>) :: OpQ c x y -> OpQ c x y -> Bool #

(>=) :: OpQ c x y -> OpQ c x y -> Bool #

max :: OpQ c x y -> OpQ c x y -> OpQ c x y #

min :: OpQ c x y -> OpQ c x y -> OpQ c x y #

Show (c y x) => Show (OpQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

showsPrec :: Int -> OpQ c x y -> ShowS #

show :: OpQ c x y -> String #

showList :: [OpQ c x y] -> ShowS #

(Category c, x ~ y) => Semigroup (OpQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(<>) :: OpQ c x y -> OpQ c x y -> OpQ c x y #

sconcat :: NonEmpty (OpQ c x y) -> OpQ c x y #

stimes :: Integral b => b -> OpQ c x y -> OpQ c x y #

(Category c, x ~ y) => Monoid (OpQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

mempty :: OpQ c x y #

mappend :: OpQ c x y -> OpQ c x y -> OpQ c x y #

mconcat :: [OpQ c x y] -> OpQ c x y #

data IsoQ c x y Source #

Arrows of IsoQ are bidirectional edges.

Constructors

IsoQ 

Fields

Instances
QFunctor (IsoQ :: (k -> k -> Type) -> k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qmap :: (forall (x :: k0) (y :: k1). p x y -> q x y) -> IsoQ p x y -> IsoQ q x y Source #

Category c => Category (IsoQ c :: k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver

Methods

id :: IsoQ c a a #

(.) :: IsoQ c b c0 -> IsoQ c a b -> IsoQ c a c0 #

(Eq (c x y), Eq (c y x)) => Eq (IsoQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(==) :: IsoQ c x y -> IsoQ c x y -> Bool #

(/=) :: IsoQ c x y -> IsoQ c x y -> Bool #

(Ord (c x y), Ord (c y x)) => Ord (IsoQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

compare :: IsoQ c x y -> IsoQ c x y -> Ordering #

(<) :: IsoQ c x y -> IsoQ c x y -> Bool #

(<=) :: IsoQ c x y -> IsoQ c x y -> Bool #

(>) :: IsoQ c x y -> IsoQ c x y -> Bool #

(>=) :: IsoQ c x y -> IsoQ c x y -> Bool #

max :: IsoQ c x y -> IsoQ c x y -> IsoQ c x y #

min :: IsoQ c x y -> IsoQ c x y -> IsoQ c x y #

(Show (c x y), Show (c y x)) => Show (IsoQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

showsPrec :: Int -> IsoQ c x y -> ShowS #

show :: IsoQ c x y -> String #

showList :: [IsoQ c x y] -> ShowS #

(Category c, x ~ y) => Semigroup (IsoQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(<>) :: IsoQ c x y -> IsoQ c x y -> IsoQ c x y #

sconcat :: NonEmpty (IsoQ c x y) -> IsoQ c x y #

stimes :: Integral b => b -> IsoQ c x y -> IsoQ c x y #

(Category c, x ~ y) => Monoid (IsoQ c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

mempty :: IsoQ c x y #

mappend :: IsoQ c x y -> IsoQ c x y -> IsoQ c x y #

mconcat :: [IsoQ c x y] -> IsoQ c x y #

newtype ApQ m c x y Source #

Apply a constructor to the arrows of a quiver.

Constructors

ApQ 

Fields

Instances
Functor t => QFunctor (ApQ t :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qmap :: (forall (x :: k) (y :: k). p x y -> q x y) -> ApQ t p x y -> ApQ t q x y Source #

Monad t => QMonad (ApQ t :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qjoin :: ApQ t (ApQ t p) x y -> ApQ t p x y Source #

qbind :: (forall (x :: k) (y :: k). p x y -> ApQ t q x y) -> ApQ t p x y -> ApQ t q x y Source #

Applicative t => QPointed (ApQ t :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qsingle :: p x y -> ApQ t p x y Source #

(Applicative m, Category c) => Category (ApQ m c :: k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver

Methods

id :: ApQ m c a a #

(.) :: ApQ m c b c0 -> ApQ m c a b -> ApQ m c a c0 #

Eq (m (c x y)) => Eq (ApQ m c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(==) :: ApQ m c x y -> ApQ m c x y -> Bool #

(/=) :: ApQ m c x y -> ApQ m c x y -> Bool #

Ord (m (c x y)) => Ord (ApQ m c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

compare :: ApQ m c x y -> ApQ m c x y -> Ordering #

(<) :: ApQ m c x y -> ApQ m c x y -> Bool #

(<=) :: ApQ m c x y -> ApQ m c x y -> Bool #

(>) :: ApQ m c x y -> ApQ m c x y -> Bool #

(>=) :: ApQ m c x y -> ApQ m c x y -> Bool #

max :: ApQ m c x y -> ApQ m c x y -> ApQ m c x y #

min :: ApQ m c x y -> ApQ m c x y -> ApQ m c x y #

Show (m (c x y)) => Show (ApQ m c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

showsPrec :: Int -> ApQ m c x y -> ShowS #

show :: ApQ m c x y -> String #

showList :: [ApQ m c x y] -> ShowS #

(Applicative m, Category c, x ~ y) => Semigroup (ApQ m c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(<>) :: ApQ m c x y -> ApQ m c x y -> ApQ m c x y #

sconcat :: NonEmpty (ApQ m c x y) -> ApQ m c x y #

stimes :: Integral b => b -> ApQ m c x y -> ApQ m c x y #

(Applicative m, Category c, x ~ y) => Monoid (ApQ m c x y) Source # 
Instance details

Defined in Data.Quiver

Methods

mempty :: ApQ m c x y #

mappend :: ApQ m c x y -> ApQ m c x y -> ApQ m c x y #

mconcat :: [ApQ m c x y] -> ApQ m c x y #

newtype KQ r x y Source #

The constant quiver.

KQ () is an indiscrete category.

Constructors

KQ 

Fields

Instances
QMonoidal (ProductQ :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type) -> k1 -> k2 -> Type) (KQ () :: k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qintro1 :: p x y -> ProductQ (KQ ()) p x y Source #

qintro2 :: p x y -> ProductQ p (KQ ()) x y Source #

qelim1 :: ProductQ (KQ ()) p x y -> p x y Source #

qelim2 :: ProductQ p (KQ ()) x y -> p x y Source #

qassoc :: ProductQ (ProductQ p q) r x y -> ProductQ p (ProductQ q r) x y Source #

qdisassoc :: ProductQ p (ProductQ q r) x y -> ProductQ (ProductQ p q) r x y Source #

Monoid m => Category (KQ m :: k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver

Methods

id :: KQ m a a #

(.) :: KQ m b c -> KQ m a b -> KQ m a c #

Eq r => Eq (KQ r x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(==) :: KQ r x y -> KQ r x y -> Bool #

(/=) :: KQ r x y -> KQ r x y -> Bool #

Ord r => Ord (KQ r x y) Source # 
Instance details

Defined in Data.Quiver

Methods

compare :: KQ r x y -> KQ r x y -> Ordering #

(<) :: KQ r x y -> KQ r x y -> Bool #

(<=) :: KQ r x y -> KQ r x y -> Bool #

(>) :: KQ r x y -> KQ r x y -> Bool #

(>=) :: KQ r x y -> KQ r x y -> Bool #

max :: KQ r x y -> KQ r x y -> KQ r x y #

min :: KQ r x y -> KQ r x y -> KQ r x y #

Show r => Show (KQ r x y) Source # 
Instance details

Defined in Data.Quiver

Methods

showsPrec :: Int -> KQ r x y -> ShowS #

show :: KQ r x y -> String #

showList :: [KQ r x y] -> ShowS #

(Semigroup m, x ~ y) => Semigroup (KQ m x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(<>) :: KQ m x y -> KQ m x y -> KQ m x y #

sconcat :: NonEmpty (KQ m x y) -> KQ m x y #

stimes :: Integral b => b -> KQ m x y -> KQ m x y #

(Monoid m, x ~ y) => Monoid (KQ m x y) Source # 
Instance details

Defined in Data.Quiver

Methods

mempty :: KQ m x y #

mappend :: KQ m x y -> KQ m x y -> KQ m x y #

mconcat :: [KQ m x y] -> KQ m x y #

data ProductQ p q x y Source #

Constructors

ProductQ 

Fields

Instances
QBifunctor (ProductQ :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qbimap :: (forall (x :: k) (y :: k). p x y -> p' x y) -> (forall (x :: k) (y :: k). q x y -> q' x y) -> ProductQ p q x y -> ProductQ p' q' x y Source #

QClosed (ProductQ :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type) -> k1 -> k2 -> Type) (HomQ :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type) -> k1 -> k2 -> Type) (HomQ :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qlev :: ProductQ (HomQ p q) p x y -> q x y Source #

qrev :: ProductQ p (HomQ p q) x y -> q x y Source #

qcurry :: (forall (x :: k) (y :: k). ProductQ p q x y -> r x y) -> p x y -> HomQ q r x y Source #

quncurry :: (forall (x :: k) (y :: k). p x y -> HomQ q r x y) -> ProductQ p q x y -> r x y Source #

qflurry :: (forall (x :: k) (y :: k). ProductQ p q x y -> r x y) -> q x y -> HomQ p r x y Source #

qunflurry :: (forall (x :: k) (y :: k). q x y -> HomQ p r x y) -> ProductQ p q x y -> r x y Source #

QFunctor (ProductQ p :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qmap :: (forall (x :: k) (y :: k). p0 x y -> q x y) -> ProductQ p p0 x y -> ProductQ p q x y Source #

QMonoidal (ProductQ :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type) -> k1 -> k2 -> Type) (KQ () :: k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qintro1 :: p x y -> ProductQ (KQ ()) p x y Source #

qintro2 :: p x y -> ProductQ p (KQ ()) x y Source #

qelim1 :: ProductQ (KQ ()) p x y -> p x y Source #

qelim2 :: ProductQ p (KQ ()) x y -> p x y Source #

qassoc :: ProductQ (ProductQ p q) r x y -> ProductQ p (ProductQ q r) x y Source #

qdisassoc :: ProductQ p (ProductQ q r) x y -> ProductQ (ProductQ p q) r x y Source #

QTraversable (ProductQ p :: (k -> k -> Type) -> k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qtraverse :: Applicative m => (forall (x :: k0) (y :: k0). p0 x y -> m (q x y)) -> ProductQ p p0 x y -> m (ProductQ p q x y) Source #

QFoldable (ProductQ p :: (k -> k -> Type) -> k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qfoldMap :: Category q => (forall (x :: k0) (y :: k0). p0 x y -> q x y) -> ProductQ p p0 x y -> q x y Source #

qfold :: Category q => ProductQ p q x y -> q x y Source #

qfoldr :: (forall (x :: k0) (y :: k0) (z :: k1). p0 x y -> q y z -> q x z) -> q y z -> ProductQ p p0 x y -> q x z Source #

qfoldl :: (forall (x :: k0) (y :: k1) (z :: k1). q x y -> p0 y z -> q x z) -> q x y -> ProductQ p p0 y z -> q x z Source #

qtoMonoid :: Monoid m => (forall (x :: k0) (y :: k0). p0 x y -> m) -> ProductQ p p0 x y -> m Source #

qtoList :: (forall (x :: k0) (y :: k0). p0 x y -> a) -> ProductQ p p0 x y -> [a] Source #

qtraverse_ :: (Applicative m, Category q) => (forall (x :: k0) (y :: k0). p0 x y -> m (q x y)) -> ProductQ p p0 x y -> m (q x y) Source #

(Category p, Category q) => Category (ProductQ p q :: k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver

Methods

id :: ProductQ p q a a #

(.) :: ProductQ p q b c -> ProductQ p q a b -> ProductQ p q a c #

(Eq (p x y), Eq (q x y)) => Eq (ProductQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(==) :: ProductQ p q x y -> ProductQ p q x y -> Bool #

(/=) :: ProductQ p q x y -> ProductQ p q x y -> Bool #

(Ord (p x y), Ord (q x y)) => Ord (ProductQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

compare :: ProductQ p q x y -> ProductQ p q x y -> Ordering #

(<) :: ProductQ p q x y -> ProductQ p q x y -> Bool #

(<=) :: ProductQ p q x y -> ProductQ p q x y -> Bool #

(>) :: ProductQ p q x y -> ProductQ p q x y -> Bool #

(>=) :: ProductQ p q x y -> ProductQ p q x y -> Bool #

max :: ProductQ p q x y -> ProductQ p q x y -> ProductQ p q x y #

min :: ProductQ p q x y -> ProductQ p q x y -> ProductQ p q x y #

(Show (p x y), Show (q x y)) => Show (ProductQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

showsPrec :: Int -> ProductQ p q x y -> ShowS #

show :: ProductQ p q x y -> String #

showList :: [ProductQ p q x y] -> ShowS #

(Category p, Category q, x ~ y) => Semigroup (ProductQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(<>) :: ProductQ p q x y -> ProductQ p q x y -> ProductQ p q x y #

sconcat :: NonEmpty (ProductQ p q x y) -> ProductQ p q x y #

stimes :: Integral b => b -> ProductQ p q x y -> ProductQ p q x y #

(Category p, Category q, x ~ y) => Monoid (ProductQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

mempty :: ProductQ p q x y #

mappend :: ProductQ p q x y -> ProductQ p q x y -> ProductQ p q x y #

mconcat :: [ProductQ p q x y] -> ProductQ p q x y #

qswap :: ProductQ p q x y -> ProductQ q p x y Source #

Symmetry of ProductQ.

newtype HomQ p q x y Source #

The quiver of quiver morphisms, HomQ is the internal hom of the category of quivers.

Constructors

HomQ 

Fields

Instances
QProfunctor (HomQ :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qdimap :: (forall (x :: k) (y :: k). p' x y -> p x y) -> (forall (x :: k) (y :: k). q x y -> q' x y) -> HomQ p q x y -> HomQ p' q' x y Source #

QClosed (ProductQ :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type) -> k1 -> k2 -> Type) (HomQ :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type) -> k1 -> k2 -> Type) (HomQ :: (k1 -> k2 -> Type) -> (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qlev :: ProductQ (HomQ p q) p x y -> q x y Source #

qrev :: ProductQ p (HomQ p q) x y -> q x y Source #

qcurry :: (forall (x :: k) (y :: k). ProductQ p q x y -> r x y) -> p x y -> HomQ q r x y Source #

quncurry :: (forall (x :: k) (y :: k). p x y -> HomQ q r x y) -> ProductQ p q x y -> r x y Source #

qflurry :: (forall (x :: k) (y :: k). ProductQ p q x y -> r x y) -> q x y -> HomQ p r x y Source #

qunflurry :: (forall (x :: k) (y :: k). q x y -> HomQ p r x y) -> ProductQ p q x y -> r x y Source #

QFunctor (HomQ p :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qmap :: (forall (x :: k) (y :: k). p0 x y -> q x y) -> HomQ p p0 x y -> HomQ p q x y Source #

QMonad (HomQ p :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qjoin :: HomQ p (HomQ p p0) x y -> HomQ p p0 x y Source #

qbind :: (forall (x :: k) (y :: k). p0 x y -> HomQ p q x y) -> HomQ p p0 x y -> HomQ p q x y Source #

QPointed (HomQ p :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qsingle :: p0 x y -> HomQ p p0 x y Source #

data ReflQ r x y where Source #

A term in ReflQ r x y observes the equality x ~ y.

ReflQ () is the discrete category.

Constructors

ReflQ :: r -> ReflQ r x x 
Instances
QMonoidal (ComposeQ :: (k -> k -> Type) -> (k -> k -> Type) -> k -> k -> Type) (ReflQ () :: k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qintro1 :: p x y -> ComposeQ (ReflQ ()) p x y Source #

qintro2 :: p x y -> ComposeQ p (ReflQ ()) x y Source #

qelim1 :: ComposeQ (ReflQ ()) p x y -> p x y Source #

qelim2 :: ComposeQ p (ReflQ ()) x y -> p x y Source #

qassoc :: ComposeQ (ComposeQ p q) r x y -> ComposeQ p (ComposeQ q r) x y Source #

qdisassoc :: ComposeQ p (ComposeQ q r) x y -> ComposeQ (ComposeQ p q) r x y Source #

Monoid m => Category (ReflQ m :: k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver

Methods

id :: ReflQ m a a #

(.) :: ReflQ m b c -> ReflQ m a b -> ReflQ m a c #

Eq r => Eq (ReflQ r x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(==) :: ReflQ r x y -> ReflQ r x y -> Bool #

(/=) :: ReflQ r x y -> ReflQ r x y -> Bool #

Ord r => Ord (ReflQ r x y) Source # 
Instance details

Defined in Data.Quiver

Methods

compare :: ReflQ r x y -> ReflQ r x y -> Ordering #

(<) :: ReflQ r x y -> ReflQ r x y -> Bool #

(<=) :: ReflQ r x y -> ReflQ r x y -> Bool #

(>) :: ReflQ r x y -> ReflQ r x y -> Bool #

(>=) :: ReflQ r x y -> ReflQ r x y -> Bool #

max :: ReflQ r x y -> ReflQ r x y -> ReflQ r x y #

min :: ReflQ r x y -> ReflQ r x y -> ReflQ r x y #

Show r => Show (ReflQ r x y) Source # 
Instance details

Defined in Data.Quiver

Methods

showsPrec :: Int -> ReflQ r x y -> ShowS #

show :: ReflQ r x y -> String #

showList :: [ReflQ r x y] -> ShowS #

data ComposeQ p q x z Source #

Compose quivers along matching source and target.

Constructors

ComposeQ (p y z) (q x y) 
Instances
QBifunctor (ComposeQ :: (k1 -> k3 -> Type) -> (k2 -> k1 -> Type) -> k2 -> k3 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qbimap :: (forall (x :: k) (y :: k). p x y -> p' x y) -> (forall (x :: k) (y :: k). q x y -> q' x y) -> ComposeQ p q x y -> ComposeQ p' q' x y Source #

QClosed (ComposeQ :: (k3 -> k1 -> Type) -> (k2 -> k3 -> Type) -> k2 -> k1 -> Type) (LeftQ :: (k2 -> k3 -> Type) -> (k2 -> k1 -> Type) -> k3 -> k1 -> Type) (RightQ :: (k3 -> k1 -> Type) -> (k2 -> k1 -> Type) -> k2 -> k3 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qlev :: ComposeQ (LeftQ p q) p x y -> q x y Source #

qrev :: ComposeQ p (RightQ p q) x y -> q x y Source #

qcurry :: (forall (x :: k) (y :: k). ComposeQ p q x y -> r x y) -> p x y -> LeftQ q r x y Source #

quncurry :: (forall (x :: k) (y :: k). p x y -> LeftQ q r x y) -> ComposeQ p q x y -> r x y Source #

qflurry :: (forall (x :: k) (y :: k). ComposeQ p q x y -> r x y) -> q x y -> RightQ p r x y Source #

qunflurry :: (forall (x :: k) (y :: k). q x y -> RightQ p r x y) -> ComposeQ p q x y -> r x y Source #

QFunctor (ComposeQ p :: (k1 -> k2 -> Type) -> k1 -> k3 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qmap :: (forall (x :: k) (y :: k). p0 x y -> q x y) -> ComposeQ p p0 x y -> ComposeQ p q x y Source #

QMonoidal (ComposeQ :: (k -> k -> Type) -> (k -> k -> Type) -> k -> k -> Type) (ReflQ () :: k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qintro1 :: p x y -> ComposeQ (ReflQ ()) p x y Source #

qintro2 :: p x y -> ComposeQ p (ReflQ ()) x y Source #

qelim1 :: ComposeQ (ReflQ ()) p x y -> p x y Source #

qelim2 :: ComposeQ p (ReflQ ()) x y -> p x y Source #

qassoc :: ComposeQ (ComposeQ p q) r x y -> ComposeQ p (ComposeQ q r) x y Source #

qdisassoc :: ComposeQ p (ComposeQ q r) x y -> ComposeQ (ComposeQ p q) r x y Source #

Category p => QMonad (ComposeQ p :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qjoin :: ComposeQ p (ComposeQ p p0) x y -> ComposeQ p p0 x y Source #

qbind :: (forall (x :: k) (y :: k). p0 x y -> ComposeQ p q x y) -> ComposeQ p p0 x y -> ComposeQ p q x y Source #

Category p => QPointed (ComposeQ p :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qsingle :: p0 x y -> ComposeQ p p0 x y Source #

(Category p, p ~ q) => Category (ComposeQ p q :: k -> k -> Type) Source # 
Instance details

Defined in Data.Quiver

Methods

id :: ComposeQ p q a a #

(.) :: ComposeQ p q b c -> ComposeQ p q a b -> ComposeQ p q a c #

(forall (y :: k2). Show (p y z), forall (y :: k2). Show (q x y)) => Show (ComposeQ p q x z) Source # 
Instance details

Defined in Data.Quiver

Methods

showsPrec :: Int -> ComposeQ p q x z -> ShowS #

show :: ComposeQ p q x z -> String #

showList :: [ComposeQ p q x z] -> ShowS #

(Category p, p ~ q, x ~ y) => Semigroup (ComposeQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(<>) :: ComposeQ p q x y -> ComposeQ p q x y -> ComposeQ p q x y #

sconcat :: NonEmpty (ComposeQ p q x y) -> ComposeQ p q x y #

stimes :: Integral b => b -> ComposeQ p q x y -> ComposeQ p q x y #

(Category p, p ~ q, x ~ y) => Monoid (ComposeQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

mempty :: ComposeQ p q x y #

mappend :: ComposeQ p q x y -> ComposeQ p q x y -> ComposeQ p q x y #

mconcat :: [ComposeQ p q x y] -> ComposeQ p q x y #

newtype LeftQ p q x y Source #

The left residual of ComposeQ.

Constructors

LeftQ 

Fields

Instances
QProfunctor (LeftQ :: (k1 -> k2 -> Type) -> (k1 -> k3 -> Type) -> k2 -> k3 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qdimap :: (forall (x :: k) (y :: k). p' x y -> p x y) -> (forall (x :: k) (y :: k). q x y -> q' x y) -> LeftQ p q x y -> LeftQ p' q' x y Source #

QClosed (ComposeQ :: (k3 -> k1 -> Type) -> (k2 -> k3 -> Type) -> k2 -> k1 -> Type) (LeftQ :: (k2 -> k3 -> Type) -> (k2 -> k1 -> Type) -> k3 -> k1 -> Type) (RightQ :: (k3 -> k1 -> Type) -> (k2 -> k1 -> Type) -> k2 -> k3 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qlev :: ComposeQ (LeftQ p q) p x y -> q x y Source #

qrev :: ComposeQ p (RightQ p q) x y -> q x y Source #

qcurry :: (forall (x :: k) (y :: k). ComposeQ p q x y -> r x y) -> p x y -> LeftQ q r x y Source #

quncurry :: (forall (x :: k) (y :: k). p x y -> LeftQ q r x y) -> ComposeQ p q x y -> r x y Source #

qflurry :: (forall (x :: k) (y :: k). ComposeQ p q x y -> r x y) -> q x y -> RightQ p r x y Source #

qunflurry :: (forall (x :: k) (y :: k). q x y -> RightQ p r x y) -> ComposeQ p q x y -> r x y Source #

QFunctor (LeftQ p :: (k2 -> k1 -> Type) -> k3 -> k1 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qmap :: (forall (x :: k) (y :: k). p0 x y -> q x y) -> LeftQ p p0 x y -> LeftQ p q x y Source #

p ~ q => Category (LeftQ p q :: k2 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver

Methods

id :: LeftQ p q a a #

(.) :: LeftQ p q b c -> LeftQ p q a b -> LeftQ p q a c #

(p ~ q, x ~ y) => Semigroup (LeftQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(<>) :: LeftQ p q x y -> LeftQ p q x y -> LeftQ p q x y #

sconcat :: NonEmpty (LeftQ p q x y) -> LeftQ p q x y #

stimes :: Integral b => b -> LeftQ p q x y -> LeftQ p q x y #

(p ~ q, x ~ y) => Monoid (LeftQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

mempty :: LeftQ p q x y #

mappend :: LeftQ p q x y -> LeftQ p q x y -> LeftQ p q x y #

mconcat :: [LeftQ p q x y] -> LeftQ p q x y #

newtype RightQ p q x y Source #

The right residual of ComposeQ.

Constructors

RightQ 

Fields

Instances
QProfunctor (RightQ :: (k3 -> k1 -> Type) -> (k2 -> k1 -> Type) -> k2 -> k3 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qdimap :: (forall (x :: k) (y :: k). p' x y -> p x y) -> (forall (x :: k) (y :: k). q x y -> q' x y) -> RightQ p q x y -> RightQ p' q' x y Source #

QClosed (ComposeQ :: (k3 -> k1 -> Type) -> (k2 -> k3 -> Type) -> k2 -> k1 -> Type) (LeftQ :: (k2 -> k3 -> Type) -> (k2 -> k1 -> Type) -> k3 -> k1 -> Type) (RightQ :: (k3 -> k1 -> Type) -> (k2 -> k1 -> Type) -> k2 -> k3 -> Type) Source # 
Instance details

Defined in Data.Quiver.Bifunctor

Methods

qlev :: ComposeQ (LeftQ p q) p x y -> q x y Source #

qrev :: ComposeQ p (RightQ p q) x y -> q x y Source #

qcurry :: (forall (x :: k) (y :: k). ComposeQ p q x y -> r x y) -> p x y -> LeftQ q r x y Source #

quncurry :: (forall (x :: k) (y :: k). p x y -> LeftQ q r x y) -> ComposeQ p q x y -> r x y Source #

qflurry :: (forall (x :: k) (y :: k). ComposeQ p q x y -> r x y) -> q x y -> RightQ p r x y Source #

qunflurry :: (forall (x :: k) (y :: k). q x y -> RightQ p r x y) -> ComposeQ p q x y -> r x y Source #

QFunctor (RightQ p :: (k1 -> k3 -> Type) -> k1 -> k2 -> Type) Source # 
Instance details

Defined in Data.Quiver.Functor

Methods

qmap :: (forall (x :: k) (y :: k). p0 x y -> q x y) -> RightQ p p0 x y -> RightQ p q x y Source #

p ~ q => Category (RightQ p q :: k1 -> k1 -> Type) Source # 
Instance details

Defined in Data.Quiver

Methods

id :: RightQ p q a a #

(.) :: RightQ p q b c -> RightQ p q a b -> RightQ p q a c #

(p ~ q, x ~ y) => Semigroup (RightQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

(<>) :: RightQ p q x y -> RightQ p q x y -> RightQ p q x y #

sconcat :: NonEmpty (RightQ p q x y) -> RightQ p q x y #

stimes :: Integral b => b -> RightQ p q x y -> RightQ p q x y #

(p ~ q, x ~ y) => Monoid (RightQ p q x y) Source # 
Instance details

Defined in Data.Quiver

Methods

mempty :: RightQ p q x y #

mappend :: RightQ p q x y -> RightQ p q x y -> RightQ p q x y #

mconcat :: [RightQ p q x y] -> RightQ p q x y #