bifunctors-5.2: 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

Functor f => Bifunctor (Clown * * f) Source 

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

Foldable f => Bifoldable (Clown * * f) Source 

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

Traversable f => Bitraversable (Clown * * f) Source 

Methods

bitraverse :: Applicative b => (a -> b c) -> (d -> b e) -> Clown * * f a d -> b (Clown * * f c e) Source

Applicative f => Biapplicative (Clown * * f) Source 

Methods

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

(<<*>>) :: Clown * * f (a -> b) (c -> d) -> Clown * * f a c -> Clown * * f b d 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 * k f a) Source 

Methods

fmap :: (b -> c) -> Clown * k f a b -> Clown * k f a c

(<$) :: b -> Clown * k f a c -> Clown * k f a b

Foldable (Clown * k f a) Source 

Methods

fold :: Monoid m => Clown * k f a m -> m

foldMap :: Monoid m => (b -> m) -> Clown * k f a b -> m

foldr :: (b -> c -> c) -> c -> Clown * k f a b -> c

foldr' :: (b -> c -> c) -> c -> Clown * k f a b -> c

foldl :: (b -> c -> b) -> b -> Clown * k f a c -> b

foldl' :: (b -> c -> b) -> b -> Clown * k f a c -> b

foldr1 :: (b -> b -> b) -> Clown * k f a b -> b

foldl1 :: (b -> b -> b) -> Clown * k f a b -> b

toList :: Clown * k f a b -> [b]

null :: Clown * k f a b -> Bool

length :: Clown * k f a b -> Int

elem :: Eq b => b -> Clown * k f a b -> Bool

maximum :: Ord b => Clown * k f a b -> b

minimum :: Ord b => Clown * k f a b -> b

sum :: Num b => Clown * k f a b -> b

product :: Num b => Clown * k f a b -> b

Traversable (Clown * k f a) Source 

Methods

traverse :: Applicative c => (b -> c d) -> Clown * k f a b -> c (Clown * k f a d)

sequenceA :: Applicative b => Clown * k f a (b c) -> b (Clown * k f a c)

mapM :: Monad m => (b -> m c) -> Clown * k f a b -> m (Clown * k f a c)

sequence :: Monad m => Clown * k f a (m b) -> m (Clown * k f a b)

Generic1 (Clown * k f a) Source 

Associated Types

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

Methods

from1 :: Clown * k f a b -> Rep1 (Clown * k f a) b

to1 :: Rep1 (Clown * k f a) b -> Clown * k f a b

Eq (f a) => Eq (Clown k k f a b) Source 

Methods

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

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

Ord (f a) => Ord (Clown k k f a b) Source 

Methods

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

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

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

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

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

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

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

Read (f a) => Read (Clown k k f a b) Source 

Methods

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

readList :: ReadS [Clown k k f a b]

readPrec :: ReadPrec (Clown k k f a b)

readListPrec :: ReadPrec [Clown k k f a b]

Show (f a) => Show (Clown k k f a b) Source 

Methods

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

show :: Clown k k f a b -> String

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

Generic (Clown k k f a b) Source 

Associated Types

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

Methods

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

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

type Rep1 (Clown k k1 f a) Source 
type Rep (Clown k k1 f a b) Source