optics-core-0.4.1.1: Optics as an abstract interface: core definitions
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Maybe.Optics

Description

This module defines Prisms for the constructors of the Maybe datatype.

Synopsis

Documentation

_Nothing :: Prism' (Maybe a) () Source #

A Prism that matches on the Nothing constructor of Maybe.

_Just :: Prism (Maybe a) (Maybe b) a b Source #

A Prism that matches on the Just constructor of Maybe.

(%?) :: (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 %.

Useful for composing lenses of Maybe type.

Since: 0.4.1