module Data.IntSet.Optics
( members
, setmapped
, setOf
) where
import Data.IntSet (IntSet)
import qualified Data.IntSet as IntSet
import Optics.Fold
import Optics.Optic
import Optics.Setter
members :: Fold IntSet Int
members :: Fold IntSet Int
members = forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
folding IntSet -> [Int]
IntSet.toAscList
{-# INLINE members #-}
setmapped :: Setter' IntSet Int
setmapped :: Setter' IntSet Int
setmapped = forall a b s t. ((a -> b) -> s -> t) -> Setter s t a b
sets (Int -> Int) -> IntSet -> IntSet
IntSet.map
{-# INLINE setmapped #-}
setOf :: Is k A_Fold => Optic' k is s Int -> s -> IntSet
setOf :: forall k (is :: IxList) s.
Is k A_Fold =>
Optic' k is s Int -> s -> IntSet
setOf Optic' k is s Int
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 Int
l Int -> IntSet
IntSet.singleton
{-# INLINE setOf #-}