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.

  1. gmap :: forall c t . (ADT t, Constraints t c) => (forall s . c s => s -> s) -> t -> t

    one-liner Generics.OneLiner

    Map over a structure, updating each component. gmap is generic specialized to (->).

  2. gmap1 :: forall c t a b . (ADT1 t, Constraints1 t c) => (forall d e (s :: Type -> Type) . c s => (d -> e) -> s d -> s e) -> (a -> b) -> t a -> t b

    one-liner Generics.OneLiner

    fmap = gmap1 @Functor fmap
    
    gmap1 is generic1 specialized to (->).

  3. glmap :: forall c t t' . (ADT t t', Constraints t t' c) => (forall s s' . c s s' => s % 1 -> s') -> t % 1 -> t'

    one-liner Generics.OneLiner.Binary

    Map over a structure linearly, updating each component. glmap is generic specialized to the linear arrow.

  4. glmap1 :: forall c t t' a b . (ADT1 t t', Constraints1 t t' c) => (forall d e (s :: Type -> Type) (s' :: Type -> Type) . c s s' => (d % 1 -> e) -> s d % 1 -> s' e) -> (a % 1 -> b) -> t a % 1 -> t' b

    one-liner Generics.OneLiner.Binary

    glmap1 is generic1 specialized to the linear arrow.

  5. gmap :: forall c t t' . (ADT t t', Constraints t t' c) => (forall s s' . c s s' => s -> s') -> t -> t'

    one-liner Generics.OneLiner.Binary

    Map over a structure, updating each component. gmap is generic specialized to (->).

  6. gmap1 :: forall c t t' a b . (ADT1 t t', Constraints1 t t' c) => (forall d e (s :: Type -> Type) (s' :: Type -> Type) . c s s' => (d -> e) -> s d -> s' e) -> (a -> b) -> t a -> t' b

    one-liner Generics.OneLiner.Binary

    gmap1 is generic1 specialized to (->).

  7. dimapForget :: Profunctor p => (a % 1 -> b) -> (c % 1 -> d) -> p b c -> p a d

    one-liner Generics.OneLiner.Classes

    No documentation available.

  8. toMapOf :: forall k (is :: IxList) i s a . (Is k A_Fold, HasSingleIndex is i, Eq i, Hashable i) => Optic' k is s a -> s -> HashMap i a

    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")]
    

  9. setmapped :: (Eq b, Hashable b) => Setter (HashSet a) (HashSet b) a b

    optics-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]
    

  10. ifoldMap :: (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m

    optics-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.

    foldMapifoldMap . const
    

Page 996 of many | Previous | Next