optics-extra-0.2: Extra utilities and instances for optics-core

Safe HaskellNone
LanguageHaskell2010

Optics.Each

Contents

Description

This module defines the Each class, which provides an IxTraversal that extracts each element of a (potentially monomorphic) container.

Synopsis
  • class Each i s t a b | s -> i a, t -> i b, s b -> t, t a -> s where

Each

class Each i s t a b | s -> i a, t -> i b, s b -> t, t a -> s where #

Extract each element of a (potentially monomorphic) container.

>>> over each (*10) (1,2,3)
(10,20,30)
>>> iover each (\i a -> a*10 + succ i) (1,2,3)
(11,22,33)

Minimal complete definition

Nothing

Methods

each :: IxTraversal i s t a b #

Instances
(a ~ Char, b ~ Char) => Each Int Text Text a b Source #
each :: IxTraversal Int64 Text Text Char Char
Instance details

Defined in Optics.Each

Methods

each :: IxTraversal Int Text Text a b #

(a ~ Char, b ~ Char) => Each Int Text Text a b Source #
each :: IxTraversal Int Text Text Char Char
Instance details

Defined in Optics.Each

Methods

each :: IxTraversal Int Text Text a b #

(a ~ Word8, b ~ Word8) => Each Int64 ByteString ByteString a b Source #
each :: IxTraversal Int64 ByteString ByteString Word8
 Word8
Instance details

Defined in Optics.Each

(a ~ Word8, b ~ Word8) => Each Int64 ByteString ByteString a b Source #
each :: IxTraversal Int ByteString ByteString Word8
 Word8
Instance details

Defined in Optics.Each

Each Int [a] [b] a b
each :: IxTraversal Int [a] [b] a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int [a] [b] a b #

