Feature proposal: ghc --full-flag-help ?
claus.reinke at talk21.com
Tue Mar 13 13:21:44 EDT 2007
| > Suppose ghc --full-flag-help simply printed the URL
| > http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html
| > Now you can see it in your web browser by clicking on it.
>Indeed, the installed version would be much better
it would indeed be kind of nice if ghc (perhaps via ghc-pkg??) knew if and where
its documentation was installed.
but i consult the locally installed users' guide quite as often on other topics than flags,
and usually have several ghcs installed, and some ghc installations appear to come
without, or with partial html docs (for whatever reason), and i have at least one
editor-script (*) that needs to figure out where the html docs are for the ghc in
$PATH (that editor-script did indeed start out as a convenient way to get at the
GHC and library docs while editing Haskell code in VIM, and currently tries to
guess the docdir from the libdir, which won't work in general).
so, how about (in analogy to --print-libdir):
or whereever the local docs are rooted, if there are local docs, and
if there are no local docs installed (note the paths to version-specific docs).
currently, adding "/users_guide/flag-reference.html" to the result would lead to
the appropriate section for flags, which could be done by a simple wrapper,
and i'd find --print-docdir more generally useful.
(*) Doc.vim (finding haddocks, auto-completing names, adding imports; for VIM)
More information about the Glasgow-haskell-users