bifunctors-5.4: Bifunctors

Data.Bifunctor.Joker

Description

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

Synopsis

Documentation

newtype Joker g a b Source #

Make a Functor over the second argument of a Bifunctor.

Mnemonic: Clowns to the left (parameter of the Bifunctor), jokers to the right.

Constructors

 Joker FieldsrunJoker :: g b

Instances

 Functor g => Bifunctor (Joker * * g) Source # Methodsbimap :: (a -> b) -> (c -> d) -> Joker * * g a c -> Joker * * g b d #first :: (a -> b) -> Joker * * g a c -> Joker * * g b c #second :: (b -> c) -> Joker * * g a b -> Joker * * g a c # Foldable g => Bifoldable (Joker * * g) Source # Methodsbifold :: Monoid m => Joker * * g m m -> m Source #bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Joker * * g a b -> m Source #bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Joker * * g a b -> c Source #bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Joker * * g a b -> c Source # Source # Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Joker * * g a b -> f (Joker * * g c d) Source # Source # Methodsbipure :: a -> b -> Joker * * g a b Source #(<<*>>) :: Joker * * g (a -> b) (c -> d) -> Joker * * g a c -> Joker * * g b d Source #(*>>) :: Joker * * g a b -> Joker * * g c d -> Joker * * g c d Source #(<<*) :: Joker * * g a b -> Joker * * g c d -> Joker * * g a b Source # Functor g => Functor (Joker k * g a) Source # Methodsfmap :: (a -> b) -> Joker k * g a a -> Joker k * g a b #(<\$) :: a -> Joker k * g a b -> Joker k * g a a # Foldable g => Foldable (Joker k * g a) Source # Methodsfold :: Monoid m => Joker k * g a m -> m #foldMap :: Monoid m => (a -> m) -> Joker k * g a a -> m #foldr :: (a -> b -> b) -> b -> Joker k * g a a -> b #foldr' :: (a -> b -> b) -> b -> Joker k * g a a -> b #foldl :: (b -> a -> b) -> b -> Joker k * g a a -> b #foldl' :: (b -> a -> b) -> b -> Joker k * g a a -> b #foldr1 :: (a -> a -> a) -> Joker k * g a a -> a #foldl1 :: (a -> a -> a) -> Joker k * g a a -> a #toList :: Joker k * g a a -> [a] #null :: Joker k * g a a -> Bool #length :: Joker k * g a a -> Int #elem :: Eq a => a -> Joker k * g a a -> Bool #maximum :: Ord a => Joker k * g a a -> a #minimum :: Ord a => Joker k * g a a -> a #sum :: Num a => Joker k * g a a -> a #product :: Num a => Joker k * g a a -> a # Traversable g => Traversable (Joker k * g a) Source # Methodstraverse :: Applicative f => (a -> f b) -> Joker k * g a a -> f (Joker k * g a b) #sequenceA :: Applicative f => Joker k * g a (f a) -> f (Joker k * g a a) #mapM :: Monad m => (a -> m b) -> Joker k * g a a -> m (Joker k * g a b) #sequence :: Monad m => Joker k * g a (m a) -> m (Joker k * g a a) # Generic1 (Joker k * g a) Source # Associated Typestype Rep1 (Joker k * g a :: * -> *) :: * -> * # Methodsfrom1 :: Joker k * g a a -> Rep1 (Joker k * g a) a #to1 :: Rep1 (Joker k * g a) a -> Joker k * g a a # Eq (g b) => Eq (Joker k1 k g a b) Source # Methods(==) :: Joker k1 k g a b -> Joker k1 k g a b -> Bool #(/=) :: Joker k1 k g a b -> Joker k1 k g a b -> Bool # Ord (g b) => Ord (Joker k1 k g a b) Source # Methodscompare :: Joker k1 k g a b -> Joker k1 k g a b -> Ordering #(<) :: Joker k1 k g a b -> Joker k1 k g a b -> Bool #(<=) :: Joker k1 k g a b -> Joker k1 k g a b -> Bool #(>) :: Joker k1 k g a b -> Joker k1 k g a b -> Bool #(>=) :: Joker k1 k g a b -> Joker k1 k g a b -> Bool #max :: Joker k1 k g a b -> Joker k1 k g a b -> Joker k1 k g a b #min :: Joker k1 k g a b -> Joker k1 k g a b -> Joker k1 k g a b # Read (g b) => Read (Joker k1 k g a b) Source # MethodsreadsPrec :: Int -> ReadS (Joker k1 k g a b) #readList :: ReadS [Joker k1 k g a b] #readPrec :: ReadPrec (Joker k1 k g a b) #readListPrec :: ReadPrec [Joker k1 k g a b] # Show (g b) => Show (Joker k1 k g a b) Source # MethodsshowsPrec :: Int -> Joker k1 k g a b -> ShowS #show :: Joker k1 k g a b -> String #showList :: [Joker k1 k g a b] -> ShowS # Generic (Joker k1 k g a b) Source # Associated Typestype Rep (Joker k1 k g a b) :: * -> * # Methodsfrom :: Joker k1 k g a b -> Rep (Joker k1 k g a b) x #to :: Rep (Joker k1 k g a b) x -> Joker k1 k g a b # type Rep1 (Joker k * g a) Source # type Rep1 (Joker k * g a) = D1 (MetaData "Joker" "Data.Bifunctor.Joker" "bifunctors-5.4-21nQkpnOsL4LQMbVs5dXHA" True) (C1 (MetaCons "Joker" PrefixI True) (S1 (MetaSel (Just Symbol "runJoker") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 g))) type Rep (Joker k1 k g a b) Source # type Rep (Joker k1 k g a b) = D1 (MetaData "Joker" "Data.Bifunctor.Joker" "bifunctors-5.4-21nQkpnOsL4LQMbVs5dXHA" True) (C1 (MetaCons "Joker" PrefixI True) (S1 (MetaSel (Just Symbol "runJoker") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (g b))))