on master help sign in
Rename haskell-ide-core to hie-core (#1809)
036e3d0Neil Mitchell
.ghcideleted−16
@@ -1,16 +0,0 @@
1−:set -ignore-package=ghc-lib -ignore-package=ghc-parser -package=ghc
2−:set -fwarn-unused-binds -fwarn-unused-imports -fwarn-orphans
3−:set -isrc -i../../libs-haskell/prettyprinter-syntax/src
4−:set -DGHC_STABLE
5−:set -XLambdaCase
6−:set -XBangPatterns
7−:set -XDeriveGeneric
8−:set -XRecordWildCards
9−:set -XScopedTypeVariables
10−:set -XNamedFieldPuns
11−:set -XTupleSections
12−:set -XTypeApplications
13−:set -XViewPatterns
14−:set -XGeneralizedNewtypeDeriving
15−:set -XStandaloneDeriving
16−:load test/Demo.hs
BUILD.bazel+4−4
@@ -40,7 +40,7 @@ depends = [
40]
40]
41
41
42da_haskell_library(
42da_haskell_library(
43− name = "haskell-ide-core",
43+ name = "hie-core",
44 srcs = glob(["src/**/*.hs"]),
44 srcs = glob(["src/**/*.hs"]),
45 hazel_deps = depends + [
45 hazel_deps = depends + [
46 "ghc-lib",
46 "ghc-lib",
@@ -54,7 +54,7 @@ da_haskell_library(
54)
54)
55
55
56da_haskell_library(
56da_haskell_library(
57− name = "haskell-ide-core-public",
57+ name = "hie-core-public",
58 srcs = glob(["src/**/*.hs"]),
58 srcs = glob(["src/**/*.hs"]),
59 compiler_flags = ["-DGHC_STABLE"],
59 compiler_flags = ["-DGHC_STABLE"],
60 hazel_deps = depends + [
60 hazel_deps = depends + [
@@ -76,7 +76,7 @@ da_haskell_library(
76)
76)
77
77
78da_haskell_binary(
78da_haskell_binary(
79− name = "haskell-ide-core-demo",
79+ name = "hie-core-demo",
80 srcs = glob(["test/**/*.hs"]),
80 srcs = glob(["test/**/*.hs"]),
81 hazel_deps = [
81 hazel_deps = [
82 "base",
82 "base",
@@ -95,7 +95,7 @@ da_haskell_binary(
95 src_strip_prefix = "test",
95 src_strip_prefix = "test",
96 visibility = ["//visibility:public"],
96 visibility = ["//visibility:public"],
97 deps = [
97 deps = [
98− "haskell-ide-core-public",
98+ "hie-core-public",
99 "//libs-haskell/prettyprinter-syntax",
99 "//libs-haskell/prettyprinter-syntax",
100 ],
100 ],
101) if not is_windows else None # Disable on Windows until ghc-paths is fixed upstream
101) if not is_windows else None # Disable on Windows until ghc-paths is fixed upstream
README.md+9−18
@@ -2,8 +2,8 @@
2
2
3Our vision is that you should build an IDE by combining:
3Our vision is that you should build an IDE by combining:
4
4
5−* [hie-bios](https://github.com/mpickering/haskell-ide-engine/tree/hie-bios/hie-bios) for determining where your files are, what the dependencies, what extensions are enabled etc.
5+* [hie-bios](https://github.com/mpickering/hie-bios) for determining where your files are, what the dependencies, what extensions are enabled etc.
6−* `haskell-ide-core` - this library - for defining how to type check, when to type check, and producing messages.
6+* `hie-core` - this library - for defining how to type check, when to type check, and producing messages.
7* `haskell-lsp` for sending those messages to an LSP server.
7* `haskell-lsp` for sending those messages to an LSP server.
8* A VS Code extension, e.g. `extension` in this directory.
8* A VS Code extension, e.g. `extension` in this directory.
9
9
@@ -14,26 +14,17 @@ There are more details [in this blog post](https://4ta.uk/p/shaking-up-the-ide).
14### Installing the binary
14### Installing the binary
15
15
161. `git clone https://github.com/digital-asset/daml.git`
161. `git clone https://github.com/digital-asset/daml.git`
17−2. `cd daml/compiler/haskell-ide-core`
17+2. `cd daml/compiler/hie-core`
183. `stack build`
183. `stack build`
19
19
20−### Using the VSCode extension
20+### Installing the VSCode extension
21
21
22−1. `cd extension`
23−2. `npm install`
24−3. `code .`
25−4. Press F5 to start the extension.
26−5. In the spawned extension, open the folder `haskell-ide-core`.
27−6. In the preferences, set the Haskell IDE Core executable preference to `stack` and the arguments to `exec -- ide-demo --lsp .ghci`
28−7. Run the Reload Window command in VS Code.
29−
30−### Installing the VSCode extension permanently
31−
32−1. `cd compiler/haskell-ide-core/extension`
22+1. `cd compiler/hie-core/extension`
332. `vsce package`
232. `vsce package`
34−3. `code --install-extension haskell-ide-core-0.0.1.vsix`
24+3. `code --install-extension hie-core-0.0.1.vsix`
25+
26+### Installing in Emacs
35
27
36−### Installing in emacs
371. Install lsp and haskell-lsp
281. Install lsp and haskell-lsp
382. Add this elisp to your .emacs.el
292. Add this elisp to your .emacs.el
39```elisp
30```elisp
@@ -41,6 +32,6 @@ There are more details [in this blog post](https://4ta.uk/p/shaking-up-the-ide).
41(require 'lsp-haskell)
32(require 'lsp-haskell)
42(require 'yasnippet)
33(require 'yasnippet)
43(add-hook 'haskell-mode-hook #'lsp)
34(add-hook 'haskell-mode-hook #'lsp)
44−(setq lsp-haskell-process-path-hie "haskell-ide-core")
35+(setq lsp-haskell-process-path-hie "hie-core")
45(setq lsp-haskell-process-args-hie '())
36(setq lsp-haskell-process-args-hie '())
46```
37```
extension/.vscode/extensions.jsondeleted−7
@@ -1,7 +0,0 @@
1−{
2− // See http://go.microsoft.com/fwlink/?LinkId=827846
3− // for the documentation about the extensions.json format
4− "recommendations": [
5− "ms-vscode.vscode-typescript-tslint-plugin"
6− ]
7−}
extension/.vscode/launch.jsondeleted−35
@@ -1,35 +0,0 @@
1−// A launch configuration that compiles the extension and then opens it inside a new window
2−// Use IntelliSense to learn about possible attributes.
3−// Hover to view descriptions of existing attributes.
4−// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5−{
6− "version": "0.2.0",
7− "configurations": [{
8− "name": "Run Extension",
9− "type": "extensionHost",
10− "request": "launch",
11− "runtimeExecutable": "${execPath}",
12− "args": [
13− "--extensionDevelopmentPath=${workspaceFolder}"
14− ],
15− "outFiles": [
16− "${workspaceFolder}/out/**/*.js"
17− ],
18− "preLaunchTask": "npm: watch"
19− },
20− {
21− "name": "Extension Tests",
22− "type": "extensionHost",
23− "request": "launch",
24− "runtimeExecutable": "${execPath}",
25− "args": [
26− "--extensionDevelopmentPath=${workspaceFolder}",
27− "--extensionTestsPath=${workspaceFolder}/out/test"
28− ],
29− "outFiles": [
30− "${workspaceFolder}/out/test/**/*.js"
31− ],
32− "preLaunchTask": "npm: watch"
33− }
34− ]
35−}
extension/.vscode/settings.jsondeleted−11
@@ -1,11 +0,0 @@
1−// Place your settings in this file to overwrite default and user settings.
2−{
3− "files.exclude": {
4− "out": false // set this to true to hide the "out" folder with the compiled JS files
5− },
6− "search.exclude": {
7− "out": true // set this to false to include "out" folder in search results
8− },
9− // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10− "typescript.tsc.autoDetect": "off"
11−}
extension/.vscode/tasks.jsondeleted−20
@@ -1,20 +0,0 @@
1−// See https://go.microsoft.com/fwlink/?LinkId=733558
2−// for the documentation about the tasks.json format
3−{
4− "version": "2.0.0",
5− "tasks": [
6− {
7− "type": "npm",
8− "script": "watch",
9− "problemMatcher": "$tsc-watch",
10− "isBackground": true,
11− "presentation": {
12− "reveal": "never"
13− },
14− "group": {
15− "kind": "build",
16− "isDefault": true
17− }
18− }
19− ]
20−}
extension/package-lock.json+1−1
@@ -1,5 +1,5 @@
1{
1{
2− "name": "haskell-ide-core",
2+ "name": "hie-core",
3 "version": "0.0.1",
3 "version": "0.0.1",
4 "lockfileVersion": 1,
4 "lockfileVersion": 1,
5 "requires": true,
5 "requires": true,
extension/package.json+4−4
@@ -1,6 +1,6 @@
1{
1{
2− "name": "haskell-ide-core",
2+ "name": "hie-core",
3− "displayName": "haskell-ide-core",
3+ "displayName": "hie-core",
4 "publisher": "digitalasset",
4 "publisher": "digitalasset",
5 "repository": {
5 "repository": {
6 "type" : "git",
6 "type" : "git",
@@ -31,8 +31,8 @@
31 "properties": {
31 "properties": {
32 "hic.executablePath": {
32 "hic.executablePath": {
33 "type": "string",
33 "type": "string",
34− "default": "haskell-ide-core",
34+ "default": "hie-core",
35− "description": "The location of your haskell-ide-core executable"
35+ "description": "The location of your hie-core executable"
36 },
36 },
37 "hic.arguments": {
37 "hic.arguments": {
38 "type": "string",
38 "type": "string",
haskell-ide-core.cabal → hie.cabalrenamed+3−3
@@ -1,6 +1,6 @@
1cabal-version: >= 1.18
1cabal-version: >= 1.18
2build-type: Simple
2build-type: Simple
3−name: haskell-ide-core
3+name: hie-core
4version: 0
4version: 0
5license: BSD3
5license: BSD3
6x-license: BSD3 OR Apache2
6x-license: BSD3 OR Apache2
@@ -107,7 +107,7 @@ library
107 other-modules:
107 other-modules:
108 Data.Text.Prettyprint.Doc.Syntax
108 Data.Text.Prettyprint.Doc.Syntax
109
109
110−executable haskell-ide-core
110+executable hie-core
111 default-language: Haskell2010
111 default-language: Haskell2010
112 main-is: Demo.hs
112 main-is: Demo.hs
113 ghc-options: -main-is Demo.main
113 ghc-options: -main-is Demo.main
@@ -123,7 +123,7 @@ executable haskell-ide-core
123 extra,
123 extra,
124 haskell-lsp,
124 haskell-lsp,
125 text,
125 text,
126− haskell-ide-core
126+ hie-core
127
127
128 default-extensions:
128 default-extensions:
129 TupleSections
129 TupleSections
src/Development/IDE/State/Rules.hs+1−1
@@ -129,7 +129,7 @@ getOpts = envOptions <$> getServiceEnv
129-- Rules
129-- Rules
130-- These typically go from key to value and are oracles.
130-- These typically go from key to value and are oracles.
131
131
132−-- TODO (MK) This should be independent of DAML or move out of haskell-ide-core.
132+-- TODO (MK) This should be independent of DAML or move out of hie-core.
133-- | We build artefacts based on the following high-to-low priority order.
133-- | We build artefacts based on the following high-to-low priority order.
134data Priority
134data Priority
135 = PriorityTypeCheck
135 = PriorityTypeCheck
test/Demo.hs+1−1
@@ -42,7 +42,7 @@ main :: IO ()
42main = do
42main = do
43 -- WARNING: If you write to stdout before runLanguageServer
43 -- WARNING: If you write to stdout before runLanguageServer
44 -- then the language server will not work
44 -- then the language server will not work
45− hPutStrLn stderr "Starting haskell-ide-core Demo"
45+ hPutStrLn stderr "Starting hie-core Demo"
46 args <- getArgs
46 args <- getArgs
47 -- lock to avoid overlapping output on stdout
47 -- lock to avoid overlapping output on stdout
48 lock <- newLock
48 lock <- newLock