module Data.Set.Optics
( setmapped
, setOf
) where
import Data.Set (Set)
import qualified Data.Set as Set
import Optics.Fold
import Optics.Optic
import Optics.Setter
setmapped :: Ord b => Setter (Set a) (Set b) a b
setmapped :: forall b a. Ord b => Setter (Set a) (Set b) a b
setmapped = forall a b s t. ((a -> b) -> s -> t) -> Setter s t a b
sets forall b a. Ord b => (a -> b) -> Set a -> Set b
Set.map
{-# INLINE setmapped #-}
setOf :: (Is k A_Fold, Ord a) => Optic' k is s a -> s -> Set a
setOf :: forall k a (is :: IxList) s.
(Is k A_Fold, Ord a) =>
Optic' k is s a -> s -> Set a
setOf Optic' k is s a
l = forall k m (is :: IxList) s a.
(Is k A_Fold, Monoid m) =>
Optic' k is s a -> (a -> m) -> s -> m
foldMapOf Optic' k is s a
l forall a. a -> Set a
Set.singleton
{-# INLINE setOf #-}