strict-tuple-lens-0.2: Optics for the `strict-tuple` library
Copyright(c) 2020-2021 Emily Pillmore
LicenseBSD-style
MaintainerEmily Pillmore <emilypi@cohomolo.gy>
StabilityExperimental
PortabilityTypeFamilies, UndecidableInstances, MPTC, FlexibleContexts
Safe HaskellNone
LanguageHaskell2010

Data.Tuple.Strict.Lens.Each

Description

Each instances for T1 through T9

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

Documentation

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

Extract each element of a (potentially monomorphic) container.

Notably, when applied to a tuple, this generalizes both to arbitrary homogeneous tuples.

>>> (1,2,3) & each *~ 10
(10,20,30)

It can also be used on monomorphic containers like Text or ByteString.

>>> over each Char.toUpper ("hello"^.Text.packed)
"HELLO"
>>> ("hello","world") & each.each %~ Char.toUpper
("HELLO","WORLD")

Minimal complete definition

Nothing

Methods

each :: Traversal s t a b #

Instances

Instances details
(a ~ Word8, b ~ Word8) => Each ByteString ByteString a b
each :: Traversal ByteString ByteString Word8 Word8
Instance details

Defined in Control.Lens.Each

(a ~ Word8, b ~ Word8) => Each ByteString ByteString a b
each :: Traversal ByteString ByteString Word8 Word8
Instance details

Defined in Control.Lens.Each

(a ~ Char, b ~ Char) => Each Text Text a b
each :: Traversal Text Text Char Char
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal Text Text a b #

(a ~ Char, b ~ Char) => Each Text Text a b
each :: Traversal Text Text Char Char
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal Text Text a b #

Each [a] [b] a b
each :: Traversal [a] [b] a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal [a] [b] a b #

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

Defined in Control.Lens.Each

Methods

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

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

Defined in Control.Lens.Each

Methods

each :: Traversal (Complex a) (Complex b) a b #

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

Defined in Control.Lens.Each

Methods

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

