Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Setter s t a b = forall (p :: Type -> Type -> Type). IsSetter p => Optic p s t a b
- type Setter' s a = Setter s s a a
- class (IsTraversal p, Mapping p) => IsSetter (p :: Type -> Type -> Type)
- sets :: ((a -> b) -> s -> t) -> Setter s t a b
- mapped :: forall (f :: Type -> Type) a b. Functor f => Setter (f a) (f b) a b
- contramapped :: forall (f :: Type -> Type) a b. Contravariant f => Setter (f a) (f b) b a
- over :: Setter s t a b -> (a -> b) -> s -> t
- (%~) :: Setter s t a b -> (a -> b) -> s -> t
- set :: Setter s t a b -> b -> s -> t
- (.~) :: Setter s t a b -> b -> s -> t
- (+~) :: Num a => Setter s t a a -> a -> s -> t
- (-~) :: Num a => Setter s t a a -> a -> s -> t
- (*~) :: Num a => Setter s t a a -> a -> s -> t
- (/~) :: Fractional a => Setter s t a a -> a -> s -> t
- (^~) :: (Num a, Integral b) => Setter s t a a -> b -> s -> t
- (^^~) :: (Fractional a, Integral b) => Setter s t a a -> b -> s -> t
- (**~) :: Floating a => Setter s t a a -> a -> s -> t
Setters
class (IsTraversal p, Mapping p) => IsSetter (p :: Type -> Type -> Type) Source #
Instances
IsSetter (->) Source # | |
Defined in Fresnel.Setter |
Construction
contramapped :: forall (f :: Type -> Type) a b. Contravariant f => Setter (f a) (f b) b a Source #
Elimination
(/~) :: Fractional a => Setter s t a a -> a -> s -> t infixr 4 Source #