optics-core 0.4.1.1 → 0.4.2
raw patch · 32 files changed
+423/−244 lines, 32 filesdep ~containersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: containers
API changes (from Hackage documentation)
- Data.Tuple.Optics: instance Data.Tuple.Optics.Field1 ((GHC.Generics.:*:) f g p) ((GHC.Generics.:*:) f' g p) (f p) (f' p)
- Data.Tuple.Optics: instance Data.Tuple.Optics.Field1 (Data.Functor.Product.Product f g a) (Data.Functor.Product.Product f' g a) (f a) (f' a)
- Data.Tuple.Optics: instance Data.Tuple.Optics.Field2 ((GHC.Generics.:*:) f g p) ((GHC.Generics.:*:) f g' p) (g p) (g' p)
- Data.Tuple.Optics: instance Data.Tuple.Optics.Field2 (Data.Functor.Product.Product f g a) (Data.Functor.Product.Product f g' a) (g a) (g' a)
- Optics.AffineTraversal: type AffineTraversalVL s t a b = forall f. Functor f => (forall r. r -> f r) -> (a -> f b) -> s -> f t
- Optics.Arrow: instance Control.Arrow.Arrow p => Control.Arrow.Arrow (Optics.Arrow.WrappedArrow p i)
- Optics.Arrow: instance Control.Category.Category p => Control.Category.Category (Optics.Arrow.WrappedArrow p i)
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GAffineFieldSum path1 g1 h1 a b, Optics.Internal.Generic.GAffineFieldSum path2 g2 h2 a b) => Optics.Internal.Generic.GAffineFieldSum ('Optics.Internal.Generic.TypeLevel.PathTree path1 path2) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: h2) a b
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GConstructorSum path g1 h1 a b, g2 GHC.Types.~ h2) => Optics.Internal.Generic.GConstructorSum ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: h2) a b
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GConstructorSum path g2 h2 a b, g1 GHC.Types.~ h1) => Optics.Internal.Generic.GConstructorSum ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: h2) a b
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GFieldProd path g1 h1 a b, g2 GHC.Types.~ h2) => Optics.Internal.Generic.GFieldProd ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: h2) a b
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GFieldProd path g2 h2 a b, g1 GHC.Types.~ h1) => Optics.Internal.Generic.GFieldProd ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: h2) a b
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GPlateImpl f a, Optics.Internal.Generic.GPlateImpl g a) => Optics.Internal.Generic.GPlateImpl (f GHC.Generics.:*: g) a
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GPlateImpl f a, Optics.Internal.Generic.GPlateImpl g a) => Optics.Internal.Generic.GPlateImpl (f GHC.Generics.:+: g) a
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GPositionSum path1 g1 h1 a b, Optics.Internal.Generic.GPositionSum path2 g2 h2 a b) => Optics.Internal.Generic.GPositionSum ('Optics.Internal.Generic.TypeLevel.PathTree path1 path2) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: h2) a b
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GSetFieldProd path g1 h1 b, g2 GHC.Types.~ h2) => Optics.Internal.Generic.GSetFieldProd ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: h2) b
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GSetFieldProd path g2 h2 b, g1 GHC.Types.~ h1) => Optics.Internal.Generic.GSetFieldProd ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: h2) b
- Optics.Internal.Generic: instance (Optics.Internal.Generic.GSetFieldSum path1 g1 h1 b, Optics.Internal.Generic.GSetFieldSum path2 g2 h2 b) => Optics.Internal.Generic.GSetFieldSum ('Optics.Internal.Generic.TypeLevel.PathTree path1 path2) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: h2) b
- Optics.Internal.Generic: instance (Optics.Internal.Magic.Dysfunctional () () g h a b, (TypeError ...)) => Optics.Internal.Generic.GConstructorTuple g h a b
- Optics.Internal.Generic: instance (g GHC.Types.~ h) => Optics.Internal.Generic.GAffineFieldMaybe ('Data.Either.Left name) g h a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GAffineFieldMaybe epath g h a b => Optics.Internal.Generic.GAffineFieldSum ('Optics.Internal.Generic.TypeLevel.PathLeaf epath) (GHC.Generics.M1 GHC.Generics.C m g) (GHC.Generics.M1 GHC.Generics.C m h) a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GAffineFieldSum path g h a b => Optics.Internal.Generic.GAffineFieldSum path (GHC.Generics.M1 GHC.Generics.D m g) (GHC.Generics.M1 GHC.Generics.D m h) a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GConstructorSum path g h a b => Optics.Internal.Generic.GConstructorSum path (GHC.Generics.M1 GHC.Generics.D m g) (GHC.Generics.M1 GHC.Generics.D m h) a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GConstructorSum path g1 h1 a b => Optics.Internal.Generic.GConstructorSum ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: g2) a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GConstructorSum path g2 h2 a b => Optics.Internal.Generic.GConstructorSum ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:+: g2) (g1 GHC.Generics.:+: h2) a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GConstructorTuple g h a b => Optics.Internal.Generic.GConstructorSum '[] (GHC.Generics.M1 GHC.Generics.C m g) (GHC.Generics.M1 GHC.Generics.C m h) a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GFieldProd path g1 h1 a b => Optics.Internal.Generic.GFieldProd ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: g2) a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GFieldProd path g2 h2 a b => Optics.Internal.Generic.GFieldProd ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:*: g2) (g1 GHC.Generics.:*: h2) a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GFieldProd prodPath g h a b => Optics.Internal.Generic.GAffineFieldMaybe ('Data.Either.Right prodPath) g h a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GPlateImpl f a => Optics.Internal.Generic.GPlateImpl (GHC.Generics.M1 i c f) a
- Optics.Internal.Generic: instance Optics.Internal.Generic.GPositionSum path g h a b => Optics.Internal.Generic.GPositionSum path (GHC.Generics.M1 GHC.Generics.D m g) (GHC.Generics.M1 GHC.Generics.D m h) a b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GSetFieldProd path g1 h1 b => Optics.Internal.Generic.GSetFieldProd ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: g2) b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GSetFieldProd path g2 h2 b => Optics.Internal.Generic.GSetFieldProd ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:*: g2) (g1 GHC.Generics.:*: h2) b
- Optics.Internal.Generic: instance Optics.Internal.Generic.GSetFieldSum path g h b => Optics.Internal.Generic.GSetFieldSum path (GHC.Generics.M1 GHC.Generics.D m g) (GHC.Generics.M1 GHC.Generics.D m h) b
- Optics.Internal.Generic.TypeLevel: PathTree :: PathTree e -> PathTree e -> PathTree e
- Optics.IxAffineTraversal: type IxAffineTraversalVL i s t a b = forall f. Functor f => (forall r. r -> f r) -> (i -> a -> f b) -> s -> f t
- Optics.IxLens: type IxLensVL i s t a b = forall f. Functor f => (i -> a -> f b) -> s -> f t
- Optics.IxTraversal: type IxTraversalVL i s t a b = forall f. Applicative f => (i -> a -> f b) -> s -> f t
- Optics.Label: instance (Optics.Internal.Generic.GConstructorImpl repDefined name s t a b, _name GHC.Types.~ GHC.TypeLits.AppendSymbol "_" name) => Optics.Label.GenericOptic repDefined _name Optics.Internal.Optic.Types.A_Prism s t a b
- Optics.Lens: type LensVL s t a b = forall f. Functor f => (a -> f b) -> s -> f t
- Optics.Re: instance Optics.Internal.Bi.Bicontravariant p => Optics.Internal.Bi.Bifunctor (Optics.Re.Re p s t)
- Optics.Re: instance Optics.Internal.Bi.Bifunctor p => Optics.Internal.Bi.Bicontravariant (Optics.Re.Re p s t)
- Optics.Traversal: type TraversalVL s t a b = forall f. Applicative f => (a -> f b) -> s -> f t
+ Data.Tuple.Optics: ($dm_1) :: (Field1 s t a b, GPosition 1 s t a b) => Lens s t a b
+ Data.Tuple.Optics: ($dm_2) :: (Field2 s t a b, GPosition 2 s t a b) => Lens s t a b
+ Data.Tuple.Optics: ($dm_3) :: (Field3 s t a b, GPosition 3 s t a b) => Lens s t a b
+ Data.Tuple.Optics: ($dm_4) :: (Field4 s t a b, GPosition 4 s t a b) => Lens s t a b
+ Data.Tuple.Optics: ($dm_5) :: (Field5 s t a b, GPosition 5 s t a b) => Lens s t a b
+ Data.Tuple.Optics: ($dm_6) :: (Field6 s t a b, GPosition 6 s t a b) => Lens s t a b
+ Data.Tuple.Optics: ($dm_7) :: (Field7 s t a b, GPosition 7 s t a b) => Lens s t a b
+ Data.Tuple.Optics: ($dm_8) :: (Field8 s t a b, GPosition 8 s t a b) => Lens s t a b
+ Data.Tuple.Optics: ($dm_9) :: (Field9 s t a b, GPosition 9 s t a b) => Lens s t a b
+ Data.Tuple.Optics: instance forall k (f :: k -> *) (g :: k -> *) (a :: k) (f' :: k -> *). Data.Tuple.Optics.Field1 (Data.Functor.Product.Product f g a) (Data.Functor.Product.Product f' g a) (f a) (f' a)
+ Data.Tuple.Optics: instance forall k (f :: k -> *) (g :: k -> *) (a :: k) (g' :: k -> *). Data.Tuple.Optics.Field2 (Data.Functor.Product.Product f g a) (Data.Functor.Product.Product f g' a) (g a) (g' a)
+ Data.Tuple.Optics: instance forall k (f :: k -> *) (g :: k -> *) (p :: k) (f' :: k -> *). Data.Tuple.Optics.Field1 ((GHC.Generics.:*:) f g p) ((GHC.Generics.:*:) f' g p) (f p) (f' p)
+ Data.Tuple.Optics: instance forall k (f :: k -> *) (g :: k -> *) (p :: k) (g' :: k -> *). Data.Tuple.Optics.Field2 ((GHC.Generics.:*:) f g p) ((GHC.Generics.:*:) f g' p) (g p) (g' p)
+ Optics.AffineTraversal: adisjoin :: forall k l (is :: IxList) s t a b (js :: IxList). (Is k An_AffineTraversal, Is l An_AffineTraversal) => Optic k is s t a b -> Optic l js s t a b -> AffineTraversal s t a b
+ Optics.AffineTraversal: infixl 3 `adisjoin`
+ Optics.AffineTraversal: type AffineTraversalVL s t a b = forall (f :: Type -> Type). Functor f => forall r. () => r -> f r -> a -> f b -> s -> f t
+ Optics.Arrow: instance forall k (p :: * -> * -> *) (i :: k). Control.Arrow.Arrow p => Control.Arrow.Arrow (Optics.Arrow.WrappedArrow p i)
+ Optics.Arrow: instance forall k1 k2 (p :: k1 -> k1 -> *) (i :: k2). Control.Category.Category p => Control.Category.Category (Optics.Arrow.WrappedArrow p i)
+ Optics.At.Core: ($dmix) :: (Ixed m, At m, IxKind m ~ An_AffineTraversal) => Index m -> Optic' (IxKind m) NoIx m (IxValue m)
+ Optics.Each.Core: ($dmeach) :: forall (g :: Type -> Type). (Each i s t a b, TraversableWithIndex i g, s ~ g a, t ~ g b) => IxTraversal i s t a b
+ Optics.Empty.Core: ($dm_Empty) :: (AsEmpty a, Monoid a, Eq a) => Prism' a ()
+ Optics.Indexed.Core: ($dmifoldMap) :: (FoldableWithIndex i f, TraversableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m
+ Optics.Indexed.Core: ($dmimap) :: (FunctorWithIndex i f, TraversableWithIndex i f) => (i -> a -> b) -> f a -> f b
+ Optics.Indexed.Core: ($dmitraverse) :: (TraversableWithIndex i t, i ~ Int, Applicative f) => (i -> a -> f b) -> t a -> f (t b)
+ Optics.Internal.Generic: instance forall k (epath :: Data.Either.Either GHC.Types.Symbol [Optics.Internal.Generic.TypeLevel.Path]) (g :: k -> *) (h :: k -> *) a b (m :: GHC.Generics.Meta). Optics.Internal.Generic.GAffineFieldMaybe epath g h a b => Optics.Internal.Generic.GAffineFieldSum ('Optics.Internal.Generic.TypeLevel.PathLeaf epath) (GHC.Generics.M1 GHC.Generics.C m g) (GHC.Generics.M1 GHC.Generics.C m h) a b
+ Optics.Internal.Generic: instance forall k (f :: k -> *) a (g :: k -> *). (Optics.Internal.Generic.GPlateImpl f a, Optics.Internal.Generic.GPlateImpl g a) => Optics.Internal.Generic.GPlateImpl (f GHC.Generics.:*: g) a
+ Optics.Internal.Generic: instance forall k (f :: k -> *) a (g :: k -> *). (Optics.Internal.Generic.GPlateImpl f a, Optics.Internal.Generic.GPlateImpl g a) => Optics.Internal.Generic.GPlateImpl (f GHC.Generics.:+: g) a
+ Optics.Internal.Generic: instance forall k (f :: k -> *) a i (c :: GHC.Generics.Meta). Optics.Internal.Generic.GPlateImpl f a => Optics.Internal.Generic.GPlateImpl (GHC.Generics.M1 i c f) a
+ Optics.Internal.Generic: instance forall k (g :: k -> *) (h :: k -> *) (name :: GHC.Types.Symbol) a b. (g GHC.Types.~ h) => Optics.Internal.Generic.GAffineFieldMaybe ('Data.Either.Left name) g h a b
+ Optics.Internal.Generic: instance forall k (g :: k -> *) (h :: k -> *) a b (m :: GHC.Generics.Meta). Optics.Internal.Generic.GConstructorTuple g h a b => Optics.Internal.Generic.GConstructorSum '[] (GHC.Generics.M1 GHC.Generics.C m g) (GHC.Generics.M1 GHC.Generics.C m h) a b
+ Optics.Internal.Generic: instance forall k (g :: k -> *) (h :: k -> *) a b. (Optics.Internal.Magic.Dysfunctional () () g h a b, (TypeError ...)) => Optics.Internal.Generic.GConstructorTuple g h a b
+ Optics.Internal.Generic: instance forall k (path :: Optics.Internal.Generic.TypeLevel.PathTree (GHC.TypeNats.Nat, GHC.TypeNats.Nat)) (g :: k -> *) (h :: k -> *) a b (m :: GHC.Generics.Meta). Optics.Internal.Generic.GPositionSum path g h a b => Optics.Internal.Generic.GPositionSum path (GHC.Generics.M1 GHC.Generics.D m g) (GHC.Generics.M1 GHC.Generics.D m h) a b
+ Optics.Internal.Generic: instance forall k (path :: Optics.Internal.Generic.TypeLevel.PathTree GHC.Types.Symbol) (g :: k -> *) (h :: k -> *) a b (m :: GHC.Generics.Meta). Optics.Internal.Generic.GAffineFieldSum path g h a b => Optics.Internal.Generic.GAffineFieldSum path (GHC.Generics.M1 GHC.Generics.D m g) (GHC.Generics.M1 GHC.Generics.D m h) a b
+ Optics.Internal.Generic: instance forall k (path :: Optics.Internal.Generic.TypeLevel.PathTree GHC.Types.Symbol) (g :: k -> *) (h :: k -> *) b (m :: GHC.Generics.Meta). Optics.Internal.Generic.GSetFieldSum path g h b => Optics.Internal.Generic.GSetFieldSum path (GHC.Generics.M1 GHC.Generics.D m g) (GHC.Generics.M1 GHC.Generics.D m h) b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g :: k -> *) (h :: k -> *) a b (m :: GHC.Generics.Meta). Optics.Internal.Generic.GConstructorSum path g h a b => Optics.Internal.Generic.GConstructorSum path (GHC.Generics.M1 GHC.Generics.D m g) (GHC.Generics.M1 GHC.Generics.D m h) a b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g1 :: k -> *) (h1 :: k -> *) a b (g2 :: k -> *) (h2 :: k -> *). (Optics.Internal.Generic.GConstructorSum path g1 h1 a b, g2 GHC.Types.~ h2) => Optics.Internal.Generic.GConstructorSum ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: h2) a b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g1 :: k -> *) (h1 :: k -> *) a b (g2 :: k -> *) (h2 :: k -> *). (Optics.Internal.Generic.GFieldProd path g1 h1 a b, g2 GHC.Types.~ h2) => Optics.Internal.Generic.GFieldProd ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: h2) a b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g1 :: k -> *) (h1 :: k -> *) a b (g2 :: k -> *). Optics.Internal.Generic.GConstructorSum path g1 h1 a b => Optics.Internal.Generic.GConstructorSum ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: g2) a b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g1 :: k -> *) (h1 :: k -> *) a b (g2 :: k -> *). Optics.Internal.Generic.GFieldProd path g1 h1 a b => Optics.Internal.Generic.GFieldProd ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: g2) a b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g1 :: k -> *) (h1 :: k -> *) b (g2 :: k -> *) (h2 :: k -> *). (Optics.Internal.Generic.GSetFieldProd path g1 h1 b, g2 GHC.Types.~ h2) => Optics.Internal.Generic.GSetFieldProd ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: h2) b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g1 :: k -> *) (h1 :: k -> *) b (g2 :: k -> *). Optics.Internal.Generic.GSetFieldProd path g1 h1 b => Optics.Internal.Generic.GSetFieldProd ('Optics.Internal.Generic.TypeLevel.PathLeft : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: g2) b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g2 :: k -> *) (h2 :: k -> *) a b (g1 :: k -> *) (h1 :: k -> *). (Optics.Internal.Generic.GConstructorSum path g2 h2 a b, g1 GHC.Types.~ h1) => Optics.Internal.Generic.GConstructorSum ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: h2) a b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g2 :: k -> *) (h2 :: k -> *) a b (g1 :: k -> *) (h1 :: k -> *). (Optics.Internal.Generic.GFieldProd path g2 h2 a b, g1 GHC.Types.~ h1) => Optics.Internal.Generic.GFieldProd ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: h2) a b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g2 :: k -> *) (h2 :: k -> *) a b (g1 :: k -> *). Optics.Internal.Generic.GConstructorSum path g2 h2 a b => Optics.Internal.Generic.GConstructorSum ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:+: g2) (g1 GHC.Generics.:+: h2) a b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g2 :: k -> *) (h2 :: k -> *) a b (g1 :: k -> *). Optics.Internal.Generic.GFieldProd path g2 h2 a b => Optics.Internal.Generic.GFieldProd ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:*: g2) (g1 GHC.Generics.:*: h2) a b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g2 :: k -> *) (h2 :: k -> *) b (g1 :: k -> *) (h1 :: k -> *). (Optics.Internal.Generic.GSetFieldProd path g2 h2 b, g1 GHC.Types.~ h1) => Optics.Internal.Generic.GSetFieldProd ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:*: g2) (h1 GHC.Generics.:*: h2) b
+ Optics.Internal.Generic: instance forall k (path :: [Optics.Internal.Generic.TypeLevel.Path]) (g2 :: k -> *) (h2 :: k -> *) b (g1 :: k -> *). Optics.Internal.Generic.GSetFieldProd path g2 h2 b => Optics.Internal.Generic.GSetFieldProd ('Optics.Internal.Generic.TypeLevel.PathRight : path) (g1 GHC.Generics.:*: g2) (g1 GHC.Generics.:*: h2) b
+ Optics.Internal.Generic: instance forall k (path1 :: Optics.Internal.Generic.TypeLevel.PathTree (GHC.TypeNats.Nat, GHC.TypeNats.Nat)) (g1 :: k -> *) (h1 :: k -> *) a b (path2 :: Optics.Internal.Generic.TypeLevel.PathTree (GHC.TypeNats.Nat, GHC.TypeNats.Nat)) (g2 :: k -> *) (h2 :: k -> *). (Optics.Internal.Generic.GPositionSum path1 g1 h1 a b, Optics.Internal.Generic.GPositionSum path2 g2 h2 a b) => Optics.Internal.Generic.GPositionSum ('Optics.Internal.Generic.TypeLevel.PathNode path1 path2) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: h2) a b
+ Optics.Internal.Generic: instance forall k (path1 :: Optics.Internal.Generic.TypeLevel.PathTree GHC.Types.Symbol) (g1 :: k -> *) (h1 :: k -> *) a b (path2 :: Optics.Internal.Generic.TypeLevel.PathTree GHC.Types.Symbol) (g2 :: k -> *) (h2 :: k -> *). (Optics.Internal.Generic.GAffineFieldSum path1 g1 h1 a b, Optics.Internal.Generic.GAffineFieldSum path2 g2 h2 a b) => Optics.Internal.Generic.GAffineFieldSum ('Optics.Internal.Generic.TypeLevel.PathNode path1 path2) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: h2) a b
+ Optics.Internal.Generic: instance forall k (path1 :: Optics.Internal.Generic.TypeLevel.PathTree GHC.Types.Symbol) (g1 :: k -> *) (h1 :: k -> *) b (path2 :: Optics.Internal.Generic.TypeLevel.PathTree GHC.Types.Symbol) (g2 :: k -> *) (h2 :: k -> *). (Optics.Internal.Generic.GSetFieldSum path1 g1 h1 b, Optics.Internal.Generic.GSetFieldSum path2 g2 h2 b) => Optics.Internal.Generic.GSetFieldSum ('Optics.Internal.Generic.TypeLevel.PathNode path1 path2) (g1 GHC.Generics.:+: g2) (h1 GHC.Generics.:+: h2) b
+ Optics.Internal.Generic: instance forall k (prodPath :: [Optics.Internal.Generic.TypeLevel.Path]) (g :: k -> *) (h :: k -> *) a b. Optics.Internal.Generic.GFieldProd prodPath g h a b => Optics.Internal.Generic.GAffineFieldMaybe ('Data.Either.Right prodPath) g h a b
+ Optics.Internal.Generic.TypeLevel: PathNode :: PathTree e -> PathTree e -> PathTree e
+ Optics.IxAffineTraversal: iadisjoin :: forall k l (is1 :: IxList) i (is2 :: IxList) s t a b. (Is k An_AffineTraversal, Is l An_AffineTraversal, HasSingleIndex is1 i, HasSingleIndex is2 i) => Optic k is1 s t a b -> Optic l is2 s t a b -> IxAffineTraversal i s t a b
+ Optics.IxAffineTraversal: infixl 3 `iadisjoin`
+ Optics.IxAffineTraversal: type IxAffineTraversalVL i s t a b = forall (f :: Type -> Type). Functor f => forall r. () => r -> f r -> i -> a -> f b -> s -> f t
+ Optics.IxFold: ($dmifoldMap) :: (FoldableWithIndex i f, TraversableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m
+ Optics.IxLens: type IxLensVL i s t a b = forall (f :: Type -> Type). Functor f => i -> a -> f b -> s -> f t
+ Optics.IxSetter: ($dmimap) :: (FunctorWithIndex i f, TraversableWithIndex i f) => (i -> a -> b) -> f a -> f b
+ Optics.IxTraversal: ($dmitraverse) :: (TraversableWithIndex i t, i ~ Int, Applicative f) => (i -> a -> f b) -> t a -> f (t b)
+ Optics.IxTraversal: idisjoin :: forall k l (is1 :: IxList) i (is2 :: IxList) s t a b. (Is k A_Traversal, Is l A_Traversal, HasSingleIndex is1 i, HasSingleIndex is2 i) => Optic k is1 s t a b -> Optic l is2 s t a b -> IxTraversal i s t a b
+ Optics.IxTraversal: infixl 3 `idisjoin`
+ Optics.IxTraversal: type IxTraversalVL i s t a b = forall (f :: Type -> Type). Applicative f => i -> a -> f b -> s -> f t
+ Optics.Label: instance (Optics.Internal.Generic.GAffineFieldImpl repDefined name s t a b, origName GHC.Types.~ GHC.TypeLits.AppendSymbol "?" name) => Optics.Label.GenericOptic repDefined origName Optics.Internal.Optic.Types.An_AffineTraversal s t a b
+ Optics.Label: instance (Optics.Internal.Generic.GConstructorImpl repDefined name s t a b, origName GHC.Types.~ GHC.TypeLits.AppendSymbol "_" name) => Optics.Label.GenericOptic repDefined origName Optics.Internal.Optic.Types.A_Prism s t a b
+ Optics.Lens: type LensVL s t a b = forall (f :: Type -> Type). Functor f => a -> f b -> s -> f t
+ Optics.Re: instance forall k (p :: k -> * -> * -> *) s t. Optics.Internal.Bi.Bicontravariant p => Optics.Internal.Bi.Bifunctor (Optics.Re.Re p s t)
+ Optics.Re: instance forall k (p :: k -> * -> * -> *) s t. Optics.Internal.Bi.Bifunctor p => Optics.Internal.Bi.Bicontravariant (Optics.Re.Re p s t)
+ Optics.Traversal: disjoin :: forall k l (is :: IxList) s t a b (js :: IxList). (Is k A_Traversal, Is l A_Traversal) => Optic k is s t a b -> Optic l js s t a b -> Traversal s t a b
+ Optics.Traversal: infixl 3 `disjoin`
+ Optics.Traversal: type TraversalVL s t a b = forall (f :: Type -> Type). Applicative f => a -> f b -> s -> f t
+ Optics.Traversal: unsafePartsOf :: forall k (is :: IxList) s t a b. Is k A_Traversal => Optic k is s t a b -> Lens s t [a] [b]
- Data.IntMap.Optics: toMapOf :: (Is k A_Fold, is `HasSingleIndex` Int) => Optic' k is s a -> s -> IntMap a
+ Data.IntMap.Optics: toMapOf :: forall k (is :: IxList) s a. (Is k A_Fold, HasSingleIndex is Int) => Optic' k is s a -> s -> IntMap a
- Data.IntSet.Optics: setOf :: Is k A_Fold => Optic' k is s Int -> s -> IntSet
+ Data.IntSet.Optics: setOf :: forall k (is :: IxList) s. Is k A_Fold => Optic' k is s Int -> s -> IntSet
- Data.Map.Optics: toMapOf :: (Is k A_Fold, is `HasSingleIndex` i, Ord i) => Optic' k is s a -> s -> Map i a
+ Data.Map.Optics: toMapOf :: forall k (is :: IxList) i s a. (Is k A_Fold, HasSingleIndex is i, Ord i) => Optic' k is s a -> s -> Map i a
- Data.Maybe.Optics: (%?) :: (AppendIndices is js ks, JoinKinds k A_Prism k', JoinKinds k' l m) => Optic k is s t (Maybe u) (Maybe v) -> Optic l js u v a b -> Optic m ks s t a b
+ Data.Maybe.Optics: (%?) :: forall (is :: IxList) (js :: IxList) (ks :: IxList) k k' l m s t u v a b. (AppendIndices is js ks, JoinKinds k A_Prism k', JoinKinds k' l m) => Optic k is s t (Maybe u) (Maybe v) -> Optic l js u v a b -> Optic m ks s t a b
- Data.Sequence.Optics: seqOf :: Is k A_Fold => Optic' k is s a -> s -> Seq a
+ Data.Sequence.Optics: seqOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> s -> Seq a
- Data.Set.Optics: setOf :: (Is k A_Fold, Ord a) => Optic' k is s a -> s -> Set a
+ Data.Set.Optics: setOf :: forall k a (is :: IxList) s. (Is k A_Fold, Ord a) => Optic' k is s a -> s -> Set a
- Data.Tuple.Optics: _1 :: (Field1 s t a b, GPosition 1 s t a b) => Lens s t a b
+ Data.Tuple.Optics: _1 :: Field1 s t a b => Lens s t a b
- Data.Tuple.Optics: _2 :: (Field2 s t a b, GPosition 2 s t a b) => Lens s t a b
+ Data.Tuple.Optics: _2 :: Field2 s t a b => Lens s t a b
- Data.Tuple.Optics: _3 :: (Field3 s t a b, GPosition 3 s t a b) => Lens s t a b
+ Data.Tuple.Optics: _3 :: Field3 s t a b => Lens s t a b
- Data.Tuple.Optics: _4 :: (Field4 s t a b, GPosition 4 s t a b) => Lens s t a b
+ Data.Tuple.Optics: _4 :: Field4 s t a b => Lens s t a b
- Data.Tuple.Optics: _5 :: (Field5 s t a b, GPosition 5 s t a b) => Lens s t a b
+ Data.Tuple.Optics: _5 :: Field5 s t a b => Lens s t a b
- Data.Tuple.Optics: _6 :: (Field6 s t a b, GPosition 6 s t a b) => Lens s t a b
+ Data.Tuple.Optics: _6 :: Field6 s t a b => Lens s t a b
- Data.Tuple.Optics: _7 :: (Field7 s t a b, GPosition 7 s t a b) => Lens s t a b
+ Data.Tuple.Optics: _7 :: Field7 s t a b => Lens s t a b
- Data.Tuple.Optics: _8 :: (Field8 s t a b, GPosition 8 s t a b) => Lens s t a b
+ Data.Tuple.Optics: _8 :: Field8 s t a b => Lens s t a b
- Data.Tuple.Optics: _9 :: (Field9 s t a b, GPosition 9 s t a b) => Lens s t a b
+ Data.Tuple.Optics: _9 :: Field9 s t a b => Lens s t a b
- Data.Typeable.Optics: _gcast :: (Typeable s, Typeable a) => AffineTraversal' (c s) (c a)
+ Data.Typeable.Optics: _gcast :: forall {k} (s :: k) (a :: k) c. (Typeable s, Typeable a) => AffineTraversal' (c s) (c a)
- GHC.Generics.Optics: _K1 :: Iso (K1 i c p) (K1 j d q) c d
+ GHC.Generics.Optics: _K1 :: forall {k1} {k2} i c (p :: k1) j d (q :: k2). Iso (K1 i c p) (K1 j d q) c d
- GHC.Generics.Optics: _L1 :: Prism ((a :+: c) t) ((b :+: c) t) (a t) (b t)
+ GHC.Generics.Optics: _L1 :: forall {k} a (c :: k -> Type) (t :: k) b. Prism ((a :+: c) t) ((b :+: c) t) (a t) (b t)
- GHC.Generics.Optics: _M1 :: Iso (M1 i c f p) (M1 j d g q) (f p) (g q)
+ GHC.Generics.Optics: _M1 :: forall {k1} {k2} i (c :: Meta) f (p :: k1) j (d :: Meta) g (q :: k2). Iso (M1 i c f p) (M1 j d g q) (f p) (g q)
- GHC.Generics.Optics: _R1 :: Prism ((c :+: a) t) ((c :+: b) t) (a t) (b t)
+ GHC.Generics.Optics: _R1 :: forall {k} (c :: k -> Type) a (t :: k) b. Prism ((c :+: a) t) ((c :+: b) t) (a t) (b t)
- GHC.Generics.Optics: _Rec1 :: Iso (Rec1 f p) (Rec1 g q) (f p) (g q)
+ GHC.Generics.Optics: _Rec1 :: forall {k1} {k2} f (p :: k1) g (q :: k2). Iso (Rec1 f p) (Rec1 g q) (f p) (g q)
- GHC.Generics.Optics: _U1 :: Iso (U1 p) (U1 q) () ()
+ GHC.Generics.Optics: _U1 :: forall {k1} {k2} (p :: k1) (q :: k2). Iso (U1 p) (U1 q) () ()
- GHC.Generics.Optics: _V1 :: Lens (V1 s) (V1 t) a b
+ GHC.Generics.Optics: _V1 :: forall {k1} {k2} (s :: k1) (t :: k2) a b. Lens (V1 s) (V1 t) a b
- GHC.Generics.Optics: generic1 :: (Generic1 f, Generic1 g) => Iso (f x) (g y) (Rep1 f x) (Rep1 g y)
+ GHC.Generics.Optics: generic1 :: forall {k1} {k2} f g (x :: k1) (y :: k2). (Generic1 f, Generic1 g) => Iso (f x) (g y) (Rep1 f x) (Rep1 g y)
- Numeric.Optics: pattern Integral :: forall a. Integral a => a -> Integer
+ Numeric.Optics: pattern Integral :: Integral a => a -> Integer
- Optics.AffineFold: afailing :: (Is k An_AffineFold, Is l An_AffineFold) => Optic' k is s a -> Optic' l js s a -> AffineFold s a
+ Optics.AffineFold: afailing :: forall k l (is :: IxList) s a (js :: IxList). (Is k An_AffineFold, Is l An_AffineFold) => Optic' k is s a -> Optic' l js s a -> AffineFold s a
- Optics.AffineFold: afoldVL :: (forall f. Functor f => (forall r. r -> f r) -> (a -> f u) -> s -> f v) -> AffineFold s a
+ Optics.AffineFold: afoldVL :: (forall (f :: Type -> Type). Functor f => (forall r. () => r -> f r) -> (a -> f u) -> s -> f v) -> AffineFold s a
- Optics.AffineFold: atraverseOf_ :: (Is k An_AffineFold, Functor f) => Optic' k is s a -> (forall r. r -> f r) -> (a -> f u) -> s -> f ()
+ Optics.AffineFold: atraverseOf_ :: forall k f (is :: IxList) s a u. (Is k An_AffineFold, Functor f) => Optic' k is s a -> (forall r. () => r -> f r) -> (a -> f u) -> s -> f ()
- Optics.AffineFold: data An_AffineFold :: OpticKind
+ Optics.AffineFold: data An_AffineFold
- Optics.AffineFold: isn't :: Is k An_AffineFold => Optic' k is s a -> s -> Bool
+ Optics.AffineFold: isn't :: forall k (is :: IxList) s a. Is k An_AffineFold => Optic' k is s a -> s -> Bool
- Optics.AffineFold: preview :: Is k An_AffineFold => Optic' k is s a -> s -> Maybe a
+ Optics.AffineFold: preview :: forall k (is :: IxList) s a. Is k An_AffineFold => Optic' k is s a -> s -> Maybe a
- Optics.AffineFold: previews :: Is k An_AffineFold => Optic' k is s a -> (a -> r) -> s -> Maybe r
+ Optics.AffineFold: previews :: forall k (is :: IxList) s a r. Is k An_AffineFold => Optic' k is s a -> (a -> r) -> s -> Maybe r
- Optics.AffineTraversal: atraverseOf :: (Is k An_AffineTraversal, Functor f) => Optic k is s t a b -> (forall r. r -> f r) -> (a -> f b) -> s -> f t
+ Optics.AffineTraversal: atraverseOf :: forall k f (is :: IxList) s t a b. (Is k An_AffineTraversal, Functor f) => Optic k is s t a b -> (forall r. () => r -> f r) -> (a -> f b) -> s -> f t
- Optics.AffineTraversal: data An_AffineTraversal :: OpticKind
+ Optics.AffineTraversal: data An_AffineTraversal
- Optics.AffineTraversal: matching :: Is k An_AffineTraversal => Optic k is s t a b -> s -> Either t a
+ Optics.AffineTraversal: matching :: forall k (is :: IxList) s t a b. Is k An_AffineTraversal => Optic k is s t a b -> s -> Either t a
- Optics.AffineTraversal: withAffineTraversal :: Is k An_AffineTraversal => Optic k is s t a b -> ((s -> Either t a) -> (s -> b -> t) -> r) -> r
+ Optics.AffineTraversal: withAffineTraversal :: forall k (is :: IxList) s t a b r. Is k An_AffineTraversal => Optic k is s t a b -> ((s -> Either t a) -> (s -> b -> t) -> r) -> r
- Optics.Arrow: assignA :: (Is k A_Setter, Arrow arr) => Optic k is s t a b -> arr s b -> arr s t
+ Optics.Arrow: assignA :: forall k arr (is :: IxList) s t a b. (Is k A_Setter, Arrow arr) => Optic k is s t a b -> arr s b -> arr s t
- Optics.Arrow: class Arrow arr => ArrowOptic k arr
+ Optics.Arrow: class Arrow arr => ArrowOptic k (arr :: Type -> Type -> Type)
- Optics.Arrow: overA :: ArrowOptic k arr => Optic k is s t a b -> arr a b -> arr s t
+ Optics.Arrow: overA :: forall (is :: IxList) s t a b. ArrowOptic k arr => Optic k is s t a b -> arr a b -> arr s t
- Optics.At.Core: ix :: (Ixed m, At m, IxKind m ~ An_AffineTraversal) => Index m -> Optic' (IxKind m) NoIx m (IxValue m)
+ Optics.At.Core: ix :: Ixed m => Index m -> Optic' (IxKind m) NoIx m (IxValue m)
- Optics.At.Core: type family IxValue (m :: Type) :: Type
+ Optics.At.Core: type family IxValue m
- Optics.Coerce: coerceA :: Coercible a a' => Optic k is s t a b -> Optic k is s t a' b
+ Optics.Coerce: coerceA :: forall a a' k (is :: IxList) s t b. Coercible a a' => Optic k is s t a b -> Optic k is s t a' b
- Optics.Coerce: coerceB :: Coercible b b' => Optic k is s t a b -> Optic k is s t a b'
+ Optics.Coerce: coerceB :: forall b b' k (is :: IxList) s t a. Coercible b b' => Optic k is s t a b -> Optic k is s t a b'
- Optics.Coerce: coerceS :: Coercible s s' => Optic k is s t a b -> Optic k is s' t a b
+ Optics.Coerce: coerceS :: forall s s' k (is :: IxList) t a b. Coercible s s' => Optic k is s t a b -> Optic k is s' t a b
- Optics.Coerce: coerceT :: Coercible t t' => Optic k is s t a b -> Optic k is s t' a b
+ Optics.Coerce: coerceT :: forall t t' k (is :: IxList) s a b. Coercible t t' => Optic k is s t a b -> Optic k is s t' a b
- Optics.Cons.Core: pattern (:<) :: forall s a. Cons s s a a => a -> s -> s
+ Optics.Cons.Core: pattern (:<) :: Cons s s a a => a -> s -> s
- Optics.Cons.Core: pattern (:>) :: forall s a. Snoc s s a a => s -> a -> s
+ Optics.Cons.Core: pattern (:>) :: Snoc s s a a => s -> a -> s
- Optics.Core.Extras: is :: Is k An_AffineFold => Optic' k is s a -> s -> Bool
+ Optics.Core.Extras: is :: forall k (is :: IxList) s a. Is k An_AffineFold => Optic' k is s a -> s -> Bool
- Optics.Each.Core: each :: (Each i s t a b, TraversableWithIndex i g, s ~ g a, t ~ g b) => IxTraversal i s t a b
+ Optics.Each.Core: each :: Each i s t a b => IxTraversal i s t a b
- Optics.Empty.Core: _Empty :: (AsEmpty a, Monoid a, Eq a) => Prism' a ()
+ Optics.Empty.Core: _Empty :: AsEmpty a => Prism' a ()
- Optics.Empty.Core: pattern Empty :: forall a. AsEmpty a => a
+ Optics.Empty.Core: pattern Empty :: AsEmpty a => a
- Optics.Fold: allOf :: Is k A_Fold => Optic' k is s a -> (a -> Bool) -> s -> Bool
+ Optics.Fold: allOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> (a -> Bool) -> s -> Bool
- Optics.Fold: andOf :: Is k A_Fold => Optic' k is s Bool -> s -> Bool
+ Optics.Fold: andOf :: forall k (is :: IxList) s. Is k A_Fold => Optic' k is s Bool -> s -> Bool
- Optics.Fold: anyOf :: Is k A_Fold => Optic' k is s a -> (a -> Bool) -> s -> Bool
+ Optics.Fold: anyOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> (a -> Bool) -> s -> Bool
- Optics.Fold: asumOf :: (Is k A_Fold, Alternative f) => Optic' k is s (f a) -> s -> f a
+ Optics.Fold: asumOf :: forall k f (is :: IxList) s a. (Is k A_Fold, Alternative f) => Optic' k is s (f a) -> s -> f a
- Optics.Fold: backwards_ :: Is k A_Fold => Optic' k is s a -> Fold s a
+ Optics.Fold: backwards_ :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> Fold s a
- Optics.Fold: cosmosOf :: forall k is a. Is k A_Fold => Optic' k is a a -> Fold a a
+ Optics.Fold: cosmosOf :: forall k (is :: IxList) a. Is k A_Fold => Optic' k is a a -> Fold a a
- Optics.Fold: data A_Fold :: OpticKind
+ Optics.Fold: data A_Fold
- Optics.Fold: elemOf :: (Is k A_Fold, Eq a) => Optic' k is s a -> a -> s -> Bool
+ Optics.Fold: elemOf :: forall k a (is :: IxList) s. (Is k A_Fold, Eq a) => Optic' k is s a -> a -> s -> Bool
- Optics.Fold: failing :: (Is k A_Fold, Is l A_Fold) => Optic' k is s a -> Optic' l js s a -> Fold s a
+ Optics.Fold: failing :: forall k l (is :: IxList) s a (js :: IxList). (Is k A_Fold, Is l A_Fold) => Optic' k is s a -> Optic' l js s a -> Fold s a
- Optics.Fold: findMOf :: (Is k A_Fold, Monad m) => Optic' k is s a -> (a -> m Bool) -> s -> m (Maybe a)
+ Optics.Fold: findMOf :: forall k m (is :: IxList) s a. (Is k A_Fold, Monad m) => Optic' k is s a -> (a -> m Bool) -> s -> m (Maybe a)
- Optics.Fold: findOf :: Is k A_Fold => Optic' k is s a -> (a -> Bool) -> s -> Maybe a
+ Optics.Fold: findOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> (a -> Bool) -> s -> Maybe a
- Optics.Fold: foldMapOf :: (Is k A_Fold, Monoid m) => Optic' k is s a -> (a -> m) -> s -> m
+ Optics.Fold: foldMapOf :: forall k m (is :: IxList) s a. (Is k A_Fold, Monoid m) => Optic' k is s a -> (a -> m) -> s -> m
- Optics.Fold: foldOf :: (Is k A_Fold, Monoid a) => Optic' k is s a -> s -> a
+ Optics.Fold: foldOf :: forall k a (is :: IxList) s. (Is k A_Fold, Monoid a) => Optic' k is s a -> s -> a
- Optics.Fold: foldVL :: (forall f. Applicative f => (a -> f u) -> s -> f v) -> Fold s a
+ Optics.Fold: foldVL :: (forall (f :: Type -> Type). Applicative f => (a -> f u) -> s -> f v) -> Fold s a
- Optics.Fold: foldlOf' :: Is k A_Fold => Optic' k is s a -> (r -> a -> r) -> r -> s -> r
+ Optics.Fold: foldlOf' :: forall k (is :: IxList) s a r. Is k A_Fold => Optic' k is s a -> (r -> a -> r) -> r -> s -> r
- Optics.Fold: foldrOf :: Is k A_Fold => Optic' k is s a -> (a -> r -> r) -> r -> s -> r
+ Optics.Fold: foldrOf :: forall k (is :: IxList) s a r. Is k A_Fold => Optic' k is s a -> (a -> r -> r) -> r -> s -> r
- Optics.Fold: foldring :: (forall f. Applicative f => (a -> f u -> f u) -> f v -> s -> f w) -> Fold s a
+ Optics.Fold: foldring :: (forall (f :: Type -> Type). Applicative f => (a -> f u -> f u) -> f v -> s -> f w) -> Fold s a
- Optics.Fold: forOf_ :: (Is k A_Fold, Applicative f) => Optic' k is s a -> s -> (a -> f r) -> f ()
+ Optics.Fold: forOf_ :: forall k f (is :: IxList) s a r. (Is k A_Fold, Applicative f) => Optic' k is s a -> s -> (a -> f r) -> f ()
- Optics.Fold: has :: Is k A_Fold => Optic' k is s a -> s -> Bool
+ Optics.Fold: has :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> s -> Bool
- Optics.Fold: hasn't :: Is k A_Fold => Optic' k is s a -> s -> Bool
+ Optics.Fold: hasn't :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> s -> Bool
- Optics.Fold: headOf :: Is k A_Fold => Optic' k is s a -> s -> Maybe a
+ Optics.Fold: headOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> s -> Maybe a
- Optics.Fold: lastOf :: Is k A_Fold => Optic' k is s a -> s -> Maybe a
+ Optics.Fold: lastOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> s -> Maybe a
- Optics.Fold: lengthOf :: Is k A_Fold => Optic' k is s a -> s -> Int
+ Optics.Fold: lengthOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> s -> Int
- Optics.Fold: lookupOf :: (Is k A_Fold, Eq a) => Optic' k is s (a, v) -> a -> s -> Maybe v
+ Optics.Fold: lookupOf :: forall k a (is :: IxList) s v. (Is k A_Fold, Eq a) => Optic' k is s (a, v) -> a -> s -> Maybe v
- Optics.Fold: maximumByOf :: Is k A_Fold => Optic' k is s a -> (a -> a -> Ordering) -> s -> Maybe a
+ Optics.Fold: maximumByOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> (a -> a -> Ordering) -> s -> Maybe a
- Optics.Fold: maximumOf :: (Is k A_Fold, Ord a) => Optic' k is s a -> s -> Maybe a
+ Optics.Fold: maximumOf :: forall k a (is :: IxList) s. (Is k A_Fold, Ord a) => Optic' k is s a -> s -> Maybe a
- Optics.Fold: minimumByOf :: Is k A_Fold => Optic' k is s a -> (a -> a -> Ordering) -> s -> Maybe a
+ Optics.Fold: minimumByOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> (a -> a -> Ordering) -> s -> Maybe a
- Optics.Fold: minimumOf :: (Is k A_Fold, Ord a) => Optic' k is s a -> s -> Maybe a
+ Optics.Fold: minimumOf :: forall k a (is :: IxList) s. (Is k A_Fold, Ord a) => Optic' k is s a -> s -> Maybe a
- Optics.Fold: msumOf :: (Is k A_Fold, MonadPlus m) => Optic' k is s (m a) -> s -> m a
+ Optics.Fold: msumOf :: forall k m (is :: IxList) s a. (Is k A_Fold, MonadPlus m) => Optic' k is s (m a) -> s -> m a
- Optics.Fold: noneOf :: Is k A_Fold => Optic' k is s a -> (a -> Bool) -> s -> Bool
+ Optics.Fold: noneOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> (a -> Bool) -> s -> Bool
- Optics.Fold: notElemOf :: (Is k A_Fold, Eq a) => Optic' k is s a -> a -> s -> Bool
+ Optics.Fold: notElemOf :: forall k a (is :: IxList) s. (Is k A_Fold, Eq a) => Optic' k is s a -> a -> s -> Bool
- Optics.Fold: orOf :: Is k A_Fold => Optic' k is s Bool -> s -> Bool
+ Optics.Fold: orOf :: forall k (is :: IxList) s. Is k A_Fold => Optic' k is s Bool -> s -> Bool
- Optics.Fold: paraOf :: Is k A_Fold => Optic' k is a a -> (a -> [r] -> r) -> a -> r
+ Optics.Fold: paraOf :: forall k (is :: IxList) a r. Is k A_Fold => Optic' k is a a -> (a -> [r] -> r) -> a -> r
- Optics.Fold: pre :: Is k A_Fold => Optic' k is s a -> AffineFold s a
+ Optics.Fold: pre :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> AffineFold s a
- Optics.Fold: productOf :: (Is k A_Fold, Num a) => Optic' k is s a -> s -> a
+ Optics.Fold: productOf :: forall k a (is :: IxList) s. (Is k A_Fold, Num a) => Optic' k is s a -> s -> a
- Optics.Fold: sequenceOf_ :: (Is k A_Fold, Applicative f) => Optic' k is s (f a) -> s -> f ()
+ Optics.Fold: sequenceOf_ :: forall k f (is :: IxList) s a. (Is k A_Fold, Applicative f) => Optic' k is s (f a) -> s -> f ()
- Optics.Fold: sumOf :: (Is k A_Fold, Num a) => Optic' k is s a -> s -> a
+ Optics.Fold: sumOf :: forall k a (is :: IxList) s. (Is k A_Fold, Num a) => Optic' k is s a -> s -> a
- Optics.Fold: summing :: (Is k A_Fold, Is l A_Fold) => Optic' k is s a -> Optic' l js s a -> Fold s a
+ Optics.Fold: summing :: forall k l (is :: IxList) s a (js :: IxList). (Is k A_Fold, Is l A_Fold) => Optic' k is s a -> Optic' l js s a -> Fold s a
- Optics.Fold: toListOf :: Is k A_Fold => Optic' k is s a -> s -> [a]
+ Optics.Fold: toListOf :: forall k (is :: IxList) s a. Is k A_Fold => Optic' k is s a -> s -> [a]
- Optics.Fold: traverseOf_ :: (Is k A_Fold, Applicative f) => Optic' k is s a -> (a -> f r) -> s -> f ()
+ Optics.Fold: traverseOf_ :: forall k f (is :: IxList) s a r. (Is k A_Fold, Applicative f) => Optic' k is s a -> (a -> f r) -> s -> f ()
- Optics.Fold: universeOf :: Is k A_Fold => Optic' k is a a -> a -> [a]
+ Optics.Fold: universeOf :: forall k (is :: IxList) a. Is k A_Fold => Optic' k is a a -> a -> [a]
- Optics.Getter: data A_Getter :: OpticKind
+ Optics.Getter: data A_Getter
- Optics.Getter: view :: Is k A_Getter => Optic' k is s a -> s -> a
+ Optics.Getter: view :: forall k (is :: IxList) s a. Is k A_Getter => Optic' k is s a -> s -> a
- Optics.Getter: views :: Is k A_Getter => Optic' k is s a -> (a -> r) -> s -> r
+ Optics.Getter: views :: forall k (is :: IxList) s a r. Is k A_Getter => Optic' k is s a -> (a -> r) -> s -> r
- Optics.Indexed.Core: (%) :: forall k l m is js ks s t u v a b. (JoinKinds k l m, AppendIndices is js ks) => Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
+ Optics.Indexed.Core: (%) :: forall k l m (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a b. (JoinKinds k l m, AppendIndices is js ks) => Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
- Optics.Indexed.Core: (%>) :: (JoinKinds k l m, IxOptic k s t u v, NonEmptyIndices is) => Optic k is s t u v -> Optic l js u v a b -> Optic m js s t a b
+ Optics.Indexed.Core: (%>) :: forall k l m s t u v (is :: IxList) (js :: IxList) a b. (JoinKinds k l m, IxOptic k s t u v, NonEmptyIndices is) => Optic k is s t u v -> Optic l js u v a b -> Optic m js s t a b
- Optics.Indexed.Core: (<%) :: (JoinKinds k l m, IxOptic l u v a b, NonEmptyIndices js) => Optic k is s t u v -> Optic l js u v a b -> Optic m is s t a b
+ Optics.Indexed.Core: (<%) :: forall k l m u v a b (js :: IxList) (is :: IxList) s t. (JoinKinds k l m, IxOptic l u v a b, NonEmptyIndices js) => Optic k is s t u v -> Optic l js u v a b -> Optic m is s t a b
- Optics.Indexed.Core: (<%>) :: (JoinKinds k l m, IxOptic m s t a b, is `HasSingleIndex` i, js `HasSingleIndex` j) => Optic k is s t u v -> Optic l js u v a b -> Optic m (WithIx (i, j)) s t a b
+ Optics.Indexed.Core: (<%>) :: forall k l m s t a b (is :: IxList) i (js :: IxList) j u v. (JoinKinds k l m, IxOptic m s t a b, HasSingleIndex is i, HasSingleIndex js j) => Optic k is s t u v -> Optic l js u v a b -> Optic m (WithIx (i, j)) s t a b
- Optics.Indexed.Core: conjoined :: is `HasSingleIndex` i => Optic k NoIx s t a b -> Optic k is s t a b -> Optic k is s t a b
+ Optics.Indexed.Core: conjoined :: forall (is :: IxList) i k s t a b. HasSingleIndex is i => Optic k NoIx s t a b -> Optic k is s t a b -> Optic k is s t a b
- Optics.Indexed.Core: icomposeN :: forall k i is s t a b. (CurryCompose is, NonEmptyIndices is) => Curry is i -> Optic k is s t a b -> Optic k (WithIx i) s t a b
+ Optics.Indexed.Core: icomposeN :: forall k i (is :: IxList) s t a b. (CurryCompose is, NonEmptyIndices is) => Curry is i -> Optic k is s t a b -> Optic k (WithIx i) s t a b
- Optics.Indexed.Core: noIx :: (IxOptic k s t a b, NonEmptyIndices is) => Optic k is s t a b -> Optic k NoIx s t a b
+ Optics.Indexed.Core: noIx :: forall (is :: IxList). (IxOptic k s t a b, NonEmptyIndices is) => Optic k is s t a b -> Optic k NoIx s t a b
- Optics.Indexed.Core: reindexed :: is `HasSingleIndex` i => (i -> j) -> Optic k is s t a b -> Optic k (WithIx j) s t a b
+ Optics.Indexed.Core: reindexed :: forall (is :: IxList) i j k s t a b. HasSingleIndex is i => (i -> j) -> Optic k is s t a b -> Optic k (WithIx j) s t a b
- Optics.Internal.Bi: bimap :: Bifunctor p => (a -> b) -> (c -> d) -> p i a c -> p i b d
+ Optics.Internal.Bi: bimap :: forall a b c d (i :: k). Bifunctor p => (a -> b) -> (c -> d) -> p i a c -> p i b d
- Optics.Internal.Bi: class Bicontravariant p
+ Optics.Internal.Bi: class Bicontravariant (p :: k -> Type -> Type -> Type)
- Optics.Internal.Bi: class Bifunctor p
+ Optics.Internal.Bi: class Bifunctor (p :: k -> Type -> Type -> Type)
- Optics.Internal.Bi: contrabimap :: Bicontravariant p => (b -> a) -> (d -> c) -> p i a c -> p i b d
+ Optics.Internal.Bi: contrabimap :: forall b a d c (i :: k). Bicontravariant p => (b -> a) -> (d -> c) -> p i a c -> p i b d
- Optics.Internal.Bi: contrafirst :: Bicontravariant p => (b -> a) -> p i a c -> p i b c
+ Optics.Internal.Bi: contrafirst :: forall b a (i :: k) c. Bicontravariant p => (b -> a) -> p i a c -> p i b c
- Optics.Internal.Bi: contrasecond :: Bicontravariant p => (c -> b) -> p i a b -> p i a c
+ Optics.Internal.Bi: contrasecond :: forall c b (i :: k) a. Bicontravariant p => (c -> b) -> p i a b -> p i a c
- Optics.Internal.Bi: first :: Bifunctor p => (a -> b) -> p i a c -> p i b c
+ Optics.Internal.Bi: first :: forall a b (i :: k) c. Bifunctor p => (a -> b) -> p i a c -> p i b c
- Optics.Internal.Bi: second :: Bifunctor p => (c -> d) -> p i a c -> p i a d
+ Optics.Internal.Bi: second :: forall c d (i :: k) a. Bifunctor p => (c -> d) -> p i a c -> p i a d
- Optics.Internal.Fold: foldVL__ :: (Bicontravariant p, Traversing p) => (forall f. Applicative f => (a -> f u) -> s -> f v) -> Optic__ p i i s t a b
+ Optics.Internal.Fold: foldVL__ :: (Bicontravariant p, Traversing p) => (forall (f :: Type -> Type). Applicative f => (a -> f u) -> s -> f v) -> Optic__ p i i s t a b
- Optics.Internal.Fold: foldring__ :: (Bicontravariant p, Traversing p) => (forall f. Applicative f => (a -> f u -> f u) -> f v -> s -> f w) -> Optic__ p i i s t a b
+ Optics.Internal.Fold: foldring__ :: (Bicontravariant p, Traversing p) => (forall (f :: Type -> Type). Applicative f => (a -> f u -> f u) -> f v -> s -> f w) -> Optic__ p i i s t a b
- Optics.Internal.Generic: _K1 :: Iso (K1 i c p) (K1 j d q) c d
+ Optics.Internal.Generic: _K1 :: forall {k1} {k2} i c (p :: k1) j d (q :: k2). Iso (K1 i c p) (K1 j d q) c d
- Optics.Internal.Generic: _L1 :: Prism ((a :+: c) t) ((b :+: c) t) (a t) (b t)
+ Optics.Internal.Generic: _L1 :: forall {k} a (c :: k -> Type) (t :: k) b. Prism ((a :+: c) t) ((b :+: c) t) (a t) (b t)
- Optics.Internal.Generic: _M1 :: Iso (M1 i c f p) (M1 j d g q) (f p) (g q)
+ Optics.Internal.Generic: _M1 :: forall {k1} {k2} i (c :: Meta) f (p :: k1) j (d :: Meta) g (q :: k2). Iso (M1 i c f p) (M1 j d g q) (f p) (g q)
- Optics.Internal.Generic: _R1 :: Prism ((c :+: a) t) ((c :+: b) t) (a t) (b t)
+ Optics.Internal.Generic: _R1 :: forall {k} (c :: k -> Type) a (t :: k) b. Prism ((c :+: a) t) ((c :+: b) t) (a t) (b t)
- Optics.Internal.Generic: _Rec1 :: Iso (Rec1 f p) (Rec1 g q) (f p) (g q)
+ Optics.Internal.Generic: _Rec1 :: forall {k1} {k2} f (p :: k1) g (q :: k2). Iso (Rec1 f p) (Rec1 g q) (f p) (g q)
- Optics.Internal.Generic: _U1 :: Iso (U1 p) (U1 q) () ()
+ Optics.Internal.Generic: _U1 :: forall {k1} {k2} (p :: k1) (q :: k2). Iso (U1 p) (U1 q) () ()
- Optics.Internal.Generic: _V1 :: Lens (V1 s) (V1 t) a b
+ Optics.Internal.Generic: _V1 :: forall {k1} {k2} (s :: k1) (t :: k2) a b. Lens (V1 s) (V1 t) a b
- Optics.Internal.Generic: class GAffineFieldSum (path :: PathTree Symbol) g h a b
+ Optics.Internal.Generic: class GAffineFieldSum (path :: PathTree Symbol) (g :: k -> Type) (h :: k -> Type) a b
- Optics.Internal.Generic: class GConstructorSum (path :: [Path]) g h a b | path g -> a, path h -> b, path g b -> h, path h a -> g
+ Optics.Internal.Generic: class GConstructorSum (path :: [Path]) (g :: k -> Type) (h :: k -> Type) a b | path g -> a, path h -> b, path g b -> h, path h a -> g
- Optics.Internal.Generic: class GConstructorTuple g h a b | g -> a, h -> b, g b -> h, h a -> g
+ Optics.Internal.Generic: class GConstructorTuple (g :: k -> Type) (h :: k -> Type) a b | g -> a, h -> b, g b -> h, h a -> g
- Optics.Internal.Generic: class GFieldProd (path :: [Path]) g h a b | path g -> a, path h -> b, path g b -> h, path h a -> g
+ Optics.Internal.Generic: class GFieldProd (path :: [Path]) (g :: k -> Type) (h :: k -> Type) a b | path g -> a, path h -> b, path g b -> h, path h a -> g
- Optics.Internal.Generic: class GPlateImpl g a
+ Optics.Internal.Generic: class GPlateImpl (g :: k -> Type) a
- Optics.Internal.Generic: class GPositionSum (path :: PathTree (Nat, Nat)) g h a b | path g -> a, path h -> b, path g b -> h, path h a -> g
+ Optics.Internal.Generic: class GPositionSum (path :: PathTree (Nat, Nat)) (g :: k -> Type) (h :: k -> Type) a b | path g -> a, path h -> b, path g b -> h, path h a -> g
- Optics.Internal.Generic: class GSetFieldProd (path :: [Path]) g h b | path h -> b, path g b -> h
+ Optics.Internal.Generic: class GSetFieldProd (path :: [Path]) (g :: k -> Type) (h :: k -> Type) b | path h -> b, path g b -> h
- Optics.Internal.Generic: class GSetFieldSum (path :: PathTree Symbol) g h b | path h -> b, path g b -> h
+ Optics.Internal.Generic: class GSetFieldSum (path :: PathTree Symbol) (g :: k -> Type) (h :: k -> Type) b | path h -> b, path g b -> h
- Optics.Internal.Generic: gafieldSum :: GAffineFieldSum path g h a b => AffineTraversalVL (g x) (h x) a b
+ Optics.Internal.Generic: gafieldSum :: forall (x :: k). GAffineFieldSum path g h a b => AffineTraversalVL (g x) (h x) a b
- Optics.Internal.Generic: gconstructorSum :: GConstructorSum path g h a b => Prism (g x) (h x) a b
+ Optics.Internal.Generic: gconstructorSum :: forall (x :: k). GConstructorSum path g h a b => Prism (g x) (h x) a b
- Optics.Internal.Generic: gconstructorTuple :: GConstructorTuple g h a b => Iso (g x) (h x) a b
+ Optics.Internal.Generic: gconstructorTuple :: forall (x :: k). GConstructorTuple g h a b => Iso (g x) (h x) a b
- Optics.Internal.Generic: generic1 :: (Generic1 f, Generic1 g) => Iso (f x) (g y) (Rep1 f x) (Rep1 g y)
+ Optics.Internal.Generic: generic1 :: forall {k1} {k2} f g (x :: k1) (y :: k2). (Generic1 f, Generic1 g) => Iso (f x) (g y) (Rep1 f x) (Rep1 g y)
- Optics.Internal.Generic: gfieldProd :: GFieldProd path g h a b => LensVL (g x) (h x) a b
+ Optics.Internal.Generic: gfieldProd :: forall (x :: k). GFieldProd path g h a b => LensVL (g x) (h x) a b
- Optics.Internal.Generic: gplateImpl :: GPlateImpl g a => TraversalVL' (g x) a
+ Optics.Internal.Generic: gplateImpl :: forall (x :: k). GPlateImpl g a => TraversalVL' (g x) a
- Optics.Internal.Generic: gpositionSum :: GPositionSum path g h a b => LensVL (g x) (h x) a b
+ Optics.Internal.Generic: gpositionSum :: forall (x :: k). GPositionSum path g h a b => LensVL (g x) (h x) a b
- Optics.Internal.Generic: gsetFieldProd :: GSetFieldProd path g h b => g x -> b -> h x
+ Optics.Internal.Generic: gsetFieldProd :: forall (x :: k). GSetFieldProd path g h b => g x -> b -> h x
- Optics.Internal.Generic: gsetFieldSum :: GSetFieldSum path g h b => g x -> b -> h x
+ Optics.Internal.Generic: gsetFieldSum :: forall (x :: k). GSetFieldSum path g h b => g x -> b -> h x
- Optics.Internal.Generic.TypeLevel: type family NoGenericError t
+ Optics.Internal.Generic.TypeLevel: type family NoGenericError (t1 :: t) :: k
- Optics.Internal.Indexed: Indexing :: (Int -> IntT f a) -> Indexing f a
+ Optics.Internal.Indexed: Indexing :: (Int -> IntT f a) -> Indexing (f :: k -> Type) (a :: k)
- Optics.Internal.Indexed: IntT :: {-# UNPACK #-} !Int -> f a -> IntT f a
+ Optics.Internal.Indexed: IntT :: {-# UNPACK #-} !Int -> f a -> IntT (f :: k -> Type) (a :: k)
- Optics.Internal.Indexed: [runIndexing] :: Indexing f a -> Int -> IntT f a
+ Optics.Internal.Indexed: [runIndexing] :: Indexing (f :: k -> Type) (a :: k) -> Int -> IntT f a
- Optics.Internal.Indexed: class is ~ '[i] => HasSingleIndex (is :: IxList) (i :: Type)
+ Optics.Internal.Indexed: class is ~ '[i] => HasSingleIndex (is :: IxList) i
- Optics.Internal.Indexed: conjoined :: is `HasSingleIndex` i => Optic k NoIx s t a b -> Optic k is s t a b -> Optic k is s t a b
+ Optics.Internal.Indexed: conjoined :: forall (is :: IxList) i k s t a b. HasSingleIndex is i => Optic k NoIx s t a b -> Optic k is s t a b -> Optic k is s t a b
- Optics.Internal.Indexed: data IntT f a
+ Optics.Internal.Indexed: data IntT (f :: k -> Type) (a :: k)
- Optics.Internal.Indexed: indexing :: ((a -> Indexing f b) -> s -> Indexing f t) -> (Int -> a -> f b) -> s -> f t
+ Optics.Internal.Indexed: indexing :: forall {k} a f (b :: k) s (t :: k). ((a -> Indexing f b) -> s -> Indexing f t) -> (Int -> a -> f b) -> s -> f t
- Optics.Internal.Indexed: newtype Indexing f a
+ Optics.Internal.Indexed: newtype Indexing (f :: k -> Type) (a :: k)
- Optics.Internal.Indexed: unIntT :: IntT f a -> f a
+ Optics.Internal.Indexed: unIntT :: forall {k} f (a :: k). IntT f a -> f a
- Optics.Internal.IxFold: ifoldVL__ :: (Bicontravariant p, Traversing p) => (forall f. Applicative f => (i -> a -> f u) -> s -> f v) -> Optic__ p j (i -> j) s t a b
+ Optics.Internal.IxFold: ifoldVL__ :: (Bicontravariant p, Traversing p) => (forall (f :: Type -> Type). Applicative f => (i -> a -> f u) -> s -> f v) -> Optic__ p j (i -> j) s t a b
- Optics.Internal.IxFold: ifoldring__ :: (Bicontravariant p, Traversing p) => (forall f. Applicative f => (i -> a -> f u -> f u) -> f v -> s -> f w) -> Optic__ p j (i -> j) s t a b
+ Optics.Internal.IxFold: ifoldring__ :: (Bicontravariant p, Traversing p) => (forall (f :: Type -> Type). Applicative f => (i -> a -> f u -> f u) -> f v -> s -> f w) -> Optic__ p j (i -> j) s t a b
- Optics.Internal.Magic: class Dysfunctional field k s t a b | field s -> k t a b, field t -> k s a b
+ Optics.Internal.Magic: class Dysfunctional (field :: k) (k6 :: k1) (s :: k2) (t :: k3) (a :: k4) (b :: k5) | field s -> k6 t a b, field t -> k6 s a b
- Optics.Internal.Magic: class TypeInferenceLoop msg1 msg2 msg3 field k s t a b | field s -> k t a b, field t -> k s a b
+ Optics.Internal.Magic: class TypeInferenceLoop (msg1 :: k) (msg2 :: k1) (msg3 :: k2) (field :: k3) (k9 :: k4) (s :: k5) (t :: k6) (a :: k7) (b :: k8) | field s -> k9 t a b, field t -> k9 s a b
- Optics.Internal.Optic: (%%) :: forall k is js ks s t u v a b. AppendIndices is js ks => Optic k is s t u v -> Optic k js u v a b -> Optic k ks s t a b
+ Optics.Internal.Optic: (%%) :: forall k (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a b. AppendIndices is js ks => Optic k is s t u v -> Optic k js u v a b -> Optic k ks s t a b
- Optics.Internal.Optic: (%&) :: Optic k is s t a b -> (Optic k is s t a b -> Optic l js s' t' a' b') -> Optic l js s' t' a' b'
+ Optics.Internal.Optic: (%&) :: forall k (is :: IxList) s t a b l (js :: IxList) s' t' a' b'. Optic k is s t a b -> (Optic k is s t a b -> Optic l js s' t' a' b') -> Optic l js s' t' a' b'
- Optics.Internal.Optic: (%) :: forall k l m is js ks s t u v a b. (JoinKinds k l m, AppendIndices is js ks) => Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
+ Optics.Internal.Optic: (%) :: forall k l m (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a b. (JoinKinds k l m, AppendIndices is js ks) => Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
- Optics.Internal.Optic: Optic :: (forall p i. Profunctor p => Optic_ k p i (Curry is i) s t a b) -> Optic (k :: OpticKind) (is :: IxList) s t a b
+ Optics.Internal.Optic: Optic :: (forall (p :: Type -> Type -> Type -> Type) i. Profunctor p => Optic_ k p i (Curry is i) s t a b) -> Optic k (is :: IxList) s t a b
- Optics.Internal.Optic: castOptic :: forall destKind srcKind is s t a b. Is srcKind destKind => Optic srcKind is s t a b -> Optic destKind is s t a b
+ Optics.Internal.Optic: castOptic :: forall destKind srcKind (is :: IxList) s t a b. Is srcKind destKind => Optic srcKind is s t a b -> Optic destKind is s t a b
- Optics.Internal.Optic: getOptic :: Profunctor p => Optic k is s t a b -> Optic_ k p i (Curry is i) s t a b
+ Optics.Internal.Optic: getOptic :: forall p k (is :: IxList) s t a b i. Profunctor p => Optic k is s t a b -> Optic_ k p i (Curry is i) s t a b
- Optics.Internal.Optic: newtype Optic (k :: OpticKind) (is :: IxList) s t a b
+ Optics.Internal.Optic: newtype Optic k (is :: IxList) s t a b
- Optics.Internal.Optic: type Optic' k is s a = Optic k is s s a a
+ Optics.Internal.Optic: type Optic' k (is :: IxList) s a = Optic k is s s a a
- Optics.Internal.Optic: type Optic__ p i j s t a b = p i a b -> p j s t
+ Optics.Internal.Optic: type Optic__ (p :: k -> k1 -> k2 -> Type) (i :: k) (j :: k) (s :: k1) (t :: k2) (a :: k1) (b :: k2) = p i a b -> p j s t
- Optics.Internal.Optic.Subtyping: implies :: Is k l => (Constraints k p => r) -> Constraints l p => r
+ Optics.Internal.Optic.Subtyping: implies :: forall (p :: Type -> Type -> Type -> Type) r. Is k l => (Constraints k p => r) -> Constraints l p => r
- Optics.Internal.Optic.Subtyping: joinKinds :: JoinKinds k l m => ((Constraints k p, Constraints l p) => r) -> Constraints m p => r
+ Optics.Internal.Optic.Subtyping: joinKinds :: forall (p :: Type -> Type -> Type -> Type) r. JoinKinds k l m => ((Constraints k p, Constraints l p) => r) -> Constraints m p => r
- Optics.Internal.Optic.Subtyping: type AffineTraversalEliminations = AffineFoldEliminations `AppendEliminations` SetterEliminations
+ Optics.Internal.Optic.Subtyping: type AffineTraversalEliminations = AppendEliminations AffineFoldEliminations SetterEliminations
- Optics.Internal.Optic.Subtyping: type IsoEliminations = GetterEliminations `AppendEliminations` ReviewEliminations `AppendEliminations` SetterEliminations
+ Optics.Internal.Optic.Subtyping: type IsoEliminations = AppendEliminations AppendEliminations GetterEliminations ReviewEliminations SetterEliminations
- Optics.Internal.Optic.Subtyping: type LensEliminations = GetterEliminations `AppendEliminations` SetterEliminations
+ Optics.Internal.Optic.Subtyping: type LensEliminations = AppendEliminations GetterEliminations SetterEliminations
- Optics.Internal.Optic.Subtyping: type PrismEliminations = AffineFoldEliminations `AppendEliminations` ReviewEliminations `AppendEliminations` SetterEliminations
+ Optics.Internal.Optic.Subtyping: type PrismEliminations = AppendEliminations AppendEliminations AffineFoldEliminations ReviewEliminations SetterEliminations
- Optics.Internal.Optic.Subtyping: type TraversalEliminations = '( '[ '("traverseOf", "Optics.Traversal")], '[]) `AppendEliminations` FoldEliminations `AppendEliminations` SetterEliminations
+ Optics.Internal.Optic.Subtyping: type TraversalEliminations = AppendEliminations AppendEliminations '( '[ '("traverseOf", "Optics.Traversal")], '[] :: [Symbol]) FoldEliminations SetterEliminations
- Optics.Internal.Optic.Subtyping: type family EliminationForms (k :: OpticKind)
+ Optics.Internal.Optic.Subtyping: type family EliminationForms k :: ([(Symbol, Symbol)], [Symbol])
- Optics.Internal.Optic.TypeLevel: [IxEq] :: IxEq i is is
+ Optics.Internal.Optic.TypeLevel: [IxEq] :: forall {k} {k1} (i :: k) (is :: k1). IxEq i is is
- Optics.Internal.Optic.TypeLevel: class AppendIndices xs ys ks | xs ys -> ks
+ Optics.Internal.Optic.TypeLevel: class AppendIndices (xs :: IxList) (ys :: IxList) (ks :: IxList) | xs ys -> ks
- Optics.Internal.Optic.TypeLevel: class CurryCompose xs
+ Optics.Internal.Optic.TypeLevel: class CurryCompose (xs :: IxList)
- Optics.Internal.Optic.TypeLevel: data IxEq i is js
+ Optics.Internal.Optic.TypeLevel: data IxEq (i :: k) (is :: k1) (js :: k1)
- Optics.Internal.Optic.TypeLevel: type NoIx = ('[] :: IxList)
+ Optics.Internal.Optic.TypeLevel: type NoIx = '[] :: [Type]
- Optics.Internal.Optic.TypeLevel: type WithIx i = ('[i] :: IxList)
+ Optics.Internal.Optic.TypeLevel: type WithIx i = '[i]
- Optics.Internal.Optic.Types: data A_Fold :: OpticKind
+ Optics.Internal.Optic.Types: data A_Fold
- Optics.Internal.Optic.Types: data A_Getter :: OpticKind
+ Optics.Internal.Optic.Types: data A_Getter
- Optics.Internal.Optic.Types: data A_Lens :: OpticKind
+ Optics.Internal.Optic.Types: data A_Lens
- Optics.Internal.Optic.Types: data A_Prism :: OpticKind
+ Optics.Internal.Optic.Types: data A_Prism
- Optics.Internal.Optic.Types: data A_ReversedLens :: OpticKind
+ Optics.Internal.Optic.Types: data A_ReversedLens
- Optics.Internal.Optic.Types: data A_ReversedPrism :: OpticKind
+ Optics.Internal.Optic.Types: data A_ReversedPrism
- Optics.Internal.Optic.Types: data A_Review :: OpticKind
+ Optics.Internal.Optic.Types: data A_Review
- Optics.Internal.Optic.Types: data A_Setter :: OpticKind
+ Optics.Internal.Optic.Types: data A_Setter
- Optics.Internal.Optic.Types: data A_Traversal :: OpticKind
+ Optics.Internal.Optic.Types: data A_Traversal
- Optics.Internal.Optic.Types: data An_AffineFold :: OpticKind
+ Optics.Internal.Optic.Types: data An_AffineFold
- Optics.Internal.Optic.Types: data An_AffineTraversal :: OpticKind
+ Optics.Internal.Optic.Types: data An_AffineTraversal
- Optics.Internal.Optic.Types: data An_Iso :: OpticKind
+ Optics.Internal.Optic.Types: data An_Iso
- Optics.Internal.Optic.Types: type family Constraints (k :: OpticKind) (p :: Type -> Type -> Type -> Type) :: Constraint
+ Optics.Internal.Optic.Types: type family Constraints k (p :: Type -> Type -> Type -> Type)
- Optics.Internal.Utils: OrT :: !Bool -> f a -> OrT f a
+ Optics.Internal.Utils: OrT :: !Bool -> f a -> OrT (f :: k -> Type) (a :: k)
- Optics.Internal.Utils: Traversed :: f a -> Traversed f a
+ Optics.Internal.Utils: Traversed :: f a -> Traversed (f :: k -> Type) (a :: k)
- Optics.Internal.Utils: data OrT f a
+ Optics.Internal.Utils: data OrT (f :: k -> Type) (a :: k)
- Optics.Internal.Utils: newtype Traversed f a
+ Optics.Internal.Utils: newtype Traversed (f :: k -> Type) (a :: k)
- Optics.Internal.Utils: wrapOrT :: f a -> OrT f a
+ Optics.Internal.Utils: wrapOrT :: forall {k} f (a :: k). f a -> OrT f a
- Optics.Iso: class Bifunctor p => Swapped p
+ Optics.Iso: class Bifunctor p => Swapped (p :: Type -> Type -> Type)
- Optics.Iso: data An_Iso :: OpticKind
+ Optics.Iso: data An_Iso
- Optics.IxAffineFold: data An_AffineFold :: OpticKind
+ Optics.IxAffineFold: data An_AffineFold
- Optics.IxAffineFold: filteredBy :: Is k An_AffineFold => Optic' k is a i -> IxAffineFold i a a
+ Optics.IxAffineFold: filteredBy :: forall k (is :: IxList) a i. Is k An_AffineFold => Optic' k is a i -> IxAffineFold i a a
- Optics.IxAffineFold: iafailing :: (Is k An_AffineFold, Is l An_AffineFold, is1 `HasSingleIndex` i, is2 `HasSingleIndex` i) => Optic' k is1 s a -> Optic' l is2 s a -> IxAffineFold i s a
+ Optics.IxAffineFold: iafailing :: forall k l (is1 :: IxList) i (is2 :: IxList) s a. (Is k An_AffineFold, Is l An_AffineFold, HasSingleIndex is1 i, HasSingleIndex is2 i) => Optic' k is1 s a -> Optic' l is2 s a -> IxAffineFold i s a
- Optics.IxAffineFold: iafoldVL :: (forall f. Functor f => (forall r. r -> f r) -> (i -> a -> f u) -> s -> f v) -> IxAffineFold i s a
+ Optics.IxAffineFold: iafoldVL :: (forall (f :: Type -> Type). Functor f => (forall r. () => r -> f r) -> (i -> a -> f u) -> s -> f v) -> IxAffineFold i s a
- Optics.IxAffineFold: iatraverseOf_ :: (Is k An_AffineFold, Functor f, is `HasSingleIndex` i) => Optic' k is s a -> (forall r. r -> f r) -> (i -> a -> f u) -> s -> f ()
+ Optics.IxAffineFold: iatraverseOf_ :: forall k f (is :: IxList) i s a u. (Is k An_AffineFold, Functor f, HasSingleIndex is i) => Optic' k is s a -> (forall r. () => r -> f r) -> (i -> a -> f u) -> s -> f ()
- Optics.IxAffineFold: ipreview :: (Is k An_AffineFold, is `HasSingleIndex` i) => Optic' k is s a -> s -> Maybe (i, a)
+ Optics.IxAffineFold: ipreview :: forall k (is :: IxList) i s a. (Is k An_AffineFold, HasSingleIndex is i) => Optic' k is s a -> s -> Maybe (i, a)
- Optics.IxAffineFold: ipreviews :: (Is k An_AffineFold, is `HasSingleIndex` i) => Optic' k is s a -> (i -> a -> r) -> s -> Maybe r
+ Optics.IxAffineFold: ipreviews :: forall k (is :: IxList) i s a r. (Is k An_AffineFold, HasSingleIndex is i) => Optic' k is s a -> (i -> a -> r) -> s -> Maybe r
- Optics.IxAffineFold: type IxAffineFold i s a = Optic' An_AffineFold (WithIx i) s a
+ Optics.IxAffineFold: type IxAffineFold i s a = Optic' An_AffineFold WithIx i s a
- Optics.IxAffineTraversal: data An_AffineTraversal :: OpticKind
+ Optics.IxAffineTraversal: data An_AffineTraversal
- Optics.IxAffineTraversal: iatraverseOf :: (Is k An_AffineTraversal, Functor f, is `HasSingleIndex` i) => Optic k is s t a b -> (forall r. r -> f r) -> (i -> a -> f b) -> s -> f t
+ Optics.IxAffineTraversal: iatraverseOf :: forall k f (is :: IxList) i s t a b. (Is k An_AffineTraversal, Functor f, HasSingleIndex is i) => Optic k is s t a b -> (forall r. () => r -> f r) -> (i -> a -> f b) -> s -> f t
- Optics.IxAffineTraversal: type IxAffineTraversal i s t a b = Optic An_AffineTraversal (WithIx i) s t a b
+ Optics.IxAffineTraversal: type IxAffineTraversal i s t a b = Optic An_AffineTraversal WithIx i s t a b
- Optics.IxAffineTraversal: type IxAffineTraversal' i s a = Optic' An_AffineTraversal (WithIx i) s a
+ Optics.IxAffineTraversal: type IxAffineTraversal' i s a = Optic' An_AffineTraversal WithIx i s a
- Optics.IxAffineTraversal: unsafeFilteredBy :: Is k An_AffineFold => Optic' k is a i -> IxAffineTraversal' i a a
+ Optics.IxAffineTraversal: unsafeFilteredBy :: forall k (is :: IxList) a i. Is k An_AffineFold => Optic' k is a i -> IxAffineTraversal' i a a
- Optics.IxFold: data A_Fold :: OpticKind
+ Optics.IxFold: data A_Fold
- Optics.IxFold: iallOf :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> (i -> a -> Bool) -> s -> Bool
+ Optics.IxFold: iallOf :: forall k (is :: IxList) i s a. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> (i -> a -> Bool) -> s -> Bool
- Optics.IxFold: ianyOf :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> (i -> a -> Bool) -> s -> Bool
+ Optics.IxFold: ianyOf :: forall k (is :: IxList) i s a. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> (i -> a -> Bool) -> s -> Bool
- Optics.IxFold: ibackwards_ :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> IxFold i s a
+ Optics.IxFold: ibackwards_ :: forall k (is :: IxList) i s a. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> IxFold i s a
- Optics.IxFold: ifailing :: (Is k A_Fold, Is l A_Fold, is1 `HasSingleIndex` i, is2 `HasSingleIndex` i) => Optic' k is1 s a -> Optic' l is2 s a -> IxFold i s a
+ Optics.IxFold: ifailing :: forall k l (is1 :: IxList) i (is2 :: IxList) s a. (Is k A_Fold, Is l A_Fold, HasSingleIndex is1 i, HasSingleIndex is2 i) => Optic' k is1 s a -> Optic' l is2 s a -> IxFold i s a
- Optics.IxFold: ifiltered :: (Is k A_Fold, is `HasSingleIndex` i) => (i -> a -> Bool) -> Optic' k is s a -> IxFold i s a
+ Optics.IxFold: ifiltered :: forall k (is :: IxList) i a s. (Is k A_Fold, HasSingleIndex is i) => (i -> a -> Bool) -> Optic' k is s a -> IxFold i s a
- Optics.IxFold: ifindMOf :: (Is k A_Fold, Monad m, is `HasSingleIndex` i) => Optic' k is s a -> (i -> a -> m Bool) -> s -> m (Maybe (i, a))
+ Optics.IxFold: ifindMOf :: forall k m (is :: IxList) i s a. (Is k A_Fold, Monad m, HasSingleIndex is i) => Optic' k is s a -> (i -> a -> m Bool) -> s -> m (Maybe (i, a))
- Optics.IxFold: ifindOf :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> (i -> a -> Bool) -> s -> Maybe (i, a)
+ Optics.IxFold: ifindOf :: forall k (is :: IxList) i s a. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> (i -> a -> Bool) -> s -> Maybe (i, a)
- Optics.IxFold: ifoldMapOf :: (Is k A_Fold, Monoid m, is `HasSingleIndex` i) => Optic' k is s a -> (i -> a -> m) -> s -> m
+ Optics.IxFold: ifoldMapOf :: forall k m (is :: IxList) i s a. (Is k A_Fold, Monoid m, HasSingleIndex is i) => Optic' k is s a -> (i -> a -> m) -> s -> m
- Optics.IxFold: ifoldVL :: (forall f. Applicative f => (i -> a -> f u) -> s -> f v) -> IxFold i s a
+ Optics.IxFold: ifoldVL :: (forall (f :: Type -> Type). Applicative f => (i -> a -> f u) -> s -> f v) -> IxFold i s a
- Optics.IxFold: ifoldlOf' :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> (i -> r -> a -> r) -> r -> s -> r
+ Optics.IxFold: ifoldlOf' :: forall k (is :: IxList) i s a r. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> (i -> r -> a -> r) -> r -> s -> r
- Optics.IxFold: ifoldrOf :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> (i -> a -> r -> r) -> r -> s -> r
+ Optics.IxFold: ifoldrOf :: forall k (is :: IxList) i s a r. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> (i -> a -> r -> r) -> r -> s -> r
- Optics.IxFold: ifoldring :: (forall f. Applicative f => (i -> a -> f u -> f u) -> f v -> s -> f w) -> IxFold i s a
+ Optics.IxFold: ifoldring :: (forall (f :: Type -> Type). Applicative f => (i -> a -> f u -> f u) -> f v -> s -> f w) -> IxFold i s a
- Optics.IxFold: iforOf_ :: (Is k A_Fold, Applicative f, is `HasSingleIndex` i) => Optic' k is s a -> s -> (i -> a -> f r) -> f ()
+ Optics.IxFold: iforOf_ :: forall k f (is :: IxList) i s a r. (Is k A_Fold, Applicative f, HasSingleIndex is i) => Optic' k is s a -> s -> (i -> a -> f r) -> f ()
- Optics.IxFold: iheadOf :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> s -> Maybe (i, a)
+ Optics.IxFold: iheadOf :: forall k (is :: IxList) i s a. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> s -> Maybe (i, a)
- Optics.IxFold: ilastOf :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> s -> Maybe (i, a)
+ Optics.IxFold: ilastOf :: forall k (is :: IxList) i s a. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> s -> Maybe (i, a)
- Optics.IxFold: inoneOf :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> (i -> a -> Bool) -> s -> Bool
+ Optics.IxFold: inoneOf :: forall k (is :: IxList) i s a. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> (i -> a -> Bool) -> s -> Bool
- Optics.IxFold: ipre :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> IxAffineFold i s a
+ Optics.IxFold: ipre :: forall k (is :: IxList) i s a. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> IxAffineFold i s a
- Optics.IxFold: isumming :: (Is k A_Fold, Is l A_Fold, is1 `HasSingleIndex` i, is2 `HasSingleIndex` i) => Optic' k is1 s a -> Optic' l is2 s a -> IxFold i s a
+ Optics.IxFold: isumming :: forall k l (is1 :: IxList) i (is2 :: IxList) s a. (Is k A_Fold, Is l A_Fold, HasSingleIndex is1 i, HasSingleIndex is2 i) => Optic' k is1 s a -> Optic' l is2 s a -> IxFold i s a
- Optics.IxFold: itoListOf :: (Is k A_Fold, is `HasSingleIndex` i) => Optic' k is s a -> s -> [(i, a)]
+ Optics.IxFold: itoListOf :: forall k (is :: IxList) i s a. (Is k A_Fold, HasSingleIndex is i) => Optic' k is s a -> s -> [(i, a)]
- Optics.IxFold: itraverseOf_ :: (Is k A_Fold, Applicative f, is `HasSingleIndex` i) => Optic' k is s a -> (i -> a -> f r) -> s -> f ()
+ Optics.IxFold: itraverseOf_ :: forall k f (is :: IxList) i s a r. (Is k A_Fold, Applicative f, HasSingleIndex is i) => Optic' k is s a -> (i -> a -> f r) -> s -> f ()
- Optics.IxFold: type IxFold i s a = Optic' A_Fold (WithIx i) s a
+ Optics.IxFold: type IxFold i s a = Optic' A_Fold WithIx i s a
- Optics.IxGetter: data A_Getter :: OpticKind
+ Optics.IxGetter: data A_Getter
- Optics.IxGetter: iview :: (Is k A_Getter, is `HasSingleIndex` i) => Optic' k is s a -> s -> (i, a)
+ Optics.IxGetter: iview :: forall k (is :: IxList) i s a. (Is k A_Getter, HasSingleIndex is i) => Optic' k is s a -> s -> (i, a)
- Optics.IxGetter: iviews :: (Is k A_Getter, is `HasSingleIndex` i) => Optic' k is s a -> (i -> a -> r) -> s -> r
+ Optics.IxGetter: iviews :: forall k (is :: IxList) i s a r. (Is k A_Getter, HasSingleIndex is i) => Optic' k is s a -> (i -> a -> r) -> s -> r
- Optics.IxGetter: type IxGetter i s a = Optic' A_Getter (WithIx i) s a
+ Optics.IxGetter: type IxGetter i s a = Optic' A_Getter WithIx i s a
- Optics.IxLens: data A_Lens :: OpticKind
+ Optics.IxLens: data A_Lens
- Optics.IxLens: toIxLensVL :: (Is k A_Lens, is `HasSingleIndex` i) => Optic k is s t a b -> IxLensVL i s t a b
+ Optics.IxLens: toIxLensVL :: forall k (is :: IxList) i s t a b. (Is k A_Lens, HasSingleIndex is i) => Optic k is s t a b -> IxLensVL i s t a b
- Optics.IxLens: type IxLens i s t a b = Optic A_Lens (WithIx i) s t a b
+ Optics.IxLens: type IxLens i s t a b = Optic A_Lens WithIx i s t a b
- Optics.IxLens: type IxLens' i s a = Optic' A_Lens (WithIx i) s a
+ Optics.IxLens: type IxLens' i s a = Optic' A_Lens WithIx i s a
- Optics.IxLens: withIxLensVL :: (Is k A_Lens, is `HasSingleIndex` i) => Optic k is s t a b -> (IxLensVL i s t a b -> r) -> r
+ Optics.IxLens: withIxLensVL :: forall k (is :: IxList) i s t a b r. (Is k A_Lens, HasSingleIndex is i) => Optic k is s t a b -> (IxLensVL i s t a b -> r) -> r
- Optics.IxSetter: data A_Setter :: OpticKind
+ Optics.IxSetter: data A_Setter
- Optics.IxSetter: iover :: (Is k A_Setter, is `HasSingleIndex` i) => Optic k is s t a b -> (i -> a -> b) -> s -> t
+ Optics.IxSetter: iover :: forall k (is :: IxList) i s t a b. (Is k A_Setter, HasSingleIndex is i) => Optic k is s t a b -> (i -> a -> b) -> s -> t
- Optics.IxSetter: iover' :: (Is k A_Setter, is `HasSingleIndex` i) => Optic k is s t a b -> (i -> a -> b) -> s -> t
+ Optics.IxSetter: iover' :: forall k (is :: IxList) i s t a b. (Is k A_Setter, HasSingleIndex is i) => Optic k is s t a b -> (i -> a -> b) -> s -> t
- Optics.IxSetter: iset :: (Is k A_Setter, is `HasSingleIndex` i) => Optic k is s t a b -> (i -> b) -> s -> t
+ Optics.IxSetter: iset :: forall k (is :: IxList) i s t a b. (Is k A_Setter, HasSingleIndex is i) => Optic k is s t a b -> (i -> b) -> s -> t
- Optics.IxSetter: iset' :: (Is k A_Setter, is `HasSingleIndex` i) => Optic k is s t a b -> (i -> b) -> s -> t
+ Optics.IxSetter: iset' :: forall k (is :: IxList) i s t a b. (Is k A_Setter, HasSingleIndex is i) => Optic k is s t a b -> (i -> b) -> s -> t
- Optics.IxSetter: type IxSetter i s t a b = Optic A_Setter (WithIx i) s t a b
+ Optics.IxSetter: type IxSetter i s t a b = Optic A_Setter WithIx i s t a b
- Optics.IxSetter: type IxSetter' i s a = Optic' A_Setter (WithIx i) s a
+ Optics.IxSetter: type IxSetter' i s a = Optic' A_Setter WithIx i s a
- Optics.IxTraversal: data A_Traversal :: OpticKind
+ Optics.IxTraversal: data A_Traversal
- Optics.IxTraversal: elementOf :: Is k A_Traversal => Optic' k is s a -> Int -> IxAffineTraversal' Int s a
+ Optics.IxTraversal: elementOf :: forall k (is :: IxList) s a. Is k A_Traversal => Optic' k is s a -> Int -> IxAffineTraversal' Int s a
- Optics.IxTraversal: elementsOf :: Is k A_Traversal => Optic k is s t a a -> (Int -> Bool) -> IxTraversal Int s t a a
+ Optics.IxTraversal: elementsOf :: forall k (is :: IxList) s t a. Is k A_Traversal => Optic k is s t a a -> (Int -> Bool) -> IxTraversal Int s t a a
- Optics.IxTraversal: iadjoin :: (Is k A_Traversal, Is l A_Traversal, is `HasSingleIndex` i) => Optic' k is s a -> Optic' l is s a -> IxTraversal' i s a
+ Optics.IxTraversal: iadjoin :: forall k l (is :: IxList) i s a. (Is k A_Traversal, Is l A_Traversal, HasSingleIndex is i) => Optic' k is s a -> Optic' l is s a -> IxTraversal' i s a
- Optics.IxTraversal: ibackwards :: (Is k A_Traversal, is `HasSingleIndex` i) => Optic k is s t a b -> IxTraversal i s t a b
+ Optics.IxTraversal: ibackwards :: forall k (is :: IxList) i s t a b. (Is k A_Traversal, HasSingleIndex is i) => Optic k is s t a b -> IxTraversal i s t a b
- Optics.IxTraversal: ifailover :: (Is k A_Traversal, is `HasSingleIndex` i) => Optic k is s t a b -> (i -> a -> b) -> s -> Maybe t
+ Optics.IxTraversal: ifailover :: forall k (is :: IxList) i s t a b. (Is k A_Traversal, HasSingleIndex is i) => Optic k is s t a b -> (i -> a -> b) -> s -> Maybe t
- Optics.IxTraversal: ifailover' :: (Is k A_Traversal, is `HasSingleIndex` i) => Optic k is s t a b -> (i -> a -> b) -> s -> Maybe t
+ Optics.IxTraversal: ifailover' :: forall k (is :: IxList) i s t a b. (Is k A_Traversal, HasSingleIndex is i) => Optic k is s t a b -> (i -> a -> b) -> s -> Maybe t
- Optics.IxTraversal: iforOf :: (Is k A_Traversal, Applicative f, is `HasSingleIndex` i) => Optic k is s t a b -> s -> (i -> a -> f b) -> f t
+ Optics.IxTraversal: iforOf :: forall k f (is :: IxList) i s t a b. (Is k A_Traversal, Applicative f, HasSingleIndex is i) => Optic k is s t a b -> s -> (i -> a -> f b) -> f t
- Optics.IxTraversal: imapAccumLOf :: (Is k A_Traversal, is `HasSingleIndex` i) => Optic k is s t a b -> (i -> acc -> a -> (b, acc)) -> acc -> s -> (t, acc)
+ Optics.IxTraversal: imapAccumLOf :: forall k (is :: IxList) i s t a b acc. (Is k A_Traversal, HasSingleIndex is i) => Optic k is s t a b -> (i -> acc -> a -> (b, acc)) -> acc -> s -> (t, acc)
- Optics.IxTraversal: imapAccumROf :: (Is k A_Traversal, is `HasSingleIndex` i) => Optic k is s t a b -> (i -> acc -> a -> (b, acc)) -> acc -> s -> (t, acc)
+ Optics.IxTraversal: imapAccumROf :: forall k (is :: IxList) i s t a b acc. (Is k A_Traversal, HasSingleIndex is i) => Optic k is s t a b -> (i -> acc -> a -> (b, acc)) -> acc -> s -> (t, acc)
- Optics.IxTraversal: indices :: (Is k A_Traversal, is `HasSingleIndex` i) => (i -> Bool) -> Optic k is s t a a -> IxTraversal i s t a a
+ Optics.IxTraversal: indices :: forall k (is :: IxList) i s t a. (Is k A_Traversal, HasSingleIndex is i) => (i -> Bool) -> Optic k is s t a a -> IxTraversal i s t a a
- Optics.IxTraversal: ipartsOf :: forall k is i s t a. (Is k A_Traversal, is `HasSingleIndex` i) => Optic k is s t a a -> IxLens [i] s t [a] [a]
+ Optics.IxTraversal: ipartsOf :: forall k (is :: IxList) i s t a. (Is k A_Traversal, HasSingleIndex is i) => Optic k is s t a a -> IxLens [i] s t [a] [a]
- Optics.IxTraversal: iscanl1Of :: (Is k A_Traversal, is `HasSingleIndex` i) => Optic k is s t a a -> (i -> a -> a -> a) -> s -> t
+ Optics.IxTraversal: iscanl1Of :: forall k (is :: IxList) i s t a. (Is k A_Traversal, HasSingleIndex is i) => Optic k is s t a a -> (i -> a -> a -> a) -> s -> t
- Optics.IxTraversal: iscanr1Of :: (Is k A_Traversal, is `HasSingleIndex` i) => Optic k is s t a a -> (i -> a -> a -> a) -> s -> t
+ Optics.IxTraversal: iscanr1Of :: forall k (is :: IxList) i s t a. (Is k A_Traversal, HasSingleIndex is i) => Optic k is s t a a -> (i -> a -> a -> a) -> s -> t
- Optics.IxTraversal: isingular :: forall k is i s a. (Is k A_Traversal, is `HasSingleIndex` i) => Optic' k is s a -> IxAffineTraversal' i s a
+ Optics.IxTraversal: isingular :: forall k (is :: IxList) i s a. (Is k A_Traversal, HasSingleIndex is i) => Optic' k is s a -> IxAffineTraversal' i s a
- Optics.IxTraversal: itraverseOf :: (Is k A_Traversal, Applicative f, is `HasSingleIndex` i) => Optic k is s t a b -> (i -> a -> f b) -> s -> f t
+ Optics.IxTraversal: itraverseOf :: forall k f (is :: IxList) i s t a b. (Is k A_Traversal, Applicative f, HasSingleIndex is i) => Optic k is s t a b -> (i -> a -> f b) -> s -> f t
- Optics.IxTraversal: type IxTraversal i s t a b = Optic A_Traversal (WithIx i) s t a b
+ Optics.IxTraversal: type IxTraversal i s t a b = Optic A_Traversal WithIx i s t a b
- Optics.IxTraversal: type IxTraversal' i s a = Optic' A_Traversal (WithIx i) s a
+ Optics.IxTraversal: type IxTraversal' i s a = Optic' A_Traversal WithIx i s a
- Optics.Label: type LabelOptic' name k s a = LabelOptic name k s s a a
+ Optics.Label: type LabelOptic' (name :: Symbol) k s a = LabelOptic name k s s a a
- Optics.Lens: alongside :: (Is k A_Lens, Is l A_Lens) => Optic k is s t a b -> Optic l js s' t' a' b' -> Lens (s, s') (t, t') (a, a') (b, b')
+ Optics.Lens: alongside :: forall k l (is :: IxList) s t a b (js :: IxList) s' t' a' b'. (Is k A_Lens, Is l A_Lens) => Optic k is s t a b -> Optic l js s' t' a' b' -> Lens (s, s') (t, t') (a, a') (b, b')
- Optics.Lens: data A_Lens :: OpticKind
+ Optics.Lens: data A_Lens
- Optics.Lens: toLensVL :: Is k A_Lens => Optic k is s t a b -> LensVL s t a b
+ Optics.Lens: toLensVL :: forall k (is :: IxList) s t a b. Is k A_Lens => Optic k is s t a b -> LensVL s t a b
- Optics.Lens: withLens :: Is k A_Lens => Optic k is s t a b -> ((s -> a) -> (s -> b -> t) -> r) -> r
+ Optics.Lens: withLens :: forall k (is :: IxList) s t a b r. Is k A_Lens => Optic k is s t a b -> ((s -> a) -> (s -> b -> t) -> r) -> r
- Optics.Lens: withLensVL :: Is k A_Lens => Optic k is s t a b -> (LensVL s t a b -> r) -> r
+ Optics.Lens: withLensVL :: forall k (is :: IxList) s t a b r. Is k A_Lens => Optic k is s t a b -> (LensVL s t a b -> r) -> r
- Optics.Mapping: class MappingOptic k f g s t a b where {
+ Optics.Mapping: class MappingOptic k (f :: Type -> Type) (g :: Type -> Type) s t a b where {
- Optics.Mapping: mapping :: (MappingOptic k f g s t a b, "mapping" `AcceptsEmptyIndices` is) => Optic k is s t a b -> Optic (MappedOptic k) is (f s) (g t) (f a) (g b)
+ Optics.Mapping: mapping :: forall (is :: IxList). (MappingOptic k f g s t a b, AcceptsEmptyIndices "mapping" is) => Optic k is s t a b -> Optic (MappedOptic k) is (f s) (g t) (f a) (g b)
- Optics.Operators: (!~) :: Is k A_Setter => Optic k is s t a b -> b -> s -> t
+ Optics.Operators: (!~) :: forall k (is :: IxList) s t a b. Is k A_Setter => Optic k is s t a b -> b -> s -> t
- Optics.Operators: (#) :: Is k A_Review => Optic' k is t b -> b -> t
+ Optics.Operators: (#) :: forall k (is :: IxList) t b. Is k A_Review => Optic' k is t b -> b -> t
- Optics.Operators: (%!~) :: Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
+ Optics.Operators: (%!~) :: forall k (is :: IxList) s t a b. Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
- Optics.Operators: (%~) :: Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
+ Optics.Operators: (%~) :: forall k (is :: IxList) s t a b. Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
- Optics.Operators: (.~) :: Is k A_Setter => Optic k is s t a b -> b -> s -> t
+ Optics.Operators: (.~) :: forall k (is :: IxList) s t a b. Is k A_Setter => Optic k is s t a b -> b -> s -> t
- Optics.Operators: (?!~) :: Is k A_Setter => Optic k is s t a (Maybe b) -> b -> s -> t
+ Optics.Operators: (?!~) :: forall k (is :: IxList) s t a b. Is k A_Setter => Optic k is s t a (Maybe b) -> b -> s -> t
- Optics.Operators: (?~) :: Is k A_Setter => Optic k is s t a (Maybe b) -> b -> s -> t
+ Optics.Operators: (?~) :: forall k (is :: IxList) s t a b. Is k A_Setter => Optic k is s t a (Maybe b) -> b -> s -> t
- Optics.Operators: (^.) :: Is k A_Getter => s -> Optic' k is s a -> a
+ Optics.Operators: (^.) :: forall k s (is :: IxList) a. Is k A_Getter => s -> Optic' k is s a -> a
- Optics.Operators: (^..) :: Is k A_Fold => s -> Optic' k is s a -> [a]
+ Optics.Operators: (^..) :: forall k s (is :: IxList) a. Is k A_Fold => s -> Optic' k is s a -> [a]
- Optics.Operators: (^?) :: Is k An_AffineFold => s -> Optic' k is s a -> Maybe a
+ Optics.Operators: (^?) :: forall k s (is :: IxList) a. Is k An_AffineFold => s -> Optic' k is s a -> Maybe a
- Optics.Operators.Unsafe: (^?!) :: (HasCallStack, Is k An_AffineFold) => s -> Optic' k is s a -> a
+ Optics.Operators.Unsafe: (^?!) :: forall k s (is :: IxList) a. (HasCallStack, Is k An_AffineFold) => s -> Optic' k is s a -> a
- Optics.Optic: (%%) :: forall k is js ks s t u v a b. AppendIndices is js ks => Optic k is s t u v -> Optic k js u v a b -> Optic k ks s t a b
+ Optics.Optic: (%%) :: forall k (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a b. AppendIndices is js ks => Optic k is s t u v -> Optic k js u v a b -> Optic k ks s t a b
- Optics.Optic: (%&) :: Optic k is s t a b -> (Optic k is s t a b -> Optic l js s' t' a' b') -> Optic l js s' t' a' b'
+ Optics.Optic: (%&) :: forall k (is :: IxList) s t a b l (js :: IxList) s' t' a' b'. Optic k is s t a b -> (Optic k is s t a b -> Optic l js s' t' a' b') -> Optic l js s' t' a' b'
- Optics.Optic: (%) :: forall k l m is js ks s t u v a b. (JoinKinds k l m, AppendIndices is js ks) => Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
+ Optics.Optic: (%) :: forall k l m (is :: IxList) (js :: IxList) (ks :: IxList) s t u v a b. (JoinKinds k l m, AppendIndices is js ks) => Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
- Optics.Optic: castOptic :: forall destKind srcKind is s t a b. Is srcKind destKind => Optic srcKind is s t a b -> Optic destKind is s t a b
+ Optics.Optic: castOptic :: forall destKind srcKind (is :: IxList) s t a b. Is srcKind destKind => Optic srcKind is s t a b -> Optic destKind is s t a b
- Optics.Optic: class AppendIndices xs ys ks | xs ys -> ks
+ Optics.Optic: class AppendIndices (xs :: IxList) (ys :: IxList) (ks :: IxList) | xs ys -> ks
- Optics.Optic: class CurryCompose xs
+ Optics.Optic: class CurryCompose (xs :: IxList)
- Optics.Optic: class is ~ '[i] => HasSingleIndex (is :: IxList) (i :: Type)
+ Optics.Optic: class is ~ '[i] => HasSingleIndex (is :: IxList) i
- Optics.Optic: data Optic (k :: OpticKind) (is :: IxList) s t a b
+ Optics.Optic: data Optic k (is :: IxList) s t a b
- Optics.Optic: type NoIx = ('[] :: IxList)
+ Optics.Optic: type NoIx = '[] :: [Type]
- Optics.Optic: type Optic' k is s a = Optic k is s s a a
+ Optics.Optic: type Optic' k (is :: IxList) s a = Optic k is s s a a
- Optics.Optic: type WithIx i = ('[i] :: IxList)
+ Optics.Optic: type WithIx i = '[i]
- Optics.Optic: type family Curry (xs :: IxList) (y :: Type) :: Type
+ Optics.Optic: type family Curry (xs :: IxList) y
- Optics.Prism: aside :: Is k A_Prism => Optic k is s t a b -> Prism (e, s) (e, t) (e, a) (e, b)
+ Optics.Prism: aside :: forall k (is :: IxList) s t a b e. Is k A_Prism => Optic k is s t a b -> Prism (e, s) (e, t) (e, a) (e, b)
- Optics.Prism: below :: (Is k A_Prism, Traversable f) => Optic' k is s a -> Prism' (f s) (f a)
+ Optics.Prism: below :: forall k f (is :: IxList) s a. (Is k A_Prism, Traversable f) => Optic' k is s a -> Prism' (f s) (f a)
- Optics.Prism: data A_Prism :: OpticKind
+ Optics.Prism: data A_Prism
- Optics.Prism: withPrism :: Is k A_Prism => Optic k is s t a b -> ((b -> t) -> (s -> Either t a) -> r) -> r
+ Optics.Prism: withPrism :: forall k (is :: IxList) s t a b r. Is k A_Prism => Optic k is s t a b -> ((b -> t) -> (s -> Either t a) -> r) -> r
- Optics.Prism: without :: (Is k A_Prism, Is l A_Prism) => Optic k is s t a b -> Optic l is u v c d -> Prism (Either s u) (Either t v) (Either a c) (Either b d)
+ Optics.Prism: without :: forall k l (is :: IxList) s t a b u v c d. (Is k A_Prism, Is l A_Prism) => Optic k is s t a b -> Optic l is u v c d -> Prism (Either s u) (Either t v) (Either a c) (Either b d)
- Optics.Re: re :: (ReversibleOptic k, "re" `AcceptsEmptyIndices` is) => Optic k is s t a b -> Optic (ReversedOptic k) is b a t s
+ Optics.Re: re :: forall (is :: IxList) s t a b. (ReversibleOptic k, AcceptsEmptyIndices "re" is) => Optic k is s t a b -> Optic (ReversedOptic k) is b a t s
- Optics.Re: type ReversedOptic k = r | r -> k;
+ Optics.Re: type ReversedOptic k = (r :: Type) | r -> k;
- Optics.ReadOnly: getting :: ToReadOnly k s t a b => Optic k is s t a b -> Optic' (ReadOnlyOptic k) is s a
+ Optics.ReadOnly: getting :: forall (is :: IxList). ToReadOnly k s t a b => Optic k is s t a b -> Optic' (ReadOnlyOptic k) is s a
- Optics.ReadOnly: type ReadOnlyOptic k :: OpticKind;
+ Optics.ReadOnly: type ReadOnlyOptic k;
- Optics.ReversedLens: data A_ReversedLens :: OpticKind
+ Optics.ReversedLens: data A_ReversedLens
- Optics.ReversedPrism: data A_ReversedPrism :: OpticKind
+ Optics.ReversedPrism: data A_ReversedPrism
- Optics.Review: data A_Review :: OpticKind
+ Optics.Review: data A_Review
- Optics.Review: review :: Is k A_Review => Optic' k is t b -> b -> t
+ Optics.Review: review :: forall k (is :: IxList) t b. Is k A_Review => Optic' k is t b -> b -> t
- Optics.Setter: data A_Setter :: OpticKind
+ Optics.Setter: data A_Setter
- Optics.Setter: over :: Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
+ Optics.Setter: over :: forall k (is :: IxList) s t a b. Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
- Optics.Setter: over' :: Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
+ Optics.Setter: over' :: forall k (is :: IxList) s t a b. Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
- Optics.Setter: rewriteOf :: Is k A_Setter => Optic k is a b a b -> (b -> Maybe a) -> a -> b
+ Optics.Setter: rewriteOf :: forall k (is :: IxList) a b. Is k A_Setter => Optic k is a b a b -> (b -> Maybe a) -> a -> b
- Optics.Setter: set :: Is k A_Setter => Optic k is s t a b -> b -> s -> t
+ Optics.Setter: set :: forall k (is :: IxList) s t a b. Is k A_Setter => Optic k is s t a b -> b -> s -> t
- Optics.Setter: set' :: Is k A_Setter => Optic k is s t a b -> b -> s -> t
+ Optics.Setter: set' :: forall k (is :: IxList) s t a b. Is k A_Setter => Optic k is s t a b -> b -> s -> t
- Optics.Setter: transformOf :: Is k A_Setter => Optic k is a b a b -> (b -> b) -> a -> b
+ Optics.Setter: transformOf :: forall k (is :: IxList) a b. Is k A_Setter => Optic k is a b a b -> (b -> b) -> a -> b
- Optics.Traversal: adjoin :: (Is k A_Traversal, Is l A_Traversal) => Optic' k is s a -> Optic' l js s a -> Traversal' s a
+ Optics.Traversal: adjoin :: forall k l (is :: IxList) s a (js :: IxList). (Is k A_Traversal, Is l A_Traversal) => Optic' k is s a -> Optic' l js s a -> Traversal' s a
- Optics.Traversal: backwards :: Is k A_Traversal => Optic k is s t a b -> Traversal s t a b
+ Optics.Traversal: backwards :: forall k (is :: IxList) s t a b. Is k A_Traversal => Optic k is s t a b -> Traversal s t a b
- Optics.Traversal: data A_Traversal :: OpticKind
+ Optics.Traversal: data A_Traversal
- Optics.Traversal: failover :: Is k A_Traversal => Optic k is s t a b -> (a -> b) -> s -> Maybe t
+ Optics.Traversal: failover :: forall k (is :: IxList) s t a b. Is k A_Traversal => Optic k is s t a b -> (a -> b) -> s -> Maybe t
- Optics.Traversal: failover' :: Is k A_Traversal => Optic k is s t a b -> (a -> b) -> s -> Maybe t
+ Optics.Traversal: failover' :: forall k (is :: IxList) s t a b. Is k A_Traversal => Optic k is s t a b -> (a -> b) -> s -> Maybe t
- Optics.Traversal: forOf :: (Is k A_Traversal, Applicative f) => Optic k is s t a b -> s -> (a -> f b) -> f t
+ Optics.Traversal: forOf :: forall k f (is :: IxList) s t a b. (Is k A_Traversal, Applicative f) => Optic k is s t a b -> s -> (a -> f b) -> f t
- Optics.Traversal: mapAccumLOf :: Is k A_Traversal => Optic k is s t a b -> (acc -> a -> (b, acc)) -> acc -> s -> (t, acc)
+ Optics.Traversal: mapAccumLOf :: forall k (is :: IxList) s t a b acc. Is k A_Traversal => Optic k is s t a b -> (acc -> a -> (b, acc)) -> acc -> s -> (t, acc)
- Optics.Traversal: mapAccumROf :: Is k A_Traversal => Optic k is s t a b -> (acc -> a -> (b, acc)) -> acc -> s -> (t, acc)
+ Optics.Traversal: mapAccumROf :: forall k (is :: IxList) s t a b acc. Is k A_Traversal => Optic k is s t a b -> (acc -> a -> (b, acc)) -> acc -> s -> (t, acc)
- Optics.Traversal: partsOf :: forall k is s t a. Is k A_Traversal => Optic k is s t a a -> Lens s t [a] [a]
+ Optics.Traversal: partsOf :: forall k (is :: IxList) s t a. Is k A_Traversal => Optic k is s t a a -> Lens s t [a] [a]
- Optics.Traversal: rewriteMOf :: (Is k A_Traversal, Monad m) => Optic k is a b a b -> (b -> m (Maybe a)) -> a -> m b
+ Optics.Traversal: rewriteMOf :: forall k m (is :: IxList) a b. (Is k A_Traversal, Monad m) => Optic k is a b a b -> (b -> m (Maybe a)) -> a -> m b
- Optics.Traversal: scanl1Of :: Is k A_Traversal => Optic k is s t a a -> (a -> a -> a) -> s -> t
+ Optics.Traversal: scanl1Of :: forall k (is :: IxList) s t a. Is k A_Traversal => Optic k is s t a a -> (a -> a -> a) -> s -> t
- Optics.Traversal: scanr1Of :: Is k A_Traversal => Optic k is s t a a -> (a -> a -> a) -> s -> t
+ Optics.Traversal: scanr1Of :: forall k (is :: IxList) s t a. Is k A_Traversal => Optic k is s t a a -> (a -> a -> a) -> s -> t
- Optics.Traversal: sequenceOf :: (Is k A_Traversal, Applicative f) => Optic k is s t (f b) b -> s -> f t
+ Optics.Traversal: sequenceOf :: forall k f (is :: IxList) s t b. (Is k A_Traversal, Applicative f) => Optic k is s t (f b) b -> s -> f t
- Optics.Traversal: singular :: forall k is s a. Is k A_Traversal => Optic' k is s a -> AffineTraversal' s a
+ Optics.Traversal: singular :: forall k (is :: IxList) s a. Is k A_Traversal => Optic' k is s a -> AffineTraversal' s a
- Optics.Traversal: transformMOf :: (Is k A_Traversal, Monad m) => Optic k is a b a b -> (b -> m b) -> a -> m b
+ Optics.Traversal: transformMOf :: forall k m (is :: IxList) a b. (Is k A_Traversal, Monad m) => Optic k is a b a b -> (b -> m b) -> a -> m b
- Optics.Traversal: transposeOf :: Is k A_Traversal => Optic k is s t [a] a -> s -> [t]
+ Optics.Traversal: transposeOf :: forall k (is :: IxList) s t a. Is k A_Traversal => Optic k is s t [a] a -> s -> [t]
- Optics.Traversal: traverseOf :: (Is k A_Traversal, Applicative f) => Optic k is s t a b -> (a -> f b) -> s -> f t
+ Optics.Traversal: traverseOf :: forall k f (is :: IxList) s t a b. (Is k A_Traversal, Applicative f) => Optic k is s t a b -> (a -> f b) -> s -> f t
Files
- CHANGELOG.md +10/−0
- optics-core.cabal +16/−5
- src/Data/IntMap/Optics.hs +5/−4
- src/Data/IntSet/Optics.hs +4/−3
- src/Data/Map/Optics.hs +5/−4
- src/Data/Sequence/Optics.hs +5/−3
- src/Data/Set/Optics.hs +4/−3
- src/Data/Tree/Optics.hs +4/−3
- src/Data/Tuple/Optics.hs +0/−1
- src/Optics/AffineFold.hs +4/−3
- src/Optics/AffineTraversal.hs +33/−3
- src/Optics/At/Core.hs +5/−4
- src/Optics/Each/Core.hs +21/−7
- src/Optics/Fold.hs +6/−5
- src/Optics/Generic.hs +14/−6
- src/Optics/Indexed/Core.hs +0/−1
- src/Optics/Internal/Generic.hs +46/−47
- src/Optics/Internal/Generic/TypeLevel.hs +30/−32
- src/Optics/Internal/Indexed.hs +21/−23
- src/Optics/Internal/Magic.hs +0/−2
- src/Optics/Internal/Optic.hs +0/−2
- src/Optics/Internal/Optic/Subtyping.hs +4/−6
- src/Optics/Internal/Optic/TypeLevel.hs +36/−39
- src/Optics/Internal/Optic/Types.hs +0/−2
- src/Optics/IxAffineTraversal.hs +33/−0
- src/Optics/IxFold.hs +0/−1
- src/Optics/IxTraversal.hs +35/−5
- src/Optics/Label.hs +29/−18
- src/Optics/Mapping.hs +0/−1
- src/Optics/Re.hs +1/−2
- src/Optics/ReadOnly.hs +0/−2
- src/Optics/Traversal.hs +52/−7
CHANGELOG.md view
@@ -1,3 +1,13 @@+# optics-core-0.4.2 (2025-02-10)+* Rename `PathTree` data constructor to `PathNode`, to avoid pun with type+ constructor.+* Add support for using `gafield` as a label in GHC >= 9.6 using `#"?field"`+ syntax.+* Add `unsafePartsOf` to `Optics.Traversal`.+* Add `failing`-like combinators for traversals: `adisjoin`+ (`Optics.AffineTraversal`), `iadisjoin` (`Optics.IxAffineTraversal`),+ `idisjoin` (`Optics.IxTraversal`) and `disjoin` (`Optics.Traversal`).+ # optics-core-0.4.1.1 (2023-06-22) * Add INLINE pragmas to small functions that really should inline
optics-core.cabal view
@@ -1,13 +1,15 @@-cabal-version: 2.2+cabal-version: 3.0 name: optics-core-version: 0.4.1.1+version: 0.4.2 license: BSD-3-Clause license-file: LICENSE build-type: Simple maintainer: optics@well-typed.com author: Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus-tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7- || ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2, GHCJS ==8.4+tested-with: GHC == { 8.2.2, 8.4.4, 8.6.5, 8.8.4, 8.10.7, 9.0.2, 9.2.8+ , 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.2, 9.14.1+ }+ GHCJS == { 8.4 } synopsis: Optics as an abstract interface: core definitions category: Data, Optics, Lenses description:@@ -35,11 +37,17 @@ common language ghc-options: -Wall -Wcompat+ if impl(ghc <9.4)+ ghc-options: -Wno-unticked-promoted-constructors default-language: Haskell2010 + if impl(ghc < 8.6)+ default-extensions: TypeInType+ default-extensions: BangPatterns ConstraintKinds+ DataKinds DefaultSignatures DeriveFoldable DeriveFunctor@@ -56,6 +64,7 @@ LambdaCase OverloadedLabels PatternSynonyms+ PolyKinds RankNTypes ScopedTypeVariables TupleSections@@ -73,7 +82,7 @@ build-depends: base >= 4.10 && <5 , array >= 0.5.2.0 && <0.6- , containers >= 0.5.10.2 && <0.7+ , containers >= 0.5.10.2 && <0.9 , indexed-profunctors >= 0.1 && <0.2 , transformers >= 0.5 && <0.7 , indexed-traversable >= 0.1 && <0.2@@ -154,3 +163,5 @@ Optics.Internal.Setter Optics.Internal.Traversal Optics.Internal.Utils++ x-docspec-options: -XTypeApplications -XTypeOperators -XFlexibleContexts -XStandaloneDeriving -XDeriveGeneric -XDataKinds -XOverloadedLabels -XTupleSections
src/Data/IntMap/Optics.hs view
@@ -50,6 +50,11 @@ import Optics.IxFold import Optics.Optic +-- $setup+-- >>> import qualified Data.IntMap as IntMap+-- >>> import Data.Monoid (Sum (..))+-- >>> import Optics.Core+ -- | Construct a map from an 'IxFold'. -- -- The construction is left-biased (see 'IntMap.union'), i.e. the first occurrences of@@ -132,7 +137,3 @@ Nothing -> point s Just (k', v) -> f k' v <&> \v' -> IntMap.insert k' v' s {-# INLINE ge #-}---- $setup--- >>> import Data.Monoid--- >>> import Optics.Core
src/Data/IntSet/Optics.hs view
@@ -17,6 +17,10 @@ import Optics.Optic import Optics.Setter +-- $setup+-- >>> import qualified Data.IntSet as IntSet+-- >>> import Optics.Core+ -- | IntSet isn't Foldable, but this 'Fold' can be used to access the members of -- an 'IntSet'. --@@ -49,6 +53,3 @@ setOf :: Is k A_Fold => Optic' k is s Int -> s -> IntSet setOf l = foldMapOf l IntSet.singleton {-# INLINE setOf #-}---- $setup--- >>> import Optics.Core
src/Data/Map/Optics.hs view
@@ -57,6 +57,11 @@ import Optics.IxFold import Optics.Optic +-- $setup+-- >>> import qualified Data.Map as Map+-- >>> import Data.Monoid (Sum (..))+-- >>> import Optics.Core+ -- | Construct a map from an 'IxFold'. -- -- The construction is left-biased (see 'Map.union'), i.e. the first@@ -139,7 +144,3 @@ Nothing -> point s Just (k', v) -> f k' v <&> \v' -> Map.insert k' v' s {-# INLINE ge #-}---- $setup--- >>> import Data.Monoid--- >>> import Optics.Core
src/Data/Sequence/Optics.hs view
@@ -20,6 +20,11 @@ import Optics.Optic import Optics.Traversal +-- $setup+-- >>> import Data.Sequence (ViewL (..), ViewR (..))+-- >>> import qualified Data.Sequence as Seq+-- >>> import Optics.Core+ -- * Sequence isomorphisms -- | A 'Seq' is isomorphic to a 'ViewL'@@ -136,6 +141,3 @@ seqOf :: Is k A_Fold => Optic' k is s a -> s -> Seq a seqOf l = foldMapOf l Seq.singleton {-# INLINE seqOf #-}---- $setup--- >>> import Optics.Core
src/Data/Set/Optics.hs view
@@ -16,6 +16,10 @@ import Optics.Optic import Optics.Setter +-- $setup+-- >>> import qualified Data.Set as Set+-- >>> import Optics.Core+ -- | This 'Setter' can be used to change the type of a 'Set' by mapping the -- elements to new values. --@@ -39,6 +43,3 @@ setOf :: (Is k A_Fold, Ord a) => Optic' k is s a -> s -> Set a setOf l = foldMapOf l Set.singleton {-# INLINE setOf #-}---- $setup--- >>> import Optics.Core
src/Data/Tree/Optics.hs view
@@ -13,6 +13,10 @@ import Optics.Lens +-- $setup+-- >>> import Data.Tree (Tree (..))+-- >>> import Optics.Core+ -- | A 'Lens' that focuses on the root of a 'Tree'. -- -- >>> view root $ Node 42 []@@ -27,6 +31,3 @@ branches :: Lens' (Tree a) [Tree a] branches = lensVL $ \f (Node a as) -> Node a <$> f as {-# INLINE branches #-}---- $setup--- >>> import Optics.Core
src/Data/Tuple/Optics.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE DataKinds #-} -- | -- Module: Data.Tuple.Optics -- Description: 'Lens'es for tuple types.
src/Optics/AffineFold.hs view
@@ -60,6 +60,10 @@ import Optics.Internal.Bi import Optics.Internal.Optic +-- $setup+-- >>> import Data.Maybe (listToMaybe)+-- >>> import Optics.Core+ -- | Type synonym for an affine fold. type AffineFold s a = Optic' An_AffineFold NoIx s a @@ -152,6 +156,3 @@ isn't :: Is k An_AffineFold => Optic' k is s a -> s -> Bool isn't k s = isNothing (preview k s) {-# INLINE isn't #-}---- $setup--- >>> import Optics.Core
src/Optics/AffineTraversal.hs view
@@ -48,6 +48,12 @@ -- * Additional elimination forms , withAffineTraversal + -- * Monoid structure+ -- | 'AffineTraversal' admits a monoid structure where 'adisjoin' returns the+ -- result from the second affine traversal only if the first does not return a+ -- result. The identity element is 'ignored' (which traverses no elements).+ , adisjoin+ -- * Subtyping , An_AffineTraversal -- | <<diagrams/AffineTraversal.png AffineTraversal in the optics hierarchy>>@@ -63,7 +69,11 @@ import Data.Profunctor.Indexed import Optics.Internal.Optic+import Optics.Internal.Utils +-- $setup+-- >>> import Optics.Core+ -- | Type synonym for a type-modifying affine traversal. type AffineTraversal s t a b = Optic An_AffineTraversal NoIx s t a b @@ -165,6 +175,29 @@ matching o = withAffineTraversal o $ \match _ -> match {-# INLINE matching #-} +-- | Try the first 'AffineTraversal'. If it does not return an entry, try the+-- second one.+--+-- >>> over (ix 2 `adisjoin` ix 1) (*5) [1,2,3]+-- [1,2,15]+-- >>> over (ix 2 `adisjoin` ix 1) (*5) [1,2]+-- [1,10]+--+-- @since 0.4.3+--+adisjoin+ :: (Is k An_AffineTraversal, Is l An_AffineTraversal)+ => Optic k is s t a b+ -> Optic l js s t a b+ -> AffineTraversal s t a b+adisjoin a b = atraversalVL $ \point f s ->+ let OrT visited fu = atraverseOf a (OrT False . point) (wrapOrT . f) s+ in if visited+ then fu+ else atraverseOf b point f s+infixl 3 `adisjoin` -- Same as (<|>)+{-# INLINE adisjoin #-}+ -- | Filter result(s) of a traversal that don't satisfy a predicate. -- -- /Note:/ This is /not/ a legal 'Optics.Traversal.Traversal', unless you are@@ -186,6 +219,3 @@ unsafeFiltered :: (a -> Bool) -> AffineTraversal' a a unsafeFiltered p = atraversalVL (\point f a -> if p a then f a else point a) {-# INLINE unsafeFiltered #-}---- $setup--- >>> import Optics.Core
src/Optics/At/Core.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE CPP #-}-{-# LANGUAGE TypeInType #-} -- | -- Module: Optics.At.Core -- Description: Optics for 'Map' and 'Set'-like containers.@@ -69,6 +68,11 @@ import Optics.Optic import Optics.Setter +-- $setup+-- >>> import Optics.Core+-- >>> import qualified Data.Map as Map+-- >>> import qualified Data.IntSet as IntSet+ -- | Type family that takes a key-value container type and returns the type of -- keys (indices) into the container, for example @'Index' ('Map' k a) ~ k@. -- This is shared by 'Ixed', 'At' and 'Contains'.@@ -483,6 +487,3 @@ go (a:as) i = (a:) <$> (go as $! i - 1) in go xs0 k {-# INLINE ixListVL #-}---- $setup--- >>> import Optics.Core
src/Optics/Each/Core.hs view
@@ -176,25 +176,39 @@ {-# INLINE[1] each #-} -- | @'each' :: 'IxTraversal' 'Int' [a] [b] a b@-instance Each Int [a] [b] a b+instance Each Int [a] [b] a b where+ each = itraversed+ {-# INLINE[1] each #-} -- | @'each' :: 'IxTraversal' 'Int' (NonEmpty a) (NonEmpty b) a b@-instance Each Int (NonEmpty a) (NonEmpty b) a b+instance Each Int (NonEmpty a) (NonEmpty b) a b where+ each = itraversed+ {-# INLINE[1] each #-} -- | @'each' :: 'IxTraversal' () ('Identity' a) ('Identity' b) a b@-instance Each () (Identity a) (Identity b) a b+instance Each () (Identity a) (Identity b) a b where+ each = itraversed+ {-# INLINE[1] each #-} -- | @'each' :: 'IxTraversal' () ('Maybe' a) ('Maybe' b) a b@-instance Each () (Maybe a) (Maybe b) a b+instance Each () (Maybe a) (Maybe b) a b where+ each = itraversed+ {-# INLINE[1] each #-} -- | @'each' :: 'IxTraversal' 'Int' ('Seq' a) ('Seq' b) a b@-instance Each Int (Seq a) (Seq b) a b+instance Each Int (Seq a) (Seq b) a b where+ each = itraversed+ {-# INLINE[1] each #-} -- | @'each' :: 'IxTraversal' [Int] ('Tree' a) ('Tree' b) a b@-instance Each [Int] (Tree a) (Tree b) a b+instance Each [Int] (Tree a) (Tree b) a b where+ each = itraversed+ {-# INLINE[1] each #-} -- | @'each' :: 'Ix' i => 'IxTraversal' i ('Array' i a) ('Array' i b) a b@-instance (Ix i, i ~ j) => Each i (Array i a) (Array j b) a b+instance (Ix i, i ~ j) => Each i (Array i a) (Array j b) a b where+ each = itraversed+ {-# INLINE[1] each #-} -- $setup -- >>> import Optics.Core
src/Optics/Fold.hs view
@@ -106,7 +106,7 @@ import Control.Applicative.Backwards import Control.Monad import Data.Foldable-import Data.Function+import Data.Function (fix) import Data.Monoid import Data.Profunctor.Indexed@@ -117,6 +117,10 @@ import Optics.Internal.Optic import Optics.Internal.Utils +-- $setup+-- >>> import Optics.Core+-- >>> import Data.Function (on)+ -- | Type synonym for a fold. type Fold s a = Optic' A_Fold NoIx s a @@ -218,7 +222,7 @@ -- This can be useful to lift operations from @Data.List@ and elsewhere into a -- 'Fold'. ----- >>> toListOf (folding tail) [1,2,3,4]+-- >>> toListOf (folding (drop 1)) [1,2,3,4] -- [2,3,4] folding :: Foldable f => (s -> f a) -> Fold s a folding f = Optic (contrafirst f . foldVL__ traverse_)@@ -707,6 +711,3 @@ where go a = f a (go <$> toListOf o a) {-# INLINE paraOf #-}---- $setup--- >>> import Optics.Core
src/Optics/Generic.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE AllowAmbiguousTypes #-}-{-# LANGUAGE DataKinds #-} {-# LANGUAGE UndecidableInstances #-} -- | -- Module: Optics.Generic@@ -53,6 +52,11 @@ import Optics.Prism import Optics.Traversal +-- $setup+-- >>> import GHC.Generics (Generic)+-- >>> import Optics.Core+-- >>> newtype NoG = NoG { fromNoG :: Char }+ -- | Hidden type for preventing GHC from solving constraints too early. data Void0 @@ -176,6 +180,14 @@ -- ...In the... -- ... --+-- /Note:/ 'gafield' is supported by 'Optics.Label.labelOptic' and can be used+-- with a concise syntax via @OverloadedLabels@ with GHC >= 9.6.+--+-- @+-- λ> herring ^? #"?name"+-- Just \"Henry\"+-- @+-- -- @since 0.4 -- class GAffineField (name :: Symbol) s t a b | name s -> t a b@@ -361,7 +373,7 @@ gplate :: Traversal' s a instance GPlateContext a s => GPlate a s where- gplate = traversalVL (gplateInner @'True)+ gplate = traversalVL (gplateInner @True) {-# INLINE gplate #-} -- | Hide implementation from haddock.@@ -377,7 +389,3 @@ instance GPlate Void0 a where gplate = error "unreachable" --- $setup--- >>> :set -XDataKinds -XDeriveGeneric -XStandaloneDeriving -XOverloadedLabels--- >>> import Optics.Core--- >>> newtype NoG = NoG { fromNoG :: Char }
src/Optics/Indexed/Core.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE DataKinds #-} -- | -- Module: Optics.Indexed.Core -- Description: Core definitions for indexed optics.
src/Optics/Internal/Generic.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE AllowAmbiguousTypes #-}-{-# LANGUAGE DataKinds #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_HADDOCK not-home #-} @@ -130,7 +129,7 @@ instance ( GSetFieldSum path1 g1 h1 b , GSetFieldSum path2 g2 h2 b- ) => GSetFieldSum ('PathTree path1 path2) (g1 :+: g2) (h1 :+: h2) b where+ ) => GSetFieldSum (PathNode path1 path2) (g1 :+: g2) (h1 :+: h2) b where gsetFieldSum (L1 x) = L1 . gsetFieldSum @path1 x gsetFieldSum (R1 y) = R1 . gsetFieldSum @path2 y {-# INLINE gsetFieldSum #-}@@ -139,15 +138,15 @@ ( path ~ GSetFieldPath con epath , When (IsLeft epath) (HideReps g h) , GSetFieldProd path g h b- ) => GSetFieldSum ('PathLeaf epath) (M1 C ('MetaCons con fix hs) g)- (M1 C ('MetaCons con fix hs) h) b where+ ) => GSetFieldSum (PathLeaf epath) (M1 C (MetaCons con fix hs) g)+ (M1 C (MetaCons con fix hs) h) b where gsetFieldSum (M1 x) = M1 . gsetFieldProd @path x type family GSetFieldPath (con :: Symbol) (e :: Either Symbol [Path]) :: [Path] where- GSetFieldPath _ ('Right path) = path- GSetFieldPath con ('Left name) = TypeError- ('Text "Data constructor " ':<>: QuoteSymbol con ':<>:- 'Text " doesn't have a field named " ':<>: QuoteSymbol name)+ GSetFieldPath _ (Right path) = path+ GSetFieldPath con (Left name) = TypeError+ (Text "Data constructor " :<>: QuoteSymbol con :<>:+ Text " doesn't have a field named " :<>: QuoteSymbol name) class GSetFieldProd (path :: [Path]) g h b | path h -> b , path g b -> h where@@ -156,27 +155,27 @@ -- fast path left instance {-# OVERLAPPING #-} ( GSetFieldProd path g1 h1 b- ) => GSetFieldProd ('PathLeft : path) (g1 :*: g2) (h1 :*: g2) b where+ ) => GSetFieldProd (PathLeft : path) (g1 :*: g2) (h1 :*: g2) b where gsetFieldProd (x :*: y) = (:*: y) . gsetFieldProd @path x -- slow path left instance ( GSetFieldProd path g1 h1 b , g2 ~ h2- ) => GSetFieldProd ('PathLeft : path) (g1 :*: g2) (h1 :*: h2) b where+ ) => GSetFieldProd (PathLeft : path) (g1 :*: g2) (h1 :*: h2) b where gsetFieldProd (x :*: y) = (:*: y) . gsetFieldProd @path x -- fast path right instance {-# OVERLAPPING #-} ( GSetFieldProd path g2 h2 b- ) => GSetFieldProd ('PathRight : path) (g1 :*: g2) (g1 :*: h2) b where+ ) => GSetFieldProd (PathRight : path) (g1 :*: g2) (g1 :*: h2) b where gsetFieldProd (x :*: y) = (x :*:) . gsetFieldProd @path y -- slow path right instance ( GSetFieldProd path g2 h2 b , g1 ~ h1- ) => GSetFieldProd ('PathRight : path) (g1 :*: g2) (h1 :*: h2) b where+ ) => GSetFieldProd (PathRight : path) (g1 :*: g2) (h1 :*: h2) b where gsetFieldProd (x :*: y) = (x :*:) . gsetFieldProd @path y instance@@ -203,10 +202,10 @@ , HasField name s a -- require the field to be in scope , Unless (AnyHasPath path) (TypeError- ('Text "Type " ':<>: QuoteType s ':<>:- 'Text " doesn't have a field named " ':<>: QuoteSymbol name))+ (Text "Type " :<>: QuoteType s :<>:+ Text " doesn't have a field named " :<>: QuoteSymbol name)) , GAffineFieldSum path (Rep s) (Rep t) a b- ) => GAffineFieldImpl 'True name s t a b where+ ) => GAffineFieldImpl True name s t a b where gafieldImpl = withAffineTraversal (atraversalVL (\point f s -> to <$> gafieldSum @path point f (from s))) (\match update -> atraversalVL $ \point f s ->@@ -226,14 +225,14 @@ instance ( GAffineFieldSum path1 g1 h1 a b , GAffineFieldSum path2 g2 h2 a b- ) => GAffineFieldSum ('PathTree path1 path2) (g1 :+: g2) (h1 :+: h2) a b where+ ) => GAffineFieldSum (PathNode path1 path2) (g1 :+: g2) (h1 :+: h2) a b where gafieldSum point f (L1 x) = L1 <$> gafieldSum @path1 point f x gafieldSum point f (R1 y) = R1 <$> gafieldSum @path2 point f y {-# INLINE gafieldSum #-} instance ( GAffineFieldMaybe epath g h a b- ) => GAffineFieldSum ('PathLeaf epath) (M1 C m g) (M1 C m h) a b where+ ) => GAffineFieldSum (PathLeaf epath) (M1 C m g) (M1 C m h) a b where gafieldSum point f (M1 x) = M1 <$> gafieldMaybe @epath point f x class GAffineFieldMaybe (epath :: Either Symbol [Path]) g h a b where@@ -241,12 +240,12 @@ instance ( g ~ h- ) => GAffineFieldMaybe ('Left name) g h a b where+ ) => GAffineFieldMaybe (Left name) g h a b where gafieldMaybe point _ g = point g instance ( GFieldProd prodPath g h a b- ) => GAffineFieldMaybe ('Right prodPath) g h a b where+ ) => GAffineFieldMaybe (Right prodPath) g h a b where gafieldMaybe _ f g = gfieldProd @prodPath f g ----------------------------------------@@ -260,27 +259,27 @@ -- fast path left instance {-# OVERLAPPING #-} ( GFieldProd path g1 h1 a b- ) => GFieldProd ('PathLeft : path) (g1 :*: g2) (h1 :*: g2) a b where+ ) => GFieldProd (PathLeft : path) (g1 :*: g2) (h1 :*: g2) a b where gfieldProd f (x :*: y) = (:*: y) <$> gfieldProd @path f x -- slow path left instance ( GFieldProd path g1 h1 a b , g2 ~ h2- ) => GFieldProd ('PathLeft : path) (g1 :*: g2) (h1 :*: h2) a b where+ ) => GFieldProd (PathLeft : path) (g1 :*: g2) (h1 :*: h2) a b where gfieldProd f (x :*: y) = (:*: y) <$> gfieldProd @path f x -- fast path right instance {-# OVERLAPPING #-} ( GFieldProd path g2 h2 a b- ) => GFieldProd ('PathRight : path) (g1 :*: g2) (g1 :*: h2) a b where+ ) => GFieldProd (PathRight : path) (g1 :*: g2) (g1 :*: h2) a b where gfieldProd f (x :*: y) = (x :*:) <$> gfieldProd @path f y -- slow path right instance ( GFieldProd path g2 h2 a b , g1 ~ h1- ) => GFieldProd ('PathRight : path) (g1 :*: g2) (h1 :*: h2) a b where+ ) => GFieldProd (PathRight : path) (g1 :*: g2) (h1 :*: h2) a b where gfieldProd f (x :*: y) = (x :*:) <$> gfieldProd @path f y instance@@ -305,11 +304,11 @@ ( Generic s , Generic t , path ~ If (n <=? 0)- (TypeError ('Text "There is no 0th position"))+ (TypeError (Text "There is no 0th position")) (GetPositionPaths s n (Rep s)) , When (n <=? 0) (HideReps (Rep s) (Rep t)) , GPositionSum path (Rep s) (Rep t) a b- ) => GPositionImpl 'True n s t a b where+ ) => GPositionImpl True n s t a b where gpositionImpl = withLens (lensVL (\f s -> to <$> gpositionSum @path f (from s))) (\get set -> lensVL $ \f s -> set s <$> f (get s))@@ -331,7 +330,7 @@ instance ( GPositionSum path1 g1 h1 a b , GPositionSum path2 g2 h2 a b- ) => GPositionSum ('PathTree path1 path2) (g1 :+: g2) (h1 :+: h2) a b where+ ) => GPositionSum (PathNode path1 path2) (g1 :+: g2) (h1 :+: h2) a b where gpositionSum f (L1 x) = L1 <$> gpositionSum @path1 f x gpositionSum f (R1 y) = R1 <$> gpositionSum @path2 f y {-# INLINE gpositionSum #-}@@ -340,21 +339,21 @@ ( path ~ GPositionPath con epath , When (IsLeft epath) (HideReps g h) , GFieldProd path g h a b- ) => GPositionSum ('PathLeaf epath) (M1 C ('MetaCons con fix hs) g)- (M1 C ('MetaCons con fix hs) h) a b where+ ) => GPositionSum (PathLeaf epath) (M1 C (MetaCons con fix hs) g)+ (M1 C (MetaCons con fix hs) h) a b where gpositionSum f (M1 x) = M1 <$> gfieldProd @path f x type family GPositionPath con (e :: Either (Nat, Nat) [Path]) :: [Path] where- GPositionPath _ ('Right path) = path- GPositionPath con ('Left '(n, k)) = TypeError- ('Text "Data constructor " ':<>: QuoteSymbol con ':<>:- 'Text " has " ':<>: ShowFieldNumber k ':<>: 'Text ", " ':<>:- ToOrdinal n ':<>: 'Text " requested")+ GPositionPath _ (Right path) = path+ GPositionPath con (Left '(n, k)) = TypeError+ (Text "Data constructor " :<>: QuoteSymbol con :<>:+ Text " has " :<>: ShowFieldNumber k :<>: Text ", " :<>:+ ToOrdinal n :<>: Text " requested") type family ShowFieldNumber (k :: Nat) :: ErrorMessage where- ShowFieldNumber 0 = 'Text "no fields"- ShowFieldNumber 1 = 'Text "1 field"- ShowFieldNumber k = 'ShowType k ':<>: 'Text " fields"+ ShowFieldNumber 0 = Text "no fields"+ ShowFieldNumber 1 = Text "1 field"+ ShowFieldNumber k = ShowType k :<>: Text " fields" ---------------------------------------- -- Constructor@@ -374,12 +373,12 @@ , epath ~ GetNamePath name (Rep s) '[] , path ~ FromRight (TypeError- ('Text "Type " ':<>: QuoteType s ':<>:- 'Text " doesn't have a constructor named " ':<>: QuoteSymbol name))+ (Text "Type " :<>: QuoteType s :<>:+ Text " doesn't have a constructor named " :<>: QuoteSymbol name)) epath , When (IsLeft epath) (HideReps (Rep s) (Rep t)) , GConstructorSum path (Rep s) (Rep t) a b- ) => GConstructorImpl 'True name s t a b where+ ) => GConstructorImpl True name s t a b where gconstructorImpl = withPrism (generic % gconstructorSum @path) prism {-# INLINE gconstructorImpl #-} @@ -399,27 +398,27 @@ -- fast path left instance {-# OVERLAPPING #-} ( GConstructorSum path g1 h1 a b- ) => GConstructorSum ('PathLeft : path) (g1 :+: g2) (h1 :+: g2) a b where+ ) => GConstructorSum (PathLeft : path) (g1 :+: g2) (h1 :+: g2) a b where gconstructorSum = _L1 % gconstructorSum @path -- slow path left instance ( GConstructorSum path g1 h1 a b , g2 ~ h2- ) => GConstructorSum ('PathLeft : path) (g1 :+: g2) (h1 :+: h2) a b where+ ) => GConstructorSum (PathLeft : path) (g1 :+: g2) (h1 :+: h2) a b where gconstructorSum = _L1 % gconstructorSum @path -- fast path right instance {-# OVERLAPPING #-} ( GConstructorSum path g2 h2 a b- ) => GConstructorSum ('PathRight : path) (g1 :+: g2) (g1 :+: h2) a b where+ ) => GConstructorSum (PathRight : path) (g1 :+: g2) (g1 :+: h2) a b where gconstructorSum = _R1 % gconstructorSum @path -- slow path right instance ( GConstructorSum path g2 h2 a b , g1 ~ h1- ) => GConstructorSum ('PathRight : path) (g1 :+: g2) (h1 :+: h2) a b where+ ) => GConstructorSum (PathRight : path) (g1 :+: g2) (h1 :+: h2) a b where gconstructorSum = _R1 % gconstructorSum @path instance@@ -439,9 +438,9 @@ instance {-# OVERLAPPABLE #-} ( Dysfunctional () () g h a b , TypeError- ('Text "Generic based access supports constructors" ':$$:- 'Text "containing up to 5 fields. Please generate" ':$$:- 'Text "PrismS with Template Haskell if you need more.")+ (Text "Generic based access supports constructors" :$$:+ Text "containing up to 5 fields. Please generate" :$$:+ Text "PrismS with Template Haskell if you need more.") ) => GConstructorTuple g h a b where gconstructorTuple = error "unreachable" @@ -545,7 +544,7 @@ class GPlateInner (repDefined :: Bool) s a where gplateInner :: TraversalVL' s a -instance (Generic s, GPlateImpl (Rep s) a) => GPlateInner 'True s a where+instance (Generic s, GPlateImpl (Rep s) a) => GPlateInner True s a where gplateInner f = fmap to . gplateImpl f . from instance {-# INCOHERENT #-} GPlateInner repNotDefined s a where
src/Optics/Internal/Generic/TypeLevel.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE PolyKinds #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_HADDOCK not-home #-} @@ -33,7 +31,7 @@ -- a data type. Computed up front by generic optics for early error reporting -- and efficient data traversal. data PathTree e- = PathTree (PathTree e) (PathTree e)+ = PathNode (PathTree e) (PathTree e) | PathLeaf (Either e [Path]) data Path = PathLeft | PathRight@@ -44,12 +42,12 @@ -- | Compute paths to a field with a specific name. type family GetFieldPaths s (name :: Symbol) g :: PathTree Symbol where GetFieldPaths s name (M1 D _ g) = GetFieldPaths s name g- GetFieldPaths s name (g1 :+: g2) = 'PathTree (GetFieldPaths s name g1)- (GetFieldPaths s name g2)- GetFieldPaths s name (M1 C _ g) = 'PathLeaf (GetNamePath name g '[])+ GetFieldPaths s name (g1 :+: g2) = PathNode (GetFieldPaths s name g1)+ (GetFieldPaths s name g2)+ GetFieldPaths s name (M1 C _ g) = PathLeaf (GetNamePath name g '[]) - GetFieldPaths s name V1 = TypeError ('Text "Type " ':<>: QuoteType s ':<>:- 'Text " has no data constructors")+ GetFieldPaths s name V1 = TypeError (Text "Type " :<>: QuoteType s :<>:+ Text " has no data constructors") -- | Compute path to a constructor in a sum or a field in a product with a -- specific name.@@ -57,16 +55,16 @@ GetNamePath name (M1 D _ g) acc = GetNamePath name g acc -- Find path to a constructor in a sum type.- GetNamePath name (M1 C ('MetaCons name _ _) _) acc = 'Right (Reverse acc '[])- GetNamePath name (g1 :+: g2) acc = FirstRight (GetNamePath name g1 ('PathLeft : acc))- (GetNamePath name g2 ('PathRight : acc))+ GetNamePath name (M1 C (MetaCons name _ _) _) acc = Right (Reverse acc '[])+ GetNamePath name (g1 :+: g2) acc = FirstRight (GetNamePath name g1 (PathLeft : acc))+ (GetNamePath name g2 (PathRight : acc)) -- Find path to a field in a product type.- GetNamePath name (M1 S ('MetaSel ('Just name) _ _ _) _) acc = 'Right (Reverse acc '[])- GetNamePath name (g1 :*: g2) acc = FirstRight (GetNamePath name g1 ('PathLeft : acc))- (GetNamePath name g2 ('PathRight : acc))+ GetNamePath name (M1 S (MetaSel (Just name) _ _ _) _) acc = Right (Reverse acc '[])+ GetNamePath name (g1 :*: g2) acc = FirstRight (GetNamePath name g1 (PathLeft : acc))+ (GetNamePath name g2 (PathRight : acc)) - GetNamePath name _ _ = 'Left name+ GetNamePath name _ _ = Left name ---------------------------------------- -- Paths to a position@@ -74,12 +72,12 @@ -- | Compute paths to a field at a specific position. type family GetPositionPaths s (pos :: Nat) g :: PathTree (Nat, Nat) where GetPositionPaths s pos (M1 D _ g) = GetPositionPaths s pos g- GetPositionPaths s pos (g1 :+: g2) = 'PathTree (GetPositionPaths s pos g1)- (GetPositionPaths s pos g2)- GetPositionPaths s pos (M1 C _ g) = 'PathLeaf (GetPositionPath pos g 0 '[])+ GetPositionPaths s pos (g1 :+: g2) = PathNode (GetPositionPaths s pos g1)+ (GetPositionPaths s pos g2)+ GetPositionPaths s pos (M1 C _ g) = PathLeaf (GetPositionPath pos g 0 '[]) - GetPositionPaths s pos V1 = TypeError ('Text "Type " ':<>: QuoteType s ':<>:- 'Text " has no data constructors")+ GetPositionPaths s pos V1 = TypeError (Text "Type " :<>: QuoteType s :<>:+ Text " has no data constructors") -- | Compute path to a constructor in a sum or a field in a product at a -- specific position.@@ -89,25 +87,25 @@ -- Find field at a position in a sum type. GetPositionPath pos (M1 C _ _) k acc =- If (pos == k + 1) ('Right (Reverse acc '[])) ('Left '(pos, k + 1))+ If (pos == k + 1) (Right (Reverse acc '[])) (Left '(pos, k + 1)) GetPositionPath pos (g1 :+: g2) k acc =- ContinueWhenLeft (GetPositionPath pos g1 k ('PathLeft : acc)) g2 acc+ ContinueWhenLeft (GetPositionPath pos g1 k (PathLeft : acc)) g2 acc -- Find field at a position in a product type. GetPositionPath pos (M1 S _ _) k acc =- If (pos == k + 1) ('Right (Reverse acc '[])) ('Left '(pos, k + 1))+ If (pos == k + 1) (Right (Reverse acc '[])) (Left '(pos, k + 1)) GetPositionPath pos (g1 :*: g2) k acc =- ContinueWhenLeft (GetPositionPath pos g1 k ('PathLeft : acc)) g2 acc+ ContinueWhenLeft (GetPositionPath pos g1 k (PathLeft : acc)) g2 acc -- The second element is the number of fields in the data constructor.- GetPositionPath pos _ k _ = 'Left '(pos, k)+ GetPositionPath pos _ k _ = Left '(pos, k) -- | If the left branch had the position we're looking for, return it. Otherwise -- continue with the right branch. type family ContinueWhenLeft (r :: Either (Nat, Nat) [Path]) g acc :: Either (Nat, Nat) [Path] where- ContinueWhenLeft ('Right path) _ _ = 'Right path- ContinueWhenLeft ('Left '(pos, k)) g acc = GetPositionPath pos g k ('PathRight : acc)+ ContinueWhenLeft (Right path) _ _ = Right path+ ContinueWhenLeft (Left '(pos, k)) g acc = GetPositionPath pos g k (PathRight : acc) ---------------------------------------- -- Misc@@ -121,11 +119,11 @@ -- | Check if any leaf in the tree has a '[Path]'. type family AnyHasPath (path :: PathTree e) :: Bool where- AnyHasPath ('PathTree path1 path2) = AnyHasPath path1 || AnyHasPath path2- AnyHasPath ('PathLeaf ('Right _)) = 'True- AnyHasPath ('PathLeaf ('Left _ )) = 'False+ AnyHasPath (PathNode path1 path2) = AnyHasPath path1 || AnyHasPath path2+ AnyHasPath (PathLeaf (Right _)) = True+ AnyHasPath (PathLeaf (Left _ )) = False type family NoGenericError t where NoGenericError t = TypeError- ('Text "Type " ':<>: QuoteType t ':<>:- 'Text " doesn't have a Generic instance")+ (Text "Type " :<>: QuoteType t :<>:+ Text " doesn't have a Generic instance")
src/Optics/Internal/Indexed.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TypeInType #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_HADDOCK not-home #-} @@ -20,9 +18,9 @@ instance ( TypeError- ('Text "‘" ':<>: 'Text f ':<>: 'Text "’ accepts only optics with no indices")- , (x ': xs) ~ NoIx- ) => AcceptsEmptyIndices f (x ': xs)+ (Text "‘" :<>: Text f :<>: Text "’ accepts only optics with no indices")+ , (x : xs) ~ NoIx+ ) => AcceptsEmptyIndices f (x : xs) instance AcceptsEmptyIndices f '[] @@ -32,10 +30,10 @@ instance ( TypeError- ('Text "Indexed optic is expected")+ (Text "Indexed optic is expected") ) => NonEmptyIndices '[] -instance NonEmptyIndices (x ': xs)+instance NonEmptyIndices (x : xs) -- | Generate sensible error messages in case a user tries to pass either an -- unindexed optic or indexed optic with unflattened indices where indexed optic@@ -46,57 +44,57 @@ instance ( TypeError- ('Text "Indexed optic is expected")+ (Text "Indexed optic is expected") , '[] ~ '[i] ) => HasSingleIndex '[] i instance ( TypeError- ('Text "Use (<%>) or icompose to combine indices of type "- ':<>: ShowTypes is)+ (Text "Use (<%>) or icompose to combine indices of type "+ :<>: ShowTypes is) , is ~ '[i1, i2] , is ~ '[i] ) => HasSingleIndex '[i1, i2] i instance ( TypeError- ('Text "Use icompose3 to combine indices of type "- ':<>: ShowTypes is)+ (Text "Use icompose3 to combine indices of type "+ :<>: ShowTypes is) , is ~ '[i1, i2, i3] , is ~ '[i] ) => HasSingleIndex [i1, i2, i3] i instance ( TypeError- ('Text "Use icompose4 to combine indices of type "- ':<>: ShowTypes is)+ (Text "Use icompose4 to combine indices of type "+ :<>: ShowTypes is) , is ~ '[i1, i2, i3, i4] , is ~ '[i] ) => HasSingleIndex '[i1, i2, i3, i4] i instance ( TypeError- ('Text "Use icompose5 to flatten indices of type "- ':<>: ShowTypes is)+ (Text "Use icompose5 to flatten indices of type "+ :<>: ShowTypes is) , is ~ '[i1, i2, i3, i4, i5] , is ~ '[i] ) => HasSingleIndex '[i1, i2, i3, i4, i5] i instance ( TypeError- ('Text "Use icomposeN to flatten indices of type "- ':<>: ShowTypes is)- , is ~ (i1 ': i2 ': i3 ': i4 ': i5 ': i6 : is')+ (Text "Use icomposeN to flatten indices of type "+ :<>: ShowTypes is)+ , is ~ (i1 : i2 : i3 : i4 : i5 : i6 : is') , is ~ '[i]- ) => HasSingleIndex (i1 ': i2 ': i3 ': i4 ': i5 ': i6 ': is') i+ ) => HasSingleIndex (i1 : i2 : i3 : i4 : i5 : i6 : is') i ---------------------------------------- -- Helpers for HasSingleIndex type family ShowTypes (types :: [Type]) :: ErrorMessage where- ShowTypes '[i] = QuoteType i- ShowTypes '[i, j] = QuoteType i ':<>: 'Text " and " ':<>: QuoteType j- ShowTypes (i ': is) = QuoteType i ':<>: 'Text ", " ':<>: ShowTypes is+ ShowTypes '[i] = QuoteType i+ ShowTypes '[i, j] = QuoteType i :<>: Text " and " :<>: QuoteType j+ ShowTypes (i : is) = QuoteType i :<>: Text ", " :<>: ShowTypes is ----------------------------------------
src/Optics/Internal/Magic.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE PolyKinds #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_HADDOCK not-home #-}
src/Optics/Internal/Optic.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TypeInType #-} {-# OPTIONS_HADDOCK not-home #-} -- | Core optic types and subtyping machinery.
src/Optics/Internal/Optic/Subtyping.hs view
@@ -1,6 +1,4 @@ {-# LANGUAGE AllowAmbiguousTypes #-}-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TypeInType #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_HADDOCK not-home #-} @@ -33,9 +31,9 @@ -- | Overlappable instance for a custom type error. instance {-# OVERLAPPABLE #-} TypeError- ('ShowType k ':<>: 'Text " cannot be used as " ':<>: 'ShowType l- ':$$: 'Text "Perhaps you meant one of these:"- ':$$: ShowEliminations (EliminationForms k)+ (ShowType k :<>: Text " cannot be used as " :<>: ShowType l+ :$$: Text "Perhaps you meant one of these:"+ :$$: ShowEliminations (EliminationForms k) ) => Is k l where implies _ = error "unreachable" @@ -434,6 +432,6 @@ instance {-# OVERLAPPABLE #-} ( JoinKinds k l m- , TypeError ('ShowType k ':<>: 'Text " cannot be composed with " ':<>: 'ShowType l)+ , TypeError (ShowType k :<>: Text " cannot be composed with " :<>: ShowType l) ) => JoinKinds k l m where joinKinds _ = error "unreachable"
src/Optics/Internal/Optic/TypeLevel.hs view
@@ -1,6 +1,4 @@ {-# LANGUAGE AllowAmbiguousTypes #-}-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TypeInType #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_HADDOCK not-home #-} @@ -26,23 +24,23 @@ -- Elimination forms in error messages type family ShowSymbolWithOrigin symbol origin :: ErrorMessage where- ShowSymbolWithOrigin symbol origin = 'Text " "- ':<>: QuoteSymbol symbol- ':<>: 'Text " (from "- ':<>: 'Text origin- ':<>: 'Text ")"+ ShowSymbolWithOrigin symbol origin = Text " "+ :<>: QuoteSymbol symbol+ :<>: Text " (from "+ :<>: Text origin+ :<>: Text ")" type family ShowSymbolsWithOrigin (fs :: [(Symbol, Symbol)]) :: ErrorMessage where ShowSymbolsWithOrigin '[ '(symbol, origin) ] = ShowSymbolWithOrigin symbol origin- ShowSymbolsWithOrigin ('(symbol, origin) ': rest) =- ShowSymbolWithOrigin symbol origin ':$$: ShowSymbolsWithOrigin rest+ ShowSymbolsWithOrigin ('(symbol, origin) : rest) =+ ShowSymbolWithOrigin symbol origin :$$: ShowSymbolsWithOrigin rest type family ShowOperators (ops :: [Symbol]) :: ErrorMessage where ShowOperators '[op] =- QuoteSymbol op ':<>: 'Text " (from Optics.Operators)"- ShowOperators (op ': rest) =- QuoteSymbol op ':<>: 'Text " " ':<>: ShowOperators rest+ QuoteSymbol op :<>: Text " (from Optics.Operators)"+ ShowOperators (op : rest) =+ QuoteSymbol op :<>: Text " " :<>: ShowOperators rest type family AppendEliminations a b where AppendEliminations '(fs1, ops1) '(fs2, ops2) =@@ -50,7 +48,7 @@ type family ShowEliminations forms :: ErrorMessage where ShowEliminations '(fs, ops) =- ShowSymbolsWithOrigin fs ':$$: 'Text " " ':<>: ShowOperators ops+ ShowSymbolsWithOrigin fs :$$: Text " " :<>: ShowOperators ops ---------------------------------------- -- Lists@@ -68,14 +66,13 @@ -- 'Curry' xs y = 'foldr' (->) y xs -- @ type family Curry (xs :: IxList) (y :: Type) :: Type where- Curry '[] y = y- Curry (x ': xs) y = x -> Curry xs y+ Curry '[] y = y+ Curry (x : xs) y = x -> Curry xs y -- | Append two type-level lists together. type family Append (xs :: [k]) (ys :: [k]) :: [k] where- Append '[] ys = ys -- needed for (<%>) and (%>)- Append xs '[] = xs -- needed for (<%)- Append (x ': xs) ys = x ': Append xs ys+ Append '[] ys = ys+ Append (x : xs) ys = x : Append xs ys -- | Class that is inhabited by all type-level lists @xs@, providing the ability -- to compose a function under @'Curry' xs@.@@ -88,7 +85,7 @@ instance CurryCompose '[] where composeN = id -instance CurryCompose xs => CurryCompose (x ': xs) where+instance CurryCompose xs => CurryCompose (x : xs) where composeN ij f = composeN @xs ij . f ----------------------------------------@@ -119,57 +116,57 @@ instance ys ~ zs => AppendIndices '[] ys zs where appendIndices = IxEq -instance AppendIndices xs ys ks => AppendIndices (x ': xs) ys (x ': ks) where- appendIndices :: forall i. IxEq i (Curry (x ': xs) (Curry ys i)) (Curry (x ': ks) i)+instance AppendIndices xs ys ks => AppendIndices (x : xs) ys (x : ks) where+ appendIndices :: forall i. IxEq i (Curry (x : xs) (Curry ys i)) (Curry (x : ks) i) appendIndices | IxEq <- appendIndices @xs @ys @ks @i = IxEq ---------------------------------------- -- Either --- | If lhs is 'Right', return it. Otherwise check rhs.+-- | If lhs is Right', return it. Otherwise check rhs. type family FirstRight (m1 :: Either e a) (m2 :: Either e a) :: Either e a where- FirstRight ('Right a) _ = 'Right a- FirstRight _ b = b+ FirstRight (Right a) _ = Right a+ FirstRight _ b = b type family FromRight (def :: b) (e :: Either a b) :: b where- FromRight _ ('Right b) = b- FromRight def ('Left _) = def+ FromRight _ (Right b) = b+ FromRight def (Left _) = def type family IsLeft (e :: Either a b) :: Bool where- IsLeft ('Left _) = 'True- IsLeft ('Right _) = 'False+ IsLeft (Left _) = True+ IsLeft (Right _) = False ---------------------------------------- -- Errors -- | Show a custom type error if @p@ is true. type family When (p :: Bool) (err :: Constraint) :: Constraint where- When 'True err = err- When 'False _ = ()+ When True err = err+ When False _ = () -- | Show a custom type error if @p@ is false (or stuck). type family Unless (p :: Bool) (err :: Constraint) :: Constraint where- Unless 'True _ = ()- Unless 'False err = err+ Unless True _ = ()+ Unless False err = err -- | Use with 'Unless' to detect stuck (undefined) type families. type family Defined (f :: k) :: Bool where Defined (f _) = Defined f- Defined _ = 'True+ Defined _ = True -- | Show a type surrounded by quote marks. type family QuoteType (x :: t) :: ErrorMessage where- QuoteType x = 'Text "‘" ':<>: 'ShowType x ':<>: 'Text "’"+ QuoteType x = Text "‘" :<>: ShowType x :<>: Text "’" -- | Show a symbol surrounded by quote marks. type family QuoteSymbol (x :: Symbol) :: ErrorMessage where- QuoteSymbol x = 'Text "‘" ':<>: 'Text x ':<>: 'Text "’"+ QuoteSymbol x = Text "‘" :<>: Text x :<>: Text "’" type family ToOrdinal (n :: Nat) :: ErrorMessage where- ToOrdinal 1 = 'Text "1st"- ToOrdinal 2 = 'Text "2nd"- ToOrdinal 3 = 'Text "3rd"- ToOrdinal n = 'ShowType n ':<>: 'Text "th"+ ToOrdinal 1 = Text "1st"+ ToOrdinal 2 = Text "2nd"+ ToOrdinal 3 = Text "3rd"+ ToOrdinal n = ShowType n :<>: Text "th" ---------------------------------------- -- Misc
src/Optics/Internal/Optic/Types.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TypeInType #-} {-# OPTIONS_HADDOCK not-home #-} -- | This module is intended for internal use only, and may change without
src/Optics/IxAffineTraversal.hs view
@@ -36,6 +36,13 @@ -- * Additional introduction forms , ignored + -- * Monoid structure+ -- | 'IxAffineTraversal' admits a monoid structure where 'iadisjoin' returns+ -- the result from the second indexed affine traversal only if the first does+ -- not return a result. The identity element is 'ignored' (which traverses no+ -- elements).+ , iadisjoin+ -- * Subtyping , An_AffineTraversal @@ -49,6 +56,7 @@ import Data.Profunctor.Indexed import Optics.AffineFold+import Optics.AffineTraversal import Optics.Internal.Indexed import Optics.Internal.Optic import Optics.Internal.Utils@@ -129,6 +137,31 @@ ignored :: IxAffineTraversal i s s a b ignored = iatraversalVL $ \point _ -> point {-# INLINE ignored #-}++-- | Try the first 'IxAffineTraversal'. If it does not return a entry, try the+-- second one.+--+-- >>> iover (ifst `iadisjoin` isnd) (++) ("foo", "bar")+-- ("barfoo","bar")+--+-- >>> iover (ignored `iadisjoin` isnd) (++) ("foo", "bar")+-- ("foo","foobar")+--+-- @since 0.4.3+--+iadisjoin+ :: ( Is k An_AffineTraversal, Is l An_AffineTraversal+ , is1 `HasSingleIndex` i, is2 `HasSingleIndex` i)+ => Optic k is1 s t a b+ -> Optic l is2 s t a b+ -> IxAffineTraversal i s t a b+iadisjoin a b = conjoined (adisjoin a b) $ iatraversalVL $ \point f s ->+ let OrT visited fu = iatraverseOf a (OrT False . point) (\i -> wrapOrT . f i) s+ in if visited+ then fu+ else iatraverseOf b point f s+infixl 3 `iadisjoin` -- Same as (<|>)+{-# INLINE iadisjoin #-} -- $setup -- >>> import Optics.Core
src/Optics/IxFold.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE CPP #-}-{-# LANGUAGE DataKinds #-} -- | -- Module: Optics.IxFold -- Description: An indexed version of a 'Optics.Fold.Fold'.
src/Optics/IxTraversal.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE DataKinds #-} -- | -- Module: Optics.IxTraversal -- Description: An indexed version of a 'Optics.Traversal.Traversal'.@@ -60,11 +59,17 @@ , ipartsOf , isingular - -- * Monoid structure- -- | 'IxTraversal' admits a (partial) monoid structure where 'iadjoin'- -- combines non-overlapping indexed traversals, and the identity element is- -- 'ignored' (which traverses no elements).+ -- * Monoid structures+ -- | 'IxTraversal' admits two monoid structures: --+ -- * 'iadjoin' combines non-overlapping indexed traversals.+ --+ -- * 'idisjoin' returns results from the second indexed traversal only if the+ -- first returns no results.+ --+ -- In both cases, the identity element is 'ignored' (which traverses no+ -- elements).+ -- -- If you merely need an 'IxFold', you can use indexed traversals as indexed -- folds and combine them with one of the monoid structures on indexed folds -- (see "Optics.IxFold#monoids"). In particular, 'isumming' can be used to@@ -76,6 +81,7 @@ -- and the ('<>') operator could not be used to combine optics of different -- kinds. , iadjoin+ , idisjoin -- * Subtyping , A_Traversal@@ -355,6 +361,30 @@ Just a' -> put Nothing >> pure a' Nothing -> pure a {-# INLINE isingular #-}++-- | Try the first 'IxTraversal'. If it returns no entries, try the second one.+--+-- >>> iover (_1 % itraversed `idisjoin` _2 % itraversed) (+) ([0, 0, 0], (3, 5))+-- ([0,1,2],(3,5))+--+-- >>> iover (ignored `idisjoin` _2 % itraversed) (+) ([0, 0, 0], (3, 5))+-- ([0,0,0],(3,8))+--+-- @since 0.4.3+--+idisjoin+ :: ( Is k A_Traversal, Is l A_Traversal+ , is1 `HasSingleIndex` i, is2 `HasSingleIndex` i)+ => Optic k is1 s t a b+ -> Optic l is2 s t a b+ -> IxTraversal i s t a b+idisjoin a b = conjoined (disjoin a b) $ itraversalVL $ \f s ->+ let OrT visited fu = itraverseOf a (\i -> wrapOrT . f i) s+ in if visited+ then fu+ else itraverseOf b f s+infixl 3 `idisjoin` -- Same as (<|>)+{-# INLINE idisjoin #-} -- | Combine two disjoint indexed traversals into one. --
src/Optics/Label.hs view
@@ -1,7 +1,5 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE CPP #-}-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TypeInType #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -Wno-orphans #-} -- |@@ -533,9 +531,14 @@ , repDefined ~ (Defined (Rep s) && Defined (Rep t)) #endif , Unless repDefined (NoLabelOpticError name k s t a b)- , k ~ If (CmpSymbol "_@" name == 'LT && CmpSymbol "_[" name == 'GT)+ -- If a label starts with "_[A-Z]", assume it's a name of a constructor.+ -- Otherwise, if it starts with "?[a-z]", assume it's a name of a partial+ -- field. Otherwise it's a total field.+ , k ~ If (CmpSymbol "_@" name == LT && CmpSymbol "_[" name == GT) A_Prism- A_Lens+ (If (CmpSymbol "?`" name == LT && CmpSymbol "?{" name == GT)+ An_AffineTraversal+ A_Lens) , GenericOptic repDefined name k s t a b , Dysfunctional name k s t a b )@@ -543,19 +546,19 @@ -- | If there is no specific 'LabelOptic' instance, display a custom type error. type family NoLabelOpticError name k s t a b where NoLabelOpticError name k s t a b = TypeError- ('Text "No instance for LabelOptic " ':<>: 'ShowType name- ':<>: 'Text " " ':<>: QuoteType k- ':<>: 'Text " " ':<>: QuoteType s- ':<>: 'Text " " ':<>: QuoteType t- ':<>: 'Text " " ':<>: QuoteType a- ':<>: 'Text " " ':<>: QuoteType b- ':$$: 'Text "Possible solutions:"- ':$$: 'Text "- Check and correct spelling of the label"- ':$$: 'Text "- Define the LabelOptic instance by hand or via Template Haskell"+ (Text "No instance for LabelOptic " :<>: ShowType name+ :<>: Text " " :<>: QuoteType k+ :<>: Text " " :<>: QuoteType s+ :<>: Text " " :<>: QuoteType t+ :<>: Text " " :<>: QuoteType a+ :<>: Text " " :<>: QuoteType b+ :$$: Text "Possible solutions:"+ :$$: Text "- Check and correct spelling of the label"+ :$$: Text "- Define the LabelOptic instance by hand or via Template Haskell" #ifdef EXPLICIT_GENERIC_LABELS- ':$$: 'Text "- Derive a GenericLabelOptics instance for " ':<>: QuoteType s+ :$$: Text "- Derive a GenericLabelOptics instance for " :<>: QuoteType s #else- ':$$: 'Text "- Derive a Generic instance for " ':<>: QuoteType s+ :$$: Text "- Derive a Generic instance for " :<>: QuoteType s #endif ) @@ -578,7 +581,7 @@ -- @since 0.4 class Generic a => GenericLabelOptics a where type HasGenericLabelOptics a :: Bool- type HasGenericLabelOptics a = 'True+ type HasGenericLabelOptics a = True ---------------------------------------- @@ -593,10 +596,18 @@ ) => GenericOptic repDefined name A_Lens s t a b where genericOptic = gfieldImpl @name +-- | This instance can only be used via label syntax with GHC >= 9.6 since it's+-- the first release with unrestricted overloaded labels. instance+ ( GAffineFieldImpl repDefined name s t a b+ , origName ~ AppendSymbol "?" name+ ) => GenericOptic repDefined origName An_AffineTraversal s t a b where+ genericOptic = gafieldImpl @repDefined @name++instance ( GConstructorImpl repDefined name s t a b- , _name ~ AppendSymbol "_" name- ) => GenericOptic repDefined _name A_Prism s t a b where+ , origName ~ AppendSymbol "_" name+ ) => GenericOptic repDefined origName A_Prism s t a b where genericOptic = gconstructorImpl @repDefined @name ----------------------------------------
src/Optics/Mapping.hs view
@@ -6,7 +6,6 @@ -- @'Optic'' ('MappedOptic' k) 'NoIx' (f s) (f a)@, in other words optic operating on values -- in a 'Functor'. ---{-# LANGUAGE DataKinds #-} module Optics.Mapping ( MappingOptic (..) ) where
src/Optics/Re.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE TypeFamilyDependencies #-} -- | -- Module: Optics.Re -- Description: The 're' operator allows some optics to be reversed.@@ -22,8 +23,6 @@ -- -- <<diagrams/reoptics.png Reversed Optics>> ---{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TypeFamilyDependencies #-} module Optics.Re ( ReversibleOptic(..) ) where
src/Optics/ReadOnly.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TypeInType #-} -- | -- Module: Optics.ReadOnly -- Description: Converting read-write optics into their read-only counterparts.
src/Optics/Traversal.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE AllowAmbiguousTypes #-}-{-# LANGUAGE DataKinds #-} {-# LANGUAGE UndecidableInstances #-} -- | -- Module: Optics.Traversal@@ -67,13 +66,20 @@ -- * Combinators , backwards , partsOf+ , unsafePartsOf , singular - -- * Monoid structure- -- | 'Traversal' admits a (partial) monoid structure where 'adjoin' combines- -- non-overlapping traversals, and the identity element is- -- 'Optics.IxAffineTraversal.ignored' (which traverses no elements).+ -- * Monoid structures+ -- | 'Traversal' admits two monoid structures: --+ -- * 'adjoin' combines non-overlapping traversals.+ --+ -- * 'disjoin' returns results from the second traversal only if the first+ -- returns no results.+ --+ -- In both cases, the identity element is 'Optics.IxAffineTraversal.ignored'+ -- (which traverses no elements).+ -- -- If you merely need a 'Fold', you can use traversals as folds and combine -- them with one of the monoid structures on folds (see -- "Optics.Fold#monoids"). In particular, 'summing' can be used to concatenate@@ -84,6 +90,7 @@ -- is not a unique choice of monoid to use that works for all optics, and the -- ('<>') operator could not be used to combine optics of different kinds. , adjoin+ , disjoin -- * Subtyping , A_Traversal@@ -380,7 +387,7 @@ -- So technically, this is only a 'Lens' if you do not change the number of -- results it returns. partsOf- :: forall k is s t a. Is k A_Traversal+ :: Is k A_Traversal => Optic k is s t a a -> Lens s t [a] [a] partsOf o = lensVL $ \f s -> evalState (traverseOf o update s)@@ -391,6 +398,22 @@ [] -> pure a {-# INLINE partsOf #-} +-- | A variant of 'partsOf' that allows changing the type of elements.+--+-- /Warning:/ if you don't supply at least as many @b@'s as you were given @a@'s,+-- the reconstruction of @t@ will result in an error.+unsafePartsOf+ :: Is k A_Traversal+ => Optic k is s t a b+ -> Lens s t [a] [b]+unsafePartsOf o = lensVL $ \f s -> evalState (traverseOf o update s)+ <$> f (toListOf (getting $ castOptic @A_Traversal o) s)+ where+ update _ = get >>= \case+ b : bs -> put bs >> pure b+ [] -> error "unsafePartsOf: not enough elements were supplied"+{-# INLINE unsafePartsOf #-}+ -- | Convert a traversal to an 'AffineTraversal' that visits the first element -- of the original traversal. --@@ -401,7 +424,7 @@ -- -- @since 0.3 singular- :: forall k is s a. Is k A_Traversal+ :: Is k A_Traversal => Optic' k is s a -> AffineTraversal' s a singular o = atraversalVL $ \point f s ->@@ -413,6 +436,28 @@ Just a' -> put Nothing >> pure a' Nothing -> pure a {-# INLINE singular #-}++-- | Try the first 'Traversal'. If it returns no entries, try the second one.+--+-- >>> over (_1 `disjoin` _2) succ (0, 0)+-- (1,0)+-- >>> over (ignored `disjoin` _2) succ (0, 0)+-- (0,1)+--+-- @since 0.4.3+--+disjoin+ :: (Is k A_Traversal, Is l A_Traversal)+ => Optic k is s t a b+ -> Optic l js s t a b+ -> Traversal s t a b+disjoin a b = traversalVL $ \f s ->+ let OrT visited fu = traverseOf a (wrapOrT . f) s+ in if visited+ then fu+ else traverseOf b f s+infixl 3 `disjoin` -- Same as (<|>)+{-# INLINE disjoin #-} -- | Combine two disjoint traversals into one. --