| Copyright | (C) 2012-16 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.HashSet.Lens
Description
Synopsis
- setmapped :: (Eq j, Hashable j) => IndexPreservingSetter (HashSet i) (HashSet j) i j
- setOf :: Hashable a => Getting (HashSet a) s a -> s -> HashSet a
- hashMap :: forall a p f. (Profunctor p, Functor f) => p (HashMap a ()) (f (HashMap a ())) -> p (HashSet a) (f (HashSet a))
Documentation
setmapped :: (Eq j, Hashable j) => IndexPreservingSetter (HashSet i) (HashSet j) i j Source #
setOf :: Hashable a => Getting (HashSet a) s a -> s -> HashSet a Source #
Construct a set from a Getter, Fold, Traversal, Lens or Iso.
setOf::Hashablea =>Getters a -> s ->HashSetasetOf:: (Eqa,Hashablea) =>Folds a -> s ->HashSetasetOf::Hashablea =>Iso's a -> s ->HashSetasetOf::Hashablea =>Lens's a -> s ->HashSetasetOf:: (Eqa,Hashablea) =>Traversal's a -> s ->HashSeta
hashMap :: forall a p f. (Profunctor p, Functor f) => p (HashMap a ()) (f (HashMap a ())) -> p (HashSet a) (f (HashSet a)) Source #
An Iso between a HashSet and a HashMap with unit values. \(\mathcal{O}(1)\).