proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Monoidal.Optic

Documentation

data ExOptic (act :: (m, k) +-> k) (a :: k) (b :: k) (s :: k) (t :: k) where Source Github #

Constructors

ExOptic :: forall {k} {m} {act :: (m, k) +-> k} (x :: m) (s :: k) (t :: k) (a :: k) (b :: k). (Ob a, Ob b, Ob x) => (s ~> Act act x a) -> (Act act x b ~> t) -> ExOptic act a b s t 

Instances

Instances details
MonoidalAction act => Strong (act :: (m, k) +-> k) (ExOptic act a b :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: m) (x :: k) (y :: k). Ob a0 => ExOptic act a b x y -> ExOptic act a b (Act act a0 x) (Act act a0 y) Source Github #

CategoryOf k => Profunctor (ExOptic act a b :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: forall (c :: k) (a0 :: k) (b0 :: k) (d :: k). (c ~> a0) -> (b0 ~> d) -> ExOptic act a b a0 b0 -> ExOptic act a b c d Source Github #

lmap :: forall (c :: k) (a0 :: k) (b0 :: k). (c ~> a0) -> ExOptic act a b a0 b0 -> ExOptic act a b c b0 Source Github #

rmap :: forall (b0 :: k) (d :: k) (a0 :: k). (b0 ~> d) -> ExOptic act a b a0 b0 -> ExOptic act a b a0 d Source Github #

(\\) :: forall (a0 :: k) (b0 :: k) r. ((Ob a0, Ob b0) => r) -> ExOptic act a b a0 b0 -> r Source Github #

ex2prof :: forall {k} {m} {act :: (m, k) +-> k} (a :: k) (b :: k) (s :: k) (t :: k). MonoidalAction act => ExOptic act a b s t -> Optic (Strong act) s t a b Source Github #

prof2ex :: forall {m} {k} {act :: (m, k) +-> k} (a :: k) (b :: k) (s :: k) (t :: k). MonoidalAction act => Optic (Strong act) s t a b -> ExOptic act a b s t Source Github #

toIso :: forall {j} (s :: j) (t :: j) (a :: j) (b :: j). Optic (Strong (Rep (NoAction :: ((), j) +-> j))) s t a b -> Iso s t a b Source Github #

fromIso :: forall {j} (s :: j) (t :: j) (a :: j) (b :: j). Iso s t a b -> Optic (Strong (Rep (NoAction :: ((), j) +-> j))) s t a b Source Github #

type MonoidalOptic (s :: k) (t :: k) (a :: k) (b :: k) = Optic (Strong (Tensor :: k -> (k, k) -> Type)) s t a b Source Github #

mkMonoidal :: forall {k} (m :: k) (a :: k) (b :: k) (s :: k) (t :: k). (Monoidal k, Ob m, Ob a, Ob b) => (s ~> (m ** a)) -> ((m ** b) ~> t) -> MonoidalOptic s t a b Source Github #

_1 :: forall {k} (a :: k) (b :: k) (c :: k). (SymMonoidal k, Ob a, Ob b, Ob c) => MonoidalOptic (a ** c) (b ** c) a b Source Github #

_2 :: forall {k} (a :: k) (b :: k) (c :: k). (SymMonoidal k, Ob a, Ob b, Ob c) => MonoidalOptic (c ** a) (c ** b) a b Source Github #

type Lens (s :: k) (t :: k) (a :: k) (b :: k) = Optic (Strong (ProdAction :: k -> (PROD k, k) -> Type)) s t a b Source Github #

mkLens :: forall {k} (s :: k) (t :: k) (a :: k) (b :: k). (HasProducts k, Ob b) => (s ~> a) -> ((s && b) ~> t) -> Lens s t a b Source Github #

type VLLens s t a b = forall (f :: Type -> Type). Functor f => (a -> f b) -> s -> f t Source Github #

toVLLens :: Lens s t a b -> VLLens s t a b Source Github #

fromVLLens :: VLLens s t a b -> Lens s t a b Source Github #

type Prism (s :: k) (t :: k) (a :: k) (b :: k) = Optic (Strong (CoprodAction :: k -> (COPROD k, k) -> Type)) s t a b Source Github #

mkPrism :: forall {k} (s :: k) (t :: k) (a :: k) (b :: k). (HasCoproducts k, Ob a) => (s ~> (t || a)) -> (b ~> t) -> Prism s t a b Source Github #

type Traversal (s :: j) (t :: j) (a :: j) (b :: j) = Optic (StrongDistributiveProfunctor :: (j +-> j) -> Constraint) s t a b Source Github #

traversing :: forall {j} (t :: j +-> j) (a :: j) (b :: j). (Traversable t, Representable t, Ob a, Ob b) => Traversal (t % a) (t % b) a b Source Github #

toTraversal :: forall {j} (s :: j) (t :: j) (a :: j) (b :: j). Optic (Strong (TravAction :: j -> (TravSub j, j) -> Type)) s t a b -> Traversal s t a b Source Github #

type HaskTraversal (s :: j) (t :: j) (a :: j) (b :: j) = Optic ((StrongDistributiveProfunctor :: (j +-> j) -> Constraint) :&&: (Representable :: (j +-> j) -> Constraint)) s t a b Source Github #

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

Methods

algebra :: m a -> a Source Github #

Instances

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

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

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

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

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

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

type AlgAction (m :: Type -> Type) = SubAction (Algebra m) (Tensor :: Type -> (Type, Type) -> Type) Source Github #

type AlgebraicLens (m :: Type -> Type) s t a b = Optic (Strong (AlgAction m)) s t a b Source Github #

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

data Previewing a b s t where Source Github #

Constructors

Previewing 

Fields

Instances

Instances details
Profunctor (Previewing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: (c ~> a0) -> (b0 ~> d) -> Previewing a b a0 b0 -> Previewing a b c d Source Github #

lmap :: (c ~> a0) -> Previewing a b a0 b0 -> Previewing a b c b0 Source Github #

rmap :: (b0 ~> d) -> Previewing a b a0 b0 -> Previewing a b a0 d Source Github #

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

Strong (CoprodAction :: Type -> (COPROD Type, Type) -> Type) (Previewing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: COPROD Type) x y. Ob a0 => Previewing a b x y -> Previewing a b (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a0 x) (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a0 y) Source Github #

Strong (ProdAction :: Type -> (PROD Type, Type) -> Type) (Previewing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: PROD Type) x y. Ob a0 => Previewing a b x y -> Previewing a b (Act (ProdAction :: Type -> (PROD Type, Type) -> Type) a0 x) (Act (ProdAction :: Type -> (PROD Type, Type) -> Type) a0 y) Source Github #

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

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

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

Constructors

Update 

Fields

Instances

Instances details
Monad m => Strong (Tensor :: KlCat m -> (KlCat m, KlCat m) -> Type) (Updating a b :: KlCat m -> KlCat m -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: KlCat m) (x :: KlCat m) (y :: KlCat m). Ob a0 => Updating a b x y -> Updating a b (Act (Tensor :: KlCat m -> (KlCat m, KlCat m) -> Type) a0 x) (Act (Tensor :: KlCat m -> (KlCat m, KlCat m) -> Type) a0 y) Source Github #

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

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

lmap :: forall (c :: KlCat m) (a0 :: KlCat m) (b0 :: KlCat m). (c ~> a0) -> Updating a b a0 b0 -> Updating a b c b0 Source Github #

rmap :: forall (b0 :: KlCat m) (d :: KlCat m) (a0 :: KlCat m). (b0 ~> d) -> Updating a b a0 b0 -> Updating a b a0 d Source Github #

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

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

newtype Replacing a b s t Source Github #

Constructors

Replace 

Fields

Instances

Instances details
Strong (Tensor :: Type -> (Type, Type) -> Type) (Replacing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: Ob a0 => Replacing a b x y -> Replacing a b (Act (Tensor :: Type -> (Type, Type) -> Type) a0 x) (Act (Tensor :: Type -> (Type, Type) -> Type) a0 y) Source Github #

Profunctor (Replacing a b :: Type -> Type -> Type) Source Github # 
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 Github #

lmap :: (c ~> a0) -> Replacing a b a0 b0 -> Replacing a b c b0 Source Github #

rmap :: (b0 ~> d) -> Replacing a b a0 b0 -> Replacing a b a0 d Source Github #

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

Strong (CoprodAction :: Type -> (COPROD Type, Type) -> Type) (Replacing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: COPROD Type) x y. Ob a0 => Replacing a b x y -> Replacing a b (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a0 x) (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a0 y) Source Github #

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

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: Type -> Type) x y. Ob a0 => Replacing a b x y -> Replacing a b (Act ApplyAction a0 x) (Act ApplyAction a0 y) Source Github #

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

(.~) :: (Replacing a b a b -> Replacing a b s t) -> b -> s -> t infixl 8 Source Github #

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

Constructors

Classifying 

Fields

Instances

Instances details
Monad m => Profunctor (Classifying m a b :: Type -> Type -> Type) Source Github # 
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 Github #

lmap :: (c ~> a0) -> Classifying m a b a0 b0 -> Classifying m a b c b0 Source Github #

rmap :: (b0 ~> d) -> Classifying m a b a0 b0 -> Classifying m a b a0 d Source Github #

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

Monad m => Strong (AlgAction m :: Type -> (SUBCAT (Algebra m), Type) -> Type) (Classifying m a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: SUBCAT (Algebra m)) x y. Ob a0 => Classifying m a b x y -> Classifying m a b (Act (AlgAction m) a0 x) (Act (AlgAction m) a0 y) Source Github #

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

v1Optic :: Traversal (V1 a) (V1 a') a a' Source Github #

u1Optic :: Traversal (U1 a) (U1 a') a a' Source Github #

rec1Optic :: Traversal (f a) (f a') a a' -> Traversal (Rec1 f a) (Rec1 f a') a a' Source Github #

m1Optic :: forall f a a' i (k :: Meta). Traversal (f a) (f a') a a' -> Traversal (M1 i k f a) (M1 i k f a') a a' Source Github #

k1Optic :: Traversal (K1 i k a) (K1 i k a') a a' Source Github #

plusOptic :: Traversal (p a) (p a') a a' -> Traversal (q a) (q a') a a' -> Traversal ((p :+: q) a) ((p :+: q) a') a a' Source Github #

multOptic :: Traversal (p a) (p a') a a' -> Traversal (q a) (q a') a a' -> Traversal ((p :*: q) a) ((p :*: q) a') a a' Source Github #

compOptic :: Traversal (p (q a)) (p (q a')) (q a) (q a') -> Traversal (q a) (q a') a a' -> Traversal ((p :.: q) a) ((p :.: q) a') a a' Source Github #

Orphan instances

Strong act p => Costrong (act :: (m, k1) +-> k1) (Re p s t :: k1 -> k1 -> Type) Source Github # 
Instance details

Methods

coact :: forall (a :: m) (x :: k1) (y :: k1). (Ob a, Ob x, Ob y) => Re p s t (Act act a x) (Act act a y) -> Re p s t x y Source Github #

Costrong act p => Strong (act :: (m, k1) +-> k1) (Re p s t :: k1 -> k1 -> Type) Source Github # 
Instance details

Methods

act :: forall (a :: m) (x :: k1) (y :: k1). Ob a => Re p s t x y -> Re p s t (Act act a x) (Act act a y) Source Github #

Profunctor p => Strong (Rep (NoAction :: ((), k) +-> k) :: k -> ((), k) -> Type) (p :: k +-> k) Source Github # 
Instance details

Methods

act :: forall (a :: ()) (x :: k) (y :: k). Ob a => p x y -> p (Act (Rep (NoAction :: ((), k) +-> k)) a x) (Act (Rep (NoAction :: ((), k) +-> k)) a y) Source Github #

InvertableOptic (Costrong t :: (k +-> k) -> Constraint) (Strong t :: (k +-> k) -> Constraint) Source Github # 
Instance details

InvertableOptic (Strong t :: (k +-> k) -> Constraint) (Costrong t :: (k +-> k) -> Constraint) Source Github # 
Instance details

StrongDistributiveProfunctor p => Strong (TravAction :: k -> (TravSub k, k) -> Type) (p :: k +-> k) Source Github # 
Instance details

Methods

act :: forall (a :: TravSub k) (x :: k) (y :: k). Ob a => p x y -> p (Act (TravAction :: k -> (TravSub k, k) -> Type) a x) (Act (TravAction :: k -> (TravSub k, k) -> Type) a y) Source Github #

Strong (CoprodAction :: Type -> (COPROD Type, Type) -> Type) (Rep (Constant (First c)) :: Type -> Type -> Type) Source Github # 
Instance details

Methods

act :: forall (a :: COPROD Type) x y. Ob a => Rep (Constant (First c)) x y -> Rep (Constant (First c)) (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a x) (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a y) Source Github #

(Cartesian k, Ob c) => Strong (ProdAction :: k -> (PROD k, k) -> Type) (Rep (Constant c) :: k -> k -> Type) Source Github # 
Instance details

Methods

act :: forall (a :: PROD k) (x :: k) (y :: k). Ob a => Rep (Constant c) x y -> Rep (Constant c) (Act (ProdAction :: k -> (PROD k, k) -> Type) a x) (Act (ProdAction :: k -> (PROD k, k) -> Type) a y) Source Github #