Closed dgrnbrg closed 12 years ago
ASTNodes perhaps shouldn't implement IPersistentMap for use w/ merge, but instead they should have a map of details. The delegation would then be done to functions configured in the metadata (to simplify equality testing)
Changes have been made to instances and astnodes to support destructuring, but the map-zipper is now broken. Based on discussions with Scott and Raeez, I think the map-zipper should be replaced with a normal walking function.
Map zipper has been removed, but now there's an issue where values pulled from a sim bundle aren't pipinsts
I think that the final blocking problem is that cast uses instance during the sim-fn phase, but really, the cast AST node needs to be able to pick up the nested elements and recursively evaluate them. This will probably require rethinking the internal API of cast, instance, the way that metadata propagates through types. Also, there is a a place where I make pipinst? of bundles check that every value is a pipinst. This code way actually be uneccessary (testing needed).
cast is based on promote, which uses constrain on the map argument. Probably should have promote not use instance/constrain for maps, and then the simfn metadata flows can get simplified again.
To do this, all keyword accesses to ASTNodes must be converted to protocol accesses. Then, delegation will be very similar as in instances.