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.
class GMap1 Default Incoherent arr Rep x Rep y =>
GMultimap arr x ygeneric-functor Generic.Functor.Internal Constraint for gmultimap.
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 ())
class
Multimap I Default Incoherent arr x y => Multimap arr x ygeneric-functor Generic.Functor.Internal Constraint for multimap.
coerceBifoldMap :: Coercible t u => (am -> bm -> t -> m) -> am -> bm -> u -> mgeneric-functor Generic.Functor.Internal No documentation available.
coerceFoldMap :: Coercible t u => (am -> t -> m) -> am -> u -> mgeneric-functor Generic.Functor.Internal No documentation available.
gbifoldMap :: forall t m a b . (GBifoldMap m t, Monoid m) => (a -> m) -> (b -> m) -> t a b -> mgeneric-functor Generic.Functor.Internal Generic implementation of bifoldMap from Bifoldable.
gbimap :: GBimap f => (a -> b) -> (c -> d) -> f a c -> f b dgeneric-functor Generic.Functor.Internal Generic implementation of bimap from Bifunctor. See also GenericBifunctor.
gfmap :: GFunctor f => (a -> b) -> f a -> f bgeneric-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 = gfmapUnlike gsolomap, gfmap is safe to use in all contexts.gfoldMap :: forall t m a . (GFoldMap m t, Monoid m) => (a -> m) -> t a -> mgeneric-functor Generic.Functor.Internal gfoldMapRep :: (GFoldMap1 m arr f f, Monoid m) => arr -> f () -> mgeneric-functor Generic.Functor.Internal Danger! GFoldMap1 m arr f f MUST come from a quantified constraint (see use in gfoldMap).