;6n      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m  unsafeCoerce=, but for all compilers. In future this can be obtained from  Unsafe.Coerce.unsafeCoerce!, but thats too recent a change. GHCs foldr/build system, but on all platforms unsafePerformIO), but suitable for inlining. Copied from Data.ByteString.Base. (Perform concatentation of continuations 2Take the type of the method, will crash if called  Convert a * to a list, assumes the value was created  with   Convert a list to a   Transform a + to a list, and back again, in a structure ? preserving way. The output and input lists must be equal in  length.     :The standard Uniplate class, all operations require this.  Must define one of   or  uniplateStr,  uniplateStr is recommended #The underlying method in the class ) uniplateStr (Add (Val 1) (Neg (Val 2))) R = (Two (One (Val 1)) (One (Neg (Val 2)))], \(Two (One a) (One b)) -> Add a b)  uniplateStr (Val 1) R = (Zero , \Zero -> 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. .Compatibility method, for direct users of the   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 = [Val i | 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 = trasform 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 n 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     +If you want to keep an existing type class   composOp ==   composOpM ==  composOpM_ == ! (return ()) (>>) composOpMonoid = ! mempty mappend  composOpMPlus = ! mzero mplus!Probably replace with  , perhaps   ! ! ! ")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]  "#$%&'()*+,- "#$%&'()*+,- "#$%&'()*+,- .6Children are defined as the top-most items of type to  starting at the root. /0.Compatibility method, for direct users of the / function 123456789:( "#$%&'()*+,-./0123456789: ./0123456789: .//0123456789: ;  gmapT == <Use  and o =Use  and p >Use  ?Use  and q @  gmapM == A mkT == rB everywhere == 3C  mkM == idD everywhereM == 4EOnly for use with F FUse  or 1, 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 ;<=>?@ABCDEFsG-The main combinator used to start the chain. 1The following rule can be used for optimisation: # plate Ctor |- x == plate (Ctor x) H&The field to the right is the target. I/The field to the right may contain the target. JThe field to the right does not contain the target. K;The field to the right is a list of the type of the target LGThe field to the right is a list of types which may contain the target M Used for PlayAll, definitions where both types are the same. / "#$%&'()*+,-./0123456789:GHIJKLMGMIJHLKGHIJKLM NCThis class represents going from the container type to the target. +This class should only be constructed with Q, R and S OtP!This function is used to write a   instance from a N one uQ-The main combinator used to start the chain. 1The following rule can be used for optimisation: # plate Ctor |- x == plate (Ctor x) R/the field to the right may contain the target. SThe 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. Vvwxyz{|}~ "#$%&'()*+,-./0123456789:NOPQRSNOPQRSNOOPQRS :An existential box representing a type which supports SYB  operations. ( "#$%&'()*+,-./0123456789: T9The standard Uniplate class, all operations require this U#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 ) V1The 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. WCGet 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 = [Val i | i <- universe x] X1Get the direct children of a node. Usually using W is more appropriate. children = fst . UY<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 ZMonadic variant of Y [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 Y is more appropriate, but [ can give better 4 compositionality. Given two single transformations f and g , you can  construct f n 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] a/Perform a fold-like computation on each value,  technically a paramorphism TUVWXYZ[\]^_`aVTUWXYZ[\]^_`aTUUVWXYZ[\]^_`a b)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. cd"Return the children of a type. If  to == from then it returns the " original element (in contrast to X) efghijklmUsed for defining instances UniplateFoo a => UniplateFoo [a] TUVWXYZ[\]^_`abcdefghijklm bcdefghijklm bcdefghijklm  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ [ \ ] T V W       ! " # $ % & ' / 0 1 2 3 4 5 6 7 8 9 :^_`^ab^cd^ae^cfg g h^ij^ik^il^im^in^io^ip^iq^ir^is^it^iu^iv^iw^ix^iy^iz^i{^i|^i}^i~^i^i^i^i^i^i^i^i^i^i^i^i^i^i^i^i^i^i^i            uniplate-1.2Data.Generics.PlateInternalData.Generics.StrData.Generics.UniplateStrData.Generics.ComposData.Generics.UniplateStrOnData.Generics.BiplateData.Generics.SYBData.Generics.PlateDirectData.Generics.PlateTypeableData.Generics.UniplateData.Generics.UniplateOnData.Generics.PlateData unsafeCastbuilderinlinePerformIO concatContStrTwoOneZerostrTypestrListlistStr strStructureUniplateuniplate UniplateType uniplateListuniversechildren transform transformMrewriterewriteMdescenddescendMcontextsholesparaComposcomposOp composOpM composOpM_composOpMonoid composOpMPlus composOpFold BiplateType universeOn childrenOn transformOn transformOnM rewriteOn rewriteOnM descendOn descendOnMholesOn contextsOnuniplateOnListBiplatebiplate biplateList universeBi childrenBi transformBi transformBiM rewriteBi rewriteBiM descendBi descendBiM contextsBiholesBigmapTgmapQlgmapQrgmapQgmapQigmapMmkT everywheremkM everywhereMmkQ everythingplate|*|+|-||*||+ plateSelfPlateAllplateAll uniplateAllbase Control.MonadmplusGHC.ListfoldlGHC.Basefoldr!!idType plateMore Data.TypeableTypeable Typeable1 Typeable2 Typeable3 Typeable4 Typeable5 Typeable6 Typeable7gcast2gcast1gcasttypeOf6DefaulttypeOf5DefaulttypeOf4DefaulttypeOf3DefaulttypeOf2DefaulttypeOf1Default typeOfDefault showsTypeRep tyConString typeRepArgs typeRepTyConmkAppTy funResultTy splitTyConAppmkFunTy typeRepKeytypeOf1typeOf2typeOf3typeOf4typeOf5typeOf6typeOf7TypeRepTyContypeOfmkTyCon mkTyConAppcastCCCfromCAnswerMissFollowHitfromHitBoxfromBoxDataBox containsMatch containsListcontainscollect_generate_selfcollect_generate