@hackage optics-operators0.1.0.0

A tiny package containing operators missing from the official package.

A tiny package containing operators missing from the official package. Basic example using state operators:

newtype Person = Person { age :: Int } deriving (Show, Generic)

main :: IO ()
main = print <=< flip execStateT (Person 0) $ do
  #age += 50
  #age -= 20

-- Output: Person {age = 30}