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

Proarrow.Category.Monoidal.Optic

Documentation

data Optic m (a :: c) (b :: d) (s :: c) (t :: d) where Source Comments #

Constructors

Optic :: forall {c} {d} {m} (x :: m) (x' :: m) (a :: c) (b :: d) (s :: c) (t :: d). (Ob a, Ob b) => (s ~> Act x a) -> (x ~> x') -> (Act x' b ~> t) -> Optic m a b s t 

Instances

Instances details
IsOptic m c d => Strong m (Optic m a b :: c -> d -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: m) (b0 :: m) (x :: c) (y :: d). (a0 ~> b0) -> Optic m a b x y -> Optic m a b (Act a0 x) (Act b0 y) Source Comments #

(CategoryOf c, CategoryOf d) => Profunctor (Optic w a b :: c -> d -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: forall (c0 :: c) (a0 :: c) (b0 :: d) (d0 :: d). (c0 ~> a0) -> (b0 ~> d0) -> Optic w a b a0 b0 -> Optic w a b c0 d0 Source Comments #

(\\) :: forall (a0 :: c) (b0 :: d) r. ((Ob a0, Ob b0) => r) -> Optic w a b a0 b0 -> r Source Comments #

parallel :: forall {k1} {k2} {k3} {k4} m (a :: k1) (b :: k2) (s :: k1) (t :: k2) m' (c :: k3) (d :: k4) (u :: k3) (v :: k4). Optic m a b s t -> Optic m' c d u v -> Optic (m, m') '(a, c) '(b, d) '(s, u) '(t, v) Source Comments #

data OPTIC (m :: k) c d Source Comments #

Constructors

OPT c d 

Instances

Instances details
IsOptic w c d => CategoryOf (OPTIC w c d) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type (~>) = OpticCat :: OPTIC w c d -> OPTIC w c d -> Type
IsOptic w c d => Promonad (OpticCat :: OPTIC w c d -> OPTIC w c d -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

id :: forall (a :: OPTIC w c d). Ob a => OpticCat a a Source Comments #

(.) :: forall (b :: OPTIC w c d) (c0 :: OPTIC w c d) (a :: OPTIC w c d). OpticCat b c0 -> OpticCat a b -> OpticCat a c0 Source Comments #

IsOptic w c d => Profunctor (OpticCat :: OPTIC w c d -> OPTIC w c d -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: forall (c0 :: OPTIC w c d) (a :: OPTIC w c d) (b :: OPTIC w c d) (d0 :: OPTIC w c d). (c0 ~> a) -> (b ~> d0) -> OpticCat a b -> OpticCat c0 d0 Source Comments #

(\\) :: forall (a :: OPTIC w c d) (b :: OPTIC w c d) r. ((Ob a, Ob b) => r) -> OpticCat a b -> r Source Comments #

type (~>) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type (~>) = OpticCat :: OPTIC w c d -> OPTIC w c d -> Type
type Ob (a :: OPTIC w c d) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type Ob (a :: OPTIC w c d) = (a ~ ('OPT (OptL a) (OptR a) :: OPTIC w c d), Ob (OptL a), Ob (OptR a))

type family OptL (p :: OPTIC w c d) :: c where ... Source Comments #

Equations

OptL ('OPT c2 d2 :: OPTIC w c1 d1) = c2 

type family OptR (p :: OPTIC w c d) :: d where ... Source Comments #

Equations

OptR ('OPT c2 d2 :: OPTIC w c1 d1) = d2 

data OpticCat (ab :: OPTIC w c d) (st :: OPTIC w c d) where Source Comments #

Constructors

OpticCat :: forall w1 c (a :: c) d (b :: d) (s :: c) (t :: d). Optic w1 a b s t -> OpticCat ('OPT a b :: OPTIC w1 c d) ('OPT s t :: OPTIC w1 c d) 

Instances

Instances details
IsOptic w c d => Promonad (OpticCat :: OPTIC w c d -> OPTIC w c d -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

id :: forall (a :: OPTIC w c d). Ob a => OpticCat a a Source Comments #

(.) :: forall (b :: OPTIC w c d) (c0 :: OPTIC w c d) (a :: OPTIC w c d). OpticCat b c0 -> OpticCat a b -> OpticCat a c0 Source Comments #

IsOptic w c d => Profunctor (OpticCat :: OPTIC w c d -> OPTIC w c d -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: forall (c0 :: OPTIC w c d) (a :: OPTIC w c d) (b :: OPTIC w c d) (d0 :: OPTIC w c d). (c0 ~> a) -> (b ~> d0) -> OpticCat a b -> OpticCat c0 d0 Source Comments #

(\\) :: forall (a :: OPTIC w c d) (b :: OPTIC w c d) r. ((Ob a, Ob b) => r) -> OpticCat a b -> r Source Comments #

type MixedOptic w (a :: k) (b :: k1) (s :: k) (t :: k1) = forall (p :: k1 +-> k). Strong w p => p a b -> p s t Source Comments #

ex2prof :: forall {k1} {k2} w (a :: k1) (b :: k2) (s :: k1) (t :: k2). Optic w a b s t -> MixedOptic w a b s t Source Comments #

prof2ex :: forall {c} {d} m (a :: c) (b :: d) (s :: c) (t :: d). (MonoidalAction m c, MonoidalAction m d, Ob a, Ob b) => MixedOptic m a b s t -> Optic m a b s t Source Comments #

type Lens (s :: k) (t :: k1) (a :: k) (b :: k1) = MixedOptic Type a b s t Source Comments #

mkLens :: (s -> a) -> (s -> b -> t) -> Lens s t a b Source Comments #

type Prism (s :: k) (t :: k1) (a :: k) (b :: k1) = MixedOptic (COPROD Type) ('COPR a) ('COPR b) ('COPR s) ('COPR t) Source Comments #

mkPrism :: (s -> Either t a) -> (b -> t) -> Prism s t a b Source Comments #

type Traversal (s :: k) (t :: k1) (a :: k) (b :: k1) = MixedOptic (Type -> Type) a b s t Source Comments #

traversing :: forall (f :: Type -> Type) a b. Traversable f => Traversal (f a) (f b) a b Source Comments #

class Monad m => Algebra (m :: Type -> Type) a where Source Comments #

Methods

algebra :: m a -> a Source Comments #

Instances

Instances details
Monad m => Algebra m () Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

algebra :: m () -> () Source Comments #

Monad m => Algebra m (m a) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

algebra :: m (m a) -> m a Source Comments #

(Monad m, Algebra m a, Algebra m b) => Algebra m (a, b) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

algebra :: m (a, b) -> (a, b) Source Comments #

type AlgebraicLens (m :: Type -> Type) (s :: k) (t :: k1) (a :: k) (b :: k1) = MixedOptic (SUBCAT (Algebra m)) a b s t Source Comments #

mkAlgebraicLens :: forall m s t a b. Monad m => (s -> a) -> (m s -> b -> t) -> AlgebraicLens m s t a b Source Comments #

newtype Viewing a b s t Source Comments #

Constructors

Viewing 

Fields

Instances

Instances details
Strong Type (Viewing a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: (a0 ~> b0) -> Viewing a b x y -> Viewing a b (Act a0 x) (Act b0 y) Source Comments #

Profunctor (Viewing a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: (c ~> a0) -> (b0 ~> d) -> Viewing a b a0 b0 -> Viewing a b c d Source Comments #

(\\) :: ((Ob a0, Ob b0) => r) -> Viewing a b a0 b0 -> r Source Comments #

(^.) :: s -> (Viewing a b a b -> Viewing a b s t) -> a infixl 8 Source Comments #

data Previewing (a :: COPROD Type) (b :: COPROD Type) (s :: COPROD Type) (t :: COPROD Type) where Source Comments #

Constructors

Previewing 

Fields

Instances

Instances details
Strong Type (Previewing a b :: COPROD Type -> COPROD Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall a0 b0 (x :: COPROD Type) (y :: COPROD Type). (a0 ~> b0) -> Previewing a b x y -> Previewing a b (Act a0 x) (Act b0 y) Source Comments #

Strong (COPROD Type) (Previewing a b :: COPROD Type -> COPROD Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: COPROD Type) (b0 :: COPROD Type) (x :: COPROD Type) (y :: COPROD Type). (a0 ~> b0) -> Previewing a b x y -> Previewing a b (Act a0 x) (Act b0 y) Source Comments #

Profunctor (Previewing a b :: COPROD Type -> COPROD Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: forall (c :: COPROD Type) (a0 :: COPROD Type) (b0 :: COPROD Type) (d :: COPROD Type). (c ~> a0) -> (b0 ~> d) -> Previewing a b a0 b0 -> Previewing a b c d Source Comments #

(\\) :: forall (a0 :: COPROD Type) (b0 :: COPROD Type) r. ((Ob a0, Ob b0) => r) -> Previewing a b a0 b0 -> r Source Comments #

(?.) :: s -> (Previewing ('COPR a) ('COPR b) ('COPR a) ('COPR b) -> Previewing ('COPR a) ('COPR b) ('COPR s) ('COPR t)) -> Maybe a infixl 8 Source Comments #

newtype Setting a b s t Source Comments #

Constructors

Setting 

Fields

  • unSet :: (a -> b) -> s -> t
     

Instances

Instances details
Strong Type (Setting a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: (a0 ~> b0) -> Setting a b x y -> Setting a b (Act a0 x) (Act b0 y) Source Comments #

Strong (COPROD Type) (Setting a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: COPROD Type) (b0 :: COPROD Type) x y. (a0 ~> b0) -> Setting a b x y -> Setting a b (Act a0 x) (Act b0 y) Source Comments #

Profunctor (Setting a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: (c ~> a0) -> (b0 ~> d) -> Setting a b a0 b0 -> Setting a b c d Source Comments #

(\\) :: ((Ob a0, Ob b0) => r) -> Setting a b a0 b0 -> r Source Comments #

(.~) :: (Setting a b a b -> Setting a b s t) -> b -> s -> t infixl 8 Source Comments #

type KlCat (m :: Type -> Type) = KLEISLI (Star (Prelude m)) Source Comments #

data Updating (a :: k) (b :: KlCat m) s (t :: KlCat m) where Source Comments #

Constructors

Update 

Fields

Instances

Instances details
Monad m => Profunctor (Updating a b :: Type -> KlCat m -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: forall c a0 (b0 :: KlCat m) (d :: KlCat m). (c ~> a0) -> (b0 ~> d) -> Updating a b a0 b0 -> Updating a b c d Source Comments #

(\\) :: forall a0 (b0 :: KlCat m) r. ((Ob a0, Ob b0) => r) -> Updating a b a0 b0 -> r Source Comments #

Monad m => Strong Type (Updating a b :: Type -> KlCat m -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall a0 b0 x (y :: KlCat m). (a0 ~> b0) -> Updating a b x y -> Updating a b (Act a0 x) (Act b0 y) Source Comments #

mupdate :: Monad m => (Updating a ('KL b :: KLEISLI (Star (Prelude m))) a ('KL b :: KLEISLI (Star (Prelude m))) -> Updating a ('KL b :: KLEISLI (Star (Prelude m))) s ('KL t :: KLEISLI (Star (Prelude m)))) -> b -> s -> m t Source Comments #

newtype Replacing a b s t Source Comments #

Constructors

Replace 

Fields

Instances

Instances details
Strong Type (Replacing a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: (a0 ~> b0) -> Replacing a b x y -> Replacing a b (Act a0 x) (Act b0 y) Source Comments #

Strong (COPROD Type) (Replacing a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: COPROD Type) (b0 :: COPROD Type) x y. (a0 ~> b0) -> Replacing a b x y -> Replacing a b (Act a0 x) (Act b0 y) Source Comments #

Profunctor (Replacing a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: (c ~> a0) -> (b0 ~> d) -> Replacing a b a0 b0 -> Replacing a b c d Source Comments #

(\\) :: ((Ob a0, Ob b0) => r) -> Replacing a b a0 b0 -> r Source Comments #

Strong (Type -> Type) (Replacing a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: Type -> Type) (b0 :: Type -> Type) x y. (a0 ~> b0) -> Replacing a b x y -> Replacing a b (Act a0 x) (Act b0 y) Source Comments #

(%~) :: (Replacing a b a b -> Replacing a b s t) -> (a -> b) -> s -> t infixl 8 Source Comments #

newtype Classifying (m :: Type -> Type) (a :: k) b s t Source Comments #

Constructors

Classifying 

Fields

Instances

Instances details
Monad m => Strong (SUBCAT (Algebra m)) (Classifying m a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: SUBCAT (Algebra m)) (b0 :: SUBCAT (Algebra m)) x y. (a0 ~> b0) -> Classifying m a b x y -> Classifying m a b (Act a0 x) (Act b0 y) Source Comments #

Monad m => Profunctor (Classifying m a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: (c ~> a0) -> (b0 ~> d) -> Classifying m a b a0 b0 -> Classifying m a b c d Source Comments #

(\\) :: ((Ob a0, Ob b0) => r) -> Classifying m a b a0 b0 -> r Source Comments #

(.?) :: Monad m => (Classifying m a b a b -> Classifying m a b s t) -> b -> m s -> t infixl 8 Source Comments #

type IsChart m c d = (IsOptic m c d, SymMonoidal m) Source Comments #

data CHART (m :: k) c d Source Comments #

Constructors

CHA c (OPPOSITE d) 

Instances

Instances details
IsChart m c d => CategoryOf (CHART m c d) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type (~>) = ChartCat :: CHART m c d -> CHART m c d -> Type
IsChart m c d => Promonad (ChartCat :: CHART m c d -> CHART m c d -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

id :: forall (a :: CHART m c d). Ob a => ChartCat a a Source Comments #

(.) :: forall (b :: CHART m c d) (c0 :: CHART m c d) (a :: CHART m c d). ChartCat b c0 -> ChartCat a b -> ChartCat a c0 Source Comments #

IsChart m c d => Profunctor (ChartCat :: CHART m c d -> CHART m c d -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: forall (c0 :: CHART m c d) (a :: CHART m c d) (b :: CHART m c d) (d0 :: CHART m c d). (c0 ~> a) -> (b ~> d0) -> ChartCat a b -> ChartCat c0 d0 Source Comments #

(\\) :: forall (a :: CHART m c d) (b :: CHART m c d) r. ((Ob a, Ob b) => r) -> ChartCat a b -> r Source Comments #

type (~>) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type (~>) = ChartCat :: CHART m c d -> CHART m c d -> Type
type Ob (a :: CHART m c d) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type Ob (a :: CHART m c d) = (a ~ ('CHA (ChaL a) (ChaR a) :: CHART m c d), Ob (ChaL a), Ob (ChaR a))

type family ChaL (p :: CHART w c d) :: c where ... Source Comments #

Equations

ChaL ('CHA c2 d2 :: CHART w c1 d1) = c2 

type family ChaR (p :: CHART w c d) :: OPPOSITE d where ... Source Comments #

Equations

ChaR ('CHA c2 d2 :: CHART w c1 d1) = d2 

data ChartCat (ab :: CHART w c d) (st :: CHART w c d) where Source Comments #

Constructors

ChartCat :: forall m c (a :: c) d (t :: d) (s :: c) (b :: d). Optic m a t s b -> ChartCat ('CHA a ('OP b) :: CHART m c d) ('CHA s ('OP t) :: CHART m c d) 

Instances

Instances details
IsChart m c d => Promonad (ChartCat :: CHART m c d -> CHART m c d -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

id :: forall (a :: CHART m c d). Ob a => ChartCat a a Source Comments #

(.) :: forall (b :: CHART m c d) (c0 :: CHART m c d) (a :: CHART m c d). ChartCat b c0 -> ChartCat a b -> ChartCat a c0 Source Comments #

IsChart m c d => Profunctor (ChartCat :: CHART m c d -> CHART m c d -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: forall (c0 :: CHART m c d) (a :: CHART m c d) (b :: CHART m c d) (d0 :: CHART m c d). (c0 ~> a) -> (b ~> d0) -> ChartCat a b -> ChartCat c0 d0 Source Comments #

(\\) :: forall (a :: CHART m c d) (b :: CHART m c d) r. ((Ob a, Ob b) => r) -> ChartCat a b -> r Source Comments #