on master help sign in
Rename haskell-ide-core to hie-core (#1809)

* Rename haskell-ide-core as hie-core, after discussions with Alan Zimmerman and others * Update the readme to just say how to install

commit036e3d0002f610e19a1c93236f84b9a950026f5d authorNeil Mitchell <35463327+neil-da@users.noreply.github.com> dateFri 21 Jun 2019, 18:07 (7 years ago) parent26d932c
12 files changed+23−121
.ghci−16 BUILD.bazel+4−4 README.md+9−18 extension/.vscode/extensions.json−7 extension/.vscode/launch.json−35 extension/.vscode/settings.json−11 extension/.vscode/tasks.json−20 extension/package-lock.json+1−1 extension/package.json+4−4 haskell-ide-core.cabal → hie.cabal+3−3 src/Development/IDE/State/Rules.hs+1−1 test/Demo.hs+1−1
.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 = [
4040]
4141
4242da_haskell_library(
43− name = "haskell-ide-core",
43+ name = "hie-core",
4444 srcs = glob(["src/**/*.hs"]),
4545 hazel_deps = depends + [
4646 "ghc-lib",
@@ -54,7 +54,7 @@ da_haskell_library(
5454)
5555
5656da_haskell_library(
57− name = "haskell-ide-core-public",
57+ name = "hie-core-public",
5858 srcs = glob(["src/**/*.hs"]),
5959 compiler_flags = ["-DGHC_STABLE"],
6060 hazel_deps = depends + [
@@ -76,7 +76,7 @@ da_haskell_library(
7676)
7777
7878da_haskell_binary(
79− name = "haskell-ide-core-demo",
79+ name = "hie-core-demo",
8080 srcs = glob(["test/**/*.hs"]),
8181 hazel_deps = [
8282 "base",
@@ -95,7 +95,7 @@ da_haskell_binary(
9595 src_strip_prefix = "test",
9696 visibility = ["//visibility:public"],
9797 deps = [
98− "haskell-ide-core-public",
98+ "hie-core-public",
9999 "//libs-haskell/prettyprinter-syntax",
100100 ],
101101) if not is_windows else None # Disable on Windows until ghc-paths is fixed upstream
README.md+9−18
@@ -2,8 +2,8 @@
22
33Our vision is that you should build an IDE by combining:
44
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.
6−* `haskell-ide-core` - this library - for defining how to type check, when to type check, and producing messages.
5+* [hie-bios](https://github.com/mpickering/hie-bios) for determining where your files are, what the dependencies, what extensions are enabled etc.
6+* `hie-core` - this library - for defining how to type check, when to type check, and producing messages.
77* `haskell-lsp` for sending those messages to an LSP server.
88* A VS Code extension, e.g. `extension` in this directory.
99
@@ -14,26 +14,17 @@ There are more details [in this blog post](https://4ta.uk/p/shaking-up-the-ide).
1414### Installing the binary
1515
16161. `git clone https://github.com/digital-asset/daml.git`
17−2. `cd daml/compiler/haskell-ide-core`
17+2. `cd daml/compiler/hie-core`
18183. `stack build`
1919
20−### Using the VSCode extension
20+### Installing the VSCode extension
2121
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`
33232. `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
3527
36−### Installing in emacs
37281. Install lsp and haskell-lsp
38292. Add this elisp to your .emacs.el
3930```elisp
@@ -41,6 +32,6 @@ There are more details [in this blog post](https://4ta.uk/p/shaking-up-the-ide).
4132(require 'lsp-haskell)
4233(require 'yasnippet)
4334(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")
4536(setq lsp-haskell-process-args-hie '())
4637```
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 @@
11{
2− "name": "haskell-ide-core",
2+ "name": "hie-core",
33 "version": "0.0.1",
44 "lockfileVersion": 1,
55 "requires": true,
extension/package.json+4−4
@@ -1,6 +1,6 @@
11{
2− "name": "haskell-ide-core",
3− "displayName": "haskell-ide-core",
2+ "name": "hie-core",
3+ "displayName": "hie-core",
44 "publisher": "digitalasset",
55 "repository": {
66 "type" : "git",
@@ -31,8 +31,8 @@
3131 "properties": {
3232 "hic.executablePath": {
3333 "type": "string",
34− "default": "haskell-ide-core",
35− "description": "The location of your haskell-ide-core executable"
34+ "default": "hie-core",
35+ "description": "The location of your hie-core executable"
3636 },
3737 "hic.arguments": {
3838 "type": "string",
haskell-ide-core.cabal → hie.cabalrenamed+3−3
@@ -1,6 +1,6 @@
11cabal-version: >= 1.18
22build-type: Simple
3−name: haskell-ide-core
3+name: hie-core
44version: 0
55license: BSD3
66x-license: BSD3 OR Apache2
@@ -107,7 +107,7 @@ library
107107 other-modules:
108108 Data.Text.Prettyprint.Doc.Syntax
109109
110−executable haskell-ide-core
110+executable hie-core
111111 default-language: Haskell2010
112112 main-is: Demo.hs
113113 ghc-options: -main-is Demo.main
@@ -123,7 +123,7 @@ executable haskell-ide-core
123123 extra,
124124 haskell-lsp,
125125 text,
126− haskell-ide-core
126+ hie-core
127127
128128 default-extensions:
129129 TupleSections
src/Development/IDE/State/Rules.hs+1−1
@@ -129,7 +129,7 @@ getOpts = envOptions <$> getServiceEnv
129129-- Rules
130130-- These typically go from key to value and are oracles.
131131
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.
133133-- | We build artefacts based on the following high-to-low priority order.
134134data Priority
135135 = PriorityTypeCheck
test/Demo.hs+1−1
@@ -42,7 +42,7 @@ main :: IO ()
4242main = do
4343 -- WARNING: If you write to stdout before runLanguageServer
4444 -- then the language server will not work
45− hPutStrLn stderr "Starting haskell-ide-core Demo"
45+ hPutStrLn stderr "Starting hie-core Demo"
4646 args <- getArgs
4747 -- lock to avoid overlapping output on stdout
4848 lock <- newLock