Skip to content

Hoogle/Haddock generation for user project #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Mikolaj opened this issue May 27, 2013 · 5 comments
Closed

Hoogle/Haddock generation for user project #70

Mikolaj opened this issue May 27, 2013 · 5 comments

Comments

@Mikolaj
Copy link
Contributor

Mikolaj commented May 27, 2013

This work item is not approved, but I need a space to document my assumptions (e.g., for work time estimates) and receive feedback.

  1. I assume haddock should be generated from a loaded, type-correct project (just as exe building currently is).
  2. I assume generating the data for Hoogle will be toggled with a boolean flag and no other haddock options will be configurable.
@ghost ghost assigned Mikolaj May 27, 2013
@Mikolaj
Copy link
Contributor Author

Mikolaj commented May 27, 2013

pinging @snoyberg

@snoyberg
Copy link
Member

(1) seems like a completely safe assumption. I'm uncertain of what (2) means: is it an optimization so that Hoogle databases aren't always generated? My understanding was that Haddock always generated a Hoogle database.

@Mikolaj
Copy link
Contributor Author

Mikolaj commented May 28, 2013

I've just tested and haddock does not generate Hoogle data by default. You need to specify --hoogle, But it'd simplify things if we could assume Hoogle data should always be generated. I'm assuming that, until corrected.

@snoyberg
Copy link
Member

That's fine with me.

@Mikolaj
Copy link
Contributor Author

Mikolaj commented Jan 10, 2014

BTW, you may want to consider the following proof of concept tool
that lets you get the (perfectly correct wrt program context, see Note)
haddocks of the given identifier (even if there exist many
haddocks for the textual substrate of the identifier, and even with
some module qualifiers prepended), without going through hoogle.
This may be faster and occasionally more accurate than hoogle.
This prototype was tested months ago using edsko's
testing tool protoide and worked OK.

Note: sometimes the latest version of a package can possibly be picked
instead of an older, correct, version; also, we may not be taking advantage
of all the new identifier information we gather now --- the tool was created
(for manual testing of identifier information) many months ago.

-- | Show approximately a haddock link (without haddock root) for an id.
-- This is an illustration and a test of the id info, but under ideal
-- conditions could perhaps serve to link to documentation without
-- going via Hoogle.
haddockLink :: IdProp -> IdScope -> String

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants