Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- (&) :: a -> (a -> b) -> b
- class Profunctor p => Extraction p where
- extractions :: Comonad w => p (w a) b -> p (w a) (w b)
- act :: (Star f a b -> Star f s t) -> (a -> f b) -> s -> f t
- t :: NonEmpty a -> Pair (Maybe a)
- u :: NonEmpty Int -> Pair Int
- home :: Int -> Store Int Int -> Either Int Int
- looper :: NonEmpty Int -> Either [Int] Int
- coiterate :: forall w a b. (Traversable w, Comonad w) => (w a -> Either b a) -> w a -> w b
- class Profunctor p => MStrong p where
- class MStrong p => Reflector p where
- reflected :: Applicative f => p a b -> p (f a) (f b)
- type Kaleidoscope' s a = Kaleidoscope s s a a
- type Kaleidoscope s t a b = forall p. Reflector p => p a b -> p s t
- pointWise :: Kaleidoscope [a] [b] a b
- type Lens' s a = Lens s s a a
- type Lens s t a b = forall p. Strong p => p a b -> p s t
- lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b
- _1 :: Lens (a, x) (b, x) a b
- _2 :: Lens (x, a) (x, b) a b
- achrom :: forall s t a b. (s -> Maybe (b -> t)) -> (s -> a) -> (b -> t) -> Lens s t a b
- type Prism' s a = Prism s s a a
- type Prism s t a b = forall p. Choice p => p a b -> p s t
- prism :: (b -> t) -> (s -> Either t a) -> Prism s t a b
- prism' :: (b -> s) -> (s -> Maybe a) -> Prism s s a b
- _Just :: Prism (Maybe a) (Maybe b) a b
- _Nothing :: Prism' (Maybe a) ()
- _Left :: Prism (Either a b) (Either a' b) a a'
- _Right :: Prism (Either a b) (Either a b') b b'
- _Show :: (Read a, Show a) => Prism' String a
- withPrism :: forall s t a b r. Prism s t a b -> ((b -> t) -> (s -> Either t a) -> r) -> r
- matching :: Prism s t a b -> s -> Either t a
- type Setter' s a = Setter s s a a
- type Setter s t a b = (a -> b) -> s -> t
- set :: Setter s t a b -> s -> b -> t
- over :: Setter s t a b -> (a -> b) -> s -> t
- sets :: (forall p. Profunctor p => p a b -> p s t) -> Setter s t a b
- setter :: (s -> a) -> (b -> t) -> Setter s t a b
- mapped :: Functor f => Setter (f a) (f b) a b
- (%~) :: Setter s t a b -> (a -> b) -> s -> t
- (.~) :: Setter s t a b -> b -> s -> t
- type CoindexedOptic' e p s a = CoindexedOptic e p s s a a
- type CoindexedOptic e p s t a b = Optical p (Coindexed e p) s t a b
- type IndexedOptic' i p s a = IndexedOptic i p s s a a
- type IndexedOptic i q s t a b = forall p. Indexable i p q => Optical p q s t a b
- type Optical' p q s a = Optical p q s s a a
- type Optical p q s t a b = p a b -> q s t
- type Optic' p s a = Optic p s s a a
- type Optic p s t a b = p a b -> p s t
- cat :: Expansive p => Optic p [a] b a b
- data CoPrism a b s t = CoPrism (s -> a) (b -> Either a t)
- type Loop' s a = Loop s s a a
- type Loop s t a b = forall p. Cochoice p => p a b -> p s t
- loop :: forall p s t a b. Cochoice p => (s -> a) -> (b -> Either a t) -> Optic p s t a b
- iterM :: forall s t a. Optic (Star ((,) [a])) s t a a -> (a -> Either a a) -> s -> ([a], t)
- tester :: Int -> Either Int Int
- indexing :: Indexable i p q => (s -> i) -> p s t -> q s t
- itraversed :: Traversing p => IndexedOptic Int p [a] [b] a b
- itoListOf :: IndexedOptic i (Forget [(i, a)]) s t a b -> s -> [(i, a)]
- iover :: IndexedOptic i (->) s t a b -> (i -> a -> b) -> s -> t
- iset :: IndexedOptic i (->) s t a b -> (i -> b) -> s -> t
- newtype Zipping a b = Zipping (a -> a -> b)
- type Grate' s a = Grate s s a a
- type Grate s t a b = forall p. Closed p => p a b -> p s t
- grate :: (((s -> a) -> b) -> t) -> Grate s t a b
- distributed :: (Closed p, Representable g) => p a b -> p (g a) (g b)
- both :: Grate (a, a) (b, b) a b
- zipWithOf :: forall s t a b. Optic (Costar Pair) s t a b -> (a -> a -> b) -> s -> s -> t
- zipFWithOf :: forall f s t a b. Optic (Costar f) s t a b -> (f a -> b) -> f s -> t
- type Getter s t a b = forall p. Phantom p => p a b -> p s t
- to :: Profunctor p => (s -> a) -> Optic p s b a b
- to' :: (s -> a) -> Getter s t a b
- to'' :: (s -> a) -> Optic (Forget r) s t a b
- view :: Optic (Forget a) s t a b -> s -> a
- views :: Optic (Forget a) s t a b -> (a -> a') -> s -> a'
- like :: a -> Getter s t a b
- (^.) :: s -> Optic (Forget a) s t a b -> a
- type Review s t a b = forall p. (Profunctor p, Bifunctor p) => p a b -> p s t
- retagged :: forall p a b s. (Profunctor p, Bifunctor p) => p a b -> p s b
- review :: (Tagged a b -> Tagged s t) -> b -> t
- (#) :: (Tagged a b -> Tagged s t) -> b -> t
- reviews :: (Tagged a b -> Tagged s t) -> (t -> t') -> b -> t'
- re :: (Tagged a b -> Tagged s t) -> Getter b a t s
- unto :: forall (s :: *) t (a :: *) b. (b -> t) -> Tagged a b -> Tagged s t
- un :: Getter s t a b -> Tagged t s -> Tagged b a
- data Exchange a b s t = Exchange (s -> a) (b -> t)
- type Iso' s a = Iso s s a a
- type Iso s t a b = forall p. Profunctor p => p a b -> p s t
- iso :: (s -> a) -> (b -> t) -> Iso s t a b
- from :: Iso s t a b -> Iso b a t s
- withIso :: Iso s t a b -> ((s -> a) -> (b -> t) -> r) -> r
- under :: Iso s t a b -> (t -> s) -> b -> a
- mapping :: (Functor f, Functor g) => Iso s t a b -> Iso (f s) (g t) (f a) (g b)
- involuted :: (a -> a) -> Iso' a a
- type Glassed p = (Strong p, Closed p)
- type Glass' s a = Glass s s a a
- type Glass s t a b = forall p. (Strong p, Closed p) => Optic p s t a b
- glassed :: (Strong p, Closed p) => p a b -> p (s, u -> a) (s, u -> b)
- glass :: forall p s t a b. Glassed p => (((s -> a) -> b) -> s -> t) -> p a b -> p s t
- glassList :: forall a b. Glass [a] [b] a b
- extendOf :: Comonad w => Optic (Costar w) s t a b -> (w a -> b) -> w s -> w t
- traversed' :: forall f a b. Traversable f => Glass (f a) (f b) a b
- type Fold s t a b = forall p. (Traversing p, Phantom p) => p a b -> p s t
- folding :: (Foldable f, Phantom p, Traversing p) => (s -> f a) -> p a b -> p s t
- folded :: (Traversing p, Foldable f, Phantom p) => p a b -> p (f a) t
- foldOf :: Monoid a => Fold s t a b -> s -> a
- foldMapOf :: Monoid m => Optic (Forget m) s t a b -> (a -> m) -> s -> m
- toListOf :: Optic (Forget [a]) s t a b -> s -> [a]
- preview :: Optic (Forget (First a)) s t a b -> s -> Maybe a
- (^?) :: s -> Optic (Forget (First a)) s t a b -> Maybe a
- (^..) :: s -> Optic (Forget [a]) s t a b -> [a]
- (<+>) :: Semigroup r => Optic (Forget r) s t a b -> Optic (Forget r) s t' a b' -> Optic (Forget r) s t a b
- type Traversal' s a = forall p. Traversing p => p a a -> p s s
- type Traversal s t a b = forall p. Traversing p => p a b -> p s t
- traversed :: Traversable f => Traversal (f a) (f b) a b
- filtered :: (a -> Bool) -> Traversal' a a
- traverseOf :: Optic (Star f) s t a b -> (a -> f b) -> s -> f t
- (%%~) :: Optic (Star f) s t a b -> (a -> f b) -> s -> f t
- beside :: forall s t a b s' t' p r. (Representable p, Bitraversable r, Applicative (Rep p)) => Optic p s t a b -> Optic p s' t' a b -> Optic p (r s s') (r t t') a b
- unsafePartsOf :: forall s t a b. (forall p. Traversing p => p a b -> p s t) -> Lens s t [a] [b]
- partsOf :: forall s a. (forall p. Traversing p => p a a -> p s s) -> Lens' s [a]
- taking :: forall q s a. Traversing q => Int -> (forall p. Traversing p => p a a -> p s s) -> Optic' q s a
- dropping :: forall s a. Int -> Traversal' s a -> Traversal' s a
- type Grid' s a = Grid s s a a
- type Grid s t a b = forall p. (Traversing p, Closed p) => Optic p s t a b
- type Feedback' s a = Feedback s s a a
- type Feedback s t a b = forall p. Costrong p => p a b -> p s t
- feedback :: forall p s t a b. Costrong p => ((s, b) -> a) -> (b -> (t, b)) -> Optic p s t a b
- fib :: Feedback Int [Int] [Int] [Int]
- diffract :: Distributive f => Optic (Star f) s t a b -> (a -> f b) -> s -> f t
- class Profunctor p => MChoice p where
- type Coalgebraic' s a = Coalgebraic s s a a
- type Coalgebraic s t a b = forall p. MChoice p => Optic p s t a b
- swapEither :: Either a b -> Either b a
- coprism :: (b -> t) -> (s -> Either t a) -> Coalgebraic s t a b
- coalgPrism :: Prism s t a b -> Coalgebraic s t a b
- _Just' :: Coalgebraic (Maybe a) (Maybe b) a b
- _Right' :: Coalgebraic (Either e a) (Either e b) a b
- type AlgebraicLens' s a = AlgebraicLens s s a a
- type AlgebraicLens s t a b = forall p. MStrong p => p a b -> p s t
- algebraic :: forall m p s t a b. (Monoid m, MStrong p) => (s -> m) -> (s -> a) -> (m -> b -> t) -> Optic p s t a b
- listLens :: MStrong p => (s -> a) -> ([s] -> b -> t) -> Optic p s t a b
- altLens :: (Alternative f, MStrong p) => (s -> a) -> (f s -> b -> t) -> Optic p s t a b
- (?.) :: Optic (Costar f) s t a b -> b -> f s -> t
- (>-) :: Optic (Costar f) s t a b -> (f a -> b) -> f s -> t
Documentation
class Profunctor p => Extraction p where Source #
extractions :: Comonad w => p (w a) b -> p (w a) (w b) Source #
Instances
Distributive f => Extraction (Star f) Source # | |
Defined in Data.Profunctor.Extraction | |
Extraction (Forget r) Source # | |
Defined in Data.Profunctor.Extraction | |
Extraction ((->) :: Type -> Type -> Type) Source # | |
Defined in Data.Profunctor.Extraction extractions :: Comonad w => (w a -> b) -> w a -> w b Source # |
class Profunctor p => MStrong p where Source #
Instances
Functor f => MStrong (Star f) Source # | |
(Functor f, Foldable f) => MStrong (Costar f) Source # | |
MStrong (Forget r) Source # | |
MStrong (Tagged :: Type -> Type -> Type) Source # | |
MStrong ((->) :: Type -> Type -> Type) Source # | |
(Traversable f, Distributive g) => MStrong (DoubleStar f g) Source # | |
Defined in Data.Profunctor.DoubleStar mfirst' :: Monoid m => DoubleStar f g a b -> DoubleStar f g (a, m) (b, m) Source # msecond' :: Monoid m => DoubleStar f g a b -> DoubleStar f g (m, a) (m, b) Source # |
class MStrong p => Reflector p where Source #
reflected :: Applicative f => p a b -> p (f a) (f b) Source #
Instances
Distributive f => Reflector (Star f) Source # | |
Defined in Data.Profunctor.Reflector | |
Traversable f => Reflector (Costar f) Source # | |
Defined in Data.Profunctor.Reflector | |
Reflector (Tagged :: Type -> Type -> Type) Source # | |
Defined in Data.Profunctor.Reflector | |
Reflector ((->) :: Type -> Type -> Type) Source # | |
Defined in Data.Profunctor.Reflector reflected :: Applicative f => (a -> b) -> f a -> f b Source # |
type Kaleidoscope' s a = Kaleidoscope s s a a Source #
type Kaleidoscope s t a b = forall p. Reflector p => p a b -> p s t Source #
pointWise :: Kaleidoscope [a] [b] a b Source #
sets :: (forall p. Profunctor p => p a b -> p s t) -> Setter s t a b Source #
type CoindexedOptic' e p s a = CoindexedOptic e p s s a a Source #
type CoindexedOptic e p s t a b = Optical p (Coindexed e p) s t a b Source #
type IndexedOptic' i p s a = IndexedOptic i p s s a a Source #
type IndexedOptic i q s t a b = forall p. Indexable i p q => Optical p q s t a b Source #
Instances
Profunctor (CoPrism a b) Source # | |
Defined in Proton.Loop dimap :: (a0 -> b0) -> (c -> d) -> CoPrism a b b0 c -> CoPrism a b a0 d # lmap :: (a0 -> b0) -> CoPrism a b b0 c -> CoPrism a b a0 c # rmap :: (b0 -> c) -> CoPrism a b a0 b0 -> CoPrism a b a0 c # (#.) :: forall a0 b0 c q. Coercible c b0 => q b0 c -> CoPrism a b a0 b0 -> CoPrism a b a0 c # (.#) :: forall a0 b0 c q. Coercible b0 a0 => CoPrism a b b0 c -> q a0 b0 -> CoPrism a b a0 c # | |
Cochoice (CoPrism a b) Source # | |
iterM :: forall s t a. Optic (Star ((,) [a])) s t a a -> (a -> Either a a) -> s -> ([a], t) Source #
itraversed :: Traversing p => IndexedOptic Int p [a] [b] a b Source #
itoListOf :: IndexedOptic i (Forget [(i, a)]) s t a b -> s -> [(i, a)] Source #
iover :: IndexedOptic i (->) s t a b -> (i -> a -> b) -> s -> t Source #
iset :: IndexedOptic i (->) s t a b -> (i -> b) -> s -> t Source #
distributed :: (Closed p, Representable g) => p a b -> p (g a) (g b) Source #
zipFWithOf :: forall f s t a b. Optic (Costar f) s t a b -> (f a -> b) -> f s -> t Source #
to :: Profunctor p => (s -> a) -> Optic p s b a b Source #
type Review s t a b = forall p. (Profunctor p, Bifunctor p) => p a b -> p s t Source #
retagged :: forall p a b s. (Profunctor p, Bifunctor p) => p a b -> p s b Source #
data Exchange a b s t Source #
Exchange (s -> a) (b -> t) |
Instances
Profunctor (Exchange a b) Source # | |
Defined in Proton.Iso dimap :: (a0 -> b0) -> (c -> d) -> Exchange a b b0 c -> Exchange a b a0 d # lmap :: (a0 -> b0) -> Exchange a b b0 c -> Exchange a b a0 c # rmap :: (b0 -> c) -> Exchange a b a0 b0 -> Exchange a b a0 c # (#.) :: forall a0 b0 c q. Coercible c b0 => q b0 c -> Exchange a b a0 b0 -> Exchange a b a0 c # (.#) :: forall a0 b0 c q. Coercible b0 a0 => Exchange a b b0 c -> q a0 b0 -> Exchange a b a0 c # | |
Functor (Exchange a b s) Source # | |
type Iso s t a b = forall p. Profunctor p => p a b -> p s t Source #
traversed' :: forall f a b. Traversable f => Glass (f a) (f b) a b Source #
type Fold s t a b = forall p. (Traversing p, Phantom p) => p a b -> p s t Source #
(<+>) :: Semigroup r => Optic (Forget r) s t a b -> Optic (Forget r) s t' a b' -> Optic (Forget r) s t a b Source #
type Traversal' s a = forall p. Traversing p => p a a -> p s s Source #
type Traversal s t a b = forall p. Traversing p => p a b -> p s t Source #
traversed :: Traversable f => Traversal (f a) (f b) a b Source #
filtered :: (a -> Bool) -> Traversal' a a Source #
traverseOf :: Optic (Star f) s t a b -> (a -> f b) -> s -> f t Source #
beside :: forall s t a b s' t' p r. (Representable p, Bitraversable r, Applicative (Rep p)) => Optic p s t a b -> Optic p s' t' a b -> Optic p (r s s') (r t t') a b Source #
unsafePartsOf :: forall s t a b. (forall p. Traversing p => p a b -> p s t) -> Lens s t [a] [b] Source #
partsOf :: forall s a. (forall p. Traversing p => p a a -> p s s) -> Lens' s [a] Source #
taking :: forall q s a. Traversing q => Int -> (forall p. Traversing p => p a a -> p s s) -> Optic' q s a Source #
dropping :: forall s a. Int -> Traversal' s a -> Traversal' s a Source #
feedback :: forall p s t a b. Costrong p => ((s, b) -> a) -> (b -> (t, b)) -> Optic p s t a b Source #
class Profunctor p => MChoice p where Source #
Nothing
type Coalgebraic' s a = Coalgebraic s s a a Source #
type Coalgebraic s t a b = forall p. MChoice p => Optic p s t a b Source #
swapEither :: Either a b -> Either b a Source #
coprism :: (b -> t) -> (s -> Either t a) -> Coalgebraic s t a b Source #
coalgPrism :: Prism s t a b -> Coalgebraic s t a b Source #
type AlgebraicLens' s a = AlgebraicLens s s a a Source #
type AlgebraicLens s t a b = forall p. MStrong p => p a b -> p s t Source #