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.Joker
Description
From the Functional Pearl "Clowns to the Left of me, Jokers to the Right: Dissecting Data Structures" by Conor McBride.
Documentation
newtype Joker (g :: k -> Type) (a :: k1) (b :: k) Source #
Make a Functor
over the second argument of a Bifunctor
.
Mnemonic: Clowns to the left (parameter of the Bifunctor), jokers to the right.
Instances
Generic1 (Joker g a :: k1 -> Type) Source # | |||||
Defined in Data.Bifunctor.Joker Associated Types
| |||||
Foldable g => Bifoldable (Joker g :: Type -> Type -> Type) Source # | |||||
Foldable1 g => Bifoldable1 (Joker g :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Joker Methods bifold1 :: Semigroup m => Joker g m m -> m bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Joker g a b -> m | |||||
Functor g => Bifunctor (Joker g :: Type -> Type -> Type) Source # | |||||
Traversable g => Bitraversable (Joker g :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Joker Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Joker g a b -> f (Joker g c d) | |||||
Eq1 g => Eq2 (Joker g :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Joker | |||||
Ord1 g => Ord2 (Joker g :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Joker Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Joker g a c -> Joker g b d -> Ordering | |||||
Read1 g => Read2 (Joker g :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Joker Methods liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Joker g a b) liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Joker g a b] liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Joker g a b) liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Joker g a b] | |||||
Show1 g => Show2 (Joker g :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Joker Methods liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Joker g a b -> ShowS liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Joker g a b] -> ShowS | |||||
Applicative g => Biapplicative (Joker g :: Type -> Type -> Type) Source # | |||||
Defined in Data.Bifunctor.Joker | |||||
Foldable g => Foldable (Joker g a) Source # | |||||
Defined in Data.Bifunctor.Joker Methods fold :: Monoid m => Joker g a m -> m foldMap :: Monoid m => (a0 -> m) -> Joker g a a0 -> m foldMap' :: Monoid m => (a0 -> m) -> Joker g a a0 -> m foldr :: (a0 -> b -> b) -> b -> Joker g a a0 -> b foldr' :: (a0 -> b -> b) -> b -> Joker g a a0 -> b foldl :: (b -> a0 -> b) -> b -> Joker g a a0 -> b foldl' :: (b -> a0 -> b) -> b -> Joker g a a0 -> b foldr1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 foldl1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 toList :: Joker g a a0 -> [a0] elem :: Eq a0 => a0 -> Joker g a a0 -> Bool maximum :: Ord a0 => Joker g a a0 -> a0 minimum :: Ord a0 => Joker g a a0 -> a0 | |||||
Foldable1 g => Foldable1 (Joker g a) Source # | |||||
Defined in Data.Bifunctor.Joker Methods fold1 :: Semigroup m => Joker g a m -> m foldMap1 :: Semigroup m => (a0 -> m) -> Joker g a a0 -> m foldMap1' :: Semigroup m => (a0 -> m) -> Joker g a a0 -> m toNonEmpty :: Joker g a a0 -> NonEmpty a0 maximum :: Ord a0 => Joker g a a0 -> a0 minimum :: Ord a0 => Joker g a a0 -> a0 foldrMap1 :: (a0 -> b) -> (a0 -> b -> b) -> Joker g a a0 -> b foldlMap1' :: (a0 -> b) -> (b -> a0 -> b) -> Joker g a a0 -> b foldlMap1 :: (a0 -> b) -> (b -> a0 -> b) -> Joker g a a0 -> b foldrMap1' :: (a0 -> b) -> (a0 -> b -> b) -> Joker g a a0 -> b | |||||
Eq1 g => Eq1 (Joker g a) Source # | |||||
Defined in Data.Bifunctor.Joker | |||||
Ord1 g => Ord1 (Joker g a) Source # | |||||
Defined in Data.Bifunctor.Joker Methods liftCompare :: (a0 -> b -> Ordering) -> Joker g a a0 -> Joker g a b -> Ordering | |||||
Read1 g => Read1 (Joker g a) Source # | |||||
Defined in Data.Bifunctor.Joker Methods liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Joker g a a0) liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Joker g a a0] liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Joker g a a0) liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Joker g a a0] | |||||
Show1 g => Show1 (Joker g a) Source # | |||||
Defined in Data.Bifunctor.Joker Methods liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Joker g a a0 -> ShowS liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Joker g a a0] -> ShowS | |||||
Traversable g => Traversable (Joker g a) Source # | |||||
Defined in Data.Bifunctor.Joker | |||||
Functor g => Functor (Joker g a) Source # | |||||
Generic (Joker g a b) Source # | |||||
Defined in Data.Bifunctor.Joker Associated Types
| |||||
Read (g b) => Read (Joker g a b) Source # | |||||
Defined in Data.Bifunctor.Joker | |||||
Show (g b) => Show (Joker g a b) Source # | |||||
Eq (g b) => Eq (Joker g a b) Source # | |||||
Ord (g b) => Ord (Joker g a b) Source # | |||||
Defined in Data.Bifunctor.Joker | |||||
type Rep1 (Joker g a :: k1 -> Type) Source # | |||||
Defined in Data.Bifunctor.Joker type Rep1 (Joker g a :: k1 -> Type) = D1 ('MetaData "Joker" "Data.Bifunctor.Joker" "bifunctors-5.6.2-DJF0s4uyN5WIHA3bCleVta" 'True) (C1 ('MetaCons "Joker" 'PrefixI 'True) (S1 ('MetaSel ('Just "runJoker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 g))) | |||||
type Rep (Joker g a b) Source # | |||||
Defined in Data.Bifunctor.Joker type Rep (Joker g a b) = D1 ('MetaData "Joker" "Data.Bifunctor.Joker" "bifunctors-5.6.2-DJF0s4uyN5WIHA3bCleVta" 'True) (C1 ('MetaCons "Joker" 'PrefixI 'True) (S1 ('MetaSel ('Just "runJoker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (g b)))) |