Copyright | (C) 2012-2016 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- 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 #
This class is used to run the various Bazaar
variants used in this
library.
bazaar :: Applicative f => p a (f b) -> w a b t -> f t #
Instances
Profunctor p => Bizarre p (Bazaar p) # | |
Defined in Control.Lens.Internal.Bazaar bazaar :: Applicative f => p a (f b) -> Bazaar p a b t -> f t # | |
Profunctor p => Bizarre p (BazaarT p g) # | |
Defined in Control.Lens.Internal.Bazaar bazaar :: Applicative f => p a (f b) -> BazaarT p g a b t -> f t # | |
Corepresentable p => Bizarre p (TakingWhile p g) # | |
Defined in Control.Lens.Internal.Magma bazaar :: Applicative f => p a (f b) -> TakingWhile p g a b t -> f t # | |
Bizarre (Indexed Int) Mafic # | |
Defined in Control.Lens.Internal.Magma | |
Bizarre (Indexed i) (Molten i) # | |
Defined in Control.Lens.Internal.Magma bazaar :: Applicative f => Indexed i a (f b) -> Molten i a b t -> f t # |
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
a
s and a function from N
b
s 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
.
Bazaar | |
|
Instances
Corepresentable p => Sellable p (Bazaar p) # | |
Defined in Control.Lens.Internal.Bazaar | |
Profunctor p => Bizarre p (Bazaar p) # | |
Defined in Control.Lens.Internal.Bazaar bazaar :: Applicative f => p a (f b) -> Bazaar p a b t -> f t # | |
Conjoined p => IndexedComonad (Bazaar p) # | |
IndexedFunctor (Bazaar p) # | |
Defined in Control.Lens.Internal.Bazaar | |
Functor (Bazaar p a b) # | |
Applicative (Bazaar p a b) # | |
Defined in Control.Lens.Internal.Bazaar pure :: a0 -> Bazaar p a b a0 # (<*>) :: Bazaar p a b (a0 -> b0) -> Bazaar p a b a0 -> Bazaar p a b b0 # liftA2 :: (a0 -> b0 -> c) -> Bazaar p a b a0 -> Bazaar p a b b0 -> Bazaar p a b c # (*>) :: Bazaar p a b a0 -> Bazaar p a b b0 -> Bazaar p a b b0 # (<*) :: Bazaar p a b a0 -> Bazaar p a b b0 -> Bazaar p a b a0 # | |
(a ~ b, Conjoined p) => Comonad (Bazaar p a b) # | |
(a ~ b, Conjoined p) => ComonadApply (Bazaar p a b) # | |
Apply (Bazaar p a b) # | |
Defined in Control.Lens.Internal.Bazaar |
newtype BazaarT p (g :: * -> *) a b t #
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!
BazaarT | |
|
Instances
Corepresentable p => Sellable p (BazaarT p g) # | |
Defined in Control.Lens.Internal.Bazaar | |
Profunctor p => Bizarre p (BazaarT p g) # | |
Defined in Control.Lens.Internal.Bazaar bazaar :: Applicative f => p a (f b) -> BazaarT p g a b t -> f t # | |
Conjoined p => IndexedComonad (BazaarT p g) # | |
IndexedFunctor (BazaarT p g) # | |
Defined in Control.Lens.Internal.Bazaar | |
Functor (BazaarT p g a b) # | |
Applicative (BazaarT p g a b) # | |
Defined in Control.Lens.Internal.Bazaar pure :: a0 -> BazaarT p g a b a0 # (<*>) :: BazaarT p g a b (a0 -> b0) -> BazaarT p g a b a0 -> BazaarT p g a b b0 # liftA2 :: (a0 -> b0 -> c) -> BazaarT p g a b a0 -> BazaarT p g a b b0 -> BazaarT p g a b c # (*>) :: BazaarT p g a b a0 -> BazaarT p g a b b0 -> BazaarT p g a b b0 # (<*) :: BazaarT p g a b a0 -> BazaarT p g a b b0 -> BazaarT p g a b a0 # | |
(Profunctor p, Contravariant g) => Contravariant (BazaarT p g a b) # | |
(a ~ b, Conjoined p) => Comonad (BazaarT p g a b) # | |
(a ~ b, Conjoined p) => ComonadApply (BazaarT p g a b) # | |
Apply (BazaarT p g a b) # | |
Defined in Control.Lens.Internal.Bazaar (<.>) :: BazaarT p g a b (a0 -> b0) -> BazaarT p g a b a0 -> BazaarT p g a b b0 # (.>) :: BazaarT p g a b a0 -> BazaarT p g a b b0 -> BazaarT p g a b b0 # (<.) :: BazaarT p g a b a0 -> BazaarT p g a b b0 -> BazaarT p g a b a0 # liftF2 :: (a0 -> b0 -> c) -> BazaarT p g a b a0 -> BazaarT p g a b b0 -> BazaarT p g a b c # | |
Contravariant g => Semigroup (BazaarT p g a b t) # | |
Contravariant g => Monoid (BazaarT p g a b t) # | |
class Profunctor p => Bizarre1 p w | w -> p where #
Instances
Profunctor p => Bizarre1 p (Bazaar1 p) # | |
Defined in Control.Lens.Internal.Bazaar | |
Profunctor p => Bizarre1 p (BazaarT1 p g) # | |
Defined in Control.Lens.Internal.Bazaar |
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
a
s and a function from N
b
s 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
.
Bazaar1 | |
|
Instances
Corepresentable p => Sellable p (Bazaar1 p) # | |
Defined in Control.Lens.Internal.Bazaar | |
Profunctor p => Bizarre1 p (Bazaar1 p) # | |
Defined in Control.Lens.Internal.Bazaar | |
Conjoined p => IndexedComonad (Bazaar1 p) # | |
IndexedFunctor (Bazaar1 p) # | |
Defined in Control.Lens.Internal.Bazaar | |
Functor (Bazaar1 p a b) # | |
(a ~ b, Conjoined p) => Comonad (Bazaar1 p a b) # | |
(a ~ b, Conjoined p) => ComonadApply (Bazaar1 p a b) # | |
Apply (Bazaar1 p a b) # | |
Defined in Control.Lens.Internal.Bazaar |
newtype BazaarT1 p (g :: * -> *) a b t #
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!
BazaarT1 | |
|
Instances
Corepresentable p => Sellable p (BazaarT1 p g) # | |
Defined in Control.Lens.Internal.Bazaar | |
Profunctor p => Bizarre1 p (BazaarT1 p g) # | |
Defined in Control.Lens.Internal.Bazaar | |
Conjoined p => IndexedComonad (BazaarT1 p g) # | |
IndexedFunctor (BazaarT1 p g) # | |
Defined in Control.Lens.Internal.Bazaar | |
Functor (BazaarT1 p g a b) # | |
(Profunctor p, Contravariant g) => Contravariant (BazaarT1 p g a b) # | |
(a ~ b, Conjoined p) => Comonad (BazaarT1 p g a b) # | |
(a ~ b, Conjoined p) => ComonadApply (BazaarT1 p g a b) # | |
Apply (BazaarT1 p g a b) # | |
Defined in Control.Lens.Internal.Bazaar (<.>) :: BazaarT1 p g a b (a0 -> b0) -> BazaarT1 p g a b a0 -> BazaarT1 p g a b b0 # (.>) :: BazaarT1 p g a b a0 -> BazaarT1 p g a b b0 -> BazaarT1 p g a b b0 # (<.) :: BazaarT1 p g a b a0 -> BazaarT1 p g a b b0 -> BazaarT1 p g a b a0 # liftF2 :: (a0 -> b0 -> c) -> BazaarT1 p g a b a0 -> BazaarT1 p g a b b0 -> BazaarT1 p g a b c # | |
Contravariant g => Semigroup (BazaarT1 p g a b t) # | |