Closed wz1000 closed 7 years ago
Thanks for the patch. Could you please craft a few examples to add to the test suite - I imagine you could tack several examples at the end of https://github.com/ndmitchell/hoogle/blob/master/src/Action/Search.hs#L146. That way I won't regress the behaviour anytime in the future.
@ndmitchell OK, I'll do that in bit. There is some fiddly stuff going on though, so I would appreciate if you would take a look at the code.
@wz1000 to be honest, the devil is in the details, and my head isn't familiar with this code to be sure either way - it certainly looks plausible. The tests are my measure of sanity - if you think the behaviour should change, and include the test suite changes, then it's easy to confirm what you are thinking makes sense.
@ndmitchell I added a couple of tests, but there is a deeper question about the behaviour of filters(especially in combination). Do you want them to behave like a logical 'and' or a logical 'or'? Currently they behave like an 'or'. This is slightly unintuitive.
I would personally expect
hoogle map package:vector module:Data.Vector
to behave like a logical "and", and
hoogle map module:Data.List module:Data.Vector
to behave like a logical 'or'.
or should the choice of behaviour somehow be exposed to the user, so they can choose themselves?
btw, the AppVeyor build failure doesn't seem to be my fault.
Thanks! All merged, and I fixed up the appveyor failures that were happening before you committed.
Sorry for the delay in merging - holidays, illness, more illness - but now done! I'll make a release once the Travis/Appveyor all come back green.
Released as hoogle-5.0.13.
Issue described in #215
Also fixes a bug where package names with upper case letters(QuickCheck, HaRe etc.) wouldn't be found in the db.