Open jfeltz opened 10 years ago
I notice you are calling dump
on hoogle.hoo
then searching with haddock.hoo
. Is that intentional?
Yes, I was trying to diagnose my problem, and I assumed it was a read only op.
What did you assume was read only? All those commands are indeed read only, but they are operating on different databases, so finding something in the dump of one database, then looking for it in another, doesn't shed much light.
Oh ya, I see what you mean, sorry, late night I guess. Let me try this again: The first output is from:
hoogle dump .hoogle/haddock.hoo
The rest still holds. Also, the function haddock appears in the dump as well.
Can you send me the .hoo
file? Either attach it here (not sure if that is possible) or email to ndmitchell @
gmail.com.
Emailed, also just for some probably unrelated context, I'm trying to pipe my cabal config through a script that creates a hoogle db specific to cabal project dependencies.
So -d
takes a directory in which to search, not a database. You can find what you want with:
C:\Neil\temp>hoogle +haddock flag_ignoreallexports
Documentation.Haddock Flag_IgnoreAllExports :: Flag
C:\Neil\temp>hoogle +haddock "haddock :: [String] -> IO ()"
Documentation.Haddock haddock :: [String] -> IO ()
In your case, you might want to pass --d=~/.hoogle
to say look for haddock.hoo
(which you specified with +haddock
) in the ~/.hoogle
directory.
Thanks. Is there a comprehensive, accurate reference/guide to flags anywhere? This is the closest thing I've found: https://github.com/ndmitchell/hoogle/blob/974e1ea43234b3fab9edbc1346714052014abe8c/misc/hoogle.1
Okay, Sorry, I'm still not sure if --d is working:
jpf@dev3:~$ hoogle --d=~/.hoogle +haddock flag
Could not find some databases: haddock
Searching in:
.
~/.hoogle
/home/jpf/.cabal/share/x86_64-linux-ghc-7.8.3/hoogle-4.2.34/databases
Either the package does not exist or has not been generated
Generate more databases with: hoogle data all
Found 42 databases, including: array base bytestring cgi containers
But it does work when ran within .hoogle directory, with and without --d.
Also works with:
jpf@dev3:~$ hoogle --d=/home/jpf/.hoogle +haddock flag
When ran outside of .hoogle. It seems that --d doesn't like ~/ style paths.
I wouldn't expect Hoogle to deal with ~/.
, but I would expect your shell to translate ~
to your home directory before passing it to Hoogle. If you do echo ~
, echo --d=~/.hoogle
and echo ~/.hoogle
does it expand the ~
.
jpf@dev3:~/.hoogle$ echo --d=~/ --d=~/
jpf@dev3:~/.hoogle$ echo ~ /home/jpf
jpf@dev3:~/.hoogle$ echo ~/.hoogle /home/jpf/.hoogle
jpf@dev3:~/.hoogle$ bash --version GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
Typing --d ~/.hoogle
might be a way around that then.
Looking back, I don't know what I was thinking - those flags are semantics are insane - sorry! I've made the new version take a single flag for the name of the database, and it doesn't monkey around with the name, its just a file.
Still unclear how to use a custom directory - -d
and --d
both fail to work with a moved directory.
I'd recommend using Hoogle 5, which operates entirely differently - Hoogle 4 is now unsupported.
This is on Hoogle 5.0.17.13
By the fact the issue is still open, thought it was still relevant to Hoogle 5. Can't find relevant docs though.
On 24 January 2020 12:45:16 GMT+02:00, Neil Mitchell notifications@github.com wrote:
I'd recommend using Hoogle 5, which operates entirely differently - Hoogle 4 is now unsupported.
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ndmitchell/hoogle/issues/82#issuecomment-578079870
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Puzzled by hoogle:
Hoogle v4.2.34