Each Int (NonEmpty a) (NonEmpty b) a b
each :: IxTraversal Int (NonEmpty a) (NonEmpty b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (NonEmpty a) (NonEmpty b) a b #

Each Int (IntMap a) (IntMap b) a b
each :: IxTraversal Int (IntMap a) (IntMap b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (IntMap a) (IntMap b) a b #

Each Int (Seq a) (Seq b) a b
each :: IxTraversal Int (Seq a) (Seq b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (Seq a) (Seq b) a b #

(Unbox a, Unbox b) => Each Int (Vector a) (Vector b) a b Source #
each :: (Unbox a, Unbox b) => IxTraversal Int (Vector a)
 (Vector b) a b
Instance details

Defined in Optics.Each

Methods

each :: IxTraversal Int (Vector a) (Vector b) a b #

(Storable a, Storable b) => Each Int (Vector a) (Vector b) a b Source #
each :: (Storable a, Storable b) => IxTraversal Int (Vector
 a) (Vector b) a b
Instance details

Defined in Optics.Each

Methods

each :: IxTraversal Int (Vector a) (Vector b) a b #

(Prim a, Prim b) => Each Int (Vector a) (Vector b) a b Source #
each :: (Prim a, Prim b) => IxTraversal Int (Vector a)
 (Vector b) a b
Instance details

Defined in Optics.Each

Methods

each :: IxTraversal Int (Vector a) (Vector b) a b #

Each Int (Vector a) (Vector b) a b Source #
each :: IxTraversal Int (Vector a) (Vector b) a b
Instance details

Defined in Optics.Each

Methods

each :: IxTraversal Int (Vector a) (Vector b) a b #

Each () (Maybe a) (Maybe b) a b
each :: IxTraversal () (Maybe a) (Maybe b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal () (Maybe a) (Maybe b) a b #

Each () (Identity a) (Identity b) a b
each :: IxTraversal () (Identity a) (Identity b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal () (Identity a) (Identity b) a b #

(a ~ a1, b ~ b1) => Each Int (a, a1) (b, b1) a b
each :: IxTraversal Int (a, a) (b, b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (a, a1) (b, b1) a b #

k ~ k' => Each k (HashMap k a) (HashMap k' b) a b Source #
each :: IxTraversal k (HashMap k a) (HashMap k b) a b
Instance details

Defined in Optics.Each

Methods

each :: IxTraversal k (HashMap k a) (HashMap k' b) a b #

k ~ k' => Each k (Map k a) (Map k' b) a b
each :: IxTraversal k (Map k a) (Map k b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal k (Map k a) (Map k' b) a b #

(Ix i, i ~ j) => Each i (Array i a) (Array j b) a b
each :: Ix i => IxTraversal i (Array i a) (Array i b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal i (Array i a) (Array j b) a b #

(a ~ a1, a ~ a2, b ~ b1, b ~ b2) => Each Int (a, a1, a2) (b, b1, b2) a b
each :: IxTraversal Int (a, a, a) (b, b, b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (a, a1, a2) (b, b1, b2) a b #

(a ~ a1, a ~ a2, a ~ a3, b ~ b1, b ~ b2, b ~ b3) => Each Int (a, a1, a2, a3) (b, b1, b2, b3) a b
each :: IxTraversal Int (a, a, a, a) (b, b, b, b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (a, a1, a2, a3) (b, b1, b2, b3) a b #

(a ~ a1, a ~ a2, a ~ a3, a ~ a4, b ~ b1, b ~ b2, b ~ b3, b ~ b4) => Each Int (a, a1, a2, a3, a4) (b, b1, b2, b3, b4) a b
each :: IxTraversal Int (a, a, a, a, a) (b, b, b, b, b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (a, a1, a2, a3, a4) (b, b1, b2, b3, b4) a b #

(a ~ a1, a ~ a2, a ~ a3, a ~ a4, a ~ a5, b ~ b1, b ~ b2, b ~ b3, b ~ b4, b ~ b5) => Each Int (a, a1, a2, a3, a4, a5) (b, b1, b2, b3, b4, b5) a b
each :: IxTraversal Int (a, a, a, a, a, a) (b, b, b, b, b, b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (a, a1, a2, a3, a4, a5) (b, b1, b2, b3, b4, b5) a b #

(a ~ a1, a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, b ~ b1, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6) => Each Int (a, a1, a2, a3, a4, a5, a6) (b, b1, b2, b3, b4, b5, b6) a b
each :: IxTraversal Int (a, a, a, a, a, a, a) (b, b, b, b, b, b, b)
 a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (a, a1, a2, a3, a4, a5, a6) (b, b1, b2, b3, b4, b5, b6) a b #

(a ~ a1, a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, a ~ a7, b ~ b1, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6, b ~ b7) => Each Int (a, a1, a2, a3, a4, a5, a6, a7) (b, b1, b2, b3, b4, b5, b6, b7) a b
each :: IxTraversal Int (a, a, a, a, a, a, a, a) (b, b, b, b, b, b,
 b, b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (a, a1, a2, a3, a4, a5, a6, a7) (b, b1, b2, b3, b4, b5, b6, b7) a b #

(a ~ a1, a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, a ~ a7, a ~ a8, b ~ b1, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6, b ~ b7, b ~ b8) => Each Int (a, a1, a2, a3, a4, a5, a6, a7, a8) (b, b1, b2, b3, b4, b5, b6, b7, b8) a b
each :: IxTraversal Int (a, a, a, a, a, a, a, a, a) (b, b, b, b, b,
 b, b, b, b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (a, a1, a2, a3, a4, a5, a6, a7, a8) (b, b1, b2, b3, b4, b5, b6, b7, b8) a b #

(a ~ a1, a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, a ~ a7, a ~ a8, a ~ a9, b ~ b1, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6, b ~ b7, b ~ b8, b ~ b9) => Each Int (a, a1, a2, a3, a4, a5, a6, a7, a8, a9) (b, b1, b2, b3, b4, b5, b6, b7, b8, b9) a b
each :: IxTraversal Int (a, a, a, a, a, a, a, a, a, a) (b, b, b, b,
 b, b, b, b, b, b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal Int (a, a1, a2, a3, a4, a5, a6, a7, a8, a9) (b, b1, b2, b3, b4, b5, b6, b7, b8, b9) a b #

Each [Int] (Tree a) (Tree b) a b
each :: IxTraversal [Int] (Tree a) (Tree b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal [Int] (Tree a) (Tree b) a b #

Each (Either () ()) (Complex a) (Complex b) a b
each :: (RealFloat a, RealFloat b) => IxTraversal (Either () ())
 (Complex a) (Complex b) a b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal (Either () ()) (Complex a) (Complex b) a b #

(a ~ a', b ~ b') => Each (Either () ()) (Either a a') (Either b b') a b
each :: IxTraversal (Either () ()) (Either a a) (Either b b) a
 b
Instance details

Defined in Optics.Each.Core

Methods

each :: IxTraversal (Either () ()) (Either a a') (Either b b') a b #

Orphan instances

(a ~ Char, b ~ Char) => Each Int Text Text a b Source #
each :: IxTraversal Int64 Text Text Char Char
Instance details

Methods

each :: IxTraversal Int Text Text a b #

(a ~ Char, b ~ Char) => Each Int Text Text a b Source #
each :: IxTraversal Int Text Text Char Char
Instance details

Methods

each :: IxTraversal Int Text Text a b #

(a ~ Word8, b ~ Word8) => Each Int64 ByteString ByteString a b Source #
each :: IxTraversal Int64 ByteString ByteString Word8
 Word8
Instance details

(a ~ Word8, b ~ Word8) => Each Int64 ByteString ByteString a b Source #
each :: IxTraversal Int ByteString ByteString Word8
 Word8
Instance details

(Unbox a, Unbox b) => Each Int (Vector a) (Vector b) a b Source #
each :: (Unbox a, Unbox b) => IxTraversal Int (Vector a)
 (Vector b) a b
Instance details

Methods

each :: IxTraversal Int (Vector a) (Vector b) a b #

(Storable a, Storable b) => Each Int (Vector a) (Vector b) a b Source #
each :: (Storable a, Storable b) => IxTraversal Int (Vector
 a) (Vector b) a b
Instance details

Methods

each :: IxTraversal Int (Vector a) (Vector b) a b #

(Prim a, Prim b) => Each Int (Vector a) (Vector b) a b Source #
each :: (Prim a, Prim b) => IxTraversal Int (Vector a)
 (Vector b) a b
Instance details

Methods

each :: IxTraversal Int (Vector a) (Vector b) a b #

Each Int (Vector a) (Vector b) a b Source #
each :: IxTraversal Int (Vector a) (Vector b) a b
Instance details

Methods

each :: IxTraversal Int (Vector a) (Vector b) a b #

k ~ k' => Each k (HashMap k a) (HashMap k' b) a b Source #
each :: IxTraversal k (HashMap k a) (HashMap k b) a b
Instance details

Methods

each :: IxTraversal k (HashMap k a) (HashMap k' b) a b #