-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distinguish between empty trees and non-existent sub-trees #431
Conversation
Change `S.find_tree` to return an optional value. This allows to not conflate the meaning of `Empty: it is now only "an empty subtree". And we use None to denote non-existent sub-trees.
/cc @talex5 |
Why is |
Because this you can create a tree (starting from an empty tree) without having to tie it to a store. |
(e.g. |
Where is this?
Seems like any other implementation of |
I've pushed a commit to remove I think ideally we would cache the empty value in the |
There were two ways to create an empty subtree: - `Empty and; - `Node <empty-node> This was a bit confusing, so remove the `Empty case. This forces `empty` to become a function, as the hash of the empty node depends on the backend used. Ideally we would cache the empty node in the Repo.t value, but it is a bit hard to do currently.
Ah, because when you save a But couldn't |
The |
Change
S.find_tree
to return an optional value. This allows to not conflatethe meaning of `Empty: it is now only "an empty subtree". And we use None to
denote non-existent sub-trees.