| 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.
Documentation
newtype Clown (f :: k -> Type) (a :: k) (b :: k1) Source #
Make a Functor over the first argument of a Bifunctor.
Mnemonic: Clowns to the left (parameter of the Bifunctor), jokers to the right.
Instances
| Generic1 (Clown f a :: k1 -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown Associated Types
| |||||
| Foldable f => Bifoldable (Clown f :: Type -> Type -> Type) Source # | |||||
| Foldable1 f => Bifoldable1 (Clown f :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown Methods bifold1 :: Semigroup m => Clown f m m -> m bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Clown f a b -> m | |||||
| Functor f => Bifunctor (Clown f :: Type -> Type -> Type) Source # | |||||
| Traversable f => Bitraversable (Clown f :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown Methods bitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Clown f a b -> f0 (Clown f c d) | |||||
| Eq1 f => Eq2 (Clown f :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown | |||||
| Ord1 f => Ord2 (Clown f :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Clown f a c -> Clown f b d -> Ordering | |||||
| Read1 f => Read2 (Clown f :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown Methods liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Clown f a b) liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Clown f a b] liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Clown f a b) liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Clown f a b] | |||||
| Show1 f => Show2 (Clown f :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown Methods liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Clown f a b -> ShowS liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Clown f a b] -> ShowS | |||||
| Applicative f => Biapplicative (Clown f :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown | |||||
| (Eq1 f, Eq a) => Eq1 (Clown f a :: Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown | |||||
| (Ord1 f, Ord a) => Ord1 (Clown f a :: Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown Methods liftCompare :: (a0 -> b -> Ordering) -> Clown f a a0 -> Clown f a b -> Ordering | |||||
| (Read1 f, Read a) => Read1 (Clown f a :: Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown Methods liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Clown f a a0) liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Clown f a a0] liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Clown f a a0) liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Clown f a a0] | |||||
| (Show1 f, Show a) => Show1 (Clown f a :: Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown Methods liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Clown f a a0 -> ShowS liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Clown f a a0] -> ShowS | |||||
| Functor (Clown f a :: Type -> Type) Source # | |||||
| Foldable (Clown f a :: Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown Methods fold :: Monoid m => Clown f a m -> m foldMap :: Monoid m => (a0 -> m) -> Clown f a a0 -> 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] 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 | |||||
| Traversable (Clown f a :: Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown | |||||
| Generic (Clown f a b) Source # | |||||
Defined in Data.Bifunctor.Clown Associated Types
| |||||
| Read (f a) => Read (Clown f a b) Source # | |||||
Defined in Data.Bifunctor.Clown | |||||
| Show (f a) => Show (Clown f a b) Source # | |||||
| Eq (f a) => Eq (Clown f a b) Source # | |||||
| Ord (f a) => Ord (Clown f a b) Source # | |||||
Defined in Data.Bifunctor.Clown | |||||
| type Rep1 (Clown f a :: k1 -> Type) Source # | |||||
Defined in Data.Bifunctor.Clown type Rep1 (Clown f a :: k1 -> Type) = D1 ('MetaData "Clown" "Data.Bifunctor.Clown" "bifunctors-5.6.3-7WCfw339E5C8BKBzi3kQU4" 'True) (C1 ('MetaCons "Clown" 'PrefixI 'True) (S1 ('MetaSel ('Just "runClown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a)))) | |||||
| type Rep (Clown f a b) Source # | |||||
Defined in Data.Bifunctor.Clown type Rep (Clown f a b) = D1 ('MetaData "Clown" "Data.Bifunctor.Clown" "bifunctors-5.6.3-7WCfw339E5C8BKBzi3kQU4" 'True) (C1 ('MetaCons "Clown" 'PrefixI 'True) (S1 ('MetaSel ('Just "runClown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a)))) | |||||