Skip to content

Commit bf5f220

Browse files
committed
Update README + remove ide-backend-client references
1 parent f821648 commit bf5f220

File tree

3 files changed

+16
-138
lines changed

3 files changed

+16
-138
lines changed

stack-ide-api/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# JSON API used by ide-backend-client
1+
# JSON API used by stack-ide
22

3-
This package is split off from `ide-backend-client` for the following
4-
reasons:
3+
This package is split off from `stack-ide` for the following reasons:
54

65
* Support for compilation using [GHCJS](https://github.com/ghcjs/ghcjs).
76

8-
* It has fewer dependencies than `ide-backend-client`. Notably, it
9-
only depends on `ide-backend-common`, which doesn't depend on ghc or
10-
Cabal and so is fairly trivial to install.
7+
* It has fewer dependencies than `stack-ide`. Notably, it only depends on
8+
`ide-backend-common`, which doesn't depend on ghc or Cabal and so is fairly
9+
trivial to install.

stack-ide/README.md

Lines changed: 10 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,16 @@
11
# Standalone JSON client for `ide-backend`
22

3-
This executable binds against the `ide-backend` library and makes it API available over JSON. It is intended to faciliate integration of `ide-backend` in editors such Atom, Emacs, Sublime, Vim, etc.
3+
This executable binds against the `ide-backend` library and makes it API
4+
available over JSON. It is intended to faciliate integration of `ide-backend` in
5+
editors such Atom, Emacs, Sublime, Vim, etc. This repository contains an emacs
6+
integration called `stack-mode`.
47

5-
# Installation instructions
6-
7-
Make sure to compile `ide-backend-client` against the same version of the `Cabal` library that your `cabal-install` uses. For instance, you could add a file `cabal.config`:
8-
9-
```
10-
constraints: Cabal==1.22.0.0
11-
```
12-
13-
# Example interaction:
14-
15-
``` javascript
16-
// ide-backend-client sends welcome message and provides its version
17-
{ "response": "welcome"
18-
, "version": { "minor": 1, "major": 0, "patch": 0 }
19-
}
20-
21-
// editor requests to load a source file
22-
> { "request": "updateSession"
23-
> , "update": [
24-
> { "update": "updateSourceFileFromFile"
25-
> , "filePath": "t/A.hs"
26-
> }
27-
> ]
28-
> }
29-
30-
// client responds with progress message
31-
< { "progress": {
32-
< "origMsg": "[1 of 1] Compiling A ( /path/to/t/A.hs, interpreted )",
33-
< "parsedMsg": "Compiling A",
34-
< "numSteps": 1,
35-
< "step": 1
36-
< }
37-
< , "response": "sessionUpdate"
38-
< }
8+
# Project Status
399

40-
// After the last progress message where will be one more response
41-
< { "response": "sessionUpdate" }
10+
stack-ide is still a work-in-progress. The goal is to create an environment for
11+
seamlessly getting lots of info about our Haskell code, but it isn't perfect
12+
yet. Give it a try, and feel free to join in on development!
4213

43-
// Editor requests the list of errors
44-
> { "request": "getSourceErrors" }
45-
46-
// client responds with the empty list
47-
< { "response": "getSourceErrors"
48-
< , "errors": []
49-
< }
50-
51-
// editor requests information about an identifier at a specific location
52-
> { "request": "getSpanInfo"
53-
> , "module": "A"
54-
> , "span": {
55-
> "filePath": "t/A.hs"
56-
> , "fromLine": 3
57-
> , "fromColumn": 2
58-
> , "toLine": 3
59-
> , "toColumn": 2
60-
> }
61-
> }
62-
63-
// client responds with the information
64-
< {
65-
< "response": "getSpanInfo",
66-
< "info": [
67-
< {
68-
< "span": {
69-
< "toColumn": 4,
70-
< "fromLine": 3,
71-
< "filePath": "t/A.hs",
72-
< "toLine": 3,
73-
< "fromColumn": 1
74-
< },
75-
< "isQuasiQuote": false,
76-
< "idInfo": {
77-
< "scope": {
78-
< "scope": "local"
79-
< },
80-
< "prop": {
81-
< "nameSpace": "varName",
82-
< "name": "foo",
83-
< "type": "Int",
84-
< "defSpan": {
85-
< "toColumn": 4,
86-
< "fromLine": 4,
87-
< "filePath": "t/A.hs",
88-
< "toLine": 4,
89-
< "fromColumn": 1
90-
< },
91-
< "definedIn": {
92-
< "name": "A",
93-
< "package": {
94-
< "packageKey": "main",
95-
< "name": "main"
96-
< }
97-
< }
98-
< }
99-
< }
100-
< }
101-
< ]
102-
< }
103-
104-
// editor asks for the type of an expression at a particular location
105-
> { "request": "getExpTypes"
106-
> , "module": "A"
107-
> , "span": {
108-
> "filePath": "t/A.hs"
109-
> , "fromLine": 4
110-
> , "fromColumn": 7
111-
> , "toLine": 4
112-
> , "toColumn": 7
113-
> }
114-
> }
115-
116-
// client responds
117-
< {
118-
< "response": "getExpTypes",
119-
< "info":[
120-
< {
121-
< "span": {
122-
< "toColumn": 8,
123-
< "fromLine": 4,
124-
< "filePath": "t/A.hs",
125-
< "toLine": 4,
126-
< "fromColumn": 7
127-
< },
128-
< "type": "Int"
129-
< }
130-
< ]
131-
< }
132-
133-
// editor requests shutdown
134-
> { "request": "shutdownSession" }
14+
# Installation instructions
13515

136-
// client shuts down
137-
< { "response":"shutdownSession" }
16+
Run `stack install` to locally install `ide-backend` and `stack-ide`.

stack-ide/src/Stack/Ide/CmdLine.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ getCommandLineOptions = execParser opts
193193
(mconcat [
194194
fullDesc
195195
, progDesc "Start a new session"
196-
, header "ide-backend-client: JSON interface to ide-backend"
196+
, header "stack-ide: JSON interface to ide-backend"
197197
])
198198

199199
{-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)