Skip to content
Snippets Groups Projects
Commit 218c5dbf authored by Matthew Pickering's avatar Matthew Pickering Committed by Marge Bot
Browse files

Add ghcide configuration files

This commit adds three new files

1. A hie.yaml file to the project root which specifies to IDEs how to
set up the correct environment for loading GHC. This currently
specifies to call the `./hadrian/hie-bios` script.
2. A `hie.yaml` file for the hadrian subcomponent, which uses the
`cabal` cradle type.
2. The `./hadrian/hie-bios` script which supplies the correct arguments
for an IDE to start a session.

With these two files it is possible to run

```
ghcide compiler/
```

and successfully load all the modules for use in the IDE.

or

```
ghcide --cwd hadrian/ src/
```

to test loading all of Hadrian's modules.

Closes #17194
parent ed520678
No related branches found
No related tags found
No related merge requests found
#! /usr/bin/env bash
# When run, this program will output a list of arguments which are necessary to
# load the GHC library component into GHCi. The program is used by `ghcide` in
# order to automatically set up the correct GHC API session for a project.
echo $(TERM=dumb CABFLAGS=-v0 $PWD/hadrian/build.cabal.sh tool-args -q --build-root=.hie-bios --flavour=ghc-in-ghci) -ighc ghc/Main.hs
# This is a IDE configuration file which tells IDEs such as `ghcide` how
# to set up a GHC API session for this project.
#
# The format is documented here - https://github.com/mpickering/hie-bios
cradle: {cabal: {component: "exe:hadrian"}}
# This is a IDE configuration file which tells IDEs such as `ghcide` how
# to set up a GHC API session for this project.
#
# The format is documented here - https://github.com/mpickering/hie-bios
cradle: {bios: {program: "./hadrian/hie-bios"}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment