Skip to content

Add filterTree to Data.Tree#1226

Open
tchoutri wants to merge 1 commit into
haskell:masterfrom
tchoutri:add-filter-tree
Open

Add filterTree to Data.Tree#1226
tchoutri wants to merge 1 commit into
haskell:masterfrom
tchoutri:add-filter-tree

Conversation

@tchoutri

@tchoutri tchoutri commented Jul 6, 2026

Copy link
Copy Markdown

@meooow25 Hi, I'd like to upstream a filter function we have at work for Trees. Happy to include a property test if you have something that you'd like tested specifically.

Sponsored-By: Scrive AB
@meooow25

Copy link
Copy Markdown
Contributor

Hi, thanks for the PR. However there are multiple possible implementations for a "filterTree". As an example, a different "treefilter" was proposed in #39. Hoogle shows yet another possible implementation used in hedgehog here. So I am not convinced that this one is particular deserves to be included in Data.Tree.

@tchoutri

Copy link
Copy Markdown
Author

@meooow25 yeah of course, you should benchmark the possible implementations, I just had to write one for work and I thought I'd upstream it, since there wasn't one available in Data.Tree. :)

@meooow25

Copy link
Copy Markdown
Contributor

I don't mean that these implementation differ in efficiency (which is also something to consider, of course), but that they have different behaviors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants