Code Monkey home page Code Monkey logo

Comments (18)

ndmitchell avatar ndmitchell commented on May 18, 2024

I notice you are calling dump on hoogle.hoo then searching with haddock.hoo. Is that intentional?

from hoogle.

jfeltz avatar jfeltz commented on May 18, 2024

Yes, I was trying to diagnose my problem, and I assumed it was a read only op.

from hoogle.

ndmitchell avatar ndmitchell commented on May 18, 2024

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.

from hoogle.

jfeltz avatar jfeltz commented on May 18, 2024

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.

from hoogle.

ndmitchell avatar ndmitchell commented on May 18, 2024

Can you send me the .hoo file? Either attach it here (not sure if that is possible) or email to ndmitchell @ gmail.com.

from hoogle.

jfeltz avatar jfeltz commented on May 18, 2024

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.

from hoogle.

ndmitchell avatar ndmitchell commented on May 18, 2024

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.

from hoogle.

jfeltz avatar jfeltz commented on May 18, 2024

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

from hoogle.

jfeltz avatar jfeltz commented on May 18, 2024

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.

from hoogle.

jfeltz avatar jfeltz commented on May 18, 2024

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.

from hoogle.

ndmitchell avatar ndmitchell commented on May 18, 2024

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 ~.

from hoogle.

jfeltz avatar jfeltz commented on May 18, 2024

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)

from hoogle.

ndmitchell avatar ndmitchell commented on May 18, 2024

Typing --d ~/.hoogle might be a way around that then.

from hoogle.

ndmitchell avatar ndmitchell commented on May 18, 2024

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.

from hoogle.

hseg avatar hseg commented on May 18, 2024

Still unclear how to use a custom directory - -d and --d both fail to work with a moved directory.

from hoogle.

ndmitchell avatar ndmitchell commented on May 18, 2024

I'd recommend using Hoogle 5, which operates entirely differently - Hoogle 4 is now unsupported.

from hoogle.

hseg avatar hseg commented on May 18, 2024

This is on Hoogle 5.0.17.13

from hoogle.

hseg avatar hseg commented on May 18, 2024

from hoogle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.