| Copyright | (c) Henry J. Wylde 2016 |
|---|---|
| License | BSD3 |
| Maintainer | public@hjwylde.com |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Control.Lens.Extra
Contents
Description
Extra utility functions for working with lenses.
Documentation
module Control.Lens
Folds
hasuse :: MonadState s m => Getting Any s a -> m Bool Source #
Check to see if this Fold or Traversal matches 1 or more entries in the current state.
hasuse=gets.has
hasn'tuse :: MonadState s m => Getting All s a -> m Bool Source #
Check to see if this Fold or Traversal has no matches in the current state.
hasn'tuse=gets.hasn't
Traversals
filteredBy :: Eq b => Lens' a b -> b -> Traversal' a a Source #
A companion to filtered that, rather than using a predicate, filters on the given lens for
matches.