-
Notifications
You must be signed in to change notification settings - Fork 3
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
Pass children to order function in treeSplice #2
Conversation
flip foldMapM (sortOn (sortKey . extendPars . rootLabel) trees) $ \(Node lbl children) -> do | ||
let sorter x = sortKey (extendPars $ rootLabel x) (subForest x) | ||
flip foldMapM (sortOn sorter trees) $ \(Node lbl children) -> do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let sortKey' = flip sortKey (subForest x)
? Then the existing code would require minimal changes here, and below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But where would the x
come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right. Okay I'll review all your PRs by this weekend.
bors try |
tryBuild succeeded: |
@jfpedroza I wasn't able to push to this branch. Did you open the PR with "Allow repository author to make changes" (something of that ilk) option disabled? |
FYI: c5e6d86 |
Apparently, I did. I must have disabled it without noticing. |
Passes the children of a node to the sorter in
Heist.Extra.Splices.Tree.treeSplice
to be able to put folders first.