lens-core-0.1.0.3: Lenses, Folds and Traversals

Copyright(C) 2012-2016 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Control.Lens.Internal.Bazaar

Description

 
Synopsis

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
Profunctor p => Bizarre p (Bazaar p) Source # 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

bazaar :: Applicative f => p a (f b) -> Bazaar p a b t -> f t Source #

newtype Bazaar 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 Bazaar is like a Traversal that has already been applied to some structure.

Where a Context a b t holds an a and a function from b to t, a Bazaar a b t holds N 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
Profunctor p => Bizarre p (Bazaar p) Source # 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

bazaar :: Applicative f => p a (f b) -> Bazaar p a b t -> f t Source #

IndexedFunctor (Bazaar p) Source # 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

ifmap :: (s -> t) -> Bazaar p a b s -> Bazaar p a b t Source #

Functor (Bazaar p a b) Source # 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

fmap :: (a0 -> b0) -> Bazaar p a b a0 -> Bazaar p a b b0 #

(<$) :: a0 -> Bazaar p a b b0 -> Bazaar p a b a0 #

Applicative (Bazaar p a b) Source # 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

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 #

type Bazaar' p a = Bazaar p a a Source #

This alias is helpful when it comes to reducing repetition in type signatures.

type Bazaar' p a t = Bazaar p a a t

class Profunctor p => Bizarre1 p w | w -> p where Source #

Methods

bazaar1 :: Applicative f => p a (f b) -> w a b t -> f t Source #

Instances
Profunctor p => Bizarre1 p (Bazaar1 p) Source # 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

bazaar1 :: Applicative f => p a (f b) -> Bazaar1 p a b t -> f t Source #

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 Context a b t holds an a and a function from b to t, a Bazaar1 a b t holds N 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
Profunctor p => Bizarre1 p (Bazaar1 p) Source # 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

bazaar1 :: Applicative f => p a (f b) -> Bazaar1 p a b t -> f t Source #

IndexedFunctor (Bazaar1 p) Source # 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

ifmap :: (s -> t) -> Bazaar1 p a b s -> Bazaar1 p a b t Source #

Functor (Bazaar1 p a b) Source # 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

fmap :: (a0 -> b0) -> Bazaar1 p a b a0 -> Bazaar1 p a b b0 #

(<$) :: a0 -> Bazaar1 p a b b0 -> Bazaar1 p a b a0 #

type Bazaar1' p a = Bazaar1 p a a Source #

This alias is helpful when it comes to reducing repetition in type signatures.

type Bazaar1' p a t = Bazaar1 p a a t