Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Contexts that can be serialized + deserialized while retaining and ex…
…plicitly representing sharing (#2202) Towards #2107. Instead of simply storing a `Map`, contexts now also store a structured tree representing how it was built, and cache homomorphic hash values so contexts can be compared + stored by hash. This allows us to serialize contexts into a compact form that never duplicates any context, then deserialize them in a way that restores all the sharing. The big thing that is left is to make `FromJSONE` instances for `Value` and `Env` (and anything which contains them). I was working on these but got bogged down, so decided to not let the perfect be the enemy of the good. You can see some commented-out code towards a `FromJSONE Value` instance. But we don't use any such instances yet, so I think this can be merged as is, and the rest worked out later.
- Loading branch information