HORIZON HASKELLDocslts/ghc-9.14.x6d5fdfd2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 6d5fdfd · 2026-10-12

Moduleoptics-core-0.4.2Haskell2010

Data.IntSet.Optics

This module defines optics for constructing and manipulating finite IntSets.

Synopsis
  • Packageoptics-core-0.4.2
  • Exports3
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceOptics.hs

IntSet isn't Foldable, but this Fold can be used to access the members of an IntSet.

Example1 expression
sumOf members $ setOf folded [1,2,3,4]10
valuesetOf :: Is k A_Fold => Optic' k is s Int -> s -> IntSet

Construct an IntSet from a fold.

Example1 expression
setOf folded [1,2,3,4]fromList [1,2,3,4]
Example1 expression
setOf (folded % _2) [("hello",1),("world",2),("!!!",3)]fromList [1,2,3]