| Copyright | (C) 2012-2015 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Safe |
| Language | Haskell98 |
Control.Lens.Internal.Bazaar
Description
- class Profunctor p => Bizarre p w | w -> p where
- bazaar :: Applicative f => p a (f b) -> w a b t -> f t
- newtype Bazaar p a b t = Bazaar {
- runBazaar :: forall f. Applicative f => p a (f b) -> f t
- type Bazaar' p a = Bazaar p a a
- newtype BazaarT p g a b t = BazaarT {
- runBazaarT :: forall f. Applicative f => p a (f b) -> f t
- type BazaarT' p g a = BazaarT p g a a
- class Profunctor p => Bizarre1 p w | w -> p where
- newtype Bazaar1 p a b t = Bazaar1 {
- runBazaar1 :: forall f. Apply f => p a (f b) -> f t
- type Bazaar1' p a = Bazaar1 p a a
- newtype BazaarT1 p g a b t = BazaarT1 {
- runBazaarT1 :: forall f. Apply f => p a (f b) -> f t
- type BazaarT1' p g a = BazaarT1 p g a a
Documentation
class Profunctor p => Bizarre p w | w -> p where Source
This class is used to run the various Bazaar variants used in this
library.
Methods
bazaar :: Applicative f => p a (f b) -> w a b t -> f t Source
Instances
This is used to characterize a Traversal.
a.k.a. indexed Cartesian store comonad, indexed Kleene store comonad, or an indexed FunList.
http://twanvl.nl/blog/haskell/non-regular1
A Bazaar is like a Traversal that has already been applied to some structure.
Where a holds an Context a b ta and a function from b to
t, a holds Bazaar a b tN as and a function from N
bs to t, (where N might be infinite).
Mnemonically, a Bazaar holds many stores and you can easily add more.
This is a final encoding of Bazaar.
Constructors
| Bazaar | |
Fields
| |
Instances
newtype BazaarT p g a b t Source
BazaarT is like Bazaar, except that it provides a questionable Contravariant instance
To protect this instance it relies on the soundness of another Contravariant type, and usage conventions.
For example. This lets us write a suitably polymorphic and lazy taking, but there
must be a better way!
Constructors
| BazaarT | |
Fields
| |
Instances
class Profunctor p => Bizarre1 p w | w -> p where Source
Instances
newtype Bazaar1 p a b t Source
This is used to characterize a Traversal.
a.k.a. indexed Cartesian store comonad, indexed Kleene store comonad, or an indexed FunList.
http://twanvl.nl/blog/haskell/non-regular1
A Bazaar1 is like a Traversal that has already been applied to some structure.
Where a holds an Context a b ta and a function from b to
t, a holds Bazaar1 a b tN as and a function from N
bs to t, (where N might be infinite).
Mnemonically, a Bazaar1 holds many stores and you can easily add more.
This is a final encoding of Bazaar1.
Constructors
| Bazaar1 | |
Fields
| |
Instances
newtype BazaarT1 p g a b t Source
BazaarT1 is like Bazaar1, except that it provides a questionable Contravariant instance
To protect this instance it relies on the soundness of another Contravariant type, and usage conventions.
For example. This lets us write a suitably polymorphic and lazy taking, but there
must be a better way!
Constructors
| BazaarT1 | |
Fields
| |
Instances