module Optics.Core.Extras
(
is
)
where
import Data.Maybe
import Optics.Optic
import Optics.AffineFold
is :: Is k An_AffineFold => Optic' k is s a -> s -> Bool
is :: forall (k :: OpticKind) (is :: IxList) (s :: OpticKind)
(a :: OpticKind).
Is k An_AffineFold =>
Optic' k is s a -> s -> Bool
is Optic' k is s a
k s
s = forall (a :: OpticKind). Maybe a -> Bool
isJust (forall (k :: OpticKind) (is :: IxList) (s :: OpticKind)
(a :: OpticKind).
Is k An_AffineFold =>
Optic' k is s a -> s -> Maybe a
preview Optic' k is s a
k s
s)
{-# INLINE is #-}