fresnel-0.0.0.0: high-powered optics in a small package
Safe HaskellNone
LanguageHaskell2010

Fresnel.OptionalFold

Synopsis

Optional folds

type OptionalFold s a = forall p. IsOptionalFold p => Optic' p s a Source #

class (IsOptional p, IsGetter p) => IsOptionalFold p Source #

Instances

Instances details
(Traversable f, Contravariant f) => IsOptionalFold (OptionalStar f) Source # 
Instance details

Defined in Fresnel.OptionalFold.Internal

Monoid r => IsOptionalFold (Forget r :: Type -> Type -> Type) Source # 
Instance details

Defined in Fresnel.OptionalFold.Internal

(Applicative f, Traversable f, Contravariant f) => IsOptionalFold (Star f) Source # 
Instance details

Defined in Fresnel.OptionalFold.Internal

Construction

folding :: (s -> Maybe a) -> OptionalFold s a Source #

filtered :: (a -> Bool) -> OptionalFold a a Source #

Elimination

is :: OptionalFold s a -> s -> Bool Source #

isn't :: OptionalFold s a -> s -> Bool Source #

traverseOf_ :: Functor f => OptionalFold s a -> (forall x. x -> f x) -> (a -> f u) -> s -> f () Source #

newtype Failover s a Source #

Constructors

Failover 

Fields

Instances

Instances details
Semigroup (Failover s a) Source # 
Instance details

Defined in Fresnel.OptionalFold

Methods

(<>) :: Failover s a -> Failover s a -> Failover s a #

sconcat :: NonEmpty (Failover s a) -> Failover s a #

stimes :: Integral b => b -> Failover s a -> Failover s a #