Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit c0dd689

Browse files
committed
Merge branch 'master' of https://github.com/haskell/haskell-ide-engine into brittany-hsimport
2 parents f4bdcda + fb980e4 commit c0dd689

18 files changed

+130
-43
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ defaults: &defaults
2222

2323
- restore_cache:
2424
keys:
25-
- stack-cache-10-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
26-
- stack-cache-10-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
27-
- stack-cache-10-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
25+
- stack-cache-11-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
26+
- stack-cache-11-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
27+
- stack-cache-11-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
2828

2929
- run:
3030
name: Stack setup
@@ -55,7 +55,7 @@ defaults: &defaults
5555
command: rm -fr ~/.cache/cabal-helper
5656

5757
- save_cache:
58-
key: stack-cache-10-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
58+
key: stack-cache-11-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
5959
paths:
6060
- ~/.stack
6161
- ~/.cache
@@ -77,7 +77,7 @@ defaults: &defaults
7777
path: test-logs
7878

7979
- save_cache:
80-
key: stack-cache-10-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
80+
key: stack-cache-11-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
8181
paths:
8282
- ~/.stack
8383
- ~/.cache
@@ -90,7 +90,7 @@ defaults: &defaults
9090
- ~/build/submodules/cabal-helper/.stack-work
9191

9292
- save_cache:
93-
key: stack-cache-10-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
93+
key: stack-cache-11-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
9494
paths:
9595
- ~/.stack
9696
- ~/.cache

.gitmodules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55

66
[submodule "submodules/cabal-helper"]
77
path = submodules/cabal-helper
8+
# url = https://github.com/arbor/cabal-helper.git
89
url = https://github.com/alanz/cabal-helper.git
910
# url = https://github.com/DanielG/cabal-helper.git
1011

1112
[submodule "submodules/ghc-mod"]
1213
path = submodules/ghc-mod
14+
# url = https://github.com/arbor/ghc-mod.git
1315
# url = https://github.com/bubba/ghc-mod.git
1416
url = https://github.com/alanz/ghc-mod.git
1517

Changelog.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
# 0.3.0.0
2+
3+
- LSP mode is now the default, and the `--lsp` flag has no effect
4+
- The `--json` flag can be used for JSON transport
5+
- HIE now warns you if there is mismatch between the HIE GHC verison and the project GHC version
6+
- Add Liquid Haskell support
7+
- Add support for hierarchical document symbols
8+
- Add many new types of code actions
9+
- Typed holes
10+
- HaRe refactoring
11+
- Misspelled variables
12+
- Missing top-level signatures
13+
- Prefix unused terms with `_`
14+
- Case splitting
15+
- Suggested pragmas and language extensions
16+
- The parsed output from a module is now cached
17+
- Some features are now available without the need for the module to typecheck first
18+
- Improve code completion
19+
- Suggests modules that can be imported
20+
- Suggests GHC extensions
21+
- Recognizes when completing a type or expression
22+
- Provides snippets for arguments to functions
23+
- Add the ability to set an explicit hoogle database
24+
25+
Thanks to the contributors for this release:
26+
- @Avi-D-coder
27+
- @Gurkenglas
28+
- @Technix
29+
- @alanz
30+
- @apeyroux
31+
- @bbarker
32+
- @bubba
33+
- @cblp
34+
- @cronokirby
35+
- @expipiplus1
36+
- @jhrcek
37+
- @jkachmar
38+
- @lorenzo
39+
- @m13m
40+
- @meck
41+
- @mpilgrem
42+
- @waddlaw
43+
144
# 0.2.2.0
245

346
Add more code actions for various diagnostics:

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
version: 1.0.{build}
22
environment:
33
matrix:
4+
- GHCVER: 8.4.4
45
- GHCVER: 8.4.3
56
- GHCVER: 8.4.2
67
- GHCVER: 8.2.2

cabal.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ packages:
66
./submodules/HaRe
77
./submodules/ghc-mod/
88
./submodules/ghc-mod/core/
9+
./submodules/cabal-helper/

haskell-ide-engine.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: haskell-ide-engine
2-
version: 0.2.2.0
2+
version: 0.3.0.0
33
synopsis: Provide a common engine to power any Haskell IDE
44
description: Please see README.md
55
homepage: http://github.com/githubuser/haskell-ide-engine#readme
@@ -55,7 +55,7 @@ library
5555
, brittany
5656
, bytestring
5757
, Cabal
58-
, cabal-helper >= 0.8.1.0
58+
, cabal-helper >= 0.8.0.4
5959
, containers
6060
, data-default
6161
, directory

