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. dimap :: Profunctor p => (a -> b) -> (c -> d) -> p b c -> p a d

    diagrams-lib Diagrams.Prelude

    Map over both arguments at the same time.

    dimap f g ≡ lmap f . rmap g
    

  2. dimapping :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) s t a b s' t' a' b' . (Profunctor p, Profunctor q) => AnIso s t a b -> AnIso s' t' a' b' -> Iso (p a s') (q b t') (p s a') (q t b')

    diagrams-lib Diagrams.Prelude

    Lift two Isos into both arguments of a Profunctor simultaneously.

    dimapping :: Profunctor p => Iso s t a b -> Iso s' t' a' b' -> Iso (p a s') (p b t') (p s a') (p t b')
    dimapping :: Profunctor p => Iso' s a -> Iso' s' a' -> Iso' (p a s') (p s a')
    

  3. foldMapBy :: Foldable t => (r -> r -> r) -> r -> (a -> r) -> t a -> r

    diagrams-lib Diagrams.Prelude

    Fold a value using its Foldable instance using explicitly provided Monoid operations. This is like foldMap where the Monoid instance can be manually specified.

    foldMapBy mappend memptyfoldMap
    
    >>> foldMapBy (+) 0 length ["hello","world"]
    10
    

  4. foldMapByOf :: Fold s a -> (r -> r -> r) -> r -> (a -> r) -> s -> r

    diagrams-lib Diagrams.Prelude

    Fold a value using a specified Fold and Monoid operations. This is like foldMapBy where the Foldable instance can be manually specified.

    foldMapByOf foldedfoldMapBy
    
    foldMapByOf :: Getter s a     -> (r -> r -> r) -> r -> (a -> r) -> s -> r
    foldMapByOf :: Fold s a       -> (r -> r -> r) -> r -> (a -> r) -> s -> r
    foldMapByOf :: Traversal' s a -> (r -> r -> r) -> r -> (a -> r) -> s -> r
    foldMapByOf :: Lens' s a      -> (r -> r -> r) -> r -> (a -> r) -> s -> r
    foldMapByOf :: Iso' s a       -> (r -> r -> r) -> r -> (a -> r) -> s -> r
    
    >>> foldMapByOf both (+) 0 length ("hello","world")
    10
    

  5. foldMapOf :: Getting r s a -> (a -> r) -> s -> r

    diagrams-lib Diagrams.Prelude

    Map each part of a structure viewed through a Lens, Getter, Fold or Traversal to a monoid and combine the results.

    >>> foldMapOf (folded . both . _Just) Sum [(Just 21, Just 21)]
    Sum {getSum = 42}
    
    foldMap = foldMapOf folded
    
    foldMapOfviews
    ifoldMapOf l = foldMapOf l . Indexed
    
    foldMapOf ::                Getter s a      -> (a -> r) -> s -> r
    foldMapOf :: Monoid r    => Fold s a        -> (a -> r) -> s -> r
    foldMapOf :: Semigroup r => Fold1 s a       -> (a -> r) -> s -> r
    foldMapOf ::                Lens' s a       -> (a -> r) -> s -> r
    foldMapOf ::                Iso' s a        -> (a -> r) -> s -> r
    foldMapOf :: Monoid r    => Traversal' s a  -> (a -> r) -> s -> r
    foldMapOf :: Semigroup r => Traversal1' s a -> (a -> r) -> s -> r
    foldMapOf :: Monoid r    => Prism' s a      -> (a -> r) -> s -> r
    
    foldMapOf :: Getting r s a -> (a -> r) -> s -> r
    

  6. iconcatMap :: FoldableWithIndex i f => (i -> a -> [b]) -> f a -> [b]

    diagrams-lib Diagrams.Prelude

    Concatenate the results of a function of the elements of an indexed container with access to the index. When you don't need access to the index then concatMap is more flexible in what it accepts.

    concatMapiconcatMap . const
    iconcatMapifoldMap
    

  7. iconcatMapOf :: IndexedGetting i [r] s a -> (i -> a -> [r]) -> s -> [r]

    diagrams-lib Diagrams.Prelude

    Concatenate the results of a function of the elements of an IndexedFold or IndexedTraversal with access to the index. When you don't need access to the index then concatMapOf is more flexible in what it accepts.

    concatMapOf l ≡ iconcatMapOf l . const
    iconcatMapOfifoldMapOf
    
    iconcatMapOf :: IndexedGetter i s a     -> (i -> a -> [r]) -> s -> [r]
    iconcatMapOf :: IndexedFold i s a       -> (i -> a -> [r]) -> s -> [r]
    iconcatMapOf :: IndexedLens' i s a      -> (i -> a -> [r]) -> s -> [r]
    iconcatMapOf :: IndexedTraversal' i s a -> (i -> a -> [r]) -> s -> [r]
    

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

    diagrams-lib Diagrams.Prelude

    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
    

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

    diagrams-lib Diagrams.Prelude

    A variant of ifoldMap that is strict in the accumulator. When you don't need access to the index then foldMap' is more flexible in what it accepts.

    foldMap'ifoldMap' . const
    

  10. ifoldMapBy :: FoldableWithIndex i t => (r -> r -> r) -> r -> (i -> a -> r) -> t a -> r

    diagrams-lib Diagrams.Prelude

    No documentation available.

Page 500 of many | Previous | Next