1{-# LANGUAGE CPP #-} 2----------------------------------------------------------------------------- 3-- | 4-- Module : Control.Lens 5-- Copyright : (C) 2012-16 Edward Kmett 6-- License : BSD-style (see the file LICENSE) 7-- Maintainer : Edward Kmett <ekmett@gmail.com> 8-- Stability : experimental 9-- Portability : non-portable 10-- 11-- Usage: 12-- 13-- You can derive lenses automatically for many data types: 14-- 15-- @ 16-- import Control.Lens 17-- 18-- data FooBar a 19-- = Foo { _x :: ['Int'], _y :: a } 20-- | Bar { _x :: ['Int'] } 21-- 'makeLenses' ''FooBar 22-- @ 23-- 24-- This defines the following lenses: 25-- 26-- @ 27-- x :: 'Lens'' (FooBar a) ['Int'] 28-- y :: 'Traversal' (FooBar a) (FooBar b) a b 29-- @ 30-- 31-- You can then access the value of @_x@ with ('^.'), the value of @_y@ – 32-- with ('^?') or ('^?!') (since it can fail), set the values with ('.~'), 33-- modify them with ('%~'), and use almost any other combinator that is 34-- re-exported here on those fields. 35-- 36-- The combinators here have unusually specific type signatures, so for 37-- particularly tricky ones, the simpler type signatures you might want to 38-- pretend the combinators have are specified as well. 39-- 40-- More information on how to use lenses is available on the lens wiki: 41-- 42-- <http://github.com/ekmett/lens/wiki> 43-- 44-- <<Hierarchy.png>> 45---------------------------------------------------------------------------- 46module Control.Lens 47 ( module Control.Lens.At 48 , module Control.Lens.Cons 49 , module Control.Lens.Each 50 , module Control.Lens.Empty 51 , module Control.Lens.Equality 52 , module Control.Lens.Fold 53 , module Control.Lens.Getter 54 , module Control.Lens.Indexed 55 , module Control.Lens.Iso 56 , module Control.Lens.Lens 57 , module Control.Lens.Level 58 , module Control.Lens.Plated 59 , module Control.Lens.Prism 60 , module Control.Lens.Reified 61 , module Control.Lens.Review 62 , module Control.Lens.Setter 63#ifndef DISABLE_TEMPLATE_HASKELL 64 , module Control.Lens.TH 65#endif 66 , module Control.Lens.Traversal 67 , module Control.Lens.Tuple 68 , module Control.Lens.Type 69 , module Control.Lens.Wrapped 70 , module Control.Lens.Zoom 71 ) where 72 73import Control.Lens.At 74import Control.Lens.Cons 75import Control.Lens.Each 76import Control.Lens.Empty 77import Control.Lens.Equality 78import Control.Lens.Fold 79import Control.Lens.Getter 80import Control.Lens.Indexed 81import Control.Lens.Iso 82import Control.Lens.Lens 83import Control.Lens.Level 84import Control.Lens.Plated 85import Control.Lens.Prism 86import Control.Lens.Reified 87import Control.Lens.Review 88import Control.Lens.Setter 89#ifndef DISABLE_TEMPLATE_HASKELL 90import Control.Lens.TH 91#endif 92import Control.Lens.Traversal 93import Control.Lens.Tuple 94import Control.Lens.Type 95import Control.Lens.Wrapped 96import Control.Lens.Zoom 97 98#ifdef HLINT 99{-# ANN module "HLint: ignore Use import/export shortcut" #-} 100#endif 101