Maybe I am missing something, but is there a way to search inside some package on hackage?
Let's say I know that Snap framework has a function called render
. How do I find it starting on it's hackage page:
http://hackage.haskell.org/package/snap-0.9.0.1
You can use Hoogle for this (as for so many other things) by using the +package
search operator.
By default, Hoogle will search inside a standard set of packages by name or by type:
traverse
will find:
traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
(a -> b -> c) -> f a -> f b -> f c
will find:
liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
Now, that's fine and dandy, but what about other packages? If you search for render
, you find Render :: RenderMode
from OpenGL, render :: Doc -> String
from pretty, and some other things; the snap package isn't searched by default.
However, if you add +packagename
or +Module.Name
to your search, Hoogle will only search inside the specified packages (and -packagename
and -Module.Name
remove packages/modules from the search). Thus, searching for +snap render
finds only the following three things:
render :: HasHeist b => ByteString -> Handler b v ()
renderAs :: HasHeist b => ByteString -> ByteString -> Handler b v ()
renderWithSplices :: HasHeist b => ByteString -> [(Text, SnapletSplice b v)] -> Handler b v ()
For more information on using Hoogle, you can check its manual on the Haskell wiki.
Click on the link to some module in the package. Then in the top right, there is an index link. Click on that, and then on the link to the letter with which the desired function begins.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With