proarrow-0: Category theory with a central role for profunctors
Safe HaskellNone
LanguageHaskell2010

Proarrow.Profunctor.Representable

Documentation

class Profunctor p => Representable (p :: j +-> k) where Source Comments #

Associated Types

type (p :: j +-> k) % (a :: j) :: k infixl 8 Source Comments #

Methods

index :: forall (a :: k) (b :: j). p a b -> a ~> (p % b) Source Comments #

tabulate :: forall (b :: j) (a :: k). Ob b => (a ~> (p % b)) -> p a b Source Comments #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (p % a) ~> (p % b) Source Comments #

Instances

Instances details
Representable Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type Forget % (a :: LINEAR) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Forget % (a :: LINEAR) = UN 'L a

Methods

index :: forall a (b :: LINEAR). Forget a b -> a ~> (Forget % b) Source Comments #

tabulate :: forall (b :: LINEAR) a. Ob b => (a ~> (Forget % b)) -> Forget a b Source Comments #

repMap :: forall (a :: LINEAR) (b :: LINEAR). (a ~> b) -> (Forget % a) ~> (Forget % b) Source Comments #

Representable Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Simplex

Associated Types

type Forget % (n :: Nat) 
Instance details

Defined in Proarrow.Category.Instance.Simplex

type Forget % (n :: Nat) = Fin n

Methods

index :: forall a (b :: Nat). Forget a b -> a ~> (Forget % b) Source Comments #

tabulate :: forall (b :: Nat) a. Ob b => (a ~> (Forget % b)) -> Forget a b Source Comments #

repMap :: forall (a :: Nat) (b :: Nat). (a ~> b) -> (Forget % a) ~> (Forget % b) Source Comments #

Representable Free Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type Free % (a :: Type) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Free % (a :: Type) = 'L (Ur a)

Methods

index :: forall (a :: LINEAR) b. Free a b -> a ~> (Free % b) Source Comments #

tabulate :: forall b (a :: LINEAR). Ob b => (a ~> (Free % b)) -> Free a b Source Comments #

repMap :: (a ~> b) -> (Free % a) ~> (Free % b) Source Comments #

