Skip to content

Commit 133991b

Browse files
authored
Document the solution to #194 (#195)
1 parent 3bec234 commit 133991b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Diff for: docs/Setup.md

+28
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,34 @@ ghcide version: 0.0.3 (GHC: 8.6.5)
2626

2727
You can see the version of GHC being used by this project in the second-last line of the output with `ghc-8.6.4/`, or in in mismatch interfaces of wanted `8065` (aka 8.6.5), got `8064` (aka 8.6.4). The solution is to use the same GHC version in both places.
2828

29+
## “failed to load interface for ‘…’ There are files missing”
30+
31+
If you see a problem such as:
32+
33+
```console
34+
File: ./src/File/FileStream.hs
35+
Range: 1:0-100001:0
36+
Source: typecheck
37+
Severity: DsError
38+
Message:
39+
Program error: Failed to load interface for ‘Data.DList’
40+
Files that failed:
41+
There are files missing in the ‘dlist-0.8.0.7’ package,
42+
* ./src/File/FileStream.hs
43+
try running 'ghc-pkg check'.
44+
Use -v to see a list of the files searched for.
45+
```
46+
47+
It might be caused by `ghcide` picking up the wrong cradle. In
48+
particular, this has been observed when running in a `nix-shell` where
49+
`ghcide` picked up the default cradle. Try setting the cradle
50+
explicitly, e.g., to use the cabal cradle create a `hie.yaml` file
51+
with the following content:
52+
53+
```
54+
cradle: {cabal: {component: "mylibrary"}}
55+
```
56+
2957
## Works in `ghcide` but not my editor
3058

3159
Does `ghcide` alone work on the console? Did you first enter a Nix shell? Or run `stack exec ghcide`? If so, there are two options:

0 commit comments

Comments
 (0)