module Optics.Core.Extras ( is ) where import Data.Maybe import Optics.Optic import Optics.AffineFold -- | Check to see if this 'AffineFold' matches. -- -- >>> is _Just Nothing -- False -- -- @since 0.4.1 is :: Is k An_AffineFold => Optic' k is s a -> s -> Bool is :: Optic' k is s a -> s -> Bool is Optic' k is s a k s s = Maybe a -> Bool forall a. Maybe a -> Bool isJust (Optic' k is s a -> s -> Maybe a forall k (is :: IxList) s a. Is k An_AffineFold => Optic' k is s a -> s -> Maybe a preview Optic' k is s a k s s) {-# INLINE is #-} -- $setup -- >>> import Optics.Core