Hoogle Search

Within LTS Haskell 24.35 (ghc-9.10.3)

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

  1. bimapping :: forall (f :: Type -> Type -> Type) (g :: Type -> Type -> Type) s t a b s' t' a' b' . (Bifunctor f, Bifunctor g) => AnIso s t a b -> AnIso s' t' a' b' -> Iso (f s s') (g t t') (f a a') (g b b')

    lens Control.Lens.Iso

    Lift two Isos into both arguments of a Bifunctor.

    bimapping :: Bifunctor p => Iso s t a b -> Iso s' t' a' b' -> Iso (p s s') (p t t') (p a a') (p b b')
    bimapping :: Bifunctor p => Iso' s a -> Iso' s' a' -> Iso' (p s s') (p a a')
    

  2. contramapping :: forall (f :: Type -> Type) s t a b . Contravariant f => AnIso s t a b -> Iso (f a) (f b) (f s) (f t)

    lens Control.Lens.Iso

    Lift an Iso into a Contravariant functor.

    contramapping :: Contravariant f => Iso s t a b -> Iso (f a) (f b) (f s) (f t)
    contramapping :: Contravariant f => Iso' s a -> Iso' (f a) (f s)
    

  3. dimap :: Profunctor p => (a -> b) -> (c -> d) -> p b c -> p a d

    lens Control.Lens.Iso

    Map over both arguments at the same time.

    dimap f g ≡ lmap f . rmap g
    

  4. 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')

    lens Control.Lens.Iso

    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')
    

  5. lmap :: Profunctor p => (a -> b) -> p b c -> p a c

    lens Control.Lens.Iso

    Map the first argument contravariantly.

    lmap f ≡ dimap f id
    

  6. lmapping :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) s t a b x y . (Profunctor p, Profunctor q) => AnIso s t a b -> Iso (p a x) (q b y) (p s x) (q t y)

    lens Control.Lens.Iso

    Lift an Iso contravariantly into the left argument of a Profunctor.

    lmapping :: Profunctor p => Iso s t a b -> Iso (p a x) (p b y) (p s x) (p t y)
    lmapping :: Profunctor p => Iso' s a -> Iso' (p a x) (p s x)
    

  7. rmap :: Profunctor p => (b -> c) -> p a b -> p a c

    lens Control.Lens.Iso

    Map the second argument covariantly.

    rmapdimap id
    

  8. rmapping :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) s t a b x y . (Profunctor p, Profunctor q) => AnIso s t a b -> Iso (p x s) (q y t) (p x a) (q y b)

    lens Control.Lens.Iso

    Lift an Iso covariantly into the right argument of a Profunctor.

    rmapping :: Profunctor p => Iso s t a b -> Iso (p x s) (p y t) (p x a) (p y b)
    rmapping :: Profunctor p => Iso' s a -> Iso' (p x s) (p x a)
    

  9. bimap :: Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d

    lens Control.Lens.Review

    Map over both arguments at the same time.

    bimap f g ≡ first f . second g
    

    Examples

    >>> bimap toUpper (+1) ('j', 3)
    ('J',4)
    
    >>> bimap toUpper (+1) (Left 'j')
    Left 'J'
    
    >>> bimap toUpper (+1) (Right 3)
    Right 4
    

  10. contramapped :: forall (f :: Type -> Type) b a . Contravariant f => Setter (f b) (f a) a b

    lens Control.Lens.Setter

    This Setter can be used to map over all of the inputs to a Contravariant.

    contramapover contramapped
    
    >>> getPredicate (over contramapped (*2) (Predicate even)) 5
    True
    
    >>> getOp (over contramapped (*5) (Op show)) 100
    "500"
    
    >>> Prelude.map ($ 1) $ over (mapped . _Unwrapping' Op . contramapped) (*12) [(*2),(+1),(^3)]
    [24,13,1728]
    

Page 422 of many | Previous | Next