-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
tree-edge: won't take #f as a tree-layout #49
Comments
If I am understanding things correctly, The reason I say that is that there is no edge to a node that isn't drawn, and that's what
|
Ah! OK, that makes sense. At the time I wrote that, I was forgetting that the |
Wonderful, thank you! I also think we need to chagne the contract from (the internal) |
(using the external |
OK, commit c088bb0 has those changes. |
And 5c4726b has the internal fn on the actual (not docs) contract. |
In the
pict/tree-layout
docs, thetree-edge
function is specified as taking atree-layout?
, which in turn is defined to be#f
or the output of thetree-layout
function. However, thetree-edge
contract given inpict/tree-layout.rkt
is not sufficiently permissive to allow#f
as an input:The practical consequence is that this appears to prevent the creation of a binary-tree-layout with one or more individually customized edges.
The immediate cause is that the
tree-layout?
given as first input in the contract is the struct type predicate fromprivate/layout.rkt
, and not the more permissive_tree-layout?
function available to client code. Making the input be_tree-layout?
does fix the immediate problem and allowtree-edge
to take#f
; however,naive-layered
andbinary-tidier
fail to render trees created that way:The
hv-alternating
function does correctly render the resulting trees.The text was updated successfully, but these errors were encountered: