forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IDE GHC 8.6 Compatibilty (digital-asset#1148)
* Rename the #ifdef for GHC_STABLE * More CPP required for GHC stable * Add a compatibility wrapper for HIE functionality which is new in GHC HEAD * HLint ignores * Finish the dummy implementations * Add a bazel build for the ide-core library against GHC
- Loading branch information
Showing
9 changed files
with
107 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
-- Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
{-# LANGUAGE CPP #-} | ||
|
||
-- | Attempt at hiding the GHC version differences we can. | ||
module Development.IDE.Compat( | ||
HieFile(..), | ||
mkHieFile, | ||
writeHieFile, | ||
readHieFile | ||
) where | ||
|
||
#ifndef GHC_STABLE | ||
import HieBin | ||
import HieAst | ||
import HieTypes | ||
#else | ||
|
||
import GHC | ||
import GhcPlugins | ||
import NameCache | ||
import Avail | ||
import TcRnTypes | ||
|
||
|
||
mkHieFile :: ModSummary -> TcGblEnv -> RenamedSource -> Hsc HieFile | ||
mkHieFile _ _ _ = return (HieFile () []) | ||
|
||
writeHieFile :: FilePath -> HieFile -> IO () | ||
writeHieFile _ _ = return () | ||
|
||
readHieFile :: NameCache -> FilePath -> IO (HieFile, ()) | ||
readHieFile _ _ = return (HieFile () [], ()) | ||
|
||
data HieFile = HieFile {hie_module :: (), hie_exports :: [AvailInfo]} | ||
|
||
#endif |
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
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