HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleoptics-extra-0.4.2.1Haskell2010

Data.HashSet.Optics

This module defines optics for constructing and manipulating finite HashSets.

  • 2 values
valuesetOf
  1. :: (Is k A_Fold, Eq a, Hashable a)
  2. => Optic' k is s a
  3. -> s
  4. -> HashSet a
#

Construct a HashSet from a fold.

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