proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Monoidal.Optic

Documentation

data ExOptic m (a :: c) (b :: d) (s :: c) (t :: d) where Source Github #

Constructors

ExOptic :: 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) -> ExOptic m a b s t 

Instances

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

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

(CategoryOf c, CategoryOf d) => Profunctor (ExOptic m a b :: d -> c -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: forall (c0 :: d) (a0 :: d) (b0 :: c) (d0 :: c). (c0 ~> a0) -> (b0 ~> d0) -> ExOptic m a b a0 b0 -> ExOptic m a b c0 d0 Source Github #

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

ex2prof :: forall {c} {d} m (a :: c) (b :: d) (s :: c) (t :: d). (CategoryOf c, CategoryOf d) => ExOptic m a b s t -> Optic (Strong m :: (d +-> c) -> Constraint) s t a b Source Github #

prof2ex :: forall {c} {d} m (a :: c) (b :: d) (s :: c) (t :: d). (IsOptic m c d, Ob a, Ob b) => Optic (Strong m :: (d +-> c) -> Constraint) s t a b -> ExOptic m a b s t Source Github #

type MonoidalOptic (s :: k) (t :: k) (a :: k) (b :: k) = Optic (Strong (SUBCAT (Any :: k -> Constraint)) :: (k +-> k) -> Constraint) 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 (PROD k) :: (k +-> k) -> Constraint) 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 Prism (s :: k) (t :: j) (a :: k) (b :: j) = Optic (Strong (COPROD k) :: (j +-> k) -> Constraint) 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 HaskTraversal (s :: k) (t :: j) (a :: k) (b :: j) = Optic (Strong (SUBCAT Traversable) :: (j +-> k) -> Constraint) 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 #

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 AlgebraicLens (m :: Type -> Type) (s :: k) (t :: j) (a :: k) (b :: j) = Optic (Strong (SUBCAT (Algebra m)) :: (j +-> k) -> Constraint) 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
Strong Type (Previewing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

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

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

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 #

(\\) :: ((Ob a0, Ob b0) => r) -> Previewing a b a0 b0 -> r 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 :: k) (b :: KlCat m) s (t :: KlCat m) where Source Github #

Constructors

Update 

Fields

Instances

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

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

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

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 Github #

newtype Replacing a b s t Source Github #

Constructors

Replace 

Fields

Instances

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

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

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

Strong (Type -> Type) (Replacing a b :: Type -> Type -> Type) Source Github # 
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 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 => Strong (SUBCAT (Algebra m)) (Classifying m a b :: Type -> Type -> Type) Source Github # 
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 Github #

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 #

(\\) :: ((Ob a0, Ob b0) => r) -> Classifying m a b a0 b0 -> r 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

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

Methods

act :: forall (a :: k) (b :: k) (x :: k) (y :: k). (a ~> b) -> Rep (Constant c) x y -> Rep (Constant c) (Act a x) (Act b y) Source Github #

Strong m p => Costrong m (Re p s t :: d -> c -> Type) Source Github # 
Instance details

Methods

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

Costrong m p => Strong m (Re p s t :: d -> c -> Type) Source Github # 
Instance details

Methods

act :: forall (a :: m) (b :: m) (x :: d) (y :: c). (a ~> b) -> Re p s t x y -> Re p s t (Act a x) (Act b y) Source Github #

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

Methods

act :: forall (a :: COPROD Type) (b :: COPROD Type) x y. (a ~> b) -> Rep (Constant (First c)) x y -> Rep (Constant (First c)) (Act a x) (Act b y) Source Github #

(Cartesian k, Ob c, Strong (SUBCAT (Any :: k -> Constraint)) ((~>) :: CAT k)) => Strong (SUBCAT (Any :: k -> Constraint)) (Rep (Constant c) :: k -> k -> Type) Source Github # 
Instance details

Methods

act :: forall (a :: SUBCAT (Any :: k -> Constraint)) (b :: SUBCAT (Any :: k -> Constraint)) (x :: k) (y :: k). (a ~> b) -> Rep (Constant c) x y -> Rep (Constant c) (Act a x) (Act b y) Source Github #

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

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