i~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij k l m n o p q r s t u v w x y z { | } ~   Safe-Inferred Invariant preserving version of IntSet from the  containers! packages, suitable for use with Uniplate.  Use  to construct values, and  to deconstruct values.  Invariant preserving version of IntMap from the  containers! packages, suitable for use with Uniplate.  Use  to construct values, and  to deconstruct values.  Invariant preserving version of Set from the  containers! packages, suitable for use with Uniplate.  Use  to construct values, and  to deconstruct values.  Invariant preserving version of Map from the  containers! packages, suitable for use with Uniplate.  Use  to construct values, and  to deconstruct values. The  data type as a * instance which reports as being defined:   data Invariant a = Invariant a However, whenever a 6 constructs a new value, it will have the function in  the % field applied to it. As an example:  I data SortedList a = SortedList (Invariant [a]) deriving (Data,Typeable) 9 toSortedList xs = SortedList $ Invariant sort (sort xs) 3 fromSortedList (SortedList (Invariant _ xs)) = xs Any time an operation such as " is applied to the data type, the  function ! is applied to the result. The fromSortedList+ function can then rely on this invariant. The Q method is partially implemented - all constructed values will have an undefined C value for all fields, regardless of which function is passed to . If you only use   (as Uniplate does) then the  method is sufficient. The  data type has a * instance which reports as being defined:   data Trigger a = Trigger a However, whenever a  or * constructs a new value, it will have the    field set to 8. The trigger information is useful to indicate whether I any invariants have been broken, and thus need fixing. As an example:  G data SortedList a = SortedList (Trigger [a]) deriving (Data,Typeable) 8 toSortedList xs = SortedList $ Trigger False $ sort xs H fromSortedList (SortedList (Trigger t xs)) = if t then sort xs else xs ZThis data type represents a sorted list. When constructed the items are initially sorted,  but operations such as ! could break that invariant. The  type is used to M detect when the Data operations have been performed, and resort the list. The ( type is often used in conjunction with , which fixes the invariants. The   data type has a 0 instance which reports having no constructors, 9 as though the type was defined as using the extension EmptyDataDecls:   data Hide a TThis type is suitable for defining regions that are avoided by Uniplate traversals.  As an example:  C transformBi (+1) (1, 2, Hide 3, Just 4) == (2, 3, Hide 3, Just 4) @As a result of having no constructors, any calls to the methods  or   will raise an error. Deconstruct a value of type . Construct a value of type . Deconstruct a value of type . Construct a value of type . Deconstruct a value of type . Construct a value of type . Deconstruct a value of type . Construct a value of type . 3    '  None(Constructor specialisation on newer GHC GHCs foldr/build system, but on all platforms ), but suitable for inlining. Copied from Data.ByteString.Base. (Perform concatentation of continuations None9The standard Uniplate class, all operations require this #The underlying method in the class R uniplate (Add (Val 1) (Neg (Val 2))) = ([Val 1, Neg (Val 2)], \[a,b] -> Add a b) R uniplate (Val 1) = ([] , \[] -> Val 1 ) 1The type of replacing all the children of a node FTaking a value, the function should return all the immediate children 5 of the same type, and a function to replace them. CGet all the children of a node, including itself and all children.  ( universe (Add (Val 1) (Neg (Val 2))) = < [Add (Val 1) (Neg (Val 2)), Val 1, Neg (Val 2), Val 2] FThis method is often combined with a list comprehension, for example: $ vals x = [i | Val i <- universe x] 1Get the direct children of a node. Usually using  is more appropriate. children = fst . <Transform every element in the tree, in a bottom-up manner. 8For example, replacing negative literals with literals:  negLits = transform f + where f (Neg (Lit i)) = Lit (negate i)  f x = x Monadic variant of  LRewrite by applying a rule everywhere you can. Ensures that the rule cannot $ be applied anywhere in the result:  @ propRewrite r x = all (isNothing . r) (universe (rewrite r x)) Usually  is more appropriate, but  can give better 4 compositionality. Given two single transformations f and g , you can  construct f  g3 which performs both rewrites until a fixed point. Monadic variant of  PPerform a transformation on all the immediate children, then combine them back. Q This operation allows additional information to be passed downwards, and can be , used to provide a top-down transformation. !Monadic variant of   "#Return all the contexts and holes. 5 propUniverse x = universe x == map fst (contexts x) 3 propId x = all (== x) [b a | (a,b) <- contexts x] #The one depth version of " 2 propChildren x = children x == map fst (holes x) 0 propId x = all (== x) [b a | (a,b) <- holes x] $/Perform a fold-like computation on each value,  technically a paramorphism  !"#$ !"#$ !"#$  !"#$None%)Return all the top most children of type to within from. If  from == to9 then this function should return the root as the single  child. '"Return the children of a type. If  to == from then it returns the " original element (in contrast to ) 0Used for defining instances UniplateFoo a => UniplateFoo [a] %&'()*+,-./0 !"#$%&'()*+,-./0 %&'()*+,-./0 %&'()*+,-./0None72Take the type of the method, will crash if called 8 Convert a 1* to a list, assumes the value was created  with 9 9Convert a list to a 1 : Transform a 1+ to a list, and back again, in a structure ? preserving way. The output and input lists must be equal in  length. 123456789: 123456789: 143256789: 143256789:None;6Children are defined as the top-most items of type to  starting at the root. All instances must define <, while  = and > are optional. <)Return all the top most children of type to within from. If  from == to9 then this function should return the root as the single  child. =Like A! but with more general types. If  from == to then this  function does not4 descend. Therefore, when writing definitions it is L highly unlikely that this function should be used in the recursive case. 6 A common pattern is to first match the types using =, then continue  the recursion with A. ?OThe standard Uniplate class, all operations require this. All definitions must  define @, while A and B are optional. @$The underlying method in the class. I Taking a value, the function should return all the immediate children 5 of the same type, and a function to replace them. Given uniplate x = (cs, gen) cs should be a Str on, constructed of Zero, One and Two,  containing all x'&s direct children of the same type as x. gen  should take a Str on$ with exactly the same structure as cs, : and generate a new element with the children replaced. Example instance:  instance Uniplate Expr where S uniplate (Val i ) = (Zero , \Zero -> Val i ) S uniplate (Neg a ) = (One a , \(One a) -> Neg a ) S uniplate (Add a b) = (Two (One a) (One b), \(Two (One a) (One b)) -> Add a b) APPerform a transformation on all the immediate children, then combine them back. S This operation allows additional information to be passed downwards, and can be W used to provide a top-down transformation. This function can be defined explicitly, 3 or can be provided by automatically in terms of @. 1For example, on the sample type, we could write:  descend f (Val i ) = Val i ! descend f (Neg a ) = Neg (f a) ' descend f (Add a b) = Add (f a) (f b) BMonadic variant of A CCGet all the children of a node, including itself and all children.  ( universe (Add (Val 1) (Neg (Val 2))) = < [Add (Val 1) (Neg (Val 2)), Val 1, Neg (Val 2), Val 2] FThis method is often combined with a list comprehension, for example: $ vals x = [i | Val i <- universe x] D1Get the direct children of a node. Usually using C is more appropriate. E<Transform every element in the tree, in a bottom-up manner. 8For example, replacing negative literals with literals:  negLits = transform f + where f (Neg (Lit i)) = Lit (negate i)  f x = x FMonadic variant of E GLRewrite by applying a rule everywhere you can. Ensures that the rule cannot $ be applied anywhere in the result:  @ propRewrite r x = all (isNothing . r) (universe (rewrite r x)) Usually E is more appropriate, but G can give better 4 compositionality. Given two single transformations f and g , you can  construct f  g3 which performs both rewrites until a fixed point. HMonadic variant of G I#Return all the contexts and holes. $ universe x == map fst (contexts x) ( all (== x) [b a | (a,b) <- contexts x] JThe one depth version of I ! children x == map fst (holes x) % all (== x) [b a | (a,b) <- holes x] K/Perform a fold-like computation on each value,  technically a paramorphism M"Return the children of a type. If  to == from then it returns the " original element (in contrast to D) ;<=>?@ABCDEFGHIJKLMNOPQRS;<=>?@ABCDEFGHIJKLMNOPQRS?@AB;<=>CDEFGHIJKLMNOPQRS;<=>?@ABCDEFGHIJKLMNOPQRSNoneT+If you want to keep an existing type class U  composOp == AV  composOpM == BW composOpM_ == Z (return ()) (>>)X composOpMonoid = Z mempty mappendY composOpMPlus = Z mzero mplusZProbably replace with C , perhaps K TUVWXYZTUVWXYZTUVWXYZTUVWXYZNone [  gmapT == A\Use D and  ]Use D and  ^Use D _Use D and  `  gmapM == Ba mkT == b everywhere == Nc  mkM == idd everywhereM == OeOnly for use with f fUse C or L, perhaps followed by a fold. #Not an exact equivalent to the SYB  everything , as the 1 operators may be applied in different orders. [\]^_`abcdef [\]^_`abcdef [\]^_`abcdef [\]^_`abcdefNone:An existential box representing a type which supports SYB  operations. h Wrap up a (a -> a)& transformation function, to use with i iSApply a sequence of transformations in order. This function obeys the equivalence:  [ transformBis [[transformer f],[transformer g],...] == transformBi f . transformBi g . ... Each item of type  [Transformer]0 is applied in turn, right to left. Within each   [Transformer], the individual  Transformer values may be interleaved. UThe implementation will attempt to perform fusion, and avoid walking any part of the W data structure more than necessary. To further improve performance, you may wish to _ partially apply the first argument, which will calculate information about the relationship  between the transformations. =g      !"#$%&'()*+,-./0123456789:;<h=i>=g      !"#$%&'()*+,-./0123456789:;<h=i>0g      !"#$%&'()*+,-./0123456789:;<h=i>None?@;<=>?@ABCDEFGHIJKLMNOPQRSghiigh?@Nonej6Children are defined as the top-most items of type to  starting at the root. All instances must define k, while  l and m are optional. k)Return all the top most children of type to within from. If  from == to9 then this function should return the root as the single  child. lLike p! but with more general types. If  from == to then this  function does not4 descend. Therefore, when writing definitions it is L highly unlikely that this function should be used in the recursive case. 6 A common pattern is to first match the types using l, then continue  the recursion with p. nOThe standard Uniplate class, all operations require this. All definitions must  define o, while p and q are optional. o$The underlying method in the class. I Taking a value, the function should return all the immediate children 5 of the same type, and a function to replace them. Given uniplate x = (cs, gen) cs should be a Str on, constructed of Zero, One and Two,  containing all x'&s direct children of the same type as x. gen  should take a Str on$ with exactly the same structure as cs, : and generate a new element with the children replaced. Example instance:  instance Uniplate Expr where S uniplate (Val i ) = (Zero , \Zero -> Val i ) S uniplate (Neg a ) = (One a , \(One a) -> Neg a ) S uniplate (Add a b) = (Two (One a) (One b), \(Two (One a) (One b)) -> Add a b) pPPerform a transformation on all the immediate children, then combine them back. S This operation allows additional information to be passed downwards, and can be W used to provide a top-down transformation. This function can be defined explicitly, 3 or can be provided by automatically in terms of o. 1For example, on the sample type, we could write:  descend f (Val i ) = Val i ! descend f (Neg a ) = Neg (f a) ' descend f (Add a b) = Add (f a) (f b) qMonadic variant of p rCGet all the children of a node, including itself and all children.  ( universe (Add (Val 1) (Neg (Val 2))) = < [Add (Val 1) (Neg (Val 2)), Val 1, Neg (Val 2), Val 2] FThis method is often combined with a list comprehension, for example: $ vals x = [i | Val i <- universe x] s1Get the direct children of a node. Usually using r is more appropriate. t<Transform every element in the tree, in a bottom-up manner. 8For example, replacing negative literals with literals:  negLits = transform f + where f (Neg (Lit i)) = Lit (negate i)  f x = x uMonadic variant of t vLRewrite by applying a rule everywhere you can. Ensures that the rule cannot $ be applied anywhere in the result:  @ propRewrite r x = all (isNothing . r) (universe (rewrite r x)) Usually t is more appropriate, but v can give better 4 compositionality. Given two single transformations f and g , you can  construct f  g3 which performs both rewrites until a fixed point. wMonadic variant of v x#Return all the contexts and holes. $ universe x == map fst (contexts x) ( all (== x) [b a | (a,b) <- contexts x] yThe one depth version of x ! children x == map fst (holes x) % all (== x) [b a | (a,b) <- holes x] z/Perform a fold-like computation on each value,  technically a paramorphism |"Return the children of a type. If  to == from then it returns the " original element (in contrast to s) jklmnopqrstuvwxyz{|}~jklmnopqrstuvwxyz{|}~jklmnopqrstuvwxyz{|}~ NoneABghijklmnopqrstuvwxyz{|}~nopqjklmrstuvwxyz{|}~ighAB None-The main combinator used to start the chain. 1The following rule can be used for optimisation: # plate Ctor |- x == plate (Ctor x) &The field to the right is the target. /The field to the right may contain the target. The field to the right does not contain the target. ;The field to the right is a list of the type of the target GThe field to the right is a list of types which may contain the target  Used for ;, definitions where both types are the same. *Write an instance in terms of a projection/1injection pair. Usually used to define instances ( for abstract containers such as Map:  2 instance Biplate (Map.Map [Char] Int) Char where 4 biplate = plateProject Map.toList Map.fromList @If the types ensure that no operations will not change the keys  we can use the fromDistictAscList" function to reconstruct the Map: 1 instance Biplate (Map.Map [Char] Int) Int where B biplate = plateProject Map.toAscList Map.fromDistinctAscList CDEFGHIJKLMNOPQR!;<=>?@ABCDEFGHIJKLMNOPQRSCDEFGHIJKLMNOPQR None=This class should be defined for each data type of interest. $This method should be defined using  and , . -The main combinator used to start the chain. /The field to the right may contain the target. The field to the right does not contain the target. N This can be used as either an optimisation, or more commonly for excluding  primitives such as Int. *Write an instance in terms of a projection/1injection pair. Usually used to define instances ( for abstract containers such as Map: F instance (Ord a, Typeable a, PlateAll a c, Typeable b, PlateAll b c, F Typeable c, PlateAll c c) => PlateAll (Map.Map a b) c where 5 plateAll = plateProject Map.toList Map.fromList STUVWXYZ[\]^_`abcdeLfghijklmnopqrstuvwxyz{|}~;<=>?@ABCDEFGHIJKLMNOPQRSSTUVWXYZ[\]^_`abcde None HZipper structure, whose root type is the first type argument, and whose + focus type is the second type argument. 0Create a zipper, focused on the top-left value. MCreate a zipper with a different focus type from the outer type. Will return  NothingH if there are no instances of the focus type within the original value. EFrom a zipper take the whole structure, including any modifications. .Move one step left from the current position. /Move one step right from the current position. .Move one step down from the current position. ,Move one step up from the current position. +Retrieve the current focus of the zipper.. 8Replace the value currently at the focus of the zipper. ) " None:The standard Uniplate class, all operations require this. $The underlying method in the class. Given uniplate x = (cs, gen) cs should be a Str on, constructed of Zero, One and Two,  containing all x'&s direct children of the same type as x. gen  should take a Str on$ with exactly the same structure as cs, : and generate a new element with the children replaced. Example instance:  instance Uniplate Expr where S uniplate (Val i ) = (Zero , \Zero -> Val i ) S uniplate (Neg a ) = (One a , \(One a) -> Neg a ) S uniplate (Add a b) = (Two (One a) (One b), \(Two (One a) (One b)) -> Add a b) 1The type of replacing all the children of a node FTaking a value, the function should return all the immediate children 5 of the same type, and a function to replace them. =Compatibility method, for direct users of the old list-based  function CGet all the children of a node, including itself and all children.  ( universe (Add (Val 1) (Neg (Val 2))) = < [Add (Val 1) (Neg (Val 2)), Val 1, Neg (Val 2), Val 2] FThis method is often combined with a list comprehension, for example: $ vals x = [i | Val i <- universe x] 1Get the direct children of a node. Usually using  is more appropriate. children = fst . <Transform every element in the tree, in a bottom-up manner. 8For example, replacing negative literals with literals:  negLits = transform f + where f (Neg (Lit i)) = Lit (negate i)  f x = x Monadic variant of  LRewrite by applying a rule everywhere you can. Ensures that the rule cannot $ be applied anywhere in the result:  @ propRewrite r x = all (isNothing . r) (universe (rewrite r x)) Usually  is more appropriate, but  can give better 4 compositionality. Given two single transformations f and g , you can  construct f  g3 which performs both rewrites until a fixed point. Monadic variant of  PPerform a transformation on all the immediate children, then combine them back. Q This operation allows additional information to be passed downwards, and can be , used to provide a top-down transformation. Monadic variant of  #Return all the contexts and holes. 5 propUniverse x = universe x == map fst (contexts x) 3 propId x = all (== x) [b a | (a,b) <- contexts x] The one depth version of  2 propChildren x = children x == map fst (holes x) 0 propId x = all (== x) [b a | (a,b) <- holes x] /Perform a fold-like computation on each value,  technically a paramorphism 123456789:None)Return all the top most children of type to within from. If  from == to9 then this function should return the root as the single  child. "Return the children of a type. If  to == from then it returns the " original element (in contrast to ) Used for defining instances UniplateFoo a => UniplateFoo [a] %123456789: None6Children are defined as the top-most items of type to  starting at the root. .Compatibility method, for direct users of the  function 2123456789: None-The main combinator used to start the chain. 1The following rule can be used for optimisation: # plate Ctor |- x == plate (Ctor x) &The field to the right is the target. /The field to the right may contain the target. The field to the right does not contain the target. ;The field to the right is a list of the type of the target GThe field to the right is a list of types which may contain the target  Used for PlayAll, definitions where both types are the same. 9123456789:NoneCThis class represents going from the container type to the target. +This class should only be constructed with ,  and  !This function is used to write a  instance from a  one -The main combinator used to start the chain. 1The following rule can be used for optimisation: # plate Ctor |- x == plate (Ctor x) /the field to the right may contain the target. The field to the right does not contain the target. L This can be used as either an optimisation, or more commonly for excluding  primitives such as Int. efghijklmnopqrstuvwxyz{|}~123456789:None:An existential box representing a type which supports SYB  operations. 2123456789:   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ*+34-./012567RSTUVWXYZ[\]^_`abcdefghijklmnoNOPQ*+34-./012567RSTUVWXY p q r s t u v w x y p r s w z { | } ~  * + , - . / 0 1 2 3 4 5 6 789:;<=>?@ABCNORSTUVWPQXYpqrstuvxyprsam                          !"#$%&'()*+,-./0123456789:;<=>?@ABCD E E F G H I I z J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ `     aabcdefuniplate-1.6.10%Data.Generics.Uniplate.Data.InstancesData.Generics.UniplateData.Generics.UniplateOnData.Generics.Str!Data.Generics.Uniplate.OperationsData.Generics.ComposData.Generics.SYBData.Generics.Uniplate.DataData.Generics.Uniplate.DataOnlyData.Generics.Uniplate.DirectData.Generics.Uniplate.TypeableData.Generics.Uniplate.ZipperData.Generics.UniplateStrData.Generics.UniplateStrOnData.Generics.BiplateData.Generics.PlateDirectData.Generics.PlateTypeable%Data.Generics.Uniplate.Internal.Utils$Data.Generics.Uniplate.Internal.Data2Data.Generics.Uniplate.Internal.DataOnlyOperationsData.Generics.PlateDataIntSetIntMapSetMap Invariant invariant fromInvariantTriggertrigger fromTriggerHidefromHidefromMaptoMapfromSettoSet fromIntMaptoIntMap fromIntSettoIntSetUniplateuniplate UniplateTypeuniversechildren transform transformMrewriterewriteMdescenddescendMcontextsholespara BiplateType universeOn childrenOn transformOn transformOnM rewriteOn rewriteOnM descendOn descendOnMholesOn contextsOnuniplateOnListStrTwoOneZerostrMapstrMapMstrTypestrListlistStr strStructureBiplatebiplate descendBi descendBiM universeBi childrenBi transformBi transformBiM rewriteBi rewriteBiM contextsBiholesBiComposcomposOp composOpM composOpM_composOpMonoid composOpMPlus composOpFoldgmapTgmapQlgmapQrgmapQgmapQigmapMmkT everywheremkM everywhereMmkQ everything Transformer transformer transformBisplate|*|+|-||*||+ plateSelf plateProjectPlateAllplateAllZipperzipperzipperBi fromZipperleftrightdownuphole replaceHole uniplateList biplateList uniplateAllbase Data.DataDatagfoldlgunfold fromConstrB fromConstrghc-prim GHC.TypesTruetoConstrtyHide conTrigger tyTrigger conInvariant tyInvariant $fOrdIntSet $fEqIntSet $fShowIntSet $fOrdIntMap $fEqIntMap $fShowIntMap$fOrdSet$fEqSet $fShowSet$fOrdMap$fEqMap $fShowMap$fDataInvariant$fShowInvariant $fDataTrigger$fFunctorTrigger $fDataHide $fFunctorHide $fShowHideSPECbuilderinlinePerformIOGHC.IOunsafePerformIO concatContSPEC2 Unsafe.Coerce unsafeCoerce Control.Monadmplus$fTraversableStr $fFoldableStr $fFunctorStr$fEqStrGHC.ListfoldlGHC.Basefoldr!!idDataBoxCCCfromCHitMap dataBoxKey dataBoxValFollowerIntMap2TypeMap2CacheOracle fromOracleAnswerMissFollowHitfromHitTypeKeyTypeMapTypeSettypeKey!map_findWithDefaultmap_fromAscList map_keysSet map_member set_partition set_toAscList set_unionsuniplateVerbosehitTestcachereadCacheFollowerreadCacheHitMaplookup2insert2 intLookup2 intInsert2followerdataBox sybChildren emptyHitMap insertHitMapfixEq biplateData uniplateData descendData descendBiData descendDataMdescendBiDataM transformer_ transformBis_ $fBiplateab $fUniplateaType plateStar platePlus$fBiplateRatioInteger$fBiplateRatioRatio$fUniplateRatio $fBiplate[][]$fBiplate[]Char $fUniplate[] $fUniplate()$fUniplateFloat$fUniplateDouble$fUniplateInteger$fUniplateChar$fUniplateBool $fUniplateInt plateMore$fPlateAllRatioto$fPlateAll(,,,,)to$fPlateAll(,,,)to$fPlateAll(,,)to$fPlateAll(,)to$fPlateAllEitherto$fPlateAllMaybeto$fPlateAll[]to$fPlateAll()to$fPlateAllFloatto$fPlateAllDoubleto$fPlateAllIntegerto$fPlateAllCharto$fPlateAllBoolto$fPlateAllInttoData.Typeable.InternalTypeable Typeable1 Typeable2 Typeable3 Typeable4 Typeable5 Typeable6 Typeable7 Data.Typeablegcast2gcast1gcastmkTyCon typeRepKey TypeRepKey showsTypeReptypeOf6DefaulttypeOf5DefaulttypeOf4DefaulttypeOf3DefaulttypeOf2DefaulttypeOf1Default typeOfDefault tyConString typeRepArgs typeRepTyConmkTyCon3mkAppTy funResultTy splitTyConAppmkFunTy tyConName tyConModule tyConPackagetypeOf1typeOf2typeOf3typeOf4typeOf5typeOf6typeOf7cast mkTyConAppTypeRepTyContypeOfZip1Diff1TwoRightTwoLeftZipNreformzipprezipptoZipperzipNleftNrightNholeNreplaceNupNtopNdownNundiff1zip1insert1left1right1move1top1hole1replace1$fEqZipN $fEqZipperBoxfromBox containsMatchcollect_generate_selfcollect_generate