Skip to content

Commit 27d3557

Browse files
author
sir4ur0n
committed
Improve following Github discussions
* Add stack.yaml to install/ folder * Add Stack and Cabal templates for hie.yaml for install/ folder * Add and cleanup documentation about hie.yaml * Add comment about building for Stack
1 parent 3e10ae3 commit 27d3557

File tree

6 files changed

+40
-15
lines changed

6 files changed

+40
-15
lines changed

Diff for: README.md

+21-9
Original file line numberDiff line numberDiff line change
@@ -497,15 +497,27 @@ args = ["--lsp"]
497497

498498
### Hacking on haskell-language-server
499499

500-
Haskell-language-server can be used on its own project. We have supplied
501-
preset samples of `hie.yaml` files for stack and cabal, simply copy
502-
the appropriate template to `hie.yaml` and it should work.
500+
Haskell-language-server can be used on itself. We provide
501+
preset samples of `hie.yaml` for Cabal and Stack.
503502

504-
- `hie.yaml.cbl` for cabal
505-
- `hie.yaml.stack` for stack
503+
Note: the `./install/` folder is not directly tied to the project so it has dedicated `./install/hie.yaml.[cbl|stack]`
504+
templates.
506505

507-
Two sample `hie.yaml` files are provided, `hie.yaml.stack` for stack
508-
usage, `hie.yaml.cbl` for cabal. Simply copy the relevant one to be
509-
`hie.yaml` and it should work.
506+
#### Using Cabal
510507

511-
The developers tend to hang out at [our IRC channel](https://webchat.freenode.net/?channels=haskell-ide-engine) at `#haskell-ide-engine` on `freenode`.
508+
```shell
509+
$ cp hie.yaml.cbl hie.yaml
510+
$ cp install/hie.yaml.cbl install/hie.yaml
511+
```
512+
513+
#### Using Stack
514+
515+
Note: Stack project must also be built once until [this issue](https://github.com/commercialhaskell/stack/issues/5213) is fixed.
516+
517+
```shell
518+
$ cp hie.yaml.stack hie.yaml
519+
$ cp install/hie.yaml.stack install/hie.yaml
520+
$ stack build --test --no-run-tests
521+
$ cd install
522+
$ stack build
523+
```

Diff for: hie.yaml.cbl

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ cradle:
66
- path: "./test/testdata/"
77
config: { cradle: { none: } }
88

9-
- path: "./install/"
10-
config: { cradle: { none: } }
11-
129
- path: "./"
1310
config:
1411
cradle:

Diff for: hie.yaml.stack

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ cradle:
66
- path: "./test/testdata/"
77
config: { cradle: { none: } }
88

9-
- path: "./install/"
10-
config: { cradle: { none: } }
11-
129
- path: "./"
1310
config:
1411
cradle:

Diff for: install/hie.yaml.cbl

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cradle:
2+
cabal:
3+
component: "lib:hls-install"

Diff for: install/hie.yaml.stack

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cradle:
2+
stack:
3+
component: "hls-install:lib"

Diff for: install/stack.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
resolver: lts-14.27 # Last 8.6.5
2+
3+
packages:
4+
- .
5+
6+
extra-deps:
7+
- cabal-install-parsers-0.3.0.1
8+
- Cabal-3.2.0.0
9+
- binary-instances-1.0.0.1
10+
- lukko-0.1.1.2
11+
12+
nix:
13+
packages: [ icu libcxx zlib ]

0 commit comments

Comments
 (0)