-
-
Notifications
You must be signed in to change notification settings - Fork 377
Expand file tree
/
Copy pathhie-stack.yaml
More file actions
72 lines (50 loc) · 2.32 KB
/
hie-stack.yaml
File metadata and controls
72 lines (50 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Symlink this as hie.yaml to force HLS to use the stack yaml/ghc mentioned below.
# This works better than relying on HLS's implicit cradle, which doesn't work well
# with multi-package projects (opening a file from a second package breaks HLS).
# XXX Circa HLS 1.9.1.0 and GHC 9.4, this does not work.
#
# Does it force HLS to use stack in all cases ? Even if cabal's dist* directories are present ?
# More on cradle selection:
# > the heuristic is `cabal.project + dist-newstyle > stack.yaml + .stack-work > cabal.project > stack.yaml > .cabal file`
# > would it ever switch to cabal because it's having trouble building with stack ?
# > no, the heuristic only accounts for static things, such as which binaries are installed, the existence of these project files and pre-existing compilation artefacts.
#
# Here's a more recent one: https://github.com/keithfancher/tvmv/blob/master/hie.yaml
cradle:
stack:
# You can specify one of the other stack*.yaml files/GHC versions here if you prefer.
stackYaml: "stack.yaml"
# Declare which component the various files/directories belong to.
# When there is a hie.yaml, this must be done explicitly
# (a current limitation of HLS with multi-package stack projects).
# The components: line is necessary when stackYaml: is defined above, apparently.
components:
- path: "hledger-lib/"
component: "hledger-lib:lib"
- path: "hledger-lib/test/doctests.hs"
component: "hledger-lib:test:doctest"
- path: "hledger-lib/test/unittest.hs"
component: "hledger-lib:test:unittest"
- path: "hledger/"
component: "hledger:lib"
- path: "hledger/app/"
component: "hledger:exe:hledger"
- path: "hledger/test/unittest.hs"
component: "hledger:test:unittest"
- path: "hledger/bench/"
component: "hledger:bench:bench"
- path: "hledger-ui/"
component: "hledger-ui:exe:hledger-ui"
- path: "hledger-web/"
component: "hledger-web:lib"
- path: "hledger-web/app/"
component: "hledger-web:exe:hledger-web"
- path: "hledger-web/test/"
component: "hledger-web:test:test"
- path: "bin/"
component: "hledger:lib"
- path: "tools/"
component: "hledger:lib"
# silences HLS error for Shake.hs, but I think also ignores actual errors
- path: "Shake.hs"
component: "hledger:lib"