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

Fresnel.Setter

Synopsis

Setters

type Setter s t a b = forall (p :: Type -> Type -> Type). IsSetter p => Optic p s t a b Source #

type Setter' s a = Setter s s a a Source #

class (IsTraversal p, Mapping p) => IsSetter (p :: Type -> Type -> Type) Source #

Instances

Instances details
IsSetter (->) Source # 
Instance details

Defined in Fresnel.Setter

Construction

sets :: ((a -> b) -> s -> t) -> Setter s t a b Source #

mapped :: forall (f :: Type -> Type) a b. Functor f => Setter (f a) (f b) a b Source #

contramapped :: forall (f :: Type -> Type) a b. Contravariant f => Setter (f a) (f b) b a Source #

Elimination

over :: Setter s t a b -> (a -> b) -> s -> t Source #

(%~) :: Setter s t a b -> (a -> b) -> s -> t infixr 4 Source #

set :: Setter s t a b -> b -> s -> t Source #

(.~) :: Setter s t a b -> b -> s -> t infixr 4 Source #

(+~) :: Num a => Setter s t a a -> a -> s -> t infixr 4 Source #

(-~) :: Num a => Setter s t a a -> a -> s -> t infixr 4 Source #

(*~) :: Num a => Setter s t a a -> a -> s -> t infixr 4 Source #

(/~) :: Fractional a => Setter s t a a -> a -> s -> t infixr 4 Source #

(^~) :: (Num a, Integral b) => Setter s t a a -> b -> s -> t infixr 4 Source #

(^^~) :: (Fractional a, Integral b) => Setter s t a a -> b -> s -> t infixr 4 Source #

(**~) :: Floating a => Setter s t a a -> a -> s -> t infixr 4 Source #