lens-simple 0.1.0.4 → 0.1.0.5
raw patch · 2 files changed
+48/−29 lines, 2 files
Files
- Lens/Simple.hs +47/−28
- lens-simple.cabal +1/−1
Lens/Simple.hs view
@@ -1,38 +1,52 @@ {-#LANGUAGE CPP, RankNTypes #-} module Lens.Simple (- -- * Fundamental lens combinators (@view\/(^.)@, @set\/(.~)@, @over\/(%~)@)+ + -- * Fundamental lens combinators: @view@, @set@ and @over@ \- also known as @(^.)@, @(.~)@ and @(%~)@ view , set , over - -- * Characteristic lenses (@_1@, @_2@) and traversals (@_Left@, @_Right@ etc.)+ -- * @LensLike@ and important strength-expressing synonyms, from the all-powerful @Lens@ downward+ , LensLike + , Lens + , Traversal + , Setter + , Getter + , Fold+ , FoldLike + , SetterLike+ + + -- * Simple Prelude lenses (@_1@, @_2@) and traversals (@_Left@, @_Right@, @_Just@, etc.) , _1 , _2 , _Left, _Right , _Just, _Nothing , both + -- * Common lens-applying operators: particularly @view\/(^.)@, @set\/(.~)@, @over\/(%~)@+ , (^.)+ , (%~)+ , (.~)+ , (&)+ , (??)+ , (?~)+ , (^..)+ , (^?) - -- * Lens (etc.) formers+ + -- * Lens forming support (see also the TH incantations below ) , lens , iso- , setting , to+ , setting+ -- * Basic state related combinators: @zoom@, @use@, @assign\/(.=)@ etc. , zoom , use, uses , assign - -- * Commonly used operators: particularly @view\/(^.)@, @set\/(.~)@, @over\/(%~)@- , (^.)- , (%~)- , (.~)- , (&)- , (??)- , (?~)- , (^..)- , (^?) -- * Convenient state-related operators , (%=)@@ -42,14 +56,10 @@ -- * Pseudo-imperatives , (+~), (*~), (-~), (//~), (&&~), (||~), (<>~)- - -- * Corresponding state-related imperatives+ -- * Corresponding state-related imperatives , (+=), (-=), (*=), (//=), (&&=), (||=), (<>=) - -- * Stock semantic editor combinators (setters)- , mapped- -- * More stock lenses , chosen , ix@@ -58,7 +68,9 @@ -- * More stock traversals , ignored-+ + -- * More stock setters+ , mapped -- * Other combinators , folding, views@@ -75,19 +87,24 @@ , makeLensesBy , makeLensesFor - -- * Types- , Lens, Lens'- , Traversal, Traversal'- , Getter, Getter'- , Setter, Setter'- , LensLike, LensLike'- , FoldLike, FoldLike'- , Phantom- , Constant (..), Identity (..)+ -- * Other type synonyms+ , LensLike'+ , Lens'+ , Traversal'+ , Getter'+ , Setter'+ , FoldLike'+ + -- * Helper classes+ , Identical(..)+ , Phantom(..)+ + -- * Helper types , AlongsideLeft, AlongsideRight , Zooming -- * Re-exports+ , Constant (..), Identity (..) , Monoid(..),(<>) ) where import Lens.Family2.Unchecked@@ -113,6 +130,8 @@ (??) :: Functor f => f (a -> b) -> a -> f b ff ?? a = fmap ($ a) ff {-# INLINE (??) #-}++type SetterLike a a' b b' = LensLike Identity a a' b b' -- (?~) :: Setter a a' b (Maybe b') -> b' -> a -> a' l ?~ b = set l (Just b)
lens-simple.cabal view
@@ -1,5 +1,5 @@ name: lens-simple-version: 0.1.0.4+version: 0.1.0.5 synopsis: simplified import of elementary lens-family combinators description: This module, <http://hackage.haskell.org/package/lens-simple/docs/Lens-Simple.html Lens.Simple>,