Data.Bifunctor.Joker

bifunctors-5.3: Bifunctors

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 | Haskell98

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

- newtype Joker g a b = Joker {
  - runJoker :: g b
  }

# Documentation

newtype Joker g a b

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 |
Fields runJoker :: g b

Instances

Functor g => Bifunctor (Joker * * g) |
Foldable g => Bifoldable (Joker * * g) |
Traversable g => Bitraversable (Joker * * g) |
Applicative g => Biapplicative (Joker * * g) |
Functor g => Functor (Joker k * g a) |
Foldable g => Foldable (Joker k * g a) |
Traversable g => Traversable (Joker k * g a) |
Generic1 (Joker k * g a) |
Eq (g b) => Eq (Joker k k g a b) |
Ord (g b) => Ord (Joker k k g a b) |
Read (g b) => Read (Joker k k g a b) |
Show (g b) => Show (Joker k k g a b) |
Generic (Joker k k g a b) |
type Rep1 (Joker k k1 g a) |
type Rep (Joker k k1 g a b) |