Hoogle Search

Within LTS Haskell 24.45 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. gfoldMap :: forall c t m . (ADT t, Constraints t c, Monoid m) => (forall s . c s => s -> m) -> t -> m

    one-liner Generics.OneLiner

    Map each component of a structure to a monoid, and combine the results. If you have a class Size, which measures the size of a structure, then this could be the default implementation:

    size = succ . getSum . gfoldMap @Size (Sum . size)
    
    gfoldMap is gtraverse specialized to Const.

  2. gfoldMap1 :: forall c t m a . (ADT1 t, Constraints1 t c, Monoid m) => (forall (s :: Type -> Type) b . c s => (b -> m) -> s b -> m) -> (a -> m) -> t a -> m

    one-liner Generics.OneLiner

    foldMap = gfoldMap1 @Foldable foldMap
    
    gfoldMap1 is gtraverse1 specialized to Const.

  3. glfoldMap :: forall c t m . (ADT t, Constraints t c, Monoid m) => (forall s . c s => s % 1 -> m) -> t % 1 -> m

    one-liner Generics.OneLiner

    Map each component of a structure to a linear monoid, and combine the results. For example. this could be the default implementation of Consumable:

    consume = glfoldMap @Consumable consume
    
    glfoldMap is gltraverse specialized to Const.

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

    one-liner Generics.OneLiner

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

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

    one-liner Generics.OneLiner

    fmap = gmap1 @Functor fmap
    
    glmap1 is generic1 specialized to the linear arrow.

  6. 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 (->).

  7. 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 (->).

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

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

  10. 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 (->).

Page 997 of many | Previous | Next