Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Setter s t a b = forall p. IsSetter p => Optic p s t a b
- type Setter' s a = Setter s s a a
- class (IsTraversal p, Mapping p) => IsSetter p
- sets :: ((a -> b) -> s -> t) -> Setter s t a b
- mapped :: Functor f => Setter (f a) (f b) a b
- contramapped :: 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 Source #
Construction
contramapped :: Contravariant f => Setter (f a) (f b) b a Source #
Elimination
(/~) :: Fractional a => Setter s t a a -> a -> s -> t infixr 4 Source #