make-build-all.bat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ CALL :hie-8.2.1
1717
CALL :hie-8.2.2
1818
CALL :hie-8.4.2
1919
CALL :hie-8.4.3
20+
CALL :hie-8.4.4
2021
EXIT /B
2122

2223
:hie-8.2.1
@@ -49,6 +50,13 @@ COPY "%STACKLOCALBINDIR%\hie.exe" "%STACKLOCALBINDIR%\hie-8.4.3.exe"
4950
COPY "%STACKLOCALBINDIR%\hie-8.4.3.exe" "%STACKLOCALBINDIR%\hie-8.4.exe"
5051
EXIT /B
5152

53+
:hie-8.4.4
54+
CALL :submodules
55+
stack --stack-yaml=stack-8.4.4.yaml install
56+
COPY "%STACKLOCALBINDIR%\hie.exe" "%STACKLOCALBINDIR%\hie-8.4.4.exe"
57+
COPY "%STACKLOCALBINDIR%\hie-8.4.4.exe" "%STACKLOCALBINDIR%\hie-8.4.exe"
58+
EXIT /B
59+
5260
:submodules
5361
git submodule update --init
5462
EXIT /B
@@ -58,4 +66,5 @@ stack --stack-yaml=stack-8.2.1.yaml exec hoogle generate
5866
stack --stack-yaml=stack-8.2.2.yaml exec hoogle generate
5967
stack --stack-yaml=stack-8.4.2.yaml exec hoogle generate
6068
stack --stack-yaml=stack-8.4.3.yaml exec hoogle generate
69+
stack --stack-yaml=stack-8.4.4.yaml exec hoogle generate
6170
EXIT /B

shell.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
with import <nixpkgs> {};
2+
stdenv.mkDerivation {
3+
name = "haskell-ide-engine";
4+
buildInputs = [
5+
gmp
6+
zlib
7+
ncurses
8+
9+
haskellPackages.cabal-install
10+
];
11+
src = null;
12+
shellHook = ''
13+
export LD_LIBRARY_PATH=${gmp}/lib:${zlib}/lib:${ncurses}/lib
14+
export PATH=$PATH:$HOME/.local/bin
15+
'';
16+
}

src/Haskell/Ide/Engine/Plugin/Build.hs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ withCommonArgs (CommonParams mode0 mDistDir mCabalExe mStackExe _fileUri) a = do
197197
Just mode -> do
198198
let cabalExe = maybe "cabal" id mCabalExe
199199
stackExe = maybe "stack" id mStackExe
200-
distDir <- maybe (liftIO $ getDistDir mode stackExe) return $
200+
distDir' <- maybe (liftIO $ getDistDir mode stackExe) return $
201201
mDistDir -- >>= uriToFilePath -- fileUri
202202
runReaderT a $ CommonArgs {
203203
caMode = mode,
204-
caDistDir = distDir,
204+
caDistDir = distDir',
205205
caCabal = cabalExe,
206206
caStack = stackExe
207207
}
@@ -217,12 +217,12 @@ withCommonArgs req a = do
217217
Map.lookup "cabalExe" (ideParams req) >>= (\(ParamTextP v) -> return $ T.unpack v)
218218
stackExe = maybe "stack" id $
219219
Map.lookup "stackExe" (ideParams req) >>= (\(ParamTextP v) -> return $ T.unpack v)
220-
distDir <- maybe (liftIO $ getDistDir mode stackExe) return $
220+
distDir' <- maybe (liftIO $ getDistDir mode stackExe) return $
221221
Map.lookup "distDir" (ideParams req) >>=
222222
uriToFilePath . (\(ParamFileP v) -> v)
223223
runReaderT a $ CommonArgs {
224224
caMode = mode,
225-
caDistDir = distDir,
225+
caDistDir = distDir',
226226
caCabal = cabalExe,
227227
caStack = stackExe
228228
}
@@ -232,8 +232,8 @@ withCommonArgs req a = do
232232

