bifunctors-5.5.3: Bifunctors

Copyright(C) 2008-2016 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

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: Clowns to the left (parameter of the Bifunctor), jokers to the right.

Constructors

Clown 

Fields

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

Defined in Data.Bifunctor.Clown

Associated Types

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

Methods

from1 :: Clown f a a0 -> Rep1 (Clown f a) a0 #

to1 :: Rep1 (Clown f a) a0 -> Clown f a a0 #

Traversable f => Bitraversable (Clown f :: * -> * -> *) 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) #

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

Defined in Data.Bifunctor.Clown

Methods

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

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

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

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

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

Defined in Data.Bifunctor.Clown

Methods

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

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

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

Applicative f => Biapplicative (Clown f :: * -> * -> *) 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 :: * -> *) Source # 
Instance details

Defined in Data.Bifunctor.Clown

Methods

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

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

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

Defined in Data.Bifunctor.Clown

Methods

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

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

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

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

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

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

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

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

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

null :: Clown f a a0 -> Bool #

length :: Clown f a a0 -> Int #

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

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

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

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

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

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

Defined in Data.Bifunctor.Clown

Methods

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

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

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

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

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

Defined in Data.Bifunctor.Clown

Methods

(==) :: Clown f a b -> Clown f a b -> Bool #

(/=) :: Clown f a b -> Clown f a b -> Bool #

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

Defined in Data.Bifunctor.Clown

Methods

compare :: Clown f a b -> Clown f a b -> Ordering #

(<) :: Clown f a b -> Clown f a b -> Bool #

(<=) :: Clown f a b -> Clown f a b -> Bool #

(>) :: Clown f a b -> Clown f a b -> Bool #

(>=) :: Clown f a b -> Clown f a b -> Bool #

max :: Clown f a b -> Clown f a b -> Clown f a b #

min :: Clown f a b -> Clown f a b -> Clown f a b #

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

Defined in Data.Bifunctor.Clown

Methods

readsPrec :: Int -> ReadS (Clown f a b) #

readList :: ReadS [Clown f a b] #

readPrec :: ReadPrec (Clown f a b) #

readListPrec :: ReadPrec [Clown f a b] #

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

Defined in Data.Bifunctor.Clown

Methods

showsPrec :: Int -> Clown f a b -> ShowS #

show :: Clown f a b -> String #

showList :: [Clown f a b] -> ShowS #

Generic (Clown f a b) Source # 
Instance details

Defined in Data.Bifunctor.Clown

Associated Types

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

Methods

from :: Clown f a b -> Rep (Clown f a b) x #

to :: Rep (Clown f a b) x -> Clown f a b #

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

Defined in Data.Bifunctor.Clown

type Rep1 (Clown f a :: k1 -> *) = D1 (MetaData "Clown" "Data.Bifunctor.Clown" "bifunctors-5.5.3-C6ZpRcwIkW2G7uSQuXu3CK" 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.3-C6ZpRcwIkW2G7uSQuXu3CK" True) (C1 (MetaCons "Clown" PrefixI True) (S1 (MetaSel (Just "runClown") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (f a))))