Hoogle Search
Within LTS Haskell 24.40 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
gmap :: forall c t . (ADT t, Constraints t c) => (forall s . c s => s -> s) -> t -> tone-liner Generics.OneLiner Map over a structure, updating each component. gmap is generic specialized to (->).
-
one-liner Generics.OneLiner fmap = gmap1 @Functor fmap
gmap1 is generic1 specialized to (->). -
one-liner Generics.OneLiner.Binary Map over a structure linearly, updating each component. glmap is generic specialized to the linear arrow.
-
one-liner Generics.OneLiner.Binary -
one-liner Generics.OneLiner.Binary Map over a structure, updating each component. gmap is generic specialized to (->).
-
one-liner Generics.OneLiner.Binary dimapForget :: Profunctor p => (a % 1 -> b) -> (c % 1 -> d) -> p b c -> p a done-liner Generics.OneLiner.Classes No documentation available.
-
optics-extra Data.HashMap.Optics Construct a hash map from an IxFold. The construction is left-biased (see union), i.e. the first occurrences of keys in the fold or traversal order are preferred.
>>> toMapOf ifolded ["hello", "world"] fromList [(0,"hello"),(1,"world")]
>>> toMapOf (folded % ifolded) [('a',"alpha"),('b', "beta")] fromList [('a',"alpha"),('b',"beta")]>>> toMapOf (folded % ifolded) [('a', "hello"), ('b', "world"), ('a', "dummy")] fromList [('a',"hello"),('b',"world")] setmapped :: (Eq b, Hashable b) => Setter (HashSet a) (HashSet b) a boptics-extra Data.HashSet.Optics This Setter can be used to change the type of a HashSet by mapping the elements to new values. Sadly, you can't create a valid Traversal for a HashSet, but you can manipulate it by reading using folded and reindexing it via setmapped.
>>> over setmapped (+1) (HashSet.fromList [1,2,3,4]) fromList [2,3,4,5]
ifoldMap :: (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> moptics-extra Optics.Indexed Fold a container by mapping value to an arbitrary Monoid with access to the index i. When you don't need access to the index then foldMap is more flexible in what it accepts.
foldMap ≡ ifoldMap . const