Safe Haskell | None |
---|---|
Language | Haskell2010 |
Proarrow.Core
Synopsis
- type (+->) j k = k -> j -> Type
- type CAT k = k +-> k
- type BI k = (k, k) -> k
- type OB k = k -> Constraint
- type Kind = Type
- class Any (a :: k)
- class Promonad ((~>) :: CAT k) => CategoryOf k where
- class (Promonad cat, CategoryOf k, cat ~ ((~>) :: CAT k)) => Category (cat :: CAT k)
- type (:~>) (p :: k -> k1 -> Type) (q :: k -> k1 -> Type) = forall (a :: k) (b :: k1). p a b -> q a b
- class (CategoryOf j, CategoryOf k) => Profunctor (p :: j +-> k) where
- (//) :: forall {k1} {k2} p (a :: k2) (b :: k1) r. Profunctor p => p a b -> ((Ob a, Ob b) => r) -> r
- lmap :: forall {j} {k} p (c :: k) (a :: k) (b :: j). Profunctor p => (c ~> a) -> p a b -> p c b
- rmap :: forall {j} {k} p (b :: j) (d :: j) (a :: k). Profunctor p => (b ~> d) -> p a b -> p a d
- dimapDefault :: forall {k} p (c :: k) (a :: k) (b :: k) (d :: k). Promonad p => p c a -> p b d -> p a b -> p c d
- class Profunctor p => Promonad (p :: k +-> k) where
- arr :: forall {k} p (a :: k) (b :: k). Promonad p => (a ~> b) -> p a b
- type Obj (a :: k) = a ~> a
- obj :: forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
- src :: forall {j} {k} (a :: k) (b :: j) p. Profunctor p => p a b -> Obj a
- tgt :: forall {k1} {k2} (a :: k2) (b :: k1) p. Profunctor p => p a b -> Obj b
- type family UN (w :: j -> k) (wa :: k) :: j
- type Is (w :: j -> k) (a :: k) = a ~ w (UN w a)
Documentation
type (+->) j k = k -> j -> Type infixr 0 Source Comments #
The kind of profunctors. Note that j
and k
swap places.
type OB k = k -> Constraint Source Comments #
class Any (a :: k) Source Comments #
Instances
Any (a :: k) Source Comments # | |
Defined in Proarrow.Core |
class Promonad ((~>) :: CAT k) => CategoryOf k Source Comments #
Instances
CategoryOf Nat Source Comments # | The category of qubits, to implement ZX calculus from quantum computing. | ||||||||
Defined in Proarrow.Category.Instance.ZX Associated Types
| |||||||||
CategoryOf BOOL Source Comments # | The category of 2 objects and one arrow between them, a.k.a. the walking arrow. | ||||||||
Defined in Proarrow.Category.Instance.Bool Associated Types
| |||||||||
CategoryOf KIND Source Comments # | The category of categories and profunctors between them. | ||||||||
Defined in Proarrow.Category.Instance.Cat Associated Types
| |||||||||
CategoryOf CONSTRAINT Source Comments # | The category of type class constraints. An arrow from constraint a to constraint b | means that a implies b, i.e. if a holds then b holds. | ||||||||
Defined in Proarrow.Category.Instance.Constraint Associated Types
| |||||||||
CategoryOf LINEAR Source Comments # | Category of linear functions. | ||||||||
Defined in Proarrow.Category.Instance.Linear | |||||||||
CategoryOf POINTED Source Comments # | The category of types with an added point and point-preserving morphisms. | ||||||||
Defined in Proarrow.Category.Instance.PointedHask | |||||||||
CategoryOf Nat Source Comments # | The (augmented) simplex category is the category of finite ordinals and order preserving maps. | ||||||||
Defined in Proarrow.Category.Instance.Simplex Associated Types
| |||||||||
CategoryOf VOID Source Comments # | The category with no objects, the initial category. | ||||||||
Defined in Proarrow.Category.Instance.Zero Associated Types
| |||||||||
CategoryOf () Source Comments # | The category with one object, the terminal category. | ||||||||
Defined in Proarrow.Category.Instance.Unit Associated Types
| |||||||||
CategoryOf Type Source Comments # | The category of Haskell types (a.k.a | ||||||||
Defined in Proarrow.Core Associated Types
| |||||||||
CategoryOf (FIN n) Source Comments # | The (thin) category of finite ordinals. An arrow from a to b means that a is less than or equal to b. | ||||||||
Defined in Proarrow.Category.Instance.Fin | |||||||||
TracedMonoidal k => CategoryOf (INT k) Source Comments # | The Int construction, a.k.a. the geometry of interaction, the free compact closed category on a traced monoidal category. | ||||||||
Defined in Proarrow.Category.Instance.IntConstruction Associated Types
| |||||||||
Num a => CategoryOf (MatK a) Source Comments # | The category of matrices with entries in a type | ||||||||
Defined in Proarrow.Category.Instance.Mat | |||||||||
PreorderOf k => CategoryOf (POCATK k) Source Comments # | The preorder as a category. | ||||||||
CategoryOf k => CategoryOf (REV k) Source Comments # | The reverse of the category of | ||||||||
Defined in Proarrow.Category.Monoidal.Rev | |||||||||
CategoryOf k => CategoryOf (OPPOSITE k) Source Comments # | The opposite category of the category of | ||||||||
Defined in Proarrow.Category.Opposite | |||||||||
CategoryOf k => CategoryOf (COPROD k) Source Comments # | The same category as the category of | ||||||||
Defined in Proarrow.Object.BinaryCoproduct | |||||||||
CategoryOf k => CategoryOf (PROD k) Source Comments # | The same category as the category of | ||||||||
Defined in Proarrow.Object.BinaryProduct | |||||||||
CategoryOf k => CategoryOf (LIST k) Source Comments # | The category of lists of arrows. | ||||||||
Defined in Proarrow.Profunctor.List | |||||||||
Monoidal k => CategoryOf [k] Source Comments # | The strictified monoidal category, making the unitors and associators identities. | ||||||||
Defined in Proarrow.Category.Monoidal.Strictified Associated Types
| |||||||||
CategoryOf (PROFK j k) Source Comments # | |||||||||
Defined in Proarrow.Category.Bicategory.Prof | |||||||||
(CategoryOf j, CategoryOf k) => CategoryOf (COPRODUCT j k) Source Comments # | The coproduct of two categories. | ||||||||
Defined in Proarrow.Category.Instance.Coproduct | |||||||||
Promonad p => CategoryOf (KLEISLI p) Source Comments # | Every promonad makes a category. | ||||||||
Defined in Proarrow.Category.Instance.Kleisli | |||||||||
CategoryOf (NatK j k) Source Comments # | The category of functors and natural transformations. | ||||||||
Defined in Proarrow.Category.Instance.Nat | |||||||||
CategoryOf k => CategoryOf (SUBCAT ob) Source Comments # | The subcategory with objects with instances of the given constraint | ||||||||
Defined in Proarrow.Category.Instance.Sub | |||||||||
(j ~ '(), k ~ '()) => CategoryOf (Unit j k) Source Comments # | |||||||||
Defined in Proarrow.Category.Bicategory.Terminal | |||||||||
CategoryOf (j +-> k) Source Comments # | The category of profunctors and natural transformations between them. | ||||||||
Defined in Proarrow.Category.Instance.Prof | |||||||||
(CategoryOf k1, CategoryOf k2) => CategoryOf (k1, k2) Source Comments # | The product of two categories. | ||||||||
Defined in Proarrow.Category.Instance.Product | |||||||||
CategoryOf (k1 -> k2 -> k3 -> k4 -> Type) Source Comments # | The category of functors with target category k2 -> k3 -> k4 -> Type. | ||||||||
Defined in Proarrow.Category.Instance.Nat | |||||||||
CategoryOf (k1 -> k2 -> k3 -> Type) Source Comments # | The category of functors with target category | ||||||||
Defined in Proarrow.Category.Instance.Nat | |||||||||
CategoryOf (k1 -> Type) Source Comments # | The category of functors with target category Hask. | ||||||||
Defined in Proarrow.Category.Instance.Nat | |||||||||
(CategoryOf k, Ob i, Ob j) => CategoryOf (PLAINK k i j) Source Comments # | |||||||||
Defined in Proarrow.Category.Bicategory.CategoryAsBi | |||||||||
CategoryOf k => CategoryOf (MonK k i j) Source Comments # | |||||||||
Defined in Proarrow.Category.Bicategory.MonoidalAsBi | |||||||||
Profunctor p => CategoryOf (COLLAGE p) Source Comments # | The collage of a profunctor. | ||||||||
Defined in Proarrow.Category.Instance.Collage | |||||||||
(Structure str, Profunctor p) => CategoryOf (FREE str p) Source Comments # | |||||||||
Defined in Proarrow.Category.Instance.Free | |||||||||
(Bicategory kk, Ob0 kk k) => CategoryOf (ENDO kk k) Source Comments # | |||||||||
Defined in Proarrow.Category.Monoidal.Endo | |||||||||
CategoryOf (DiscreteK ob j k) Source Comments # | |||||||||
Defined in Proarrow.Category.Bicategory.Bidiscrete Associated Types
| |||||||||
CategoryOf (kk j k2) => CategoryOf (COK kk j k2) Source Comments # | |||||||||
Defined in Proarrow.Category.Bicategory.Co | |||||||||
CategoryOf (kk k2 j) => CategoryOf (OPK kk j k2) Source Comments # | |||||||||
Defined in Proarrow.Category.Bicategory.Op | |||||||||
(CategoryOf (kk j k2), Bicategory kk) => CategoryOf (Path kk j k2) Source Comments # | |||||||||
Defined in Proarrow.Category.Bicategory.Strictified Associated Types
| |||||||||
MonoidalAction m k => CategoryOf (STT m k i j) Source Comments # | |||||||||
Defined in Proarrow.Category.Equipment.Stateful | |||||||||
IsChart m c d => CategoryOf (CHART m c d) Source Comments # | The category of charts. | ||||||||
Defined in Proarrow.Category.Monoidal.Optic | |||||||||
IsOptic w c d => CategoryOf (OPTIC w c d) Source Comments # | The category of optics. | ||||||||
Defined in Proarrow.Category.Monoidal.Optic | |||||||||
CategoryOf (kk i j) => CategoryOf (HK kk i j) Source Comments # | |||||||||
Defined in Proarrow.Category.Bicategory.Hom | |||||||||
CategoryOf (kk i j) => CategoryOf (SUBCAT tag kk i j) Source Comments # | The subcategory with objects with instances of the given constraint `IsOb tag`. | ||||||||
Defined in Proarrow.Category.Bicategory.Sub | |||||||||
CategoryOf (kk i j) => CategoryOf (WKK kk i j) Source Comments # | |||||||||
Defined in Proarrow.Category.Equipment.BiAsEquipment | |||||||||
CategoryOf (kk i j) => CategoryOf (QKK kk i j) Source Comments # | |||||||||
Defined in Proarrow.Category.Equipment.Quintet | |||||||||
(CategoryOf (jj (Fst ik) (Fst jl)), CategoryOf (kk (Snd ik) (Snd jl))) => CategoryOf (PRODK jj kk ik jl) Source Comments # | |||||||||
Defined in Proarrow.Category.Bicategory.Product |
class (Promonad cat, CategoryOf k, cat ~ ((~>) :: CAT k)) => Category (cat :: CAT k) Source Comments #
type (:~>) (p :: k -> k1 -> Type) (q :: k -> k1 -> Type) = forall (a :: k) (b :: k1). p a b -> q a b infixr 0 Source Comments #
class (CategoryOf j, CategoryOf k) => Profunctor (p :: j +-> k) where Source Comments #
Minimal complete definition
Methods
dimap :: forall (c :: k) (a :: k) (b :: j) (d :: j). (c ~> a) -> (b ~> d) -> p a b -> p c d Source Comments #
(\\) :: forall (a :: k) (b :: j) r. ((Ob a, Ob b) => r) -> p a b -> r infixl 1 Source Comments #
Instances
(//) :: forall {k1} {k2} p (a :: k2) (b :: k1) r. Profunctor p => p a b -> ((Ob a, Ob b) => r) -> r infixr 0 Source Comments #
lmap :: forall {j} {k} p (c :: k) (a :: k) (b :: j). Profunctor p => (c ~> a) -> p a b -> p c b Source Comments #
rmap :: forall {j} {k} p (b :: j) (d :: j) (a :: k). Profunctor p => (b ~> d) -> p a b -> p a d Source Comments #
dimapDefault :: forall {k} p (c :: k) (a :: k) (b :: k) (d :: k). Promonad p => p c a -> p b d -> p a b -> p c d Source Comments #
class Profunctor p => Promonad (p :: k +-> k) where Source Comments #
Methods
id :: forall (a :: k). Ob a => p a a Source Comments #
(.) :: forall (b :: k) (c :: k) (a :: k). p b c -> p a b -> p a c infixr 9 Source Comments #
Instances
type family UN (w :: j -> k) (wa :: k) :: j Source Comments #
A helper type family to unwrap a wrapped kind. This is needed because the field selector functions of newtypes have to be lower case and therefore cannot be used at the type level.
Instances
type UN 'K ('K k :: KIND) Source Comments # | |
Defined in Proarrow.Category.Instance.Cat | |
type UN 'CNSTRNT ('CNSTRNT a :: CONSTRAINT) Source Comments # | |
Defined in Proarrow.Category.Instance.Constraint | |
type UN 'L ('L a :: LINEAR) Source Comments # | |
Defined in Proarrow.Category.Instance.Linear | |
type UN 'P ('P a :: POINTED) Source Comments # | |
Defined in Proarrow.Category.Instance.PointedHask | |
type UN ('M :: Nat -> MatK a) ('M n :: MatK a) Source Comments # | |
type UN ('EMB :: j -> FK j) ('EMB a :: FK j) Source Comments # | |
type UN ('PC :: j -> POCATK j) ('PC k :: POCATK j) Source Comments # | |
type UN ('R :: j -> REV j) ('R a :: REV j) Source Comments # | |
type UN ('OP :: j -> OPPOSITE j) ('OP k :: OPPOSITE j) Source Comments # | |
type UN ('F :: j -> FK j) ('F a :: FK j) Source Comments # | |
type UN ('COPR :: j -> COPROD j) ('COPR k :: COPROD j) Source Comments # | |
type UN ('PR :: j -> PROD j) ('PR k :: PROD j) Source Comments # | |
type UN ('T :: j -> THIN j) ('T a :: THIN j) Source Comments # | |
type UN ('CK :: j -> CATK j i) ('CK a :: CATK j i) Source Comments # | |
type UN ('BIPARA :: j -> BIPARAK j i) ('BIPARA a :: BIPARAK j i) Source Comments # | |
type UN ('KL :: j -> KLEISLI p) ('KL k :: KLEISLI p) Source Comments # | |
type UN ('SUB :: j -> SUBCAT ob) ('SUB k :: SUBCAT ob) Source Comments # | |
type UN ('MK :: j1 -> MonK j1 i j2) ('MK k :: MonK j1 i j2) Source Comments # | |
type UN ('L :: [k] -> LIST k) ('L as :: LIST k) Source Comments # | |
type UN ('F :: FK k1 -> FREE str p) ('F k2 :: FREE str p) Source Comments # | |
type UN ('PK :: (j +-> k) -> PROFK j k) ('PK p :: PROFK j k) Source Comments # | |
type UN ('NT :: (j -> k) -> NatK j k) ('NT f :: NatK j k) Source Comments # | |
type UN ('E :: kk k k -> ENDO kk k) ('E p :: ENDO kk k) Source Comments # | |
type UN ('ST :: (k +-> k) -> STT m k i j) ('ST p :: STT m k i j) Source Comments # | |
type UN ('CO :: kk j k2 -> COK kk j k2) ('CO k3 :: COK kk j k2) Source Comments # | |
type UN ('OP :: kk k2 j -> OPK kk j k2) ('OP k3 :: OPK kk j k2) Source Comments # | |
type UN ('HomK :: kk i j -> HK kk i j) ('HomK k3 :: HK kk i j) Source Comments # | |
type UN ('SUB :: kk i j -> SUBCAT tag kk i j) ('SUB p :: SUBCAT tag kk i j) Source Comments # | |
type UN ('WK :: kk i j -> WKK kk i j) ('WK p :: WKK kk i j) Source Comments # | |
type UN ('QK :: kk i j -> QKK kk i j) ('QK p :: QKK kk i j) Source Comments # | |