Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype OptionalStar f a b = OptionalStar {
- withOptionalStar :: forall r. ((forall x. x -> f x) -> (a -> f b) -> r) -> r
- optionalStar :: (forall x. x -> f x) -> (a -> f b) -> OptionalStar f a b
- runOptionalStar :: OptionalStar f a b -> a -> f b
- mapOptionalStar :: ((a -> f b) -> c -> f d) -> OptionalStar f a b -> OptionalStar f c d
Optional star profunctors
newtype OptionalStar f a b Source #
OptionalStar | |
|
Instances
Contravariant f => Bicontravariant (OptionalStar f) Source # | |
Defined in Fresnel.Profunctor.OptionalStar contrabimap :: (a' -> a) -> (b' -> b) -> OptionalStar f a b -> OptionalStar f a' b' Source # | |
(Contravariant f, Traversable f) => IsGetter (OptionalStar f) Source # | |
Defined in Fresnel.Getter.Internal | |
Functor f => IsIso (OptionalStar f) Source # | |
Defined in Fresnel.Iso.Internal | |
Functor f => IsLens (OptionalStar f) Source # | |
Defined in Fresnel.Lens.Internal | |
Functor f => IsOptional (OptionalStar f) Source # | |
Defined in Fresnel.Optional.Internal | |
(Traversable f, Contravariant f) => IsOptionalFold (OptionalStar f) Source # | |
Defined in Fresnel.OptionalFold.Internal | |
Functor f => IsPrism (OptionalStar f) Source # | |
Defined in Fresnel.Prism.Internal | |
Functor f => Choice (OptionalStar f) Source # | |
Defined in Fresnel.Profunctor.OptionalStar left' :: OptionalStar f a b -> OptionalStar f (Either a c) (Either b c) right' :: OptionalStar f a b -> OptionalStar f (Either c a) (Either c b) | |
Traversable f => Cochoice (OptionalStar f) Source # | |
Defined in Fresnel.Profunctor.OptionalStar unleft :: OptionalStar f (Either a d) (Either b d) -> OptionalStar f a b unright :: OptionalStar f (Either d a) (Either d b) -> OptionalStar f a b | |
Functor f => Strong (OptionalStar f) Source # | |
Defined in Fresnel.Profunctor.OptionalStar first' :: OptionalStar f a b -> OptionalStar f (a, c) (b, c) second' :: OptionalStar f a b -> OptionalStar f (c, a) (c, b) | |
Functor f => Profunctor (OptionalStar f) Source # | |
Defined in Fresnel.Profunctor.OptionalStar dimap :: (a -> b) -> (c -> d) -> OptionalStar f b c -> OptionalStar f a d lmap :: (a -> b) -> OptionalStar f b c -> OptionalStar f a c rmap :: (b -> c) -> OptionalStar f a b -> OptionalStar f a c (#.) :: forall a b c q. Coercible c b => q b c -> OptionalStar f a b -> OptionalStar f a c (.#) :: forall a b c q. Coercible b a => OptionalStar f b c -> q a b -> OptionalStar f a c |
Construction
optionalStar :: (forall x. x -> f x) -> (a -> f b) -> OptionalStar f a b Source #
Elimination
runOptionalStar :: OptionalStar f a b -> a -> f b Source #
Computation
mapOptionalStar :: ((a -> f b) -> c -> f d) -> OptionalStar f a b -> OptionalStar f c d Source #