Copyright | (C) 2020 Csongor Kiss |
---|---|
License | BSD3 |
Maintainer | Csongor Kiss <kiss.csongor.kiss@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
The library internals are exposed through this module. Please keep in mind that everything here is subject to change irrespective of the the version numbers.
Synopsis
- module Data.Generics.Internal.Families
- module Data.Generics.Internal.Families.Changing
- module Data.Generics.Internal.Families.Collect
- module Data.Generics.Internal.Families.Has
- module Data.Generics.Internal.Void
- module Data.Generics.Internal.Errors
- data family Param :: Nat -> j -> k
- newtype Rec (p :: Type ) a x = Rec { }
- class ( Coercible ( Rep a) ( RepN a), Generic a) => GenericN (a :: Type ) where
- type Iso s t a b = forall p i. Profunctor p => p i a b -> p i s t
- type Iso' s a = Iso s s a a
- repIso :: ( Generic a, Generic b) => Iso a b ( Rep a x) ( Rep b x)
- mIso :: Iso ( M1 i c f p) ( M1 i c g p) (f p) (g p)
- kIso :: Iso ( K1 r a p) ( K1 r b p) a b
- recIso :: Iso ( Rec r a p) ( Rec r b p) a b
- sumIso :: Iso ((a :+: b) x) ((a' :+: b') x) ( Either (a x) (b x)) ( Either (a' x) (b' x))
- prodIso :: Iso ((a :*: b) x) ((a' :*: b') x) (a x, b x) (a' x, b' x)
- assoc3 :: Iso ((a, b), c) ((a', b'), c') (a, (b, c)) (a', (b', c'))
- fromIso :: Iso s t a b -> Iso b a t s
- iso :: (s -> a) -> (b -> t) -> Iso s t a b
- withIso :: Iso s t a b -> ((s -> a) -> (b -> t) -> r) -> r
- pairing :: Iso s t a b -> Iso s' t' a' b' -> Iso (s, s') (t, t') (a, a') (b, b')
- type Lens s t a b = forall p i. Strong p => p i a b -> p i s t
- type LensLike p s t a b = p a b -> p s t
- ravel :: ( ALens a b i a b -> ALens a b i s t) -> Lens s t a b
- set :: ((a -> b) -> s -> t) -> (s, b) -> t
- view :: Lens s s a a -> s -> a
- withLensPrim :: Lens s t a b -> ( forall c. (s -> (c, a)) -> ((c, b) -> t) -> r) -> r
- idLens :: ALens a b i a b
- first :: Lens ((a :*: b) x) ((a' :*: b) x) (a x) (a' x)
- second :: Lens ((a :*: b) x) ((a :*: b') x) (b x) (b' x)
- fork :: (a -> b) -> (a -> c) -> a -> (b, c)
- data Coyoneda f b = forall a. Coyoneda (a -> b) (f a)
- inj :: Functor f => Coyoneda f a -> f a
- proj :: Functor f => f a -> Coyoneda f a
- (??) :: Functor f => f (a -> b) -> a -> f b
- assoc3L :: Lens ((a, b), c) ((a', b'), c') (a, (b, c)) (a', (b', c'))
- stron :: ( Either s s', b) -> Either (s, b) (s', b)
- choosing :: forall s t a b s' t'. Lens s t a b -> Lens s' t' a b -> Lens ( Either s s') ( Either t t') a b
- lens :: (s -> (c, a)) -> ((c, b) -> t) -> Lens s t a b
- data ALens a b i s t = forall c. ALens (s -> (c, a)) ((c, b) -> t)
- swap :: (a, b) -> (b, a)
- type APrism i s t a b = Market a b i a b -> Market a b i s t
- type Prism s t a b = forall p i. Choice p => p i a b -> p i s t
- type Prism' s a = forall p i. Choice p => p i a a -> p i s s
- left :: Prism ((a :+: c) x) ((b :+: c) x) (a x) (b x)
- right :: Prism ((a :+: b) x) ((a :+: c) x) (b x) (c x)
- prism :: (b -> t) -> (s -> Either t a) -> Prism s t a b
- _Left :: Prism ( Either a c) ( Either b c) a b
- _Right :: Prism ( Either c a) ( Either c b) a b
- prismPRavel :: APrism i s t a b -> Prism s t a b
- build :: ( Tagged i b b -> Tagged i t t) -> b -> t
- match :: Prism s t a b -> s -> Either t a
- without' :: Prism s t a b -> Prism s t c d -> Prism s t ( Either a c) ( Either b d)
- withPrism :: APrism i s t a b -> ((b -> t) -> (s -> Either t a) -> r) -> r
- prism2prismp :: Market a b i s t -> Prism s t a b
- idPrism :: Market a b i a b
- gsum :: (a x -> c) -> (b x -> c) -> (a :+: b) x -> c
- module Data.Generics.Product.Internal.Subtype
Documentation
module Data.Generics.Internal.Void
data family Param :: Nat -> j -> k Source #
Instances
newtype Param n (a :: Type ) Source # | |
Defined in Data.Generics.Internal.GenericN |
Profunctor optics
type Iso s t a b = forall p i. Profunctor p => p i a b -> p i s t Source #
repIso :: ( Generic a, Generic b) => Iso a b ( Rep a x) ( Rep b x) Source #
A type and its generic representation are isomorphic
mIso :: Iso ( M1 i c f p) ( M1 i c g p) (f p) (g p) Source #
M1
is just a wrapper around `f p`
mIso :: Iso' (M1 i c f p) (f p)
withLensPrim :: Lens s t a b -> ( forall c. (s -> (c, a)) -> ((c, b) -> t) -> r) -> r Source #
first :: Lens ((a :*: b) x) ((a' :*: b) x) (a x) (a' x) Source #
Lens focusing on the first element of a product
second :: Lens ((a :*: b) x) ((a :*: b') x) (b x) (b' x) Source #
Lens focusing on the second element of a product
forall a. Coyoneda (a -> b) (f a) |
choosing :: forall s t a b s' t'. Lens s t a b -> Lens s' t' a b -> Lens ( Either s s') ( Either t t') a b Source #
forall c. ALens (s -> (c, a)) ((c, b) -> t) |
Instances
Profunctor ( ALens a b) Source # | |
Defined in Data.Generics.Internal.Profunctor.Lens dimap :: (a0 -> b0) -> (c -> d) -> ALens a b i b0 c -> ALens a b i a0 d Source # lmap :: (a0 -> b0) -> ALens a b i b0 c -> ALens a b i a0 c Source # rmap :: (c -> d) -> ALens a b i b0 c -> ALens a b i b0 d Source # lcoerce' :: Coercible a0 b0 => ALens a b i a0 c -> ALens a b i b0 c Source # rcoerce' :: Coercible a0 b0 => ALens a b i c a0 -> ALens a b i c b0 Source # conjoined__ :: ( ALens a b i a0 b0 -> ALens a b i s t) -> ( ALens a b i a0 b0 -> ALens a b j s t) -> ALens a b i a0 b0 -> ALens a b j s t Source # ixcontramap :: (j -> i) -> ALens a b i a0 b0 -> ALens a b j a0 b0 Source # |
|
Strong ( ALens a b) Source # | |
Defined in Data.Generics.Internal.Profunctor.Lens first' :: ALens a b i a0 b0 -> ALens a b i (a0, c) (b0, c) Source # second' :: ALens a b i a0 b0 -> ALens a b i (c, a0) (c, b0) Source # linear :: ( forall (f :: Type -> Type ). Functor f => (a0 -> f b0) -> s -> f t) -> ALens a b i a0 b0 -> ALens a b i s t Source # ilinear :: ( forall (f :: Type -> Type ). Functor f => (i -> a0 -> f b0) -> s -> f t) -> ALens a b j a0 b0 -> ALens a b (i -> j) s t Source # |
|
Functor ( ALens a b i s) Source # | |
prismPRavel :: APrism i s t a b -> Prism s t a b Source #
prism2prismp :: Market a b i s t -> Prism s t a b Source #