Hoogle Search

Within LTS Haskell 24.46 (ghc-9.10.3)

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

  1. class GMap1 Default Incoherent arr Rep x Rep y => GMultimap arr x y

    generic-functor Generic.Functor.Internal

    Constraint for gmultimap.

  2. class GMultimapK (m :: Type -> Type) arr (f :: Type -> Type) (g :: Type -> Type)

    generic-functor Generic.Functor.Internal

    We use the same class to implement all of fmap, foldMap, traverse, instantiating m as Identity, 'Const (EndoM mm)' and 'Aps n' respectively. Those three cases differ in their instances for K1. (the K stands for Kleisli, because the result is Kleisli m (f ()) (g ())

  3. class MultimapI Default Incoherent arr x y => Multimap arr x y

    generic-functor Generic.Functor.Internal

    Constraint for multimap.

  4. coerceBifoldMap :: Coercible t u => (am -> bm -> t -> m) -> am -> bm -> u -> m

    generic-functor Generic.Functor.Internal

    No documentation available.

  5. coerceFoldMap :: Coercible t u => (am -> t -> m) -> am -> u -> m

    generic-functor Generic.Functor.Internal

    No documentation available.

  6. gbifoldMap :: forall t m a b . (GBifoldMap m t, Monoid m) => (a -> m) -> (b -> m) -> t a b -> m

    generic-functor Generic.Functor.Internal

    Generic implementation of bifoldMap from Bifoldable.

  7. gbimap :: GBimap f => (a -> b) -> (c -> d) -> f a c -> f b d

    generic-functor Generic.Functor.Internal

    Generic implementation of bimap from Bifunctor. See also GenericBifunctor.

  8. gfmap :: GFunctor f => (a -> b) -> f a -> f b

    generic-functor Generic.Functor.Internal

    Generic implementation of fmap. See also GenericFunctor for DerivingVia, using gfmap under the hood.

    Example

    {-# LANGUAGE DeriveGeneric #-}
    
    import GHC.Generics (Generic)
    import Generic.Functor (gfmap)
    
    data Twice a = Twice (Either a a)
    deriving Generic
    
    instance Functor Twice where
    fmap = gfmap
    
    Unlike gsolomap, gfmap is safe to use in all contexts.

  9. gfoldMap :: forall t m a . (GFoldMap m t, Monoid m) => (a -> m) -> t a -> m

    generic-functor Generic.Functor.Internal

    Generic implementation of foldMap from Foldable.

  10. gfoldMapRep :: (GFoldMap1 m arr f f, Monoid m) => arr -> f () -> m

    generic-functor Generic.Functor.Internal

    Danger! GFoldMap1 m arr f f MUST come from a quantified constraint (see use in gfoldMap).

Page 1160 of many | Previous | Next