Skip to content

Commit

Permalink
Upgrade to hie-bios (#257)
Browse files Browse the repository at this point in the history
This does not yet take advantage of any new features but we should at
least be able to benefit from bugfixes.
  • Loading branch information
cocreature authored Dec 16, 2019
1 parent 2523c21 commit fc30f14
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
8 changes: 7 additions & 1 deletion exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,13 @@ showEvent lock e = withLock lock $ print e

cradleToSession :: Cradle -> IO HscEnvEq
cradleToSession cradle = do
opts <- either throwIO return =<< getCompilerOptions "" cradle
cradleRes <- getCompilerOptions "" cradle
opts <- case cradleRes of
CradleSuccess r -> pure r
CradleFail err -> throwIO err
-- TODO Rather than failing here, we should ignore any files that use this cradle.
-- That will require some more changes.
CradleNone -> fail "'none' cradle is not yet supported"
libdir <- getLibdir
env <- runGhc (Just libdir) $ do
_targets <- initSession opts
Expand Down
2 changes: 1 addition & 1 deletion ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ executable ghcide
ghc-paths,
ghc,
haskell-lsp,
hie-bios >= 0.2 && < 0.3,
hie-bios >= 0.3 && < 0.4,
ghcide,
optparse-applicative,
shake,
Expand Down
2 changes: 1 addition & 1 deletion stack-ghc-lib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extra-deps:
- haskell-lsp-0.18.0.0
- haskell-lsp-types-0.18.0.0
- lsp-test-0.8.2.0
- hie-bios-0.2.0
- hie-bios-0.3.0
- ghc-lib-parser-8.8.1
- ghc-lib-8.8.1
nix:
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ extra-deps:
- haskell-lsp-0.18.0.0
- haskell-lsp-types-0.18.0.0
- lsp-test-0.8.2.0
- hie-bios-0.2.1
- hie-bios-0.3.0
nix:
packages: [zlib]
2 changes: 1 addition & 1 deletion stack84.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extra-deps:
- shake-0.18.3
- filepattern-0.1.1
- js-dgtable-0.5.2
- hie-bios-0.2.1
- hie-bios-0.3.0
nix:
packages: [zlib]
allow-newer: true
1 change: 1 addition & 0 deletions stack88.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ resolver: nightly-2019-12-06
packages:
- .
extra-deps:
- hie-bios-0.3.0
allow-newer: true
nix:
packages: [zlib]

0 comments on commit fc30f14

Please sign in to comment.