ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
738 stars 134 forks source link

Applicative search strategy #269

Open matt-noonan opened 5 years ago

matt-noonan commented 5 years ago

The special handling of (->) means that we can't easily find functions for queries that need to use the a -> functor. See here, for example: https://stackoverflow.com/questions/47779818/is-there-a-standard-function-that-computes-f-x-g-x

A special case like what we do for Maybe-returning query variants might do pretty well.

ndmitchell commented 5 years ago

Maybe, but I honestly wonder if this is more a show-off feature, and not what people really want. I would have thought adding specific instances for a handful of special cases (e.g. adding (<*>) but with the m instantiated to (->)) might capture everything we actually care about.