Skip to content

Cleanup GHC macros (because min version is 8.8.4) #3281

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 7 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 0 additions & 2 deletions docs/contributing/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ To create binaries:
* `nix build .#haskell-language-server-884` - GHC 8.8.4
* `nix build .#haskell-language-server-901` - GHC 9.0.1

GHC 8.6.5 is not supported here because `nixpkgs-unstable` no longer maintains the corresponding packages set.

## Testing

The tests make use of the [Tasty](https://github.com/feuerbach/tasty) test framework.
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/plugin-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ And here is the gist of the algorithm:

## Setup

To get started, let’s fetch the HLS repo and build it. You need at least GHC 8.6 for this:
To get started, let’s fetch the HLS repo and build it. You need at least GHC 8.8 for this:

```
git clone --recursive http://github.com/haskell/haskell-language-server hls
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Homebrew users can install `haskell-language-server` using the following command
brew install haskell-language-server
```

This formula contains HLS binaries compiled with GHC versions available via Homebrew; at the moment those are: 8.6.5, 8.8.4, 8.10.7.
This formula contains HLS binaries compiled with GHC versions available via Homebrew; at the moment those are: 8.8.4, 8.10.7.

You need to provide your own GHC/Cabal/Stack as required by your project, possibly via Homebrew.

Expand Down
2 changes: 1 addition & 1 deletion ghcide-bench/ghcide-bench.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ synopsis: An LSP client for running performance experiments on HLS
description: An LSP client for running performance experiments on HLS
homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme
bug-reports: https://github.com/haskell/haskell-language-server/issues
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4

source-repository head
type: git
Expand Down
2 changes: 1 addition & 1 deletion ghcide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ If you can't get `ghcide` working outside the editor, see [this setup troublesho

### Optimal project setup

`ghcide` has been designed to handle projects with hundreds or thousands of modules. If `ghci` can handle it, then `ghcide` should be able to handle it. The only caveat is that this currently requires GHC >= 8.6, and that the first time a module is loaded in the editor will trigger generation of support files in the background if those do not already exist.
`ghcide` has been designed to handle projects with hundreds or thousands of modules. If `ghci` can handle it, then `ghcide` should be able to handle it. The only caveat is that this currently requires GHC >= 8.8, and that the first time a module is loaded in the editor will trigger generation of support files in the background if those do not already exist.

### Using with VS Code

Expand Down
4 changes: 2 additions & 2 deletions ghcide/ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ library
unliftio-core,
ghc-boot-th,
ghc-boot,
ghc >= 8.6,
ghc >= 8.8,
ghc-check >=0.5.0.8,
ghc-paths,
cryptohash-sha1 >=0.11.100 && <0.12,
Expand Down Expand Up @@ -363,7 +363,7 @@ test-suite ghcide-tests
text,
text-rope,
unordered-containers,
if (impl(ghc >= 8.6) && impl(ghc < 9.2))
if impl(ghc < 9.2)
build-depends:
record-dot-preprocessor,
record-hasfield
Expand Down
5 changes: 1 addition & 4 deletions ghcide/src/Development/IDE/GHC/Compat.hs
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,7 @@ generatedNodeInfo = sourceNodeInfo -- before ghc 9.0, we don't distinguish the s
#endif

data GhcVersion
= GHC86
| GHC88
= GHC88
| GHC810
| GHC90
| GHC92
Expand All @@ -588,8 +587,6 @@ ghcVersion = GHC90
ghcVersion = GHC810
#elif MIN_VERSION_GLASGOW_HASKELL(8,8,0,0)
ghcVersion = GHC88
#elif MIN_VERSION_GLASGOW_HASKELL(8,6,0,0)
ghcVersion = GHC86
#endif

runUnlit :: Logger -> DynFlags -> [Option] -> IO ()
Expand Down
2 changes: 1 addition & 1 deletion ghcide/src/Development/IDE/GHC/CoreFile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import GHC.Types.TypeEnv
import GHC.Driver.Types
#endif

#elif MIN_VERSION_ghc(8,6,0)
#else
import Binary
import BinFingerprint (fingerprintBinMem)
import BinIface
Expand Down
2 changes: 1 addition & 1 deletion ghcide/test/ghcide-test-utils.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description:
Test utils for ghcide
homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme
bug-reports: https://github.com/haskell/haskell-language-server/issues
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4

source-repository head
type: git
Expand Down
2 changes: 1 addition & 1 deletion hie-compat/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# hie-compat

Mainly a backport of [HIE
Files](https://gitlab.haskell.org/ghc/ghc/-/wikis/hie-files) for ghc 8.6, along
Files](https://gitlab.haskell.org/ghc/ghc/-/wikis/hie-files) for ghc 8.8, along
with a few other backports of fixes useful for `ghcide`

Also includes backport of record-dot-syntax support to 9.2.x
Expand Down
9 changes: 0 additions & 9 deletions plugins/hls-eval-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,6 @@ tests =
, goldenWithEval "Don't panic on {-# UNPACK #-} pragma" "TUNPACK" "hs"
, goldenWithEval "Can handle eval inside nested comment properly" "TNested" "hs"
, goldenWithEval "Test on last line insert results correctly" "TLastLine" "hs"
, testGroup "with preprocessors"
[ knownBrokenInEnv [HostOS Windows, GhcVer GHC86]
"CPP eval on Windows and/or GHC <= 8.6 fails for some reasons" $
goldenWithEval "CPP support" "TCPP" "hs"
, knownBrokenForGhcVersions [GHC86]
"Preprocessor known to fail on GHC <= 8.6" $
goldenWithEval "Literate Haskell Bird Style" "TLHS" "lhs"
-- , goldenWithEval "Literate Haskell LaTeX Style" "TLHSLateX" "lhs"
]
, goldenWithEval "Works with NoImplicitPrelude" "TNoImplicitPrelude" "hs"
, goldenWithEval "Variable 'it' works" "TIt" "hs"
, testGroup "configuration"
Expand Down
2 changes: 1 addition & 1 deletion test/functional/Completion.hs
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,4 @@ compls `shouldNotContainCompl` lbl =
@? "Should not contain completion: " ++ show lbl

expectFailIfBeforeGhc92 :: String -> TestTree -> TestTree
expectFailIfBeforeGhc92 = knownBrokenForGhcVersions [GHC810, GHC88, GHC86, GHC90]
expectFailIfBeforeGhc92 = knownBrokenForGhcVersions [GHC810, GHC88, GHC90]