Closed GoogleCodeExporter closed 9 years ago
Also see Randall's version that allows non-Products via a similar interface.
Original comment by inkytonik
on 5 Nov 2009 at 5:28
Original comment by inkytonik
on 8 Nov 2009 at 11:36
Original comment by inkytonik
on 10 Nov 2009 at 5:11
So, this one is really about adding tests for rewriting on non-Products, since
we will always rely on the Product
interface for generic operations.
Original comment by inkytonik
on 17 Nov 2009 at 2:18
Another aspect is raised by Scala 2.8 collections. It shouldn't be too hard to
provide generic traversals for any
Traversable collection type. This seems to be the best way to automatically
get rewriting for data structures that
include collections such as lists and maps. The "map" combinator in Rewriter
could disappear in this case, I think.
Original comment by inkytonik
on 26 Nov 2009 at 10:12
It would also be good to support rewriting of Scala XML data.
Original comment by inkytonik
on 2 Dec 2009 at 8:32
Original comment by inkytonik
on 7 Apr 2010 at 10:13
Some progress: revision 914fcbc926 extends rewriting support to rules that
match on primitive types.
Original comment by inkytonik
on 27 Jul 2010 at 4:03
Some discussion in this StackOverflow thread:
http://stackoverflow.com/questions/3717265/copy-objects-in-scala-but-changing-ch
ildren-for-rewriting
Original comment by inkytonik
on 20 Sep 2010 at 12:45
[deleted comment]
Revision ac703aee04 contains general support for any Traversable (incl Map)
data structures plus a new interface called Rewritable that can be implemented
in order to add operations needed by rewriting to a type. These are in addition
to the basic Product support (which works well for case classes).
We are still to come up with a satisfactory design for rewriting of other
structures, such as Java types that cannot be modified to implement Rewritable.
Deferring this until a later release. Suggestions welcome.
Original comment by inkytonik
on 24 Jan 2011 at 2:15
This has all been released in 1.1.0. Closing, since the extra stuff is very
low priority. WIll create new issue when we think we might get to it, or if
there is some demand.
Original comment by inkytonik
on 18 May 2011 at 9:50
Original issue reported on code.google.com by
inkytonik
on 5 Nov 2009 at 5:26