Skip to content

Commit fc30f14

Browse files
authored
Upgrade to hie-bios (#257)
This does not yet take advantage of any new features but we should at least be able to benefit from bugfixes.
1 parent 2523c21 commit fc30f14

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

exe/Main.hs

+7-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,13 @@ showEvent lock e = withLock lock $ print e
156156

157157
cradleToSession :: Cradle -> IO HscEnvEq
158158
cradleToSession cradle = do
159-
opts <- either throwIO return =<< getCompilerOptions "" cradle
159+
cradleRes <- getCompilerOptions "" cradle
160+
opts <- case cradleRes of
161+
CradleSuccess r -> pure r
162+
CradleFail err -> throwIO err
163+
-- TODO Rather than failing here, we should ignore any files that use this cradle.
164+
-- That will require some more changes.
165+
CradleNone -> fail "'none' cradle is not yet supported"
160166
libdir <- getLibdir
161167
env <- runGhc (Just libdir) $ do
162168
_targets <- initSession opts

ghcide.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ executable ghcide
150150
ghc-paths,
151151
ghc,
152152
haskell-lsp,
153-
hie-bios >= 0.2 && < 0.3,
153+
hie-bios >= 0.3 && < 0.4,
154154
ghcide,
155155
optparse-applicative,
156156
shake,

stack-ghc-lib.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extra-deps:
55
- haskell-lsp-0.18.0.0
66
- haskell-lsp-types-0.18.0.0
77
- lsp-test-0.8.2.0
8-
- hie-bios-0.2.0
8+
- hie-bios-0.3.0
99
- ghc-lib-parser-8.8.1
1010
- ghc-lib-8.8.1
1111
nix:

stack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ extra-deps:
55
- haskell-lsp-0.18.0.0
66
- haskell-lsp-types-0.18.0.0
77
- lsp-test-0.8.2.0
8-
- hie-bios-0.2.1
8+
- hie-bios-0.3.0
99
nix:
1010
packages: [zlib]

stack84.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extra-deps:
1010
- shake-0.18.3
1111
- filepattern-0.1.1
1212
- js-dgtable-0.5.2
13-
- hie-bios-0.2.1
13+
- hie-bios-0.3.0
1414
nix:
1515
packages: [zlib]
1616
allow-newer: true

stack88.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ resolver: nightly-2019-12-06
22
packages:
33
- .
44
extra-deps:
5+
- hie-bios-0.3.0
56
allow-newer: true
67
nix:
78
packages: [zlib]

0 commit comments

Comments
 (0)