Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Obtain the GHC libdir at runtime #696

Merged
merged 2 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
420 changes: 214 additions & 206 deletions exe/Main.hs

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions exe/Utils.hs

This file was deleted.

3 changes: 1 addition & 2 deletions ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,14 @@ executable ghcide
hashable,
haskell-lsp,
haskell-lsp-types,
hie-bios >= 0.5.0 && < 0.6,
hie-bios >= 0.6.0 && < 0.7,
ghcide,
optparse-applicative,
safe-exceptions,
shake,
text,
unordered-containers
other-modules:
Utils
Arguments
Paths_ghcide

Expand Down
2 changes: 1 addition & 1 deletion stack-ghc-lib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extra-deps:
- haskell-lsp-types-0.22.0.0
- lsp-test-0.11.0.2
- extra-1.7.2
- hie-bios-0.5.0
- hie-bios-0.6.1
- ghc-lib-parser-8.8.1
- ghc-lib-8.8.1
- fuzzy-0.1.0.0
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extra-deps:
- haskell-lsp-0.22.0.0
- haskell-lsp-types-0.22.0.0
- lsp-test-0.11.0.2
- hie-bios-0.5.0
- hie-bios-0.6.1
- fuzzy-0.1.0.0
- regex-pcre-builtin-0.95.1.1.8.43
- regex-base-0.94.0.0
Expand Down
2 changes: 1 addition & 1 deletion stack810.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extra-deps:
- haskell-lsp-types-0.22.0.0
- lsp-test-0.11.0.2
- ghc-check-0.5.0.1
- hie-bios-0.5.0
- hie-bios-0.6.1

# not yet in stackage
- Chart-diagrams-1.9.3
Expand Down
2 changes: 1 addition & 1 deletion stack84.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extra-deps:
- rope-utf16-splay-0.3.1.0
- filepattern-0.1.1
- js-dgtable-0.5.2
- hie-bios-0.5.0
- hie-bios-0.6.1
- fuzzy-0.1.0.0
- shake-0.18.5
- time-compat-1.9.2.2
Expand Down
2 changes: 1 addition & 1 deletion stack88.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extra-deps:
- haskell-lsp-types-0.22.0.0
- lsp-test-0.11.0.2
- ghc-check-0.5.0.1
- hie-bios-0.5.0
- hie-bios-0.6.1
- extra-1.7.2
nix:
packages: [zlib]
13 changes: 11 additions & 2 deletions test/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ import Language.Haskell.LSP.VFS (applyChange)
import Network.URI
import System.Environment.Blank (getEnv, setEnv, unsetEnv)
import System.FilePath
import System.IO.Extra
import System.IO.Extra hiding (withTempDir)
import qualified System.IO.Extra
import System.Directory
import System.Exit (ExitCode(ExitSuccess))
import System.Process.Extra (readCreateProcessWithExitCode, CreateProcess(cwd), proc)
Expand Down Expand Up @@ -1261,7 +1262,7 @@ addTypeAnnotationsToLiteralsTest = testGroup "add type annotations to literals t
, ""
, "import Debug.Trace"
, ""
, "f a = traceShow \"debug\" a"
, "f a = traceShow \"debug\" a"
])
[ (DsWarning, (6, 6), "Defaulting the following constraint") ]
"Add type annotation ‘[Char]’ to ‘\"debug\"’"
Expand Down Expand Up @@ -3001,3 +3002,11 @@ getWatchedFilesSubscriptionsUntil = do
| Just RequestMessage{_params = RegistrationParams (List regs)} <- msgs
, Registration _id WorkspaceDidChangeWatchedFiles args <- regs
]

-- | Version of 'System.IO.Extra.withTempDir' that canonicalizes the path
-- Which we need to do on macOS since the $TMPDIR can be in @/private/var@ or
-- @/var@
withTempDir :: (FilePath -> IO a) -> IO a
withTempDir f = System.IO.Extra.withTempDir $ \dir -> do
dir' <- canonicalizePath dir
f dir'