This repository has been archived by the owner on Jan 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Development.IDE.Session into ghcide itself
Sublibraries do not seem to play well. Hide this behind the ghc-lib flag so that the Haskell specific hie-bios stuff can be disabled Note that we need to put the template-haskell part of this module into a separate module because of an access exception when compiling with Stack, GHC 8.10.1 and Windows.
- Loading branch information
Showing
5 changed files
with
71 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{-# LANGUAGE TemplateHaskell #-} | ||
{-# LANGUAGE CPP #-} | ||
|
||
-- | This module exists to circumvent a compile time exception on Windows with | ||
-- Stack and GHC 8.10.1. It's just been pulled out from Development.IDE.Session. | ||
-- See https://github.com/digital-asset/ghcide/pull/697 | ||
module Development.IDE.Session.VersionCheck | ||
#ifndef GHC_LIB | ||
(ghcVersionChecker) | ||
#endif | ||
|
||
where | ||
|
||
#ifndef GHC_LIB | ||
|
||
import Data.Maybe | ||
import GHC.Check | ||
-- Only use this for checking against the compile time GHC libDir! | ||
-- Use getRuntimeGhcLibDir from hie-bios instead for everything else | ||
-- otherwise binaries will not be distributable since paths will be baked into them | ||
import qualified GHC.Paths | ||
import System.Environment | ||
|
||
ghcVersionChecker :: GhcVersionChecker | ||
ghcVersionChecker = $$(makeGhcVersionChecker (fromMaybe GHC.Paths.libdir <$> lookupEnv "NIX_GHC_LIBDIR")) | ||
|
||
#endif |