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

Proarrow.Object.Power

Synopsis

Documentation

class CategoryOf k => Powered k where Source Comments #

Categories powered over Hask.

Associated Types

type (a :: k) ^ n :: k Source Comments #

Methods

withObPower :: forall (a :: k) n r. Ob a => (Ob (a ^ n) => r) -> r Source Comments #

power :: forall (a :: k) (b :: k) n. (Ob a, Ob b) => (n -> a ~> b) -> a ~> (b ^ n) Source Comments #

unpower :: forall (b :: k) (a :: k) n. Ob b => (a ~> (b ^ n)) -> n -> a ~> b Source Comments #

Instances

Instances details
Powered LINEAR Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type ('L a :: LINEAR) ^ n 
Instance details

Defined in Proarrow.Category.Instance.Linear

type ('L a :: LINEAR) ^ n = 'L (n -> a)

Methods

withObPower :: forall (a :: LINEAR) n r. Ob a => (Ob (a ^ n) => r) -> r Source Comments #

power :: forall (a :: LINEAR) (b :: LINEAR) n. (Ob a, Ob b) => (n -> a ~> b) -> a ~> (b ^ n) Source Comments #

unpower :: forall (b :: LINEAR) (a :: LINEAR) n. Ob b => (a ~> (b ^ n)) -> n -> a ~> b Source Comments #

Powered POINTED Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.PointedHask

Associated Types

type ('P a :: POINTED) ^ n 
Instance details

Defined in Proarrow.Category.Instance.PointedHask

type ('P a :: POINTED) ^ n = 'P (n -> Maybe a)

Methods

withObPower :: forall (a :: POINTED) n r. Ob a => (Ob (a ^ n) => r) -> r Source Comments #

power :: forall (a :: POINTED) (b :: POINTED) n. (Ob a, Ob b) => (n -> a ~> b) -> a ~> (b ^ n) Source Comments #

unpower :: forall (b :: POINTED) (a :: POINTED) n. Ob b => (a ~> (b ^ n)) -> n -> a ~> b Source Comments #

Powered () Source Comments # 
Instance details

Defined in Proarrow.Object.Power

Associated Types

type (a :: ()) ^ n 
Instance details

Defined in Proarrow.Object.Power

type (a :: ()) ^ n = '()

Methods

withObPower :: forall (a :: ()) n r. Ob a => (Ob (a ^ n) => r) -> r Source Comments #

power :: forall (a :: ()) (b :: ()) n. (Ob a, Ob b) => (n -> a ~> b) -> a ~> (b ^ n) Source Comments #

unpower :: forall (b :: ()) (a :: ()) n. Ob b => (a ~> (b ^ n)) -> n -> a ~> b Source Comments #

Powered Type Source Comments # 
Instance details

Defined in Proarrow.Object.Power

Associated Types

type (a :: Type) ^ n 
Instance details

Defined in Proarrow.Object.Power

type (a :: Type) ^ n = n -> a

Methods

withObPower :: Ob a => (Ob (a ^ n) => r) -> r Source Comments #

power :: (Ob a, Ob b) => (n -> a ~> b) -> a ~> (b ^ n) Source Comments #

unpower :: Ob b => (a ~> (b ^ n)) -> n -> a ~> b Source Comments #

Copowered k => Powered (OPPOSITE k) Source Comments # 
Instance details

Defined in Proarrow.Category.Opposite

Methods

withObPower :: forall (a :: OPPOSITE k) n r. Ob a => (Ob (a ^ n) => r) -> r Source Comments #

power :: forall (a :: OPPOSITE k) (b :: OPPOSITE k) n. (Ob a, Ob b) => (n -> a ~> b) -> a ~> (b ^ n) Source Comments #

unpower :: forall (b :: OPPOSITE k) (a :: OPPOSITE k) n. Ob b => (a ~> (b ^ n)) -> n -> a ~> b Source Comments #

(CategoryOf j, CategoryOf k) => Powered (j +-> k) Source Comments # 
Instance details

Defined in Proarrow.Object.Power

Methods

withObPower :: forall (a :: j +-> k) n r. Ob a => (Ob (a ^ n) => r) -> r Source Comments #

power :: forall (a :: j +-> k) (b :: j +-> k) n. (Ob a, Ob b) => (n -> a ~> b) -> a ~> (b ^ n) Source Comments #

unpower :: forall (b :: j +-> k) (a :: j +-> k) n. Ob b => (a ~> (b ^ n)) -> n -> a ~> b Source Comments #

(Powered j, Powered k) => Powered (j, k) Source Comments # 
Instance details

Defined in Proarrow.Object.Power

Methods

withObPower :: forall (a :: (j, k)) n r. Ob a => (Ob (a ^ n) => r) -> r Source Comments #

power :: forall (a :: (j, k)) (b :: (j, k)) n. (Ob a, Ob b) => (n -> a ~> b) -> a ~> (b ^ n) Source Comments #

unpower :: forall (b :: (j, k)) (a :: (j, k)) n. Ob b => (a ~> (b ^ n)) -> n -> a ~> b Source Comments #

Powered (k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

withObPower :: forall (a :: k -> Type) n r. Ob a => (Ob (a ^ n) => r) -> r Source Comments #

power :: forall (a :: k -> Type) (b :: k -> Type) n. (Ob a, Ob b) => (n -> a ~> b) -> a ~> (b ^ n) Source Comments #

unpower :: forall (b :: k -> Type) (a :: k -> Type) n. Ob b => (a ~> (b ^ n)) -> n -> a ~> b Source Comments #

mapBase :: forall k (a :: k) (b :: k) n. Powered k => (a ~> b) -> (a ^ n) ~> (b ^ n) Source Comments #

mapPower :: forall k (a :: k) n m. (Powered k, Ob a) => (n -> m) -> (a ^ m) ~> (a ^ n) Source Comments #

data ((p :: k -> k1 -> Type) :^: n) (a :: k) (b :: k1) where Source Comments #

Constructors

Power 

Fields

  • :: forall {k} {k1} (a :: k) (b :: k1) n (p :: k -> k1 -> Type). (Ob a, Ob b)
     
  • => { unPower :: n -> p a b
     
  •    } -> (p :^: n) a b
     

Instances

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

Defined in Proarrow.Object.Power

Methods

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

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