Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Getter s a = forall (p :: Type -> Type -> Type). IsGetter p => Optic' p s a
- class (IsLens p, Bicontravariant p, Cochoice p) => IsGetter (p :: Type -> Type -> Type)
- to :: (s -> a) -> Getter s a
- getting :: (Profunctor p, Bicontravariant p) => Optic p s t a b -> Optic' p s a
- views :: Getter s a -> (a -> r) -> s -> r
- view :: Getter s a -> s -> a
- (^.) :: s -> Getter s a -> a
Getters
class (IsLens p, Bicontravariant p, Cochoice p) => IsGetter (p :: Type -> Type -> Type) Source #
Instances
(Contravariant f, Traversable f) => IsGetter (OptionalStar f) Source # | |
Defined in Fresnel.Getter.Internal | |
(Contravariant f, Traversable f) => IsGetter (Star1 f) Source # | |
Defined in Fresnel.Getter.Internal | |
IsGetter (Forget r :: Type -> Type -> Type) Source # | |
Defined in Fresnel.Getter.Internal | |
(Contravariant f, Traversable f) => IsGetter (Star f) Source # | |
Defined in Fresnel.Getter.Internal |
Construction
getting :: (Profunctor p, Bicontravariant p) => Optic p s t a b -> Optic' p s a Source #