Each (NonEmpty a) (NonEmpty b) a b
each :: Traversal (NonEmpty a) (NonEmpty b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (NonEmpty a) (NonEmpty b) a b #

Each (IntMap a) (IntMap b) a b
each :: Traversal (Map c a) (Map c b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (IntMap a) (IntMap b) a b #

Each (Tree a) (Tree b) a b
each :: Traversal (Tree a) (Tree b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (Tree a) (Tree b) a b #

Each (Seq a) (Seq b) a b
each :: Traversal (Seq a) (Seq b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (Seq a) (Seq b) a b #

(Prim a, Prim b) => Each (Vector a) (Vector b) a b
each :: (Prim a, Prim b) => Traversal (Vector a) (Vector b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (Vector a) (Vector b) a b #

(Storable a, Storable b) => Each (Vector a) (Vector b) a b
each :: (Storable a, Storable b) => Traversal (Vector a) (Vector b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (Vector a) (Vector b) a b #

(Unbox a, Unbox b) => Each (Vector a) (Vector b) a b
each :: (Unbox a, Unbox b) => Traversal (Vector a) (Vector b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (Vector a) (Vector b) a b #

Each (Vector a) (Vector b) a b
each :: Traversal (Vector a) (Vector b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (Vector a) (Vector b) a b #

Each (Maybe a) (Maybe b) a b

Since: lens-4.20

Instance details

Defined in Control.Lens.Each

Methods

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

a ~ a' => Each (T1 a) (T1 a') a a' Source # 
Instance details

Defined in Data.Tuple.Strict.Lens.Each

Methods

each :: Traversal (T1 a) (T1 a') a a' #

(a ~ a', b ~ b') => Each (Either a a') (Either b b') a b
each :: Traversal (Either a a) (Either b b) a b

Since: lens-4.18

Instance details

Defined in Control.Lens.Each

Methods

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

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

Defined in Control.Lens.Each

Methods

each :: Traversal (a, a') (b, b') a b #

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

Defined in Control.Lens.Each

Methods

each :: Traversal (UArray i a) (UArray j b) a b #

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

Defined in Control.Lens.Each

Methods

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

c ~ d => Each (Map c a) (Map d b) a b
each :: Traversal (Map c a) (Map c b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (Map c a) (Map d b) a b #

c ~ d => Each (HashMap c a) (HashMap d b) a b
each :: Traversal (HashMap c a) (HashMap c b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (HashMap c a) (HashMap d b) a b #

(a ~ a', b ~ b') => Each (Pair a a') (Pair b b') a b

Since: lens-4.20

Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (Pair a a') (Pair b b') a b #

(a ~ a', b ~ b') => Each (These a a') (These b b') a b

Since: lens-4.20

Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (These a a') (These b b') a b #

(a ~ a', b ~ b') => Each (Either a a') (Either b b') a b

Since: lens-4.20

Instance details

Defined in Control.Lens.Each

Methods

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

(a ~ a', b ~ b') => Each (T2 a a') (T2 b b') a b Source # 
Instance details

Defined in Data.Tuple.Strict.Lens.Each

Methods

each :: Traversal (T2 a a') (T2 b b') a b #

(a ~ a', b ~ b') => Each (These a a') (These b b') a b

Since: lens-4.20

Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (These a a') (These b b') a b #

(a ~ a2, a ~ a3, b ~ b2, b ~ b3) => Each (a, a2, a3) (b, b2, b3) a b
each :: Traversal (a,a,a) (b,b,b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (a, a2, a3) (b, b2, b3) a b #

(a ~ a2, a ~ a3, b ~ b2, b ~ b3) => Each (T3 a a2 a3) (T3 b b2 b3) a b Source # 
Instance details

Defined in Data.Tuple.Strict.Lens.Each

Methods

each :: Traversal (T3 a a2 a3) (T3 b b2 b3) a b #

(a ~ a2, a ~ a3, a ~ a4, b ~ b2, b ~ b3, b ~ b4) => Each (a, a2, a3, a4) (b, b2, b3, b4) a b
each :: Traversal (a,a,a,a) (b,b,b,b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (a, a2, a3, a4) (b, b2, b3, b4) a b #

(a ~ a2, a ~ a3, a ~ a4, b ~ b2, b ~ b3, b ~ b4) => Each (T4 a a2 a3 a4) (T4 b b2 b3 b4) a b Source # 
Instance details

Defined in Data.Tuple.Strict.Lens.Each

Methods

each :: Traversal (T4 a a2 a3 a4) (T4 b b2 b3 b4) a b #

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

Defined in Control.Lens.Each

Methods

each :: Traversal (a, a2, a3, a4, a5) (b, b2, b3, b4, b5) a b #

(a ~ a2, a ~ a3, a ~ a4, a ~ a5, b ~ b2, b ~ b3, b ~ b4, b ~ b5) => Each (T5 a a2 a3 a4 a5) (T5 b b2 b3 b4 b5) a b Source # 
Instance details

Defined in Data.Tuple.Strict.Lens.Each

Methods

each :: Traversal (T5 a a2 a3 a4 a5) (T5 b b2 b3 b4 b5) a b #

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

Defined in Control.Lens.Each

Methods

each :: Traversal (a, a2, a3, a4, a5, a6) (b, b2, b3, b4, b5, b6) a b #

(a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6) => Each (T6 a a2 a3 a4 a5 a6) (T6 b b2 b3 b4 b5 b6) a b Source # 
Instance details

Defined in Data.Tuple.Strict.Lens.Each

Methods

each :: Traversal (T6 a a2 a3 a4 a5 a6) (T6 b b2 b3 b4 b5 b6) a b #

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

Defined in Control.Lens.Each

Methods

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

(a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, a ~ a7, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6, b ~ b7) => Each (T7 a a2 a3 a4 a5 a6 a7) (T7 b b2 b3 b4 b5 b6 b7) a b Source # 
Instance details

Defined in Data.Tuple.Strict.Lens.Each

Methods

each :: Traversal (T7 a a2 a3 a4 a5 a6 a7) (T7 b b2 b3 b4 b5 b6 b7) a b #

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

Defined in Control.Lens.Each

Methods

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

(a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, a ~ a7, a ~ a8, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6, b ~ b7, b ~ b8) => Each (T8 a a2 a3 a4 a5 a6 a7 a8) (T8 b b2 b3 b4 b5 b6 b7 b8) a b Source # 
Instance details

Defined in Data.Tuple.Strict.Lens.Each

Methods

each :: Traversal (T8 a a2 a3 a4 a5 a6 a7 a8) (T8 b b2 b3 b4 b5 b6 b7 b8) a b #

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

Defined in Control.Lens.Each

Methods

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

(a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, a ~ a7, a ~ a8, a ~ a9, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6, b ~ b7, b ~ b8, b ~ b9) => Each (T9 a a2 a3 a4 a5 a6 a7 a8 a9) (T9 b b2 b3 b4 b5 b6 b7 b8 b9) a b Source # 
Instance details

Defined in Data.Tuple.Strict.Lens.Each

Methods

each :: Traversal (T9 a a2 a3 a4 a5 a6 a7 a8 a9) (T9 b b2 b3 b4 b5 b6 b7 b8 b9) a b #

Orphan instances

a ~ a' => Each (T1 a) (T1 a') a a' Source # 
Instance details

Methods

each :: Traversal (T1 a) (T1 a') a a' #

(a ~ a', b ~ b') => Each (T2 a a') (T2 b b') a b Source # 
Instance details

Methods

each :: Traversal (T2 a a') (T2 b b') a b #

(a ~ a2, a ~ a3, b ~ b2, b ~ b3) => Each (T3 a a2 a3) (T3 b b2 b3) a b Source # 
Instance details

Methods

each :: Traversal (T3 a a2 a3) (T3 b b2 b3) a b #

(a ~ a2, a ~ a3, a ~ a4, b ~ b2, b ~ b3, b ~ b4) => Each (T4 a a2 a3 a4) (T4 b b2 b3 b4) a b Source # 
Instance details

Methods

each :: Traversal (T4 a a2 a3 a4) (T4 b b2 b3 b4) a b #

(a ~ a2, a ~ a3, a ~ a4, a ~ a5, b ~ b2, b ~ b3, b ~ b4, b ~ b5) => Each (T5 a a2 a3 a4 a5) (T5 b b2 b3 b4 b5) a b Source # 
Instance details

Methods

each :: Traversal (T5 a a2 a3 a4 a5) (T5 b b2 b3 b4 b5) a b #

(a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6) => Each (T6 a a2 a3 a4 a5 a6) (T6 b b2 b3 b4 b5 b6) a b Source # 
Instance details

Methods

each :: Traversal (T6 a a2 a3 a4 a5 a6) (T6 b b2 b3 b4 b5 b6) a b #

(a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, a ~ a7, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6, b ~ b7) => Each (T7 a a2 a3 a4 a5 a6 a7) (T7 b b2 b3 b4 b5 b6 b7) a b Source # 
Instance details

Methods

each :: Traversal (T7 a a2 a3 a4 a5 a6 a7) (T7 b b2 b3 b4 b5 b6 b7) a b #

(a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, a ~ a7, a ~ a8, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6, b ~ b7, b ~ b8) => Each (T8 a a2 a3 a4 a5 a6 a7 a8) (T8 b b2 b3 b4 b5 b6 b7 b8) a b Source # 
Instance details

Methods

each :: Traversal (T8 a a2 a3 a4 a5 a6 a7 a8) (T8 b b2 b3 b4 b5 b6 b7 b8) a b #

(a ~ a2, a ~ a3, a ~ a4, a ~ a5, a ~ a6, a ~ a7, a ~ a8, a ~ a9, b ~ b2, b ~ b3, b ~ b4, b ~ b5, b ~ b6, b ~ b7, b ~ b8, b ~ b9) => Each (T9 a a2 a3 a4 a5 a6 a7 a8 a9) (T9 b b2 b3 b4 b5 b6 b7 b8 b9) a b Source # 
Instance details

Methods

each :: Traversal (T9 a a2 a3 a4 a5 a6 a7 a8 a9) (T9 b b2 b3 b4 b5 b6 b7 b8 b9) a b #