Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

bug in findFromRoot #4

Open
dwhitney opened this issue Jan 16, 2018 · 2 comments
Open

bug in findFromRoot #4

dwhitney opened this issue Jan 16, 2018 · 2 comments

Comments

@dwhitney
Copy link

dwhitney commented Jan 16, 2018

Hi I've been using your library a bit and I like it! In using it I think I've found a bug. If you run findFromRoot for 7 on the sampleTree in your tests (https://github.com/dmbfm/purescript-tree/blob/master/test/Main.purs#L27) the value won't be found. I spent some time trying to fix the bug today, and I found a tentative solution, but realized afterward that fromTree does not work the way I expected it to, so while my solution found the value, the resulting Loc was broken. I thought it might be easier for you to fix since you understand the code better than I do. Also I'm not sure findUp and findDown work correctly. Neither will find 7 when starting from the top or bottom of the tree.

TIA

@dmbfm
Copy link
Owner

dmbfm commented Jan 16, 2018

Thanks! Haven't touched this in a while but I'll try to look into it the next few days.

@dwhitney
Copy link
Author

well I needed it fixed, so I went ahead and fixed it! https://github.com/dmbfm/purescript-tree/pulls

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants