Questions tagged [hoogle]

Hoogle is a Haskell API search engine.

Hoogle is a Haskell API search engine, which allows you to search many standard Haskell libraries by either function name, or by approximate type signature.

Taken from http://www.haskell.org/hoogle/

36 questions
15
votes
3 answers

Using hoogle in a haskell development environment on nix

I'm trying to use hoogle in a Haskell development environment exactly like the one described by O'Charles' wiki: I have modified shell.nix like below in order to use hoogleLocal, but it doesn't seem to install the hoogle binary for me. let pkgs =…
illabout
  • 3,517
  • 1
  • 18
  • 39
9
votes
1 answer

Hayoo/Hoogle not matching monomorphic/less polymorphic signatures with polymorphic ones

I'm trying to understand if there's a fundamental reason for why Hoogle and Hayoo aren't matching, for instance (b -> c) -> (b' -> c') -> (b, b') -> (c, c') to a b c -> a b' c' -> a (b, b') (c, c') which happens to be the type of…
Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111
9
votes
2 answers

How to search for typeclass instances on Hoogle?

Is there a way to search for instances of a typeclass on Hoogle (or Stackage)? For instance, I want to know which package defines an instance of Lift for Text. I was able to find it in the package th-lift-instances, but it took about 10 minutes of…
illabout
  • 3,517
  • 1
  • 18
  • 39
8
votes
1 answer

Is there a way to use flags when searching with hoogle from ghci?

How can I use the hoogle command line flags when using hoogle inside ghci? This obviously doesn't work: ghci> :hoogle --count=5 Char -> Int Could not read as type Int, "5 Char -> Int"
sjakobi
  • 3,546
  • 1
  • 25
  • 43
7
votes
1 answer

Manage hoogle index using stack tool

Context: Before stack I stopped using hoogle locally because my index would somehow lose sync with installed packages. If I recall correctly, I had issues with different results in ghci, command line and cabal sandboxes. Can I leverage stack…
sevo
  • 4,559
  • 1
  • 15
  • 31
6
votes
1 answer

Running Hoogle Locally

I want to run hoogle on a project of mine. I successfully generated the hoogle database (a file with .hoo extension) from my project. But when I run the server locally, hoogle cannot find any of the functions or types that are defined in my…
Oxy
  • 323
  • 2
  • 9
6
votes
2 answers

foldlWithKey in monad

I'm looking for a function that like foldlWithKey, but encapsulated in a monad. I would expect it to have type Monad m => (a -> k -> b -> m a) -> a -> Map k b -> m a but Hoogle isn't giving me anything with that type.
6
votes
2 answers

Accessing documentation for a function from Hoogle command line

When searching for a function on the Hoogle website, one sees the documentation associated with it, e.g.: mod :: a -> a -> a infixl 7 integer modulus, satisfying (x `div` y)*y + (x `mod` y) == x Hoogle also exists as a command…
nicolas
  • 9,549
  • 3
  • 39
  • 83
6
votes
1 answer

Haskell hoogle installed through cabal, but hoogle command not found

The hoogle (hoogle-4.2.36) installation process looks successful, except that when typing "hoogle" at the command line, it complains "hoogle: command not found". Tried this on two machines (both running MAC OS X Yosemite), they failed exactly the…
user962815
  • 155
  • 1
  • 5
6
votes
3 answers

how to find `toStrict :: Text -> Text` using hayoo / hoogle

I was trying to find the toStrict function of type Data.Text.Lazy.Text -> Data.Text.Text, but I didn't know a) what it was called, and b) exactly what the Lazy module name was. Searching Hayoo for Text -> Text brings up lots of results. Is there a…
ErikR
  • 51,541
  • 9
  • 73
  • 124
5
votes
1 answer

Either a b. Different Hoogle results after two years?

I am following a video that was recorded about two years ago. The speaker enters Either a b -> IO b in the public Hoogle search input and the result contains (among others): either :: (a -> c) -> (b -> c) -> Either a b -> c If I try it today, this…
Marco Faustinelli
  • 3,734
  • 5
  • 30
  • 49
5
votes
2 answers

Why some functions are not visible in hoogle?

Why some functions are not visible in Hoogle? Example: ppTopElement ppTopElement :: Element -> String -- Defined in `Text.XML.Light.Output' Is it a bug?
Rumca
  • 1,809
  • 12
  • 17
4
votes
1 answer

Can I “factorize” a type signature?

Suppose I wanted a function of type [[a]] -> [[b]] -> [[(a, b)]]. I'm sure I could figure something out, but chances are, it wouldn't be as clean as, for example, zipWith zip, which also has that type. Entering this type signature into Hoogle gives…
MikaelF
  • 3,518
  • 4
  • 20
  • 33
4
votes
1 answer

cabal install hoogle error - BuilderResponse missing

Warning: new Haskell user here I'm trying to install the CLI version of Hoogle to follow along with a tutorial. I'm seeing the following on Haskell Platform 2013.2.0.0 for Mac OS X, 64 bit. Other info: ~/Library/Haskell/bin is in my path. alex and…
ddp
  • 43
  • 3
3
votes
2 answers

How can I search all packages with hoogle via command line?

I've installed hoogle locally and have run hoogle generate. If I run hoogle maybeToEither I get: Data.Either.Utils maybeToEither :: MonadError e m => e -> Maybe a -> m a Either maybeToEither :: Monoid b => (a -> b) -> Maybe a ->…
Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
1
2 3