| Copyright | (C) 2013-2016 Edward Kmett 2015-2016 Artyom Kazak 2018 Monadfix |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
Lens.Micro.GHC
Contents
Description
By importing this module you get all functions and types from microlens, as well as the following instances:
Synopsis
- (&) :: a -> (a -> b) -> b
- (<&>) :: Functor f => f a -> (a -> b) -> f b
- (%~) :: ASetter s t a b -> (a -> b) -> s -> t
- (+~) :: Num a => ASetter s t a a -> a -> s -> t
- (-~) :: Num a => ASetter s t a a -> a -> s -> t
- (.~) :: ASetter s t a b -> b -> s -> t
- (<%~) :: LensLike ((,) b) s t a b -> (a -> b) -> s -> (b, t)
- (<<%~) :: LensLike ((,) a) s t a b -> (a -> b) -> s -> (a, t)
- (<<.~) :: LensLike ((,) a) s t a b -> b -> s -> (a, t)
- (<>~) :: Monoid a => ASetter s t a a -> a -> s -> t
- (?~) :: ASetter s t a (Maybe b) -> b -> s -> t
- (^.) :: s -> Getting a s a -> a
- (^..) :: s -> Getting (Endo [a]) s a -> [a]
- (^?) :: s -> Getting (First a) s a -> Maybe a
- (^?!) :: HasCallStack => s -> Getting (Endo a) s a -> a
- _Just :: forall a a' f. Applicative f => (a -> f a') -> Maybe a -> f (Maybe a')
- _Left :: forall a b a' f. Applicative f => (a -> f a') -> Either a b -> f (Either a' b)
- _Nothing :: forall a f. Applicative f => (() -> f ()) -> Maybe a -> f (Maybe a)
- _Right :: forall a b b' f. Applicative f => (b -> f b') -> Either a b -> f (Either a b')
- _Show :: (Show a, Read a) => Traversal' String a
- _head :: Cons s s a a => Traversal' s a
- _init :: Snoc s s a a => Traversal' s s
- _last :: Snoc s s a a => Traversal' s a
- _tail :: Cons s s a a => Traversal' s s
- allOf :: Getting All s a -> (a -> Bool) -> s -> Bool
- anyOf :: Getting Any s a -> (a -> Bool) -> s -> Bool
- both :: forall a b f. Applicative f => (a -> f b) -> (a, a) -> f (b, b)
- cosmosOf :: Traversal a t a t -> Traversal a t a b'
- failing :: Traversal s t a b -> Traversal s t a b -> Traversal s t a b
- filtered :: (a -> Bool) -> Traversal' a a
- folding :: Foldable f => (s -> f a) -> SimpleFold s a
- forOf :: LensLike f s t a b -> s -> (a -> f b) -> f t
- forOf_ :: Functor f => Getting (Traversed r f) s a -> s -> (a -> f r) -> f ()
- has :: Getting Any s a -> s -> Bool
- lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b
- lined :: Traversal' String String
- mapAccumLOf :: LensLike (State acc) s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
- mapMOf :: LensLike (WrappedMonad m) s t a b -> (a -> m b) -> s -> m t
- mapped :: Functor f => ASetter (f a) (f b) a b
- non :: Eq a => a -> Lens' (Maybe a) a
- noneOf :: Getting Any s a -> (a -> Bool) -> s -> Bool
- over :: ASetter s t a b -> (a -> b) -> s -> t
- rewriteMOf :: Monad m => LensLike (WrappedMonad m) a b a b -> (b -> m (Maybe a)) -> a -> m b
- rewriteOf :: ASetter a b a b -> (b -> Maybe a) -> a -> b
- set :: ASetter s t a b -> b -> s -> t
- singular :: HasCallStack => Traversal s t a a -> Lens s t a a
- to :: (s -> a) -> SimpleGetter s a
- toListOf :: Getting (Endo [a]) s a -> s -> [a]
- transformMOf :: Monad m => LensLike (WrappedMonad m) a b a b -> (b -> m b) -> a -> m b
- transformOf :: ASetter a b a b -> (b -> b) -> a -> b
- traverseOf :: LensLike f s t a b -> (a -> f b) -> s -> f t
- traverseOf_ :: Functor f => Getting (Traversed r f) s a -> (a -> f r) -> s -> f ()
- worded :: Traversal' String String
- foldMapOf :: Getting r s a -> (a -> r) -> s -> r
- folded :: forall (f :: Type -> Type) a. Foldable f => SimpleFold (f a) a
- sets :: ((a -> b) -> s -> t) -> ASetter s t a b
- traversed :: forall (f :: Type -> Type) a b. Traversable f => Traversal (f a) (f b) a b
- class Field1 s t a b | s -> a, t -> b, s b -> t, t a -> s where
- class Field2 s t a b | s -> a, t -> b, s b -> t, t a -> s where
- class Field3 s t a b | s -> a, t -> b, s b -> t, t a -> s where
- class Field4 s t a b | s -> a, t -> b, s b -> t, t a -> s where
- class Field5 s t a b | s -> a, t -> b, s b -> t, t a -> s where
- class Field6 s t a b | s -> a, t -> b, s b -> t, t a -> s where
- class Field7 s t a b | s -> a, t -> b, s b -> t, t a -> s where
- class Field8 s t a b | s -> a, t -> b, s b -> t, t a -> s where
- class Field9 s t a b | s -> a, t -> b, s b -> t, t a -> s where
- at :: At m => Index m -> Lens' m (Maybe (IxValue m))
- each :: Each s t a b => Traversal s t a b
- ix :: Ixed m => Index m -> Traversal' m (IxValue m)
- lazy :: Strict lazy strict => Lens' strict lazy
- strict :: Strict lazy strict => Lens' lazy strict
- type ASetter s t a b = (a -> Identity b) -> s -> Identity t
- type ASetter' s a = ASetter s s a a
- type Getting r s a = (a -> Const r a) -> s -> Const r s
- type Lens s t a b = forall (f :: Type -> Type). Functor f => (a -> f b) -> s -> f t
- type Lens' s a = Lens s s a a
- type LensLike (f :: Type -> Type) s t a b = (a -> f b) -> s -> f t
- type LensLike' (f :: Type -> Type) s a = LensLike f s s a a
- type SimpleFold s a = forall r. Monoid r => Getting r s a
- type SimpleGetter s a = forall r. Getting r s a
- type Traversal s t a b = forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t
- type Traversal' s a = Traversal s s a a
- packedBytes :: IsByteString t => Lens' [Word8] t
- unpackedBytes :: IsByteString t => Lens' t [Word8]
- packedChars :: IsByteString t => Lens' String t
- unpackedChars :: IsByteString t => Lens' t String
- chars :: IsByteString t => Traversal' t Char
Documentation
_Show :: (Show a, Read a) => Traversal' String a #
_head :: Cons s s a a => Traversal' s a #
_init :: Snoc s s a a => Traversal' s s #
_last :: Snoc s s a a => Traversal' s a #
_tail :: Cons s s a a => Traversal' s s #
filtered :: (a -> Bool) -> Traversal' a a #
folding :: Foldable f => (s -> f a) -> SimpleFold s a #
lined :: Traversal' String String #
mapAccumLOf :: LensLike (State acc) s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t) #
rewriteMOf :: Monad m => LensLike (WrappedMonad m) a b a b -> (b -> m (Maybe a)) -> a -> m b #
to :: (s -> a) -> SimpleGetter s a #
transformMOf :: Monad m => LensLike (WrappedMonad m) a b a b -> (b -> m b) -> a -> m b #
transformOf :: ASetter a b a b -> (b -> b) -> a -> b #
traverseOf :: LensLike f s t a b -> (a -> f b) -> s -> f t #
traverseOf_ :: Functor f => Getting (Traversed r f) s a -> (a -> f r) -> s -> f () #
worded :: Traversal' String String #
folded :: forall (f :: Type -> Type) a. Foldable f => SimpleFold (f a) a #
class Field1 s t a b | s -> a, t -> b, s b -> t, t a -> s where #
Instances
| Field1 (a, b) (a', b) a a' # | |
Defined in Lens.Micro.FieldN | |
| Field1 (a, b, c) (a', b, c) a a' # | |
Defined in Lens.Micro.FieldN | |
| Field1 (a, b, c, d) (a', b, c, d) a a' # | |
Defined in Lens.Micro.FieldN | |
| Field1 (a, b, c, d, e) (a', b, c, d, e) a a' # | |
Defined in Lens.Micro.FieldN | |
| Field1 (a, b, c, d, e, f) (a', b, c, d, e, f) a a' # | |
Defined in Lens.Micro.FieldN | |
| Field1 (a, b, c, d, e, f, g) (a', b, c, d, e, f, g) a a' # | |
Defined in Lens.Micro.FieldN | |
| Field1 (a, b, c, d, e, f, g, h) (a', b, c, d, e, f, g, h) a a' # | |
Defined in Lens.Micro.FieldN | |
| Field1 (a, b, c, d, e, f, g, h, i) (a', b, c, d, e, f, g, h, i) a a' # | |
Defined in Lens.Micro.FieldN | |
class Field2 s t a b | s -> a, t -> b, s b -> t, t a -> s where #
Instances
| Field2 (a, b) (a, b') b b' # | |
Defined in Lens.Micro.FieldN | |
| Field2 (a, b, c) (a, b', c) b b' # | |
Defined in Lens.Micro.FieldN | |
| Field2 (a, b, c, d) (a, b', c, d) b b' # | |
Defined in Lens.Micro.FieldN | |
| Field2 (a, b, c, d, e) (a, b', c, d, e) b b' # | |
Defined in Lens.Micro.FieldN | |
| Field2 (a, b, c, d, e, f) (a, b', c, d, e, f) b b' # | |
Defined in Lens.Micro.FieldN | |
| Field2 (a, b, c, d, e, f, g) (a, b', c, d, e, f, g) b b' # | |
Defined in Lens.Micro.FieldN | |
| Field2 (a, b, c, d, e, f, g, h) (a, b', c, d, e, f, g, h) b b' # | |
Defined in Lens.Micro.FieldN | |
| Field2 (a, b, c, d, e, f, g, h, i) (a, b', c, d, e, f, g, h, i) b b' # | |
Defined in Lens.Micro.FieldN | |
class Field3 s t a b | s -> a, t -> b, s b -> t, t a -> s where #
Instances
| Field3 (a, b, c) (a, b, c') c c' # | |
Defined in Lens.Micro.FieldN | |
| Field3 (a, b, c, d) (a, b, c', d) c c' # | |
Defined in Lens.Micro.FieldN | |
| Field3 (a, b, c, d, e) (a, b, c', d, e) c c' # | |
Defined in Lens.Micro.FieldN | |
| Field3 (a, b, c, d, e, f) (a, b, c', d, e, f) c c' # | |
Defined in Lens.Micro.FieldN | |
| Field3 (a, b, c, d, e, f, g) (a, b, c', d, e, f, g) c c' # | |
Defined in Lens.Micro.FieldN | |
| Field3 (a, b, c, d, e, f, g, h) (a, b, c', d, e, f, g, h) c c' # | |
Defined in Lens.Micro.FieldN | |
| Field3 (a, b, c, d, e, f, g, h, i) (a, b, c', d, e, f, g, h, i) c c' # | |
Defined in Lens.Micro.FieldN | |
class Field4 s t a b | s -> a, t -> b, s b -> t, t a -> s where #
Instances
| Field4 (a, b, c, d) (a, b, c, d') d d' # | |
Defined in Lens.Micro.FieldN | |
| Field4 (a, b, c, d, e) (a, b, c, d', e) d d' # | |
Defined in Lens.Micro.FieldN | |
| Field4 (a, b, c, d, e, f) (a, b, c, d', e, f) d d' # | |
Defined in Lens.Micro.FieldN | |
| Field4 (a, b, c, d, e, f, g) (a, b, c, d', e, f, g) d d' # | |
Defined in Lens.Micro.FieldN | |
| Field4 (a, b, c, d, e, f, g, h) (a, b, c, d', e, f, g, h) d d' # | |
Defined in Lens.Micro.FieldN | |
| Field4 (a, b, c, d, e, f, g, h, i) (a, b, c, d', e, f, g, h, i) d d' # | |
Defined in Lens.Micro.FieldN | |
class Field5 s t a b | s -> a, t -> b, s b -> t, t a -> s where #
Instances
| Field5 (a, b, c, d, e) (a, b, c, d, e') e e' # | |
Defined in Lens.Micro.FieldN | |
| Field5 (a, b, c, d, e, f) (a, b, c, d, e', f) e e' # | |
Defined in Lens.Micro.FieldN | |
| Field5 (a, b, c, d, e, f, g) (a, b, c, d, e', f, g) e e' # | |
Defined in Lens.Micro.FieldN | |
| Field5 (a, b, c, d, e, f, g, h) (a, b, c, d, e', f, g, h) e e' # | |
Defined in Lens.Micro.FieldN | |
| Field5 (a, b, c, d, e, f, g, h, i) (a, b, c, d, e', f, g, h, i) e e' # | |
Defined in Lens.Micro.FieldN | |
class Field6 s t a b | s -> a, t -> b, s b -> t, t a -> s where #
Instances
| Field6 (a, b, c, d, e, f) (a, b, c, d, e, f') f f' # | |
Defined in Lens.Micro.FieldN | |
| Field6 (a, b, c, d, e, f, g) (a, b, c, d, e, f', g) f f' # | |
Defined in Lens.Micro.FieldN | |
| Field6 (a, b, c, d, e, f, g, h) (a, b, c, d, e, f', g, h) f f' # | |
Defined in Lens.Micro.FieldN | |
| Field6 (a, b, c, d, e, f, g, h, i) (a, b, c, d, e, f', g, h, i) f f' # | |
Defined in Lens.Micro.FieldN | |
class Field7 s t a b | s -> a, t -> b, s b -> t, t a -> s where #
Instances
| Field7 (a, b, c, d, e, f, g) (a, b, c, d, e, f, g') g g' # | |
Defined in Lens.Micro.FieldN | |
| Field7 (a, b, c, d, e, f, g, h) (a, b, c, d, e, f, g', h) g g' # | |
Defined in Lens.Micro.FieldN | |
| Field7 (a, b, c, d, e, f, g, h, i) (a, b, c, d, e, f, g', h, i) g g' # | |
Defined in Lens.Micro.FieldN | |
class Field8 s t a b | s -> a, t -> b, s b -> t, t a -> s where #
Instances
| Field8 (a, b, c, d, e, f, g, h) (a, b, c, d, e, f, g, h') h h' # | |
Defined in Lens.Micro.FieldN | |
| Field8 (a, b, c, d, e, f, g, h, i) (a, b, c, d, e, f, g, h', i) h h' # | |
Defined in Lens.Micro.FieldN | |
ix :: Ixed m => Index m -> Traversal' m (IxValue m) #
type SimpleFold s a = forall r. Monoid r => Getting r s a #
type SimpleGetter s a = forall r. Getting r s a #
type Traversal' s a = Traversal s s a a #
packedBytes :: IsByteString t => Lens' [Word8] t Source #
Treat a list of bytes as a strict or lazy ByteString.
unpackedBytes :: IsByteString t => Lens' t [Word8] Source #
Treat a strict or lazy ByteString as a list of bytes.
packedChars :: IsByteString t => Lens' String t Source #
Treat a String as a strict or lazy ByteString. (Note that it will garble characters above 0xFF, same as pack does.)
unpackedChars :: IsByteString t => Lens' t String Source #
Treat a strict or lazy ByteString as a String. (Just as packedChars, it will garble characters above 0xFF.)
chars :: IsByteString t => Traversal' t Char Source #
Traverse characters in a strict or lazy ByteString (to traverse bytes instead of characters, use each).
Orphan instances
| At IntSet Source # | |
| Ixed ByteString Source # | |
Methods ix :: Index ByteString -> Traversal' ByteString (IxValue ByteString) # | |
| Ixed ByteString Source # | |
Methods ix :: Index ByteString -> Traversal' ByteString (IxValue ByteString) # | |
| Ixed IntSet Source # | |
Methods ix :: Index IntSet -> Traversal' IntSet (IxValue IntSet) # | |
| Strict ByteString ByteString Source # | |
| Cons ByteString ByteString Word8 Word8 Source # | |
| Cons ByteString ByteString Word8 Word8 Source # | |
| (a ~ Word8, b ~ Word8) => Each ByteString ByteString a b Source # | |
| (a ~ Word8, b ~ Word8) => Each ByteString ByteString a b Source # | |
| Snoc ByteString ByteString Word8 Word8 Source # | |
| Snoc ByteString ByteString Word8 Word8 Source # | |
| At (IntMap a) Source # | |
| Ord k => At (Set k) Source # | |
| Ixed (IntMap a) Source # | |
Methods ix :: Index (IntMap a) -> Traversal' (IntMap a) (IxValue (IntMap a)) # | |
| Ixed (Seq a) Source # | |
Methods ix :: Index (Seq a) -> Traversal' (Seq a) (IxValue (Seq a)) # | |
| Ord k => Ixed (Set k) Source # | |
Methods ix :: Index (Set k) -> Traversal' (Set k) (IxValue (Set k)) # | |
| Ixed (Tree a) Source # | |
Methods ix :: Index (Tree a) -> Traversal' (Tree a) (IxValue (Tree a)) # | |
| Cons (Seq a) (Seq b) a b Source # | |
| Each (IntMap a) (IntMap b) a b Source # | |
| Each (Seq a) (Seq b) a b Source # | |
| Each (Tree a) (Tree b) a b Source # | |
| Snoc (Seq a) (Seq b) a b Source # | |
| Ord k => At (Map k a) Source # | |
| (IArray UArray e, Ix i) => Ixed (UArray i e) Source # | |
Methods ix :: Index (UArray i e) -> Traversal' (UArray i e) (IxValue (UArray i e)) # | |
| Ord k => Ixed (Map k a) Source # | |
Methods ix :: Index (Map k a) -> Traversal' (Map k a) (IxValue (Map k a)) # | |
| Ix i => Ixed (Array i e) Source # | |
Methods ix :: Index (Array i e) -> Traversal' (Array i e) (IxValue (Array i e)) # | |
| (Ix i, IArray UArray a, IArray UArray b, i ~ j) => Each (UArray i a) (UArray j b) a b Source # | |
| c ~ d => Each (Map c a) (Map d b) a b Source # | |
| (Ix i, i ~ j) => Each (Array i a) (Array j b) a b Source # | |
| Strict (StateT s m a) (StateT s m a) Source # | |
| Strict (WriterT w m a) (WriterT w m a) Source # | |
| Strict (RWST r w s m a) (RWST r w s m a) Source # | |