-
-
Notifications
You must be signed in to change notification settings - Fork 391
Cleanup cabal files, ghc compat code, fix ghc warnings #4222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
347cc70
Cleanup cabal files, fix ghc warnings
jhrcek ef218be
fix
jhrcek 5548caf
Cleanup more < 9.2 code from compat modules
jhrcek 6287e23
mkIfaceTc: hide differences in compat module
jhrcek 1c1d508
Avoid dodgy imports
jhrcek 2315402
Follow CPP import guidelines
jhrcek 30e57ac
Fix more dodgy imports/exports
jhrcek c018b7e
stylish-haskell
jhrcek 93734ab
More stylish
jhrcek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -11,34 +11,36 @@ import Development.IDE.GHC.Compat | |
import Development.IDE.GHC.Util | ||
|
||
import Control.DeepSeq | ||
import Control.Monad.Trans.Reader (ReaderT (..)) | ||
import Control.Monad.Trans.Reader (ReaderT (..)) | ||
import Data.Aeson | ||
import Data.Hashable | ||
import Data.String (IsString (fromString)) | ||
import Data.Text (unpack) | ||
|
||
-- See Note [Guidelines For Using CPP In GHCIDE Import Statements] | ||
import Data.String (IsString (fromString)) | ||
import Data.Text (unpack) | ||
|
||
import GHC.ByteCode.Types | ||
import GHC.Data.Bag | ||
import GHC.Data.FastString | ||
import qualified GHC.Data.StringBuffer as SB | ||
import qualified GHC.Data.StringBuffer as SB | ||
import GHC.Types.SrcLoc | ||
|
||
-- See Note [Guidelines For Using CPP In GHCIDE Import Statements] | ||
#if !MIN_VERSION_ghc(9,3,0) | ||
import GHC (ModuleGraph) | ||
import GHC.Types.Unique (getKey) | ||
import GHC (ModuleGraph) | ||
import GHC.Types.Unique (getKey) | ||
#endif | ||
|
||
import Data.Bifunctor (Bifunctor (..)) | ||
import Data.Bifunctor (Bifunctor (..)) | ||
import GHC.Parser.Annotation | ||
import GHC.Unit.Module.Location (ModLocation (..)) | ||
|
||
#if MIN_VERSION_ghc(9,3,0) | ||
import GHC.Types.PkgQual | ||
|
||
#endif | ||
|
||
#if MIN_VERSION_ghc(9,5,0) | ||
import GHC.Unit.Home.ModInfo | ||
import GHC.Unit.Module.WholeCoreBindings | ||
#endif | ||
|
||
-- Orphan instance for Shake.hs | ||
|
@@ -56,11 +58,22 @@ instance NFData SafeHaskellMode where rnf = rwhnf | |
instance Show Linkable where show = unpack . printOutputable | ||
instance NFData Linkable where rnf (LM a b c) = rnf a `seq` rnf b `seq` rnf c | ||
instance NFData Unlinked where | ||
rnf (DotO f) = rnf f | ||
rnf (DotA f) = rnf f | ||
rnf (DotDLL f) = rnf f | ||
rnf (BCOs a b) = seqCompiledByteCode a `seq` liftRnf rwhnf b | ||
rnf _ = error "rnf: not implemented for Unlinked" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Completing this NFData implementation for more recent GHCs |
||
rnf (DotO f) = rnf f | ||
rnf (DotA f) = rnf f | ||
rnf (DotDLL f) = rnf f | ||
rnf (BCOs a b) = seqCompiledByteCode a `seq` liftRnf rwhnf b | ||
#if MIN_VERSION_ghc(9,5,0) | ||
rnf (CoreBindings wcb) = rnf wcb | ||
rnf (LoadedBCOs us) = rnf us | ||
|
||
instance NFData WholeCoreBindings where | ||
rnf (WholeCoreBindings bs m ml) = rnf bs `seq` rnf m `seq` rnf ml | ||
|
||
instance NFData ModLocation where | ||
rnf (ModLocation mf f1 f2 f3 f4 f5) = rnf mf `seq` rnf f1 `seq` rnf f2 `seq` rnf f3 `seq` rnf f4 `seq` rnf f5 | ||
|
||
#endif | ||
|
||
instance Show PackageFlag where show = unpack . printOutputable | ||
instance Show InteractiveImport where show = unpack . printOutputable | ||
instance Show PackageName where show = unpack . printOutputable | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.