233233
-- isHelperPrepared :: CommandFunc Bool
234234
-- isHelperPrepared = CmdSync $ \ctx req -> withCommonArgs ctx req $ do
235-
-- distDir <- asks caDistDir
236-
-- ret <- liftIO $ isPrepared (defaultQueryEnv "." distDir)
235+
-- distDir' <- asks caDistDir
236+
-- ret <- liftIO $ isPrepared (defaultQueryEnv "." distDir')
237237
-- return $ IdeResultOk ret
238238

239239
-----------------------------------------------
@@ -249,15 +249,15 @@ prepareHelper = CmdSync $ \req -> withCommonArgs req $ do
249249
return $ IdeResultOk ()
250250

251251
prepareHelper' :: MonadIO m => FilePath -> FilePath -> FilePath -> m ()
252-
prepareHelper' distDir cabalExe dir =
253-
prepare $ (mkQueryEnv dir distDir) {qePrograms = defaultPrograms {cabalProgram = cabalExe}}
252+
prepareHelper' distDir' cabalExe dir =
253+
prepare $ (mkQueryEnv dir distDir') {qePrograms = defaultPrograms {cabalProgram = cabalExe}}
254254

255255
-----------------------------------------------
256256

257257
isConfigured :: CommandFunc CommonParams Bool
258258
isConfigured = CmdSync $ \req -> withCommonArgs req $ do
259-
distDir <- asks caDistDir
260-
ret <- liftIO $ doesFileExist $ localBuildInfoFile distDir
259+
distDir' <- asks caDistDir
260+
ret <- liftIO $ doesFileExist $ localBuildInfoFile distDir'
261261
return $ IdeResultOk ret
262262

263263
-----------------------------------------------
@@ -279,7 +279,7 @@ configureStack stackExe = do
279279
_manyPackages -> readProcess stackExe ["build"] ""
280280

281281
configureCabal :: FilePath -> IO String
282-
configureCabal cabalExe = readProcess cabalExe ["configure"] ""
282+
configureCabal cabalExe = readProcess cabalExe ["new-configure"] ""
283283

284284
-----------------------------------------------
285285

@@ -360,7 +360,7 @@ buildDirectory = CmdSync $ \(BP m dd c s f mbDir) -> withCommonArgs (CommonParam
360360
liftIO $ case caMode ca of
361361
CabalMode -> do
362362
-- for cabal specifying directory have no sense
363-
_ <- readProcess (caCabal ca) ["build"] ""
363+
_ <- readProcess (caCabal ca) ["new-build"] ""
364364
return $ IdeResultOk ()
365365
StackMode ->
366366
case mbDir of
@@ -398,7 +398,7 @@ buildTarget = CmdSync $ \(BT m dd c s f component package' compType) -> withComm
398398
ca <- ask
399399
liftIO $ case caMode ca of
400400
CabalMode -> do
401-
_ <- readProcess (caCabal ca) ["build", T.unpack $ maybe "" id component] ""
401+
_ <- readProcess (caCabal ca) ["new-build", T.unpack $ maybe "" id component] ""
402402
return $ IdeResultOk ()
403403
StackMode -> do
404404
case (package', component) of
@@ -436,13 +436,13 @@ listTargets = CmdSync $ \req -> withCommonArgs req $ do
436436
return $ IdeResultOk ret
437437

438438
listStackTargets :: FilePath -> IO [Package]
439-
listStackTargets distDir = do
439+
listStackTargets distDir' = do
440440
stackPackageDirs <- getStackLocalPackages "stack.yaml"
441-
mapM (listCabalTargets distDir) stackPackageDirs
441+
mapM (listCabalTargets distDir') stackPackageDirs
442442

443443
listCabalTargets :: MonadIO m => FilePath -> FilePath -> m Package
444-
listCabalTargets distDir dir = do
445-
runQuery (mkQueryEnv dir distDir) $ do
444+
listCabalTargets distDir' dir = do
445+
runQuery (mkQueryEnv dir distDir') $ do
446446
pkgName' <- fst <$> packageId
447447
cc <- components $ (,) CH.<$> entrypoints
448448
let comps = map (fixupLibraryEntrypoint pkgName') $ map snd cc

stack-8.2.1.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ extra-deps:
88
- ./submodules/HaRe
99
- ./submodules/ghc-mod
1010
- ./submodules/ghc-mod/core
11+
- ./submodules/cabal-helper
12+
13+
# - brittany-0.11.0.0
1114
- butcher-1.3.1.1
12-
- cabal-helper-0.8.1.0@rev:0
1315
- cabal-plan-0.3.0.0
1416
- constrained-dynamic-0.1.0.0
1517
- czipwith-1.0.1.0
16-
- ghc-exactprint-0.5.8.0
18+
- ghc-exactprint-0.5.8.2
1719
- haddock-api-2.18.1
1820
- haddock-library-1.4.4
1921
- haskell-lsp-0.8.0.1
2022
- haskell-lsp-types-0.8.0.1
2123
- hlint-2.0.11
2224
- hsimport-0.8.6
2325
- lsp-test-0.4.0.0
26+
- pretty-show-1.8.2
2427
- sorted-list-0.2.1.0
2528
- syz-0.2.0.0
2629
- yaml-0.8.32

stack-8.2.2.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ extra-deps:
88
- ./submodules/HaRe
99
- ./submodules/ghc-mod
1010
- ./submodules/ghc-mod/core
11+
- ./submodules/cabal-helper
12+
13+
# - brittany-0.11.0.0
1114
- butcher-1.3.1.1
12-
- cabal-helper-0.8.1.0@rev:0
1315
- cabal-plan-0.3.0.0
1416
- conduit-parse-0.2.1.0
1517
- constrained-dynamic-0.1.0.0
1618
- czipwith-1.0.1.0
17-
- ghc-exactprint-0.5.8.0
19+
- ghc-exactprint-0.5.8.2
1820
- haddock-api-2.18.1
1921
- haddock-library-1.4.4
2022
- haskell-lsp-0.8.0.1
2123
- haskell-lsp-types-0.8.0.1
2224
- hsimport-0.8.6
2325
- lsp-test-0.4.0.0
26+
- pretty-show-1.8.2
2427
- sorted-list-0.2.1.0
2528
- syz-0.2.0.0
2629

stack-8.4.2.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ extra-deps:
88
- ./submodules/HaRe
99
- ./submodules/ghc-mod
1010
- ./submodules/ghc-mod/core
11+
- ./submodules/cabal-helper
12+
1113
- base-compat-0.9.3
12-
- cabal-helper-0.8.1.0@rev:0
14+
# - brittany-0.11.0.0
1315
- cabal-plan-0.3.0.0
1416
- constrained-dynamic-0.1.0.0
15-
- ghc-exactprint-0.5.8.0
17+
- ghc-exactprint-0.5.8.2
1618
- haddock-api-2.20.0
1719
- haddock-library-1.6.0
1820
- haskell-lsp-0.8.0.1
1921
- haskell-lsp-types-0.8.0.1
2022
- hlint-2.1.8
2123
- hsimport-0.8.6
2224
- lsp-test-0.4.0.0
25+
- pretty-show-1.8.2
2326
- syz-0.2.0.0
2427
- temporary-1.2.1.1
2528
- windns-0.1.0.0

stack-8.4.3.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ extra-deps:
88
- ./submodules/HaRe
99
- ./submodules/ghc-mod
1010
- ./submodules/ghc-mod/core
11+
- ./submodules/cabal-helper
12+
1113
- base-compat-0.9.3
12-
- cabal-helper-0.8.1.0@rev:0
1314
- cabal-plan-0.3.0.0
1415
- constrained-dynamic-0.1.0.0
1516
- ghc-exactprint-0.5.8.2
@@ -19,6 +20,7 @@ extra-deps:
1920
- haskell-lsp-types-0.8.0.1
2021
- hsimport-0.8.6
2122
- lsp-test-0.4.0.0
23+
- pretty-show-1.8.2
2224
- syz-0.2.0.0
2325
- temporary-1.2.1.1
2426

stack-8.4.4.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resolver: lts-12.16 # LTS 12.15 is first to support GHC 8.4.4
1+
resolver: lts-12.17 # LTS 12.15 is first to support GHC 8.4.4
22
packages:
33
- .
44
- hie-plugin-api
@@ -8,8 +8,9 @@ extra-deps:
88
- ./submodules/HaRe
99
- ./submodules/ghc-mod
1010
- ./submodules/ghc-mod/core
11+
- ./submodules/cabal-helper
12+
1113
- base-compat-0.9.3
12-
- cabal-helper-0.8.1.0@rev:0
1314
- cabal-plan-0.3.0.0
1415
- constrained-dynamic-0.1.0.0
1516
- ghc-exactprint-0.5.8.2
@@ -19,6 +20,7 @@ extra-deps:
1920
- haskell-lsp-types-0.8.0.1
2021
- hsimport-0.8.6
2122
- lsp-test-0.4.0.0
23+
- pretty-show-1.8.2
2224
- syz-0.2.0.0
2325
- temporary-1.2.1.1
2426

0 commit comments

Comments
 (0)