CategoryOf k => Representable (Id :: k -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Identity

Methods

index :: forall (a :: k) (b :: k). Id a b -> a ~> ((Id :: k -> k -> Type) % b) Source Comments #

tabulate :: forall (b :: k) (a :: k). Ob b => (a ~> ((Id :: k -> k -> Type) % b)) -> Id a b Source Comments #

repMap :: forall (a :: k) (b :: k). (a ~> b) -> ((Id :: k -> k -> Type) % a) ~> ((Id :: k -> k -> Type) % b) Source Comments #

Monoid m => Representable (Replicate m :: k -> Nat -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Simplex

Methods

index :: forall (a :: k) (b :: Nat). Replicate m a b -> a ~> (Replicate m % b) Source Comments #

tabulate :: forall (b :: Nat) (a :: k). Ob b => (a ~> (Replicate m % b)) -> Replicate m a b Source Comments #

repMap :: forall (a :: Nat) (b :: Nat). (a ~> b) -> (Replicate m % a) ~> (Replicate m % b) Source Comments #

Representable d => Representable (EndLimit d :: Type -> () -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Limit

Methods

index :: forall a (b :: ()). EndLimit d a b -> a ~> (EndLimit d % b) Source Comments #

tabulate :: forall (b :: ()) a. Ob b => (a ~> (EndLimit d % b)) -> EndLimit d a b Source Comments #

repMap :: forall (a :: ()) (b :: ()). (a ~> b) -> (EndLimit d % a) ~> (EndLimit d % b) Source Comments #

(HasBinaryCoproducts k, Representable d) => Representable (CoproductColimit d :: k -> () -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Colimit

Methods

index :: forall (a :: k) (b :: ()). CoproductColimit d a b -> a ~> (CoproductColimit d % b) Source Comments #

tabulate :: forall (b :: ()) (a :: k). Ob b => (a ~> (CoproductColimit d % b)) -> CoproductColimit d a b Source Comments #

repMap :: forall (a :: ()) (b :: ()). (a ~> b) -> (CoproductColimit d % a) ~> (CoproductColimit d % b) Source Comments #

HasInitialObject k => Representable (InitialLimit d :: k -> () -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Colimit

Methods

index :: forall (a :: k) (b :: ()). InitialLimit d a b -> a ~> (InitialLimit d % b) Source Comments #

tabulate :: forall (b :: ()) (a :: k). Ob b => (a ~> (InitialLimit d % b)) -> InitialLimit d a b Source Comments #

repMap :: forall (a :: ()) (b :: ()). (a ~> b) -> (InitialLimit d % a) ~> (InitialLimit d % b) Source Comments #

(HasBinaryProducts k, Representable d) => Representable (ProductLimit d :: k -> () -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Limit

Methods

index :: forall (a :: k) (b :: ()). ProductLimit d a b -> a ~> (ProductLimit d % b) Source Comments #

tabulate :: forall (b :: ()) (a :: k). Ob b => (a ~> (ProductLimit d % b)) -> ProductLimit d a b Source Comments #

repMap :: forall (a :: ()) (b :: ()). (a ~> b) -> (ProductLimit d % a) ~> (ProductLimit d % b) Source Comments #

HasTerminalObject k => Representable (TerminalLimit d :: k -> () -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Limit

Methods

index :: forall (a :: k) (b :: ()). TerminalLimit d a b -> a ~> (TerminalLimit d % b) Source Comments #

tabulate :: forall (b :: ()) (a :: k). Ob b => (a ~> (TerminalLimit d % b)) -> TerminalLimit d a b Source Comments #

repMap :: forall (a :: ()) (b :: ()). (a ~> b) -> (TerminalLimit d % a) ~> (TerminalLimit d % b) Source Comments #

Corepresentable p => Representable (CorepStar p :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

index :: forall (a :: k) (b :: j). CorepStar p a b -> a ~> (CorepStar p % b) Source Comments #

tabulate :: forall (b :: j) (a :: k). Ob b => (a ~> (CorepStar p % b)) -> CorepStar p a b Source Comments #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (CorepStar p % a) ~> (CorepStar p % b) Source Comments #

Representable p => Representable (RepStar p :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

index :: forall (a :: k) (b :: j). RepStar p a b -> a ~> (RepStar p % b) Source Comments #

tabulate :: forall (b :: j) (a :: k). Ob b => (a ~> (RepStar p % b)) -> RepStar p a b Source Comments #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (RepStar p % a) ~> (RepStar p % b) Source Comments #

Functor f => Representable (Star f :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Star

Methods

index :: forall (a :: k) (b :: j). Star f a b -> a ~> (Star f % b) Source Comments #

tabulate :: forall (b :: j) (a :: k). Ob b => (a ~> (Star f % b)) -> Star f a b Source Comments #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (Star f % a) ~> (Star f % b) Source Comments #

(Representable p, Representable q) => Representable (p :.: q :: k -> j2 -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Composition

Methods

index :: forall (a :: k) (b :: j2). (p :.: q) a b -> a ~> ((p :.: q) % b) Source Comments #

tabulate :: forall (b :: j2) (a :: k). Ob b => (a ~> ((p :.: q) % b)) -> (p :.: q) a b Source Comments #

repMap :: forall (a :: j2) (b :: j2). (a ~> b) -> ((p :.: q) % a) ~> ((p :.: q) % b) Source Comments #

HasCofree ob => Representable (CofreeSub ob :: SUBCAT ob -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Cofree

Methods

index :: forall (a :: SUBCAT ob) (b :: j). CofreeSub ob a b -> a ~> (CofreeSub ob % b) Source Comments #

tabulate :: forall (b :: j) (a :: SUBCAT ob). Ob b => (a ~> (CofreeSub ob % b)) -> CofreeSub ob a b Source Comments #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (CofreeSub ob % a) ~> (CofreeSub ob % b) Source Comments #

HasFree ob => Representable (FreeSub ob :: SUBCAT ob -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

index :: forall (a :: SUBCAT ob) (b :: j). FreeSub ob a b -> a ~> (FreeSub ob % b) Source Comments #

tabulate :: forall (b :: j) (a :: SUBCAT ob). Ob b => (a ~> (FreeSub ob % b)) -> FreeSub ob a b Source Comments #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (FreeSub ob % a) ~> (FreeSub ob % b) Source Comments #

Profunctor p => Representable (InjL p :: COLLAGE p -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Collage

Methods

index :: forall (a :: COLLAGE p) (b :: j). InjL p a b -> a ~> (InjL p % b) Source Comments #

tabulate :: forall (b :: j) (a :: COLLAGE p). Ob b => (a ~> (InjL p % b)) -> InjL p a b Source Comments #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (InjL p % a) ~> (InjL p % b) Source Comments #

Profunctor p => Representable (InjR p :: COLLAGE p -> j2 -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Collage

Methods

index :: forall (a :: COLLAGE p) (b :: j2). InjR p a b -> a ~> (InjR p % b) Source Comments #

tabulate :: forall (b :: j2) (a :: COLLAGE p). Ob b => (a ~> (InjR p % b)) -> InjR p a b Source Comments #

repMap :: forall (a :: j2) (b :: j2). (a ~> b) -> (InjR p % a) ~> (InjR p % b) Source Comments #

Corepresentable p => Representable (Op p :: OPPOSITE j -> OPPOSITE k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Opposite

Methods

index :: forall (a :: OPPOSITE j) (b :: OPPOSITE k). Op p a b -> a ~> (Op p % b) Source Comments #

tabulate :: forall (b :: OPPOSITE k) (a :: OPPOSITE j). Ob b => (a ~> (Op p % b)) -> Op p a b Source Comments #

repMap :: forall (a :: OPPOSITE k) (b :: OPPOSITE k). (a ~> b) -> (Op p % a) ~> (Op p % b) Source Comments #

Closed k => Representable (ExponentialFunctor :: k -> (OPPOSITE k, k) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Object.Exponential

Methods

index :: forall (a :: k) (b :: (OPPOSITE k, k)). ExponentialFunctor a b -> a ~> ((ExponentialFunctor :: k -> (OPPOSITE k, k) -> Type) % b) Source Comments #

tabulate :: forall (b :: (OPPOSITE k, k)) (a :: k). Ob b => (a ~> ((ExponentialFunctor :: k -> (OPPOSITE k, k) -> Type) % b)) -> ExponentialFunctor a b Source Comments #

repMap :: forall (a :: (OPPOSITE k, k)) (b :: (OPPOSITE k, k)). (a ~> b) -> ((ExponentialFunctor :: k -> (OPPOSITE k, k) -> Type) % a) ~> ((ExponentialFunctor :: k -> (OPPOSITE k, k) -> Type) % b) Source Comments #

CategoryOf k => Representable (Forget ob :: k -> SUBCAT ob -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Forget

Methods

index :: forall (a :: k) (b :: SUBCAT ob). Forget ob a b -> a ~> (Forget ob % b) Source Comments #

tabulate :: forall (b :: SUBCAT ob) (a :: k). Ob b => (a ~> (Forget ob % b)) -> Forget ob a b Source Comments #

repMap :: forall (a :: SUBCAT ob) (b :: SUBCAT ob). (a ~> b) -> (Forget ob % a) ~> (Forget ob % b) Source Comments #

(Representable p, forall (a :: k). ob a => ob (p % a)) => Representable (Sub p :: SUBCAT ob -> SUBCAT ob -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Sub

Methods

index :: forall (a :: SUBCAT ob) (b :: SUBCAT ob). Sub p a b -> a ~> ((Sub p :: SUBCAT ob -> SUBCAT ob -> Type) % b) Source Comments #

tabulate :: forall (b :: SUBCAT ob) (a :: SUBCAT ob). Ob b => (a ~> ((Sub p :: SUBCAT ob -> SUBCAT ob -> Type) % b)) -> Sub p a b Source Comments #

repMap :: forall (a :: SUBCAT ob) (b :: SUBCAT ob). (a ~> b) -> ((Sub p :: SUBCAT ob -> SUBCAT ob -> Type) % a) ~> ((Sub p :: SUBCAT ob -> SUBCAT ob -> Type) % b) Source Comments #

(Representable p, Representable q) => Representable (p :**: q :: (k1, k2) -> (j1, j2) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Product

Methods

index :: forall (a :: (k1, k2)) (b :: (j1, j2)). (p :**: q) a b -> a ~> ((p :**: q) % b) Source Comments #

tabulate :: forall (b :: (j1, j2)) (a :: (k1, k2)). Ob b => (a ~> ((p :**: q) % b)) -> (p :**: q) a b Source Comments #

repMap :: forall (a :: (j1, j2)) (b :: (j1, j2)). (a ~> b) -> ((p :**: q) % a) ~> ((p :**: q) % b) Source Comments #

(Profunctor p, Representable f, Representable g, Reifies s (ProfSq p (Id :: k2 -> k2 -> Type) f g)) => Representable (CotabulatorFactorizer s p f g :: k2 -> COLLAGE p -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Bicategory.Prof

Methods

index :: forall (a :: k2) (b :: COLLAGE p). CotabulatorFactorizer s p f g a b -> a ~> (CotabulatorFactorizer s p f g % b) Source Comments #

tabulate :: forall (b :: COLLAGE p) (a :: k2). Ob b => (a ~> (CotabulatorFactorizer s p f g % b)) -> CotabulatorFactorizer s p f g a b Source Comments #

repMap :: forall (a :: COLLAGE p) (b :: COLLAGE p). (a ~> b) -> (CotabulatorFactorizer s p f g % a) ~> (CotabulatorFactorizer s p f g % b) Source Comments #

repObj :: forall {j} {k} (p :: j +-> k) (a :: j). (Representable p, Ob a) => Obj (p % a) Source Comments #

withRepObj :: forall {j} {k} (p :: j +-> k) (a :: j) r. (Representable p, Ob a) => (Ob (p % a) => r) -> r Source Comments #

dimapRep :: forall {j} {k} p (a :: k) (b :: j) (c :: k) (d :: j). Representable p => (c ~> a) -> (b ~> d) -> p a b -> p c d Source Comments #

data RepStar (p :: j +-> k) (a :: k) (b :: j) where Source Comments #

Constructors

RepStar 

Fields

Instances

Instances details
Representable p => Profunctor (RepStar p :: j -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

dimap :: forall (c :: j) (a :: j) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> RepStar p a b -> RepStar p c d Source Comments #

(\\) :: forall (a :: j) (b :: k) r. ((Ob a, Ob b) => r) -> RepStar p a b -> r Source Comments #

Representable p => Representable (RepStar p :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

index :: forall (a :: k) (b :: j). RepStar p a b -> a ~> (RepStar p % b) Source Comments #

tabulate :: forall (b :: j) (a :: k). Ob b => (a ~> (RepStar p % b)) -> RepStar p a b Source Comments #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (RepStar p % a) ~> (RepStar p % b) Source Comments #

type (RepStar p :: k -> j -> Type) % (a :: j) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

type (RepStar p :: k -> j -> Type) % (a :: j) = p % a

data CorepStar (p :: k +-> j) (a :: k) (b :: j) where Source Comments #

Constructors

CorepStar 

Fields

Instances

Instances details
Corepresentable p => Profunctor (CorepStar p :: j -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

dimap :: forall (c :: j) (a :: j) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> CorepStar p a b -> CorepStar p c d Source Comments #

(\\) :: forall (a :: j) (b :: k) r. ((Ob a, Ob b) => r) -> CorepStar p a b -> r Source Comments #

Corepresentable p => Representable (CorepStar p :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

index :: forall (a :: k) (b :: j). CorepStar p a b -> a ~> (CorepStar p % b) Source Comments #

tabulate :: forall (b :: j) (a :: k). Ob b => (a ~> (CorepStar p % b)) -> CorepStar p a b Source Comments #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (CorepStar p % a) ~> (CorepStar p % b) Source Comments #

type (CorepStar p :: k -> j -> Type) % (a :: j) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

type (CorepStar p :: k -> j -> Type) % (a :: j) = p %% a

data RepCostar (p :: k +-> j) (a :: k) (b :: j) where Source Comments #

Constructors

RepCostar 

Fields

Instances

Instances details
Representable f => Adjunction (f :: k +-> j) (RepCostar f :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Adjunction

Methods

unit :: forall (a :: k). Ob a => (RepCostar f :.: f) a a Source Comments #

counit :: (f :.: RepCostar f) :~> ((~>) :: CAT j) Source Comments #

MonoidalProfunctor (RepCostar Free) Source Comments #

Free is also a colax monoidal functor

Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

par0 :: RepCostar Free (Unit :: Type) (Unit :: LINEAR) Source Comments #

par :: forall x1 (x2 :: LINEAR) y1 (y2 :: LINEAR). RepCostar Free x1 x2 -> RepCostar Free y1 y2 -> RepCostar Free (x1 ** y1) (x2 ** y2) Source Comments #

MonoidalProfunctor (RepCostar Forget) Source Comments #

Forget is also a colax monoidal functor

Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

par0 :: RepCostar Forget (Unit :: LINEAR) (Unit :: Type) Source Comments #

par :: forall (x1 :: LINEAR) x2 (y1 :: LINEAR) y2. RepCostar Forget x1 x2 -> RepCostar Forget y1 y2 -> RepCostar Forget (x1 ** y1) (x2 ** y2) Source Comments #

(MonoidalProfunctor r, Adjunction l r, Representable l, Representable r, Monoidal j, Monoidal k) => MonoidalProfunctor (RepCostar l :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Adjunction

Methods

par0 :: RepCostar l (Unit :: k) (Unit :: j) Source Comments #

par :: forall (x1 :: k) (x2 :: j) (y1 :: k) (y2 :: j). RepCostar l x1 x2 -> RepCostar l y1 y2 -> RepCostar l (x1 ** y1) (x2 ** y2) Source Comments #

Representable p => Profunctor (RepCostar p :: j -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

dimap :: forall (c :: j) (a :: j) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> RepCostar p a b -> RepCostar p c d Source Comments #

(\\) :: forall (a :: j) (b :: k) r. ((Ob a, Ob b) => r) -> RepCostar p a b -> r Source Comments #

Representable p => Corepresentable (RepCostar p :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

coindex :: forall (a :: k) (b :: j). RepCostar p a b -> (RepCostar p %% a) ~> b Source Comments #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((RepCostar p %% a) ~> b) -> RepCostar p a b Source Comments #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (RepCostar p %% a) ~> (RepCostar p %% b) Source Comments #

type (RepCostar p :: k -> j -> Type) %% (a :: k) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Representable

type (RepCostar p :: k -> j -> Type) %% (a :: k) = p % a

flipRep :: forall {k1} {k} (p :: k1 +-> k) (q :: k +-> k1). (Representable p, Corepresentable q) => (RepCostar p :~> q) -> CorepStar q :~> p Source Comments #