úÎ!C+>û>      !"#$%&'()*+,-./0123456789:;<=(c) Varun Gandhi 2018 BSD-style (see the file LICENSE)theindigamer15@gmail.com experimentalportableSafe134568]:¡editThe  type encapsulates rewriting.Since ÿ' is also a monad, it allows you to easily "bubble up" information on whether changes were made when working with nested data structures. This is helpful when you want to save the fact that you've reaching a fixed point while rewriting, instead of, say re-computing it after the fact using an >' instance on the underlying data-type. For example,HhalveEvens x = if x `mod` 2 == 0 then (Dirty $ x `div` 2) else (Clean x)traverse halveEvens [1, 2, 3] Dirty [1,1,3]traverse halveEvens [1, 3, 5] Clean [1,3,5]To support this behaviour, the ? and @' instances have "polluting" semantics: A =  = B.The result of C is + if and only if both the arguments are .If you bind a \ value, you may get anything depending on the function involved. However, if you bind a & value, you will definitely get a  value back.*If you're familiar with the Writer monad,  is isomorphic to  Writer Any ( is D with  (<>) = (||)).editA value that has been modified.edit#A value that has not been modified.editForcibly make the value e. You probably do not want to use this function unless you're implementing some class instance for . editForcibly make the value e. You probably do not want to use this function unless you're implementing some class instance for . edit5Extract the final value after having done some edits.Unlike s i, this function doesn't require a default value for totality as both constructors have a value in them. editWas an edit made (is the value )? If yes, returns E otherwise F.toMaybe (Clean "Good morning.")NothingtoMaybe (Dirty "Wink, wink.")Just "Wink, wink." edit<Takes a clean value and a possibly dirty value and makes an .fromMaybe "Hi" Nothing Clean "Hi"defaultValue = 1000correctedValue = Just 1024%fromMaybe defaultValue correctedValue Dirty 1024 editwTakes a function that may dirty a value, and returns another which saves the default value if no modification is done.  f `edits` x == fromMaybe x (f x)editA  value becomes a G and a  value becomes a H.FMnemonic: having things clean is usually the right situation to be in.editA G value becomes a  and a H value becomes a .FMnemonic: having things clean is usually the right situation to be in.editReturn I iff the argument has the form Clean _.editReturns I iff the argument has the form Dirty _.edit values are put on the left and  values are put on the right. 0partitionEdits = partitionEithers . map toEitheredit Keep editing till the result is  (find the fixed point).0g x = if x >= 10 then Clean x else Dirty (x + 2) polish g 311 Conceptually, "polish f x = last $ iterations f xedit Keep editing till the result is , recording iterations. Similar to ß but gets the entire list of arguments tested instead of just the final result. The result is guaranteed to be non-empty because the first element will always be included. If the list is finite, the last element gives a  result.0g x = if x >= 10 then Clean x else Dirty (x + 2)iterations g 3 [3,5,7,9,11]KThis can be helpful in debugging your transformation function. For example, ‰[ (before, after) | let xs = iterations f start , (before, after) <- zip xs (tail xs) , sanityCheck before && not (sanityCheck after)) ] editJ" is biased towards producing more  values. K shrinks the generator towards  values.    (c) Varun Gandhi 2018 BSD-style (see the file LICENSE)theindigamer15@gmail.com experimentalportableSafe=*+,-*+,-(c) Varun Gandhi 2018 BSD-style (see the file LICENSE)theindigamer15@gmail.com experimentalportableSafe>÷L    !"#$%&'()*+,-./01234566789:;<=>?@ABCDEFGHIJK LM LN LO LP LQIRS LT LU VW VXIRYZ[\Z[]^#edit-1.0.0.0-9LKJoySQ5QXFh9hH4LMk8Z Data.EditControl.Monad.Trans.Edit Data.MonoidAny Data.MaybeMaybe' fromMaybeData.Edit.Tutorialbase Control.Monad<=<>=>$comonad-5.0.4-E437j0xZa4yEk94g9329dNControl.Comonadextend duplicateextractEditDirtyCleancleandirtyfromEdittoMaybeeditstoEither fromEitherisCleanisDirtypartitionEditspolish iterations$fComonadApplyEdit $fComonadEdit$fArbitraryEdit$fArbitrary1Edit $fRead1Edit $fShow1Edit $fEq1Edit$fMonadZipEdit $fMonoidEdit$fSemigroupEdit $fMonadEdit$fApplicativeEdit$fEqEdit $fShowEdit $fReadEdit $fFunctorEdit$fFoldableEdit$fTraversableEdit $fGenericEdit $fNFDataEdit $fDataEditEditTrunEditTmapEditT$fComonadTransEditT$fComonadEditT$fTraversableEditT$fFoldableEditT$fMonadZipEditT$fMonadIOEditT$fMonadTransEditT $fMonadEditT$fApplicativeEditT$fFunctorEditT $fShowEditT $fReadEditT $fEqEditT $fRead1EditT $fShow1EditT $fEq1EditTghc-prim GHC.ClassesEqGHC.Base ApplicativeMonadpurereturn<*> GHC.TypesBoolJustNothing Data.EitherLeftRightTrue(QuickCheck-2.11.3-58QsvdIMmwDDNaUIIDmLArTest.QuickCheck.Arbitrary arbitraryshrink