Hi > > too general to allow the Uniplate solution, but it would be easy to > > add universe/transform to SYB and implement them using them much more > > efficiently. > > > > It has been a while, and most of my experience was with Strafunski's > StrategyLib, but I seem to recall using the predefined > schemes more as patterns for defining my own schemes than as > a directly useable library - in spite of the variety of schemes provided, > often none of them it quite the thing you want.
I find Uniplate to be completely the opposite. I always use the predefine schemes, and they are nearly always exactly what I want. Whether this is a difference in the traversals provided by the library, or in the mindset of the user of the library is still up for debate. > In this case, everywhere always traverses String while everywhereBut (mkQ > (const True::String->Bool)) never > touches String. Fortunately, all of the traversal schemes > have very short definitions, and we can define a variant that > allows us to do something useful with Strings, without traversing them. Yuk, much better to have something which just works (TM) without these hacks. Uniplate has these properties (but of course other schemes could gain them) > Ok, it would be interesting to know how much performance > remains lost, once a/b are addressed and only c is left (a factor of 2 > might not be bad for the added flexibility, and is far lower > than the factors reported anecdotically, without details) Yes, but that means someone has to go in and tweak SYB. These things are not trivial. > and it would be > good to know whether there are any other performance > killers in typical SYB usage. I'd guess at no. There are performance overheads (~30%) but no real killers. Thanks Neil _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
