where to go for HLS details?
Zubin Duggal
zubin at well-typed.com
Tue Oct 12 17:07:12 UTC 2021
In general #haskell-language-server on libera is a good place to
ask these questions.
> - When a project is compiled against a Stage 1 `base` library (as
> opposed to the one shipped with the bootstrap compiler), I am not
> always getting the documentation I expect.
>
Are you getting any documentation at all, or none? If your GHC is built
with hadrian, there is currently a bug (#20427) which means that the
location of the haddock interfaces and html files is not correct in
the package configuration. It will be fixed by !6295 (in particular https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6295/diffs?commit_id=73799ad32b6009ffc50049e80b1276a306818ad3)
Also how are you setting your project up to use the stage 1 base library?
Do you have a specially configured .hie-bios file?
> - I cannot seem to get the `hiedb` command to index any files.
Ah, I see nr (I'm assuming you) asked a similar question on
the IRC channel. Unfortunately I did not wake up in time to be able to
answer before you left.
The `hiedb` subcommand is more of a low level interface to access the guts
of the database, and as such directly passes on the remaing arguments
to `hiedb`, without co-operating with `haskell-language-server` very much
beyond figuring out the location of the database.
As such, it has no idea where the build products of files are located
and can only index already generated .hie files.
So to index using that command, you would have to point it at a directory
containing `.hie` files. `haskell-language-server` usually puts its hie
files under a project specific subdirectory of $XDG_CACHE_DIR/ghcide.
For example, this works when I'm using HLS on ghc:
haskell-language-server hiedb index ~/.cache/ghc-$HASH/
then to verify you can use
haskell-language-server hiedb ls ~/.cache/ghc-$HASH/
> - I'd like to set up the HLS to get to documentation via an HTTP-ish
> URL rather than the file:// URL that it is currently using, so
> that `doc-index.json` can be loaded successfully.
>
I don't think this is currently possible without modifications to HLS.
HLS uses the `haddock-html:` field of the package configuration to locate
rendered haddock pages.
Feel free to ask in case you have any other questions. I don't really
know about the HLint one.
Cheers,
Zubin.
More information about the ghc-devs
mailing list