on master help sign in
Document the solution to #194 (#195)
commit133991b7111d5da6d3ae441a68b604c4b2295755 authorMoritz Kiefer <moritz.kiefer@purelyfunctional.org> dateFri 15 Nov 2019, 14:10 (7 years ago) parent3bec234
1 file changed+28
docs/Setup.md+28
docs/Setup.md+28
@@ -26,6 +26,34 @@ ghcide version: 0.0.3 (GHC: 8.6.5)
2626
2727You 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
3159Does `ghcide` alone work on the console? Did you first enter a Nix shell? Or run `stack exec ghcide`? If so, there are two options: