-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generalization of lenses, folds and traversals to handle monads and addition. -- -- References can read, write or update parts of the data. They are -- first-class values, can be passed in functions, transformed, combined. -- References generalize lenses, folds and traversals for haskell (see: -- https://hackage.haskell.org/package/lens). -- -- There are two things that references can do but the previously -- mentioned access methods don't. -- --
-- logger = -- (forever $ do -- log <- logChan ^! chan&logRecord -- Extract the log record from the received log message -- thrId <- forkIO (do time <- getTime -- ioref&lastLogTime != time $ logDB -- Update the last logging time mutable log database -- let logMsg = senderThread .- show -- Transform the thread id to a string and -- $ loggingTime .= time -- update the time -- $ log -- inside the log message -- ioref&debugInfos !~ addLogEntry log $ logDB -- update the table of log entries -- mvar !- (+1) $ count ) -- mvar !- (thrId:) $ updaters -- Record the spawned thread -- ) `catch` stopUpdaters updaters -- where stopUpdaters updaters ThreadKilled = -- mvar&traverse *!| killThread $ updaters -- Kill all spawned threads before stopping ---- -- There are a bunch of predefined references for datatypes included in -- standard libraries. -- -- New references can be created in several ways: -- --
-- refSet l a s >>= refGet l return ≡ a ---- -- 2) Putting back what you got doesn't change anything: -- --
-- refGet l return a >>= \b -> refSet l b s ≡ s ---- -- 3) Setting twice is the same as setting once: -- --
-- refSet l a s >>= refSet l b ≡ refSet l b s ---- -- But because update, set and get are different operations, . -- -- 4) Updating something is the same as getting and then setting (if the -- reader and writer monads are the same, or one can be converted into -- the other): -- --
-- refGet l a >>= f >>= \b -> refSet l b s ≡ refUpdate l f s ---- -- This has some consequences. For example lensUpdate l id = -- return. -- -- == Type arguments of Reference [w] Writer monad, -- controls how the value can be reassembled when the part is changed. -- See differences between Lens, IOLens and -- StateLens [r] Reader monad. Controls how part of the -- value can be asked. See differences between Lens, -- Partial and Traversal [s] The type of the -- original context. [t] The after replacing the accessed part -- to something of type b the type of the context changes to -- t. [a] The type of the accessed part. [b] -- The accessed part can be changed to something of this type. -- -- Usually s and b determines t, t -- and a determines s. -- -- The reader monad usually have more information (MMorph w -- r). data Reference w r s t a b Reference :: (forall x. (a -> r x) -> s -> r x) -> (b -> s -> w t) -> ((a -> w b) -> s -> w t) -> Reference w r s t a b -- | Getter for the lens. Takes a monadic function and runs it on the -- accessed value. This is necessary to run actions after a read. refGet :: Reference w r s t a b -> forall x. (a -> r x) -> s -> r x -- | Setter for the lens refSet :: Reference w r s t a b -> b -> s -> w t -- | Updater for the lens. Handles monadic update functions. refUpdate :: Reference w r s t a b -> (a -> w b) -> s -> w t -- | Creates a reference. reference :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, Monad r) => (s -> r a) -> (b -> s -> w t) -> ((a -> w b) -> s -> w t) -> Reference w r s t a b -- | Creates a reference with explicit close operations that are executed -- after the data is accessed. referenceWithClose :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, Monad r) => (s -> r a) -> (s -> r ()) -> (b -> s -> w t) -> (s -> w ()) -> ((a -> w b) -> s -> w t) -> (s -> w ()) -> Reference w r s t a b -- | A simple class to enforce that both reader and writer semantics of the -- reference are Monads (as well as Applicatives and -- Functors) class (Functor w, Applicative w, Monad w, Functor r, Applicative r, Monad r) => RefMonads w r -- | A monomorph Lens, Traversal, Partial, etc... -- Setting or updating does not change the type of the base. type Simple t s a = t s s a a -- | A Reference that can access a part of data that exists in the -- context. Every well-formed Reference is a Lens. type Lens s t a b = forall w r. RefMonads w r => Reference w r s t a b -- | Strict lens. A Reference that must access a part of data that -- surely exists in the context. type Lens' = Reference Identity Identity -- | A reference that may not have the accessed element, and that can look -- for the accessed element in multiple locations. type RefPlus s t a b = forall w r. (RefMonads w r, MonadPlus r) => Reference w r s t a b -- | Partial lens. A Reference that can access data that may not -- exist in the context. Every lens is a partial lens. -- -- Any reference that is a partial lens should only perform the action -- given to its updateRef function if it can get a value (the -- value returned by getRef is not the lifted form of -- Nothing). type Partial s t a b = forall w r. (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, MMorph Maybe r) => Reference w r s t a b -- | Strict partial lens. A Reference that must access data that may -- not exist in the context. type Partial' = Reference Identity Maybe -- | A reference that can access data that is available in a number of -- instances inside the contexts. -- -- Any reference that is a Traversal should perform the action -- given to its updater in the exactly the same number of times that is -- the number of the values returned by it's getRef function. type Traversal s t a b = forall w r. (RefMonads w r, MonadPlus r, MMorph [] r) => Reference w r s t a b -- | Strict traversal. A reference that must access data that is available -- in a number of instances inside the context. type Traversal' = Reference Identity [] class (MMorph IO w, MMorph IO r, MonadBaseControl IO w, MonadBaseControl IO r) => IOMonads w r -- | A reference that can access mutable data. type IOLens s t a b = forall w r. (RefMonads w r, IOMonads w r) => Reference w r s t a b -- | A reference that must access mutable data that is available in the -- context. type IOLens' = Reference IO IO -- | A reference that can access mutable data that may not exist in the -- context. type IOPartial s t a b = forall w r. (RefMonads w r, IOMonads w r, MonadPlus r, MMorph Maybe r) => Reference w r s t a b -- | A reference that must access mutable data that may not exist in the -- context. type IOPartial' = Reference IO (MaybeT IO) type IOTraversal s t a b = forall w r. (RefMonads w r, IOMonads w r, MonadPlus r, MMorph [] r) => Reference w r s t a b -- | A reference that can access mutable data that is available in a number -- of instances inside the contexts. type IOTraversal' = Reference IO (ListT IO) -- | A reference that can access a value inside a StateT transformed -- monad. type StateLens st m s t a b = forall w r. (RefMonads w r, MMorph (StateT st m) w, MMorph (StateT st m) r) => Reference w r s t a b -- | A reference that must access a value inside a StateT -- transformed monad. type StateLens' s m = Reference (StateT s m) (StateT s m) -- | A reference that can access a value inside a StateT transformed -- monad that may not exist. type StatePartial st m s t a b = forall w r. (RefMonads w r, MMorph (StateT st m) w, MonadPlus r, MMorph Maybe r, MMorph (StateT st m) r) => Reference w r s t a b -- | A reference that must access a value inside a StateT -- transformed monad that may not exist. type StatePartial' s m = Reference (StateT s m) (MaybeT (StateT s m)) -- | A reference that can access a value inside a StateT transformed -- monad that may exist in multiple instances. type StateTraversal st m s t a b = forall w r. (RefMonads w r, MMorph (StateT st m) w, MonadPlus r, MMorph [] r, MMorph (StateT st m) r) => Reference w r s t a b -- | A reference that must access a value inside a StateT -- transformed monad that may exist in multiple instances. type StateTraversal' s m = Reference (StateT s m) (ListT (StateT s m)) -- | A reference that can access a value inside a WriterT -- transformed monad. type WriterLens st m s t a b = forall w r. (RefMonads w r, MMorph (WriterT st m) w, MMorph (WriterT st m) r) => Reference w r s t a b -- | A reference that must access a value inside a WriterT -- transformed monad. type WriterLens' s m = Reference (WriterT s m) (WriterT s m) -- | A reference that can access a value inside a WriterT -- transformed monad that may not exist. type WriterPartial st m s t a b = forall w r. (RefMonads w r, MMorph (WriterT st m) w, MonadPlus r, MMorph Maybe r, MMorph (WriterT st m) r) => Reference w r s t a b -- | A reference that must access a value inside a WriteT -- transformed monad that may not exist. type WriterPartial' s m = Reference (WriterT s m) (MaybeT (WriterT s m)) -- | A reference that can access a value inside a WriteT -- transformed monad that may exist in multiple instances. type WriterTraversal st m s t a b = forall w r. (RefMonads w r, MMorph (WriterT st m) w, MonadPlus r, MMorph [] r, MMorph (WriterT st m) r) => Reference w r s t a b -- | A reference that must access a value inside a WriteT -- transformed monad that may exist in multiple instances. type WriterTraversal' s m = Reference (WriterT s m) (ListT (WriterT s m)) -- | States that m1 can be represented with m2. That is -- because m2 contains more infromation than m1. -- -- The MMorph relation defines a natural transformation from -- m1 to m2 that keeps the following laws: -- --
-- morph (return x) = return x -- morph (m >>= f) = morph m >>= morph . f ---- -- It is a reflexive and transitive relation. class MMorph (m1 :: * -> *) (m2 :: * -> *) morph :: MMorph m1 m2 => m1 a -> m2 a instance MMorph Identity [] instance MMorph Identity Maybe instance MMorph IO IO instance MMorph IO (ListT IO) instance MMorph IO (MaybeT IO) instance (MMorph IO w, MMorph IO r, MonadBaseControl IO w, MonadBaseControl IO r) => IOMonads w r instance (Functor w, Applicative w, Monad w, Functor r, Applicative r, Monad r) => RefMonads w r -- | Predefined references for commonly used data structures and reference -- generators. -- -- When defining lenses one should use the more general types. For -- instance Lens instead of the more strict Lens'. This way -- references with different m1 and m2 monads can be -- combined if there is a monad m' for MMorph m1 m' and -- MMorph m2 m'. module Control.Reference.Predefined -- | An identical lens. Accesses the context. -- --
-- self & a = a & self = a --self :: Lens a b a b -- | An empty reference that do not traverse anything -- --
-- emptyRef &+& a = a &+& emptyRef = a ---- --
-- a & emptyRef = emptyRef & a = emptyRef --emptyRef :: Simple RefPlus s a -- | Generates a traversal for any Traversable Functor traverse :: Traversable t => Traversal (t a) (t b) a b -- | Generate a lens from a pair of inverse functions iso :: (a -> b) -> (b -> a) -> Lens a a b b -- | Generates a lens from a getter and a setter lens :: (s -> a) -> (b -> s -> t) -> Lens s t a b -- | Creates a monomorphic partial lense partial :: (s -> Either t (a, b -> t)) -> Partial s t a b -- | Creates a simple partial lens simplePartial :: (s -> Maybe (a, a -> s)) -> Partial s s a a -- | Clones a lens from Control.Lens fromLens :: (forall f. Functor f => (a -> f b) -> s -> f t) -> Lens s t a b -- | Clones a traversal from Control.Lens fromTraversal :: (forall f. Applicative f => (a -> f b) -> s -> f t) -> Traversal s t a b -- | Filters the traversed elements with a given predicate. Has specific -- versions for traversals and partial lenses. filtered :: (a -> Bool) -> Simple RefPlus a a -- | A partial lens to access the value that may not exist just :: Partial (Maybe a) (Maybe b) a b -- | A partial lens to access the right option of an Either right :: Partial (Either a b) (Either a c) b c -- | A partial lens to access the left option of an Either left :: Partial (Either a c) (Either b c) a b -- | Access the value that is in the left or right state of an -- Either anyway :: Lens (Either a a) (Either b b) a b -- | References both elements of a tuple both :: Traversal (a, a) (b, b) a b -- | References the head of a list _head :: Simple Partial [a] a -- | References the tail of a list _tail :: Simple Partial [a] [a] -- | Lenses for given values in a data structure that is indexed by keys. class Association e where type family AssocIndex e :: * type family AssocElem e :: * element :: Association e => AssocIndex e -> Simple Partial e (AssocElem e) -- | A dummy object to interact with the user through the console. data Console Console :: Console -- | Interacts with a line of text on the console. Values set are printed, -- getting is reading from the console. consoleLine :: Simple IOLens Console String -- | Access a value inside an MVar. Setting is not atomic. If there is two -- supplier that may set the accessed value, one may block and can -- corrupt the following updates. -- -- Reads and updates are done in sequence, always using consistent data. mvar :: (Functor w, Applicative w, Monad w, MMorph IO w, MonadBaseControl IO w, Functor r, Applicative r, Monad r, MMorph IO r) => Simple (Reference w r) (MVar a) a chan :: Simple IOLens (Chan a) a -- | Access the value of an IORef. ioref :: Simple IOLens (IORef a) a -- | Access the state inside a state monad (from any context). state :: Monad m => Simple (StateLens s m) a s instance Ord k => Association (Map k v) instance Association [a] -- | Common operators for references. References bind the types of the read -- and write monads of a reference. -- -- The naming of the operators follows the given convetions: -- --
-- a ^* twice == [a,a] -- (twice *= x) a == x -- (twice *- f) a == f (f a) ---- -- Addition is commutative only if we do not consider the order of the -- results from a get, or the order in which monadic actions are -- performed. (&+&) :: (Monad w, MonadPlus r, MMorph [] r) => Reference w r s s a a -> Reference w r s s a a -> Reference w r s s a a -- | A module for making connections between different monads. module Control.Reference.TH.Monad -- | Creates MMorph instances from reflectivity, and transitivity of -- the relation. Uses data from all instances declared so far. makeMonadRepr :: (ToQType t1, ToQType t2, ToQExp e) => t1 -> t2 -> e -> Q [Dec] -- | A type name or a type expression, that can be converted into a type -- inside Q. class ToQType t toQType :: ToQType t => t -> Q Type -- | A variable or function name or an expression, that can be converted -- into an expression inside Q. class ToQExp t toQExp :: ToQExp t => t -> Q Exp instance Show InstanceGenState instance Show Above instance Show Below instance ToQExp Name instance ToQExp (Q Exp) instance ToQType Name instance ToQType (Q Type) instance ToQType Type -- | An interface with references that can be used internally while -- generating instances for MMorph and tuple lens classes. -- -- Only the public parts of Control.Reference.Representation are -- exported. -- -- For creating a new interface with different generated elements, use -- this internal interface. module Control.Reference.InternalInterface -- | A monomorph Lens, Traversal, Partial, etc... -- Setting or updating does not change the type of the base. type Simple t s a = t s s a a -- | A reference is an accessor to a part or different view of some data. -- The referenc has a separate getter, setter and updater. In some cases, -- the semantics are a bit different -- -- == Reference laws -- -- As the references are generalizations of lenses, they should conform -- to the lens laws: -- -- 1) You get back what you put in: -- --
-- refSet l a s >>= refGet l return ≡ a ---- -- 2) Putting back what you got doesn't change anything: -- --
-- refGet l return a >>= \b -> refSet l b s ≡ s ---- -- 3) Setting twice is the same as setting once: -- --
-- refSet l a s >>= refSet l b ≡ refSet l b s ---- -- But because update, set and get are different operations, . -- -- 4) Updating something is the same as getting and then setting (if the -- reader and writer monads are the same, or one can be converted into -- the other): -- --
-- refGet l a >>= f >>= \b -> refSet l b s ≡ refUpdate l f s ---- -- This has some consequences. For example lensUpdate l id = -- return. -- -- == Type arguments of Reference [w] Writer monad, -- controls how the value can be reassembled when the part is changed. -- See differences between Lens, IOLens and -- StateLens [r] Reader monad. Controls how part of the -- value can be asked. See differences between Lens, -- Partial and Traversal [s] The type of the -- original context. [t] The after replacing the accessed part -- to something of type b the type of the context changes to -- t. [a] The type of the accessed part. [b] -- The accessed part can be changed to something of this type. -- -- Usually s and b determines t, t -- and a determines s. -- -- The reader monad usually have more information (MMorph w -- r). data Reference w r s t a b -- | Creates a reference. reference :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, Monad r) => (s -> r a) -> (b -> s -> w t) -> ((a -> w b) -> s -> w t) -> Reference w r s t a b -- | Creates a reference with explicit close operations that are executed -- after the data is accessed. referenceWithClose :: (Functor w, Applicative w, Monad w, Functor r, Applicative r, Monad r) => (s -> r a) -> (s -> r ()) -> (b -> s -> w t) -> (s -> w ()) -> ((a -> w b) -> s -> w t) -> (s -> w ()) -> Reference w r s t a b -- | A Reference that can access a part of data that exists in the -- context. Every well-formed Reference is a Lens. type Lens s t a b = forall w r. RefMonads w r => Reference w r s t a b -- | Partial lens. A Reference that can access data that may not -- exist in the context. Every lens is a partial lens. -- -- Any reference that is a partial lens should only perform the action -- given to its updateRef function if it can get a value (the -- value returned by getRef is not the lifted form of -- Nothing). type Partial s t a b = forall w r. (Functor w, Applicative w, Monad w, Functor r, Applicative r, MonadPlus r, MMorph Maybe r) => Reference w r s t a b -- | A reference that can access data that is available in a number of -- instances inside the contexts. -- -- Any reference that is a Traversal should perform the action -- given to its updater in the exactly the same number of times that is -- the number of the values returned by it's getRef function. type Traversal s t a b = forall w r. (RefMonads w r, MonadPlus r, MMorph [] r) => Reference w r s t a b -- | Strict lens. A Reference that must access a part of data that -- surely exists in the context. type Lens' = Reference Identity Identity -- | Strict partial lens. A Reference that must access data that may -- not exist in the context. type Partial' = Reference Identity Maybe -- | Strict traversal. A reference that must access data that is available -- in a number of instances inside the context. type Traversal' = Reference Identity [] -- | A reference that can access mutable data. type IOLens s t a b = forall w r. (RefMonads w r, IOMonads w r) => Reference w r s t a b -- | A reference that can access mutable data that may not exist in the -- context. type IOPartial s t a b = forall w r. (RefMonads w r, IOMonads w r, MonadPlus r, MMorph Maybe r) => Reference w r s t a b type IOTraversal s t a b = forall w r. (RefMonads w r, IOMonads w r, MonadPlus r, MMorph [] r) => Reference w r s t a b -- | A reference that must access mutable data that is available in the -- context. type IOLens' = Reference IO IO -- | A reference that must access mutable data that may not exist in the -- context. type IOPartial' = Reference IO (MaybeT IO) -- | A reference that can access mutable data that is available in a number -- of instances inside the contexts. type IOTraversal' = Reference IO (ListT IO) -- | A reference that can access a value inside a StateT transformed -- monad. type StateLens st m s t a b = forall w r. (RefMonads w r, MMorph (StateT st m) w, MMorph (StateT st m) r) => Reference w r s t a b -- | A reference that can access a value inside a StateT transformed -- monad that may not exist. type StatePartial st m s t a b = forall w r. (RefMonads w r, MMorph (StateT st m) w, MonadPlus r, MMorph Maybe r, MMorph (StateT st m) r) => Reference w r s t a b -- | A reference that can access a value inside a StateT transformed -- monad that may exist in multiple instances. type StateTraversal st m s t a b = forall w r. (RefMonads w r, MMorph (StateT st m) w, MonadPlus r, MMorph [] r, MMorph (StateT st m) r) => Reference w r s t a b -- | A reference that must access a value inside a StateT -- transformed monad. type StateLens' s m = Reference (StateT s m) (StateT s m) -- | A reference that must access a value inside a StateT -- transformed monad that may not exist. type StatePartial' s m = Reference (StateT s m) (MaybeT (StateT s m)) -- | A reference that must access a value inside a StateT -- transformed monad that may exist in multiple instances. type StateTraversal' s m = Reference (StateT s m) (ListT (StateT s m)) -- | A reference that can access a value inside a WriterT -- transformed monad. type WriterLens st m s t a b = forall w r. (RefMonads w r, MMorph (WriterT st m) w, MMorph (WriterT st m) r) => Reference w r s t a b -- | A reference that can access a value inside a WriterT -- transformed monad that may not exist. type WriterPartial st m s t a b = forall w r. (RefMonads w r, MMorph (WriterT st m) w, MonadPlus r, MMorph Maybe r, MMorph (WriterT st m) r) => Reference w r s t a b -- | A reference that can access a value inside a WriteT -- transformed monad that may exist in multiple instances. type WriterTraversal st m s t a b = forall w r. (RefMonads w r, MMorph (WriterT st m) w, MonadPlus r, MMorph [] r, MMorph (WriterT st m) r) => Reference w r s t a b -- | A reference that must access a value inside a WriterT -- transformed monad. type WriterLens' s m = Reference (WriterT s m) (WriterT s m) -- | A reference that must access a value inside a WriteT -- transformed monad that may not exist. type WriterPartial' s m = Reference (WriterT s m) (MaybeT (WriterT s m)) -- | A reference that must access a value inside a WriteT -- transformed monad that may exist in multiple instances. type WriterTraversal' s m = Reference (WriterT s m) (ListT (WriterT s m)) -- | States that m1 can be represented with m2. That is -- because m2 contains more infromation than m1. -- -- The MMorph relation defines a natural transformation from -- m1 to m2 that keeps the following laws: -- --
-- morph (return x) = return x -- morph (m >>= f) = morph m >>= morph . f ---- -- It is a reflexive and transitive relation. class MMorph (m1 :: * -> *) (m2 :: * -> *) morph :: MMorph m1 m2 => m1 a -> m2 a -- | A basic set of instances derived using -- Control.Reference.TH.Monad. -- -- == Structure defined -- --
-- ListT IO -- / \ -- [] MaybeT IO -- | / | -- Maybe IO -- \ / -- Identity --module Control.Reference.TH.MonadInstances instance MMorph (MaybeT IO) (ListT IO) instance MMorph [] (ListT IO) instance MMorph Maybe (ListT IO) instance MMorph (ListT IO) (ListT IO) instance MMorph Maybe [] instance MMorph [] [] instance MMorph Maybe (MaybeT IO) instance MMorph (MaybeT IO) (MaybeT IO) instance MMorph Identity (MaybeT IO) instance MMorph Identity (ListT IO) instance MMorph Identity IO instance MMorph Maybe Maybe instance MMorph Identity Identity -- | An example module that adds references for Template Haskell. These -- references are used to create the TH functions that generate -- references. module Control.Reference.Examples.TH -- | Reference all type variables inside a type typeVariables :: Simple Traversal Type Name -- | Reference the name of the type variable inside a type variable binder typeVarName :: Simple Lens TyVarBndr Name -- | Reference the characters of the name. If changed there is no guarantee -- that the created name will be unique. nameBaseStr :: Simple Lens Name String -- | Reference the record fields in a constructor. recFields :: Simple Partial Con [(Name, Strict, Type)] -- | Reference all fields (data members) in a constructor. conFields :: Simple Lens Con [(Strict, Type)] -- | Reference the name of the constructor conName :: Simple Lens Con Name -- | Access a function application as a list of expressions with the -- function application at the head of the list and the arguments on it's -- tail. funApplication :: Simple Lens Exp [Exp] -- | A module for creating lenses to fields of simple, tuple data -- structures like pairs, triplets, and so on. module Control.Reference.TH.Tuple -- | A tuple configuration is a scheme for tuple-like data structures. data TupleConf TupleConf :: ([Name] -> Type) -> ([Name] -> Pat) -> ([Name] -> Exp) -> TupleConf tupleType :: TupleConf -> [Name] -> Type tuplePattern :: TupleConf -> [Name] -> Pat tupleExpr :: TupleConf -> [Name] -> Exp -- | Generates the normal haskell tuples ((a,b), (a,b,c), -- (a,b,c,d)) hsTupConf :: TupleConf -- | Creates Lens_1 ... Lens_n classes, and instances for -- tuples up to m. -- -- Classes and instances look like the following: -- --
-- class Lens_1 s t a b | s -> a, t -> b -- , a t -> s, b s -> t where -- _1 :: Lens s t a b -- -- instance Lens_1 (a,b) (a',b) a a' where -- _1 = lens ((a,b) -> a) (a' (a,b) -> (a',b)) --makeTupleRefs :: TupleConf -> Int -> Int -> Q [Dec] -- | A module where tuple classes and instances are created up to 16-tuple -- using makeTupleRefs. The number of classes and instances can be -- changed by hiding import from this module and calling -- makeTupleRefs in an other module. module Control.Reference.TupleInstances class Lens_1 s_aa0Q t_aa0R a_aa0S b1_aa0T | s_aa0Q -> a_aa0S, t_aa0R -> b1_aa0T, a_aa0S t_aa0R -> s_aa0Q, b1_aa0T s_aa0Q -> t_aa0R _1 :: Lens_1 s_aa0Q t_aa0R a_aa0S b1_aa0T => Lens s_aa0Q t_aa0R a_aa0S b1_aa0T class Lens_2 s_aa0U t_aa0V a_aa0W b1_aa0X | s_aa0U -> a_aa0W, t_aa0V -> b1_aa0X, a_aa0W t_aa0V -> s_aa0U, b1_aa0X s_aa0U -> t_aa0V _2 :: Lens_2 s_aa0U t_aa0V a_aa0W b1_aa0X => Lens s_aa0U t_aa0V a_aa0W b1_aa0X class Lens_3 s_aa0Y t_aa0Z a_aa10 b1_aa11 | s_aa0Y -> a_aa10, t_aa0Z -> b1_aa11, a_aa10 t_aa0Z -> s_aa0Y, b1_aa11 s_aa0Y -> t_aa0Z _3 :: Lens_3 s_aa0Y t_aa0Z a_aa10 b1_aa11 => Lens s_aa0Y t_aa0Z a_aa10 b1_aa11 class Lens_4 s_aa12 t_aa13 a_aa14 b1_aa15 | s_aa12 -> a_aa14, t_aa13 -> b1_aa15, a_aa14 t_aa13 -> s_aa12, b1_aa15 s_aa12 -> t_aa13 _4 :: Lens_4 s_aa12 t_aa13 a_aa14 b1_aa15 => Lens s_aa12 t_aa13 a_aa14 b1_aa15 class Lens_5 s_aa16 t_aa17 a_aa18 b1_aa19 | s_aa16 -> a_aa18, t_aa17 -> b1_aa19, a_aa18 t_aa17 -> s_aa16, b1_aa19 s_aa16 -> t_aa17 _5 :: Lens_5 s_aa16 t_aa17 a_aa18 b1_aa19 => Lens s_aa16 t_aa17 a_aa18 b1_aa19 class Lens_6 s_aa1a t_aa1b a_aa1c b1_aa1d | s_aa1a -> a_aa1c, t_aa1b -> b1_aa1d, a_aa1c t_aa1b -> s_aa1a, b1_aa1d s_aa1a -> t_aa1b _6 :: Lens_6 s_aa1a t_aa1b a_aa1c b1_aa1d => Lens s_aa1a t_aa1b a_aa1c b1_aa1d class Lens_7 s_aa1e t_aa1f a_aa1g b1_aa1h | s_aa1e -> a_aa1g, t_aa1f -> b1_aa1h, a_aa1g t_aa1f -> s_aa1e, b1_aa1h s_aa1e -> t_aa1f _7 :: Lens_7 s_aa1e t_aa1f a_aa1g b1_aa1h => Lens s_aa1e t_aa1f a_aa1g b1_aa1h class Lens_8 s_aa1i t_aa1j a_aa1k b1_aa1l | s_aa1i -> a_aa1k, t_aa1j -> b1_aa1l, a_aa1k t_aa1j -> s_aa1i, b1_aa1l s_aa1i -> t_aa1j _8 :: Lens_8 s_aa1i t_aa1j a_aa1k b1_aa1l => Lens s_aa1i t_aa1j a_aa1k b1_aa1l class Lens_9 s_aa1m t_aa1n a_aa1o b1_aa1p | s_aa1m -> a_aa1o, t_aa1n -> b1_aa1p, a_aa1o t_aa1n -> s_aa1m, b1_aa1p s_aa1m -> t_aa1n _9 :: Lens_9 s_aa1m t_aa1n a_aa1o b1_aa1p => Lens s_aa1m t_aa1n a_aa1o b1_aa1p class Lens_10 s_aa1q t_aa1r a_aa1s b1_aa1t | s_aa1q -> a_aa1s, t_aa1r -> b1_aa1t, a_aa1s t_aa1r -> s_aa1q, b1_aa1t s_aa1q -> t_aa1r _10 :: Lens_10 s_aa1q t_aa1r a_aa1s b1_aa1t => Lens s_aa1q t_aa1r a_aa1s b1_aa1t class Lens_11 s_aa1u t_aa1v a_aa1w b1_aa1x | s_aa1u -> a_aa1w, t_aa1v -> b1_aa1x, a_aa1w t_aa1v -> s_aa1u, b1_aa1x s_aa1u -> t_aa1v _11 :: Lens_11 s_aa1u t_aa1v a_aa1w b1_aa1x => Lens s_aa1u t_aa1v a_aa1w b1_aa1x class Lens_12 s_aa1y t_aa1z a_aa1A b1_aa1B | s_aa1y -> a_aa1A, t_aa1z -> b1_aa1B, a_aa1A t_aa1z -> s_aa1y, b1_aa1B s_aa1y -> t_aa1z _12 :: Lens_12 s_aa1y t_aa1z a_aa1A b1_aa1B => Lens s_aa1y t_aa1z a_aa1A b1_aa1B class Lens_13 s_aa1C t_aa1D a_aa1E b1_aa1F | s_aa1C -> a_aa1E, t_aa1D -> b1_aa1F, a_aa1E t_aa1D -> s_aa1C, b1_aa1F s_aa1C -> t_aa1D _13 :: Lens_13 s_aa1C t_aa1D a_aa1E b1_aa1F => Lens s_aa1C t_aa1D a_aa1E b1_aa1F class Lens_14 s_aa1G t_aa1H a_aa1I b1_aa1J | s_aa1G -> a_aa1I, t_aa1H -> b1_aa1J, a_aa1I t_aa1H -> s_aa1G, b1_aa1J s_aa1G -> t_aa1H _14 :: Lens_14 s_aa1G t_aa1H a_aa1I b1_aa1J => Lens s_aa1G t_aa1H a_aa1I b1_aa1J class Lens_15 s_aa1K t_aa1L a_aa1M b1_aa1N | s_aa1K -> a_aa1M, t_aa1L -> b1_aa1N, a_aa1M t_aa1L -> s_aa1K, b1_aa1N s_aa1K -> t_aa1L _15 :: Lens_15 s_aa1K t_aa1L a_aa1M b1_aa1N => Lens s_aa1K t_aa1L a_aa1M b1_aa1N class Lens_16 s_aa1O t_aa1P a_aa1Q b1_aa1R | s_aa1O -> a_aa1Q, t_aa1P -> b1_aa1R, a_aa1Q t_aa1P -> s_aa1O, b1_aa1R s_aa1O -> t_aa1P _16 :: Lens_16 s_aa1O t_aa1P a_aa1Q b1_aa1R => Lens s_aa1O t_aa1P a_aa1Q b1_aa1R instance Lens_16 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, b20) a15 b20 instance Lens_15 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, b20, a15) a14 b20 instance Lens_15 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, b20) a14 b20 instance Lens_14 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, b20, a14, a15) a13 b20 instance Lens_14 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, b20, a14) a13 b20 instance Lens_14 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, b20) a13 b20 instance Lens_13 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, b20, a13, a14, a15) a12 b20 instance Lens_13 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, b20, a13, a14) a12 b20 instance Lens_13 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, b20, a13) a12 b20 instance Lens_13 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, b20) a12 b20 instance Lens_12 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, b20, a12, a13, a14, a15) a11 b20 instance Lens_12 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, b20, a12, a13, a14) a11 b20 instance Lens_12 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, b20, a12, a13) a11 b20 instance Lens_12 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, b20, a12) a11 b20 instance Lens_12 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, b20) a11 b20 instance Lens_11 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, b20, a11, a12, a13, a14, a15) a10 b20 instance Lens_11 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, b20, a11, a12, a13, a14) a10 b20 instance Lens_11 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, b20, a11, a12, a13) a10 b20 instance Lens_11 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, b20, a11, a12) a10 b20 instance Lens_11 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, b20, a11) a10 b20 instance Lens_11 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, b20) a10 b20 instance Lens_10 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, a5, a6, a7, a8, b20, a10, a11, a12, a13, a14, a15) a9 b20 instance Lens_10 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, a4, a5, a6, a7, a8, b20, a10, a11, a12, a13, a14) a9 b20 instance Lens_10 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, a3, a4, a5, a6, a7, a8, b20, a10, a11, a12, a13) a9 b20 instance Lens_10 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, a2, a3, a4, a5, a6, a7, a8, b20, a10, a11, a12) a9 b20 instance Lens_10 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, a1, a2, a3, a4, a5, a6, a7, a8, b20, a10, a11) a9 b20 instance Lens_10 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (a0, a1, a2, a3, a4, a5, a6, a7, a8, b20, a10) a9 b20 instance Lens_10 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) (a0, a1, a2, a3, a4, a5, a6, a7, a8, b20) a9 b20 instance Lens_9 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, a5, a6, a7, b20, a9, a10, a11, a12, a13, a14, a15) a8 b20 instance Lens_9 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, a4, a5, a6, a7, b20, a9, a10, a11, a12, a13, a14) a8 b20 instance Lens_9 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, a3, a4, a5, a6, a7, b20, a9, a10, a11, a12, a13) a8 b20 instance Lens_9 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, a2, a3, a4, a5, a6, a7, b20, a9, a10, a11, a12) a8 b20 instance Lens_9 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, a1, a2, a3, a4, a5, a6, a7, b20, a9, a10, a11) a8 b20 instance Lens_9 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (a0, a1, a2, a3, a4, a5, a6, a7, b20, a9, a10) a8 b20 instance Lens_9 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) (a0, a1, a2, a3, a4, a5, a6, a7, b20, a9) a8 b20 instance Lens_9 (a0, a1, a2, a3, a4, a5, a6, a7, a8) (a0, a1, a2, a3, a4, a5, a6, a7, b20) a8 b20 instance Lens_8 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, a5, a6, b20, a8, a9, a10, a11, a12, a13, a14, a15) a7 b20 instance Lens_8 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, a4, a5, a6, b20, a8, a9, a10, a11, a12, a13, a14) a7 b20 instance Lens_8 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, a3, a4, a5, a6, b20, a8, a9, a10, a11, a12, a13) a7 b20 instance Lens_8 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, a2, a3, a4, a5, a6, b20, a8, a9, a10, a11, a12) a7 b20 instance Lens_8 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, a1, a2, a3, a4, a5, a6, b20, a8, a9, a10, a11) a7 b20 instance Lens_8 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (a0, a1, a2, a3, a4, a5, a6, b20, a8, a9, a10) a7 b20 instance Lens_8 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) (a0, a1, a2, a3, a4, a5, a6, b20, a8, a9) a7 b20 instance Lens_8 (a0, a1, a2, a3, a4, a5, a6, a7, a8) (a0, a1, a2, a3, a4, a5, a6, b20, a8) a7 b20 instance Lens_8 (a0, a1, a2, a3, a4, a5, a6, a7) (a0, a1, a2, a3, a4, a5, a6, b20) a7 b20 instance Lens_7 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, a5, b20, a7, a8, a9, a10, a11, a12, a13, a14, a15) a6 b20 instance Lens_7 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, a4, a5, b20, a7, a8, a9, a10, a11, a12, a13, a14) a6 b20 instance Lens_7 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, a3, a4, a5, b20, a7, a8, a9, a10, a11, a12, a13) a6 b20 instance Lens_7 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, a2, a3, a4, a5, b20, a7, a8, a9, a10, a11, a12) a6 b20 instance Lens_7 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, a1, a2, a3, a4, a5, b20, a7, a8, a9, a10, a11) a6 b20 instance Lens_7 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (a0, a1, a2, a3, a4, a5, b20, a7, a8, a9, a10) a6 b20 instance Lens_7 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) (a0, a1, a2, a3, a4, a5, b20, a7, a8, a9) a6 b20 instance Lens_7 (a0, a1, a2, a3, a4, a5, a6, a7, a8) (a0, a1, a2, a3, a4, a5, b20, a7, a8) a6 b20 instance Lens_7 (a0, a1, a2, a3, a4, a5, a6, a7) (a0, a1, a2, a3, a4, a5, b20, a7) a6 b20 instance Lens_7 (a0, a1, a2, a3, a4, a5, a6) (a0, a1, a2, a3, a4, a5, b20) a6 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, a4, b20, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) a5 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, a4, b20, a6, a7, a8, a9, a10, a11, a12, a13, a14) a5 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, a3, a4, b20, a6, a7, a8, a9, a10, a11, a12, a13) a5 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, a2, a3, a4, b20, a6, a7, a8, a9, a10, a11, a12) a5 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, a1, a2, a3, a4, b20, a6, a7, a8, a9, a10, a11) a5 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (a0, a1, a2, a3, a4, b20, a6, a7, a8, a9, a10) a5 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) (a0, a1, a2, a3, a4, b20, a6, a7, a8, a9) a5 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5, a6, a7, a8) (a0, a1, a2, a3, a4, b20, a6, a7, a8) a5 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5, a6, a7) (a0, a1, a2, a3, a4, b20, a6, a7) a5 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5, a6) (a0, a1, a2, a3, a4, b20, a6) a5 b20 instance Lens_6 (a0, a1, a2, a3, a4, a5) (a0, a1, a2, a3, a4, b20) a5 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, a3, b20, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, a3, b20, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, a3, b20, a5, a6, a7, a8, a9, a10, a11, a12, a13) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, a2, a3, b20, a5, a6, a7, a8, a9, a10, a11, a12) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, a1, a2, a3, b20, a5, a6, a7, a8, a9, a10, a11) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (a0, a1, a2, a3, b20, a5, a6, a7, a8, a9, a10) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) (a0, a1, a2, a3, b20, a5, a6, a7, a8, a9) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5, a6, a7, a8) (a0, a1, a2, a3, b20, a5, a6, a7, a8) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5, a6, a7) (a0, a1, a2, a3, b20, a5, a6, a7) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5, a6) (a0, a1, a2, a3, b20, a5, a6) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4, a5) (a0, a1, a2, a3, b20, a5) a4 b20 instance Lens_5 (a0, a1, a2, a3, a4) (a0, a1, a2, a3, b20) a4 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, a2, b20, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, a2, b20, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, a2, b20, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, a2, b20, a4, a5, a6, a7, a8, a9, a10, a11, a12) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, a1, a2, b20, a4, a5, a6, a7, a8, a9, a10, a11) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (a0, a1, a2, b20, a4, a5, a6, a7, a8, a9, a10) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) (a0, a1, a2, b20, a4, a5, a6, a7, a8, a9) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5, a6, a7, a8) (a0, a1, a2, b20, a4, a5, a6, a7, a8) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5, a6, a7) (a0, a1, a2, b20, a4, a5, a6, a7) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5, a6) (a0, a1, a2, b20, a4, a5, a6) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4, a5) (a0, a1, a2, b20, a4, a5) a3 b20 instance Lens_4 (a0, a1, a2, a3, a4) (a0, a1, a2, b20, a4) a3 b20 instance Lens_4 (a0, a1, a2, a3) (a0, a1, a2, b20) a3 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, a1, b20, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, a1, b20, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, a1, b20, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, a1, b20, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, a1, b20, a3, a4, a5, a6, a7, a8, a9, a10, a11) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (a0, a1, b20, a3, a4, a5, a6, a7, a8, a9, a10) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) (a0, a1, b20, a3, a4, a5, a6, a7, a8, a9) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5, a6, a7, a8) (a0, a1, b20, a3, a4, a5, a6, a7, a8) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5, a6, a7) (a0, a1, b20, a3, a4, a5, a6, a7) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5, a6) (a0, a1, b20, a3, a4, a5, a6) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4, a5) (a0, a1, b20, a3, a4, a5) a2 b20 instance Lens_3 (a0, a1, a2, a3, a4) (a0, a1, b20, a3, a4) a2 b20 instance Lens_3 (a0, a1, a2, a3) (a0, a1, b20, a3) a2 b20 instance Lens_3 (a0, a1, a2) (a0, a1, b20) a2 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (a0, b20, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (a0, b20, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (a0, b20, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (a0, b20, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (a0, b20, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (a0, b20, a2, a3, a4, a5, a6, a7, a8, a9, a10) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) (a0, b20, a2, a3, a4, a5, a6, a7, a8, a9) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5, a6, a7, a8) (a0, b20, a2, a3, a4, a5, a6, a7, a8) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5, a6, a7) (a0, b20, a2, a3, a4, a5, a6, a7) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5, a6) (a0, b20, a2, a3, a4, a5, a6) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4, a5) (a0, b20, a2, a3, a4, a5) a1 b20 instance Lens_2 (a0, a1, a2, a3, a4) (a0, b20, a2, a3, a4) a1 b20 instance Lens_2 (a0, a1, a2, a3) (a0, b20, a2, a3) a1 b20 instance Lens_2 (a0, a1, a2) (a0, b20, a2) a1 b20 instance Lens_2 (a0, a1) (a0, b20) a1 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) (b20, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (b20, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (b20, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (b20, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (b20, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (b20, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) (b20, a1, a2, a3, a4, a5, a6, a7, a8, a9) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5, a6, a7, a8) (b20, a1, a2, a3, a4, a5, a6, a7, a8) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5, a6, a7) (b20, a1, a2, a3, a4, a5, a6, a7) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5, a6) (b20, a1, a2, a3, a4, a5, a6) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4, a5) (b20, a1, a2, a3, a4, a5) a0 b20 instance Lens_1 (a0, a1, a2, a3, a4) (b20, a1, a2, a3, a4) a0 b20 instance Lens_1 (a0, a1, a2, a3) (b20, a1, a2, a3) a0 b20 instance Lens_1 (a0, a1, a2) (b20, a1, a2) a0 b20 instance Lens_1 (a0, a1) (b20, a1) a0 b20 -- | This module can be used to generate references for record fields. If -- the field surely exists, a Lens will be generated. If the field -- may not exist, it will be a Partial lens. -- -- It will have the maximum amount of polymorphism it can create. -- -- If the name of the field starts with _, the name of the field -- will be the same with _ removed. If not, the reference name -- will be the field name with _ added te the start. -- -- The following code sample: -- --
-- data Maybe' a = Just' { _fromJust' :: a }
-- | Nothing'
-- $(makeReferences ''Maybe)
--
-- data Tuple a b = Tuple { _fst' :: a, _snd' :: b }
-- $(makeReferences ''Tuple)
--
--
-- Is equivalent to:
--
--
-- data Maybe' a = Just' { _fromJust' :: a }
-- | Nothing'
--
-- fromJust' :: Partial (Maybe' a) (Maybe' b) a b
-- fromJust' = partial (case Just' x -> Right (x, y -> return (Just' y))
-- Nothing' -> Left (return Nothing'))
--
-- data Tuple a b = Tuple { _fst' :: a, _snd' :: b }
-- fst' :: Lens (Tuple a c) (Tuple b c) a b
-- fst' = lens _fst' (b tup -> tup { _fst' = b })
-- snd' :: Lens (Tuple a c) (Tuple a d) c d
-- snd' = lens _snd' (b tup -> tup { _snd' = b })
--
module Control.Reference.TH.Records
-- | Creates references for fields of a data structure.
makeReferences :: Name -> Q [Dec]
-- | Shows the generated declarations instead of using them.
debugTH :: Q [Dec] -> Q [Dec]
instance Monad m => MMorph (StateT s m) (ListT (StateT s m))
instance MMorph [] (ListT (StateT s Q))
-- | A frontend module for the Control.Reference package
module Control.Reference