Data.Maybe.Optics
Description
This module defines Prisms for the constructors of the Maybe datatype.
Prism
Maybe
_Nothing :: Prism' (Maybe a) () Source #
A Prism that matches on the Nothing constructor of Maybe.
Nothing
_Just :: Prism (Maybe a) (Maybe b) a b Source #
A Prism that matches on the Just constructor of Maybe.
Just
(%?) :: (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 infixl 9 Source #
Shortcut for % _Just %.
% _Just %
%
_Just
Useful for composing lenses of Maybe type.
Since: 0.4.1