From 55482179ed8446f61f4ba518bdef059a12a7cde9 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Wed, 10 Nov 2021 21:20:29 +0200 Subject: [PATCH] docs: contributing: upd "Using HLS on HLS code" section algorythm --- docs/contributing/contributing.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/contributing/contributing.md b/docs/contributing/contributing.md index 937a4ba414..8dd8f2c354 100644 --- a/docs/contributing/contributing.md +++ b/docs/contributing/contributing.md @@ -113,17 +113,33 @@ $ cabal run haskell-language-server:func-test -- -p "hlint enables" ## Using HLS on HLS code -[HLS project configuration guidelines](../configuration.md#configuring-your-project-build) also apply to the HLS project itself. +Project source code should load without `hie.yaml` setup. + +In other cases: + +1. Check if `hie.yaml` (& `hie.yml`) files left from previous configurations. + +2. If the main project needs special configuration, note that other internal subprojects probably also would need configuration. + +To create an explicit configuration for all projects - use [implicit-hie](https://github.com/Avi-D-coder/implicit-hie) generator directly: + +```shell +gen-hie > hie.yaml # into the main HLS directory +``` + +that configuration should help. + +3. Inspect & tune configuration explicitly. + +[Configuring project build](../configuration.md#configuring-your-project-build) applies to HLS project source code loading just as to any other. + +Note: HLS may implicitly detect codebase as a Stack project (see [hie-bios implicit configuration documentation](https://github.com/haskell/hie-bios/blob/master/README.md#implicit-configuration)). To use Cabal, try creating an `hie.yaml` file: -Note: HLS implicitly detects HLS codebase as a Stack project (see [hie-bios implicit configuration documentation](https://github.com/haskell/hie-bios/blob/master/README.md#implicit-configuration)). -If you want HLS to use Cabal, you need to create an `hie.yaml` file: ```yaml cradle: cabal: ``` -Also note that the `install/` subdirectory is a different project, so if you want to work on this part of the code, you may also have to create an `install/hie.yaml` file. - ### Manually testing your hacked HLS If you want to test HLS while hacking on it, follow the steps below.