úÎWÇR„@      !"#$%&'()*+,-./0123456789:;<=>?  Safe-InferredThe accessor function we use, %has a record value as first argument 3and returns the content of a specific record field Eand a function that allows to overwrite that field with a new value. In former version of a package 3we used a function that resembled the state monad.  However this required to use an @ in the implementation of the get function. ABCDEABCDABCDE Safe-InferredIf an object is wrapped in a newtype, you can generate an Accessor to the unwrapped data 2by providing a wrapper and an unwrapper function. *The set function is simpler in this case, %since no existing data must be kept. OSince the information content of the wrapped and unwrapped data is equivalent, $you can swap wrapper and unwrapper. This way you can construct an Accessor :that treats a record field containing an unwrapped object *like a field containing a wrapped object.   newtype A = A {unA :: Int}   access :: Accessor.T A Int  access = fromWrapper A unA (We could also have called this function  fromBijection, since it must hold wrap . unwrap = id and unwrap . wrap = id. Access the record itself (Access a (non-existing) element of type () result a/ accesses the value of a function for argument a. -It is not very efficient to build a function 4from setting all of its values using this accessor, .since every access to a function adds another  if-then-else. &Also see semantic editor combinators, @that allow to modify all function values of a function at once. Cf.  8http://conal.net/blog/posts/semantic-editor-combinators/ Set the value of a field.  as infix operator. This lets us write %first ^= 2+3 $ second ^= 5+7 $ record. This is a general function, Obut it is especially useful for setting many values of different type at once. Get the value of a field.   as infix operator. This lets us write record^.field^.subfield.  This imitates Modula II syntax. /Transform the value of a field by a function.   as infix operator. This lets us write field^:subfield^:(2*) $ record, record$%field^:subfield^:(2*) or "record$%field^:subfield^:(const 1). Flipped version of '($)'. Accessor composition: 5Combine an accessor with an accessor to a sub-field. Speak "stack". *Accessor composition the other direction.   (<.) = flip (.>) You may also use the (.) operator from Category class. /Merge the accessors to two independent fields. "Independency means, it must hold:  ; set (merge accA accB) (a,b) = set (merge accB accA) (b,a) "You may construct smart accessors &by composing a merged accessor with a  fromWrapper accessor. +This is a special case of the more general Point concept in the package fclabels.       Safe-Inferred2Modify a record element and return its old value. 2Modify a record element and return its new value. Infix variant of . Infix variant of .    Safe-Inferred   Safe-Inferred"Treat a Set like a boolean array. *Treats a finite map like an infinite map, >where all undefined elements are replaced by a default value. *Treats a finite map like an infinite map, !where all undefined elements are F and defined elements are G.      Safe-InferredH!"!"!"H!" Safe-Inferred#&Access to the first value of a pair. $'Access to the second value of a pair. %(Access to the first value of a triple. &)Access to the second value of a triple. '(Access to the third value of a triple. #$%&'#$%&'#$%&'#$%&' Safe-Inferred()*+,-./012345IJKLMN()*+,-./012345312/0-.+,()*45()*+,-./012345IJKLMN  Safe-InferredOExample of using P, get, modify. QModify a value of the R function. S&Modify a value of a curried function. OTUVWXYZ[\]^_`QSabcdPefOTUVWXYZ[\]^_`QSabcdPefOTUVWXYZ[\]^_`QSabcdPef Safe-Inferred 6An  Accessor r a" is an object that encodes how to  get and put a subject of type a out of/into an object  of type s. 0In order for an instance of this data structure a to be  an 6#, it must obey the following laws:  getVal a (setVal a x r) = x  setVal a (getVal a r) r = r 7 Construct an 6 from a get and a set method. 8AGet a value from a record field that is specified by an Accessor 9?Set a value of a record field that is specified by an Accessor :Accessor composition: 5Combine an accessor with an accessor to a sub-field. Speak "stack". ;*Accessor composition the other direction.   (<.) = flip (.>) You may also use the (.) operator from Category class. <An "assignment operator" for state monads.  (=:) = putA =4A structural dereference function for state monads. >3A structural assignment function for state monads. ?5A structural modification function for state monads. 67 get method  set method 8record field record "value of the field in the record 9record field f value x to be set original record new record with field f changed to x :;<=>? 6789:;<=>?6798 =><?:; 6789:;<=>?g          ! "#$%&'()*+,-.//0123456789(:;<=>?@ABCDEFGHCIJCIKLMNOPQR S  CTU V W X Y Z [ \ ] ^ _ ` a    b c # $ %ddata-accessor-0.2.2.3Data.Accessor.BasicData.Accessor.MonadStateData.Accessor.ContainerData.Accessor.ShowData.Accessor.TupleData.Accessor.BinaryRead Data.AccessorData.Accessor.PrivateData.Accessor.MonadStatePrivateData.Accessor.ExampleT fromSetGetfromLens fromWrapperselfnullresultset^=composeget^.modify^:$%.><.merge getAndModify modifyAndGet%=%:liftliftTarray mapDefaultmapMaybe intMapDefault intMapMaybefield showsPrecfirstsecondfirst3second3third3Parser runParserByteCompatibletoByte ByteStreamgetWord8 ByteSource readWord8CanyStreamrecordAccessoraccessorgetValsetVal=:getAputAmodAbaseGHC.Err undefinedConsdecons $fCategoryT Data.MaybeNothingJusttoMaybe$fCInt$fCChar$fCWord8$fByteSourceStateT$fByteCompatibleWord8$fByteStream[]plainGHC.Baseordresult2init initInfixreadinfix0infix1infix2infix3infix4 showsPairshow0show1accessHourMinutemergeHourMinute