bifunctors-5.5.14: Bifunctors
Copyright (C) 2008-2016 Edward Kmett
License BSD-style (see the file LICENSE)
Maintainer Edward Kmett <ekmett@gmail.com>
Stability provisional
Portability portable
Safe Haskell Safe
Language Haskell2010

Data.Bifunctor.Clown

Description

From the Functional Pearl "Clowns to the Left of me, Jokers to the Right: Dissecting Data Structures" by Conor McBride.

Synopsis

Documentation

newtype Clown f a b Source #

Make a Functor over the first argument of a Bifunctor .

Mnemonic: C l owns to the l eft (parameter of the Bifunctor), joke r s to the r ight.

Constructors

Clown

Fields

Instances

Instances details
Generic1 ( Clown f a :: k1 -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Associated Types

type Rep1 ( Clown f a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Clown f a a0 -> Rep1 ( Clown f a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Clown f a) a0 -> Clown f a a0 Source #

Traversable f => Bitraversable ( Clown f :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

bitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Clown f a b -> f0 ( Clown f c d) Source #

Foldable f => Bifoldable ( Clown f :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

bifold :: Monoid m => Clown f m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Clown f a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Clown f a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Clown f a b -> c Source #

Functor f => Bifunctor ( Clown f :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

bimap :: (a -> b) -> (c -> d) -> Clown f a c -> Clown f b d Source #

first :: (a -> b) -> Clown f a c -> Clown f b c Source #

second :: (b -> c) -> Clown f a b -> Clown f a c Source #

Eq1 f => Eq2 ( Clown f :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftEq2 :: (a -> b -> Bool ) -> (c -> d -> Bool ) -> Clown f a c -> Clown f b d -> Bool Source #

Ord1 f => Ord2 ( Clown f :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftCompare2 :: (a -> b -> Ordering ) -> (c -> d -> Ordering ) -> Clown f a c -> Clown f b d -> Ordering Source #

Read1 f => Read2 ( Clown f :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Show1 f => Show2 ( Clown f :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftShowsPrec2 :: ( Int -> a -> ShowS ) -> ([a] -> ShowS ) -> ( Int -> b -> ShowS ) -> ([b] -> ShowS ) -> Int -> Clown f a b -> ShowS Source #

liftShowList2 :: ( Int -> a -> ShowS ) -> ([a] -> ShowS ) -> ( Int -> b -> ShowS ) -> ([b] -> ShowS ) -> [ Clown f a b] -> ShowS Source #

Applicative f => Biapplicative ( Clown f :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

bipure :: a -> b -> Clown f a b Source #

(<<*>>) :: Clown f (a -> b) (c -> d) -> Clown f a c -> Clown f b d Source #

biliftA2 :: (a -> b -> c) -> (d -> e -> f0) -> Clown f a d -> Clown f b e -> Clown f c f0 Source #

(*>>) :: Clown f a b -> Clown f c d -> Clown f c d Source #

(<<*) :: Clown f a b -> Clown f c d -> Clown f a b Source #

Functor ( Clown f a :: Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

fmap :: (a0 -> b) -> Clown f a a0 -> Clown f a b Source #

(<$) :: a0 -> Clown f a b -> Clown f a a0 Source #

Foldable ( Clown f a :: Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

fold :: Monoid m => Clown f a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Clown f a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Clown f a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Clown f a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Clown f a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Clown f a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Clown f a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 Source #

toList :: Clown f a a0 -> [a0] Source #

null :: Clown f a a0 -> Bool Source #

length :: Clown f a a0 -> Int Source #

elem :: Eq a0 => a0 -> Clown f a a0 -> Bool Source #

maximum :: Ord a0 => Clown f a a0 -> a0 Source #

minimum :: Ord a0 => Clown f a a0 -> a0 Source #

sum :: Num a0 => Clown f a a0 -> a0 Source #

product :: Num a0 => Clown f a a0 -> a0 Source #

Traversable ( Clown f a :: Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Clown f a a0 -> f0 ( Clown f a b) Source #

sequenceA :: Applicative f0 => Clown f a (f0 a0) -> f0 ( Clown f a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Clown f a a0 -> m ( Clown f a b) Source #

sequence :: Monad m => Clown f a (m a0) -> m ( Clown f a a0) Source #

( Eq1 f, Eq a) => Eq1 ( Clown f a :: Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftEq :: (a0 -> b -> Bool ) -> Clown f a a0 -> Clown f a b -> Bool Source #

( Ord1 f, Ord a) => Ord1 ( Clown f a :: Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftCompare :: (a0 -> b -> Ordering ) -> Clown f a a0 -> Clown f a b -> Ordering Source #

( Read1 f, Read a) => Read1 ( Clown f a :: Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

( Show1 f, Show a) => Show1 ( Clown f a :: Type -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftShowsPrec :: ( Int -> a0 -> ShowS ) -> ([a0] -> ShowS ) -> Int -> Clown f a a0 -> ShowS Source #

liftShowList :: ( Int -> a0 -> ShowS ) -> ([a0] -> ShowS ) -> [ Clown f a a0] -> ShowS Source #

Eq (f a) => Eq ( Clown f a b) Source #
Instance details

Defined in Data.Bifunctor.Clown

Ord (f a) => Ord ( Clown f a b) Source #
Instance details

Defined in Data.Bifunctor.Clown

Read (f a) => Read ( Clown f a b) Source #
Instance details

Defined in Data.Bifunctor.Clown

Show (f a) => Show ( Clown f a b) Source #
Instance details

Defined in Data.Bifunctor.Clown

Generic ( Clown f a b) Source #
Instance details

Defined in Data.Bifunctor.Clown

Associated Types

type Rep ( Clown f a b) :: Type -> Type Source #

type Rep1 ( Clown f a :: k1 -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Clown

type Rep1 ( Clown f a :: k1 -> Type ) = D1 (' MetaData "Clown" "Data.Bifunctor.Clown" "bifunctors-5.5.14-4o2vxpA6iYN8K0rfLgtyzm" ' True ) ( C1 (' MetaCons "Clown" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "runClown") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (f a))))
type Rep ( Clown f a b) Source #
Instance details

Defined in Data.Bifunctor.Clown

type Rep ( Clown f a b) = D1 (' MetaData "Clown" "Data.Bifunctor.Clown" "bifunctors-5.5.14-4o2vxpA6iYN8K0rfLgtyzm" ' True ) ( C1 (' MetaCons "Clown" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "runClown") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (f a))))