ndmitchell / hoogle

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

Turn todo3.txt into a test suite #265

Closed ndmitchell closed 5 years ago

matt-noonan commented 5 years ago

What is the best way to run tests like "ensure the first hit for (a -> b) -> Maybe a -> Maybe b is fmap? Can we assume that the db from hoogle generate is available during tests?

ndmitchell commented 5 years ago

See https://github.com/ndmitchell/hoogle/blob/master/src/Action/Search.hs#L152-L153 - yes - you can assume the database is available.

Probably add a new helper like ===~ for in the top-5, or an actual function top 5 to add new types of search.