Purge GHC 8.8 (#3287)

We're also dropping support for this.
This commit is contained in:
Michael Peyton Jones 2022-10-18 22:12:53 +01:00 committed by GitHub
parent dc62321779
commit 388fd40ade
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
47 changed files with 66 additions and 2615 deletions

View File

@ -75,11 +75,6 @@ defaults: &defaults
version: 2 version: 2
jobs: jobs:
stackage-lts16:
environment:
- STACK_FILE: "stack-lts16.yaml"
<<: *defaults
stackage-lts19: stackage-lts19:
environment: environment:
- STACK_FILE: "stack-lts19.yaml" - STACK_FILE: "stack-lts19.yaml"
@ -95,6 +90,5 @@ workflows:
version: 2 version: 2
multiple-ghcs: multiple-ghcs:
jobs: jobs:
- stackage-lts16
- stackage-lts19 - stackage-lts19
- stackage-nightly - stackage-nightly

View File

@ -84,7 +84,6 @@ jobs:
, "9.2.3" , "9.2.3"
, "9.0.2" , "9.0.2"
, "8.10.7" , "8.10.7"
, "8.8.4"
] ]
os: [ "ubuntu-latest" os: [ "ubuntu-latest"
, "macOS-latest" , "macOS-latest"

View File

@ -47,7 +47,6 @@ jobs:
ghc: [ "9.2.4" ghc: [ "9.2.4"
, "9.0.2" , "9.0.2"
, "8.10.7" , "8.10.7"
, "8.8.4"
] ]
os: [ "ubuntu-latest" os: [ "ubuntu-latest"
] ]

View File

@ -40,7 +40,6 @@ jobs:
"haskell-language-server"] "haskell-language-server"]
ghc: [ "9.0.2" ghc: [ "9.0.2"
, "8.10.7" , "8.10.7"
, "8.8.4"
] ]
exclude: exclude:
- ghc: "9.0.2" - ghc: "9.0.2"

View File

@ -63,7 +63,6 @@ jobs:
, "9.2.3" , "9.2.3"
, "9.0.2" , "9.0.2"
, "8.10.7" , "8.10.7"
, "8.8.4"
] ]
os: [ "ubuntu-latest" os: [ "ubuntu-latest"
, "macOS-latest" , "macOS-latest"
@ -82,9 +81,6 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
ghc: '8.10.7' ghc: '8.10.7'
test: true test: true
- os: ubuntu-latest
ghc: '8.8.4'
test: true
- os: windows-latest - os: windows-latest
ghc: '9.4.2' ghc: '9.4.2'
test: true test: true
@ -98,8 +94,6 @@ jobs:
ghc: '8.10.7' ghc: '8.10.7'
test: true test: true
# only build rest of supported ghc versions for windows # only build rest of supported ghc versions for windows
- os: windows-latest
ghc: '8.8.4'
- os: windows-latest - os: windows-latest
ghc: '9.2.3' ghc: '9.2.3'
@ -111,9 +105,8 @@ jobs:
ghc: ${{ matrix.ghc }} ghc: ${{ matrix.ghc }}
os: ${{ runner.os }} os: ${{ runner.os }}
# repeating builds to workaround segfaults in windows and ghc-8.8.4
- name: Build - name: Build
run: cabal build || cabal build || cabal build run: cabal build
- name: Set test options - name: Set test options
# run the tests without parallelism, otherwise tasty will attempt to run # run the tests without parallelism, otherwise tasty will attempt to run
@ -137,125 +130,125 @@ jobs:
- if: needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test - if: needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test
name: Test ghcide name: Test ghcide
# run the tests without parallelism to avoid running out of memory # run the tests without parallelism to avoid running out of memory
run: cabal test ghcide --test-options="$TEST_OPTS" || cabal test ghcide --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="$TEST_OPTS" run: cabal test ghcide --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-plugin-api name: Test hls-plugin-api
run: cabal test hls-plugin-api --test-options="$TEST_OPTS" || cabal test hls-plugin-api --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-plugin-api --test-options="$TEST_OPTS" run: cabal test hls-plugin-api --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-plugin-api --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test func-test suite name: Test func-test suite
env: env:
HLS_TEST_EXE: hls HLS_TEST_EXE: hls
HLS_WRAPPER_TEST_EXE: hls-wrapper HLS_WRAPPER_TEST_EXE: hls-wrapper
run: cabal test func-test --test-options="$TEST_OPTS" || cabal test func-test --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="$TEST_OPTS" run: cabal test func-test --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test wrapper-test suite name: Test wrapper-test suite
env: env:
HLS_TEST_EXE: hls HLS_TEST_EXE: hls
HLS_WRAPPER_TEST_EXE: hls-wrapper HLS_WRAPPER_TEST_EXE: hls-wrapper
run: cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" run: cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper"
- if: matrix.test && matrix.ghc != '9.2.4' && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.2.4' && matrix.ghc != '9.4.2'
name: Test hls-brittany-plugin name: Test hls-brittany-plugin
run: cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="$TEST_OPTS" run: cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.4.2'
name: Test hls-refactor-plugin name: Test hls-refactor-plugin
run: cabal test hls-refactor-plugin --test-options="$TEST_OPTS" || cabal test hls-refactor-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refactor-plugin --test-options="$TEST_OPTS" run: cabal test hls-refactor-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refactor-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.4.2'
name: Test hls-floskell-plugin name: Test hls-floskell-plugin
run: cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-floskell-plugin --test-options="$TEST_OPTS" run: cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-floskell-plugin --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-class-plugin name: Test hls-class-plugin
run: cabal test hls-class-plugin --test-options="$TEST_OPTS" || cabal test hls-class-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="$TEST_OPTS" run: cabal test hls-class-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-pragmas-plugin name: Test hls-pragmas-plugin
run: cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" run: cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-pragmas-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.4.2'
name: Test hls-eval-plugin name: Test hls-eval-plugin
run: cabal test hls-eval-plugin --test-options="$TEST_OPTS" || cabal test hls-eval-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="$TEST_OPTS" run: cabal test hls-eval-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.2.4' && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.2.4' && matrix.ghc != '9.4.2'
name: Test hls-haddock-comments-plugin name: Test hls-haddock-comments-plugin
run: cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" run: cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.2.4' && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.2.4' && matrix.ghc != '9.4.2'
name: Test hls-splice-plugin name: Test hls-splice-plugin
run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || cabal test hls-splice-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="$TEST_OPTS" run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.4.2'
name: Test hls-stylish-haskell-plugin name: Test hls-stylish-haskell-plugin
run: cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" run: cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.4.2'
name: Test hls-ormolu-plugin name: Test hls-ormolu-plugin
run: cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" run: cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.4.2'
name: Test hls-fourmolu-plugin name: Test hls-fourmolu-plugin
run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.2.4' && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.2.4' && matrix.ghc != '9.4.2'
name: Test hls-tactics-plugin test suite name: Test hls-tactics-plugin test suite
run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="$TEST_OPTS" run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-refine-imports-plugin test suite name: Test hls-refine-imports-plugin test suite
run: cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS" || cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS" run: cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-explicit-imports-plugin test suite name: Test hls-explicit-imports-plugin test suite
run: cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" || cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" run: cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-call-hierarchy-plugin test suite name: Test hls-call-hierarchy-plugin test suite
run: cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS" || cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS" run: cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.os != 'windows-latest' && matrix.ghc != '9.4.2' - if: matrix.test && matrix.os != 'windows-latest' && matrix.ghc != '9.4.2'
name: Test hls-rename-plugin test suite name: Test hls-rename-plugin test suite
run: cabal test hls-rename-plugin --test-options="$TEST_OPTS" || cabal test hls-rename-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-rename-plugin --test-options="$TEST_OPTS" run: cabal test hls-rename-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-rename-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.4.2'
name: Test hls-hlint-plugin test suite name: Test hls-hlint-plugin test suite
run: cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-hlint-plugin --test-options="$TEST_OPTS" run: cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-hlint-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.0.2' && matrix.ghc != '9.2.4' && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.0.2' && matrix.ghc != '9.2.4' && matrix.ghc != '9.4.2'
name: Test hls-stan-plugin test suite name: Test hls-stan-plugin test suite
run: cabal test hls-stan-plugin --test-options="$TEST_OPTS" || cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stan-plugin --test-options="$TEST_OPTS" run: cabal test hls-stan-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stan-plugin --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-module-name-plugin test suite name: Test hls-module-name-plugin test suite
run: cabal test hls-module-name-plugin --test-options="$TEST_OPTS" || cabal test hls-module-name-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-module-name-plugin --test-options="$TEST_OPTS" run: cabal test hls-module-name-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-module-name-plugin --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-alternate-number-format-plugin test suite name: Test hls-alternate-number-format-plugin test suite
run: cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" || cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" run: cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-qualify-imported-names-plugin test suite name: Test hls-qualify-imported-names-plugin test suite
run: cabal test hls-qualify-imported-names-plugin --test-options="$TEST_OPTS" || cabal test hls-qualify-imported-names-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-qualify-imported-names-plugin --test-options="$TEST_OPTS" run: cabal test hls-qualify-imported-names-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-qualify-imported-names-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.4.2'
name: Test hls-code-range-plugin test suite name: Test hls-code-range-plugin test suite
run: cabal test hls-code-range-plugin --test-options="$TEST_OPTS" || cabal test hls-code-range-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-code-range-plugin --test-options="$TEST_OPTS" run: cabal test hls-code-range-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-code-range-plugin --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-change-type-signature test suite name: Test hls-change-type-signature test suite
run: cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS" || cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS" run: cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS"
- if: matrix.test && matrix.ghc != '9.4.2' - if: matrix.test && matrix.ghc != '9.4.2'
name: Test hls-gadt-plugin test suit name: Test hls-gadt-plugin test suit
run: cabal test hls-gadt-plugin --test-options="$TEST_OPTS" || cabal test hls-gadt-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-gadt-plugin --test-options="$TEST_OPTS" run: cabal test hls-gadt-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-gadt-plugin --test-options="$TEST_OPTS"
- if: matrix.test - if: matrix.test
name: Test hls-explicit-fixity-plugin test suite name: Test hls-explicit-fixity-plugin test suite
run: cabal test hls-explicit-fixity-plugin --test-options="$TEST_OPTS" || cabal test hls-explicit-fixity-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-fixity-plugin --test-options="$TEST_OPTS" run: cabal test hls-explicit-fixity-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-fixity-plugin --test-options="$TEST_OPTS"
test_post_job: test_post_job:
if: always() if: always()

1
.gitpod.Dockerfile vendored
View File

@ -7,7 +7,6 @@ RUN sudo install-packages build-essential curl libffi-dev libffi7 libgmp-dev lib
echo 'export PATH=$HOME/.cabal/bin:$HOME/.local/bin:$PATH' >> $HOME/.bashrc && \ echo 'export PATH=$HOME/.cabal/bin:$HOME/.local/bin:$PATH' >> $HOME/.bashrc && \
. /home/gitpod/.ghcup/env && \ . /home/gitpod/.ghcup/env && \
# Install all verions of GHC that HLS supports. Putting GHC into Docker image makes workspace start much faster. # Install all verions of GHC that HLS supports. Putting GHC into Docker image makes workspace start much faster.
ghcup install ghc 8.8.4 && \
ghcup install ghc 8.10.7 && \ ghcup install ghc 8.10.7 && \
ghcup install ghc 9.0.2 && \ ghcup install ghc 9.0.2 && \
ghcup install ghc 9.2.3 && \ ghcup install ghc 9.2.3 && \

View File

@ -1,4 +1,3 @@
8.8.4,cabal.project
8.10.7,cabal.project 8.10.7,cabal.project
9.0.2,cabal.project 9.0.2,cabal.project
9.2.3,cabal.project 9.2.3,cabal.project

View File

@ -51,18 +51,14 @@ If you are using nix 2.4 style command (enabled by `experimental-features = nix-
you can use `nix develop` instead of `nix-shell` to enter the development shell. To enter the shell with specific GHC versions: you can use `nix develop` instead of `nix-shell` to enter the development shell. To enter the shell with specific GHC versions:
* `nix develop` or `nix develop .#haskell-language-server-dev` - default GHC version * `nix develop` or `nix develop .#haskell-language-server-dev` - default GHC version
* `nix develop .#haskell-language-server-8107-dev` - GHC 8.10.7 * `nix develop .#haskell-language-server-901-dev` - GHC 9.0.1 (substitute GHC version as appropriate)
* `nix develop .#haskell-language-server-884-dev` - GHC 8.8.4
* `nix develop .#haskell-language-server-901-dev` - GHC 9.0.1
If you are looking for a Nix expression to create haskell-language-server binaries, see https://github.com/haskell/haskell-language-server/issues/122 If you are looking for a Nix expression to create haskell-language-server binaries, see https://github.com/haskell/haskell-language-server/issues/122
To create binaries: To create binaries:
* `nix build` or `nix build .#haskell-language-server` - default GHC version * `nix build` or `nix build .#haskell-language-server` - default GHC version
* `nix build .#haskell-language-server-8107` - GHC 8.10.7 * `nix build .#haskell-language-server-901` - GHC 9.0.1 (substitute GHC version as appropriate)
* `nix build .#haskell-language-server-884` - GHC 8.8.4
* `nix build .#haskell-language-server-901` - GHC 9.0.1
## Testing ## Testing

View File

@ -34,7 +34,7 @@ And here is the gist of the algorithm:
## Setup ## Setup
To get started, lets fetch the HLS repo and build it. You need at least GHC 8.8 for this: To get started, lets fetch the HLS repo and build it. You need at least GHC 8.10 for this:
``` ```
git clone --recursive http://github.com/haskell/haskell-language-server hls git clone --recursive http://github.com/haskell/haskell-language-server hls

View File

@ -157,7 +157,7 @@ Homebrew users can install `haskell-language-server` using the following command
brew install haskell-language-server brew install haskell-language-server
``` ```
This formula contains HLS binaries compiled with GHC versions available via Homebrew; at the moment those are: 8.8.4, 8.10.7. This formula contains HLS binaries compiled with GHC versions available via Homebrew; at the moment those are: 8.10.7.
You need to provide your own GHC/Cabal/Stack as required by your project, possibly via Homebrew. You need to provide your own GHC/Cabal/Stack as required by your project, possibly via Homebrew.

View File

@ -29,7 +29,7 @@ Support status (see the support policy below for more details):
| 8.10.5 | [1.5.1](https://github.com/haskell/haskell-language-server/releases/tag/1.5.1) | deprecated | | 8.10.5 | [1.5.1](https://github.com/haskell/haskell-language-server/releases/tag/1.5.1) | deprecated |
| 8.10.(4,3,2) | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated | | 8.10.(4,3,2) | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated |
| 8.10.1 | [0.9.0](https://github.com/haskell/haskell-language-server/releases/tag/0.9.0) | deprecated | | 8.10.1 | [0.9.0](https://github.com/haskell/haskell-language-server/releases/tag/0.9.0) | deprecated |
| 8.8.4 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support, will be deprecated after LTS and HLS full support for ghc-9.2 | | 8.8.4 | [1.8.0](https://github.com/haskell/haskell-language-server/releases/1.8.0) | deprecated |
| 8.8.3 | [1.5.1](https://github.com/haskell/haskell-language-server/releases/1.5.1) | deprecated | | 8.8.3 | [1.5.1](https://github.com/haskell/haskell-language-server/releases/1.5.1) | deprecated |
| 8.8.2 | [1.2.0](https://github.com/haskell/haskell-language-server/releases/tag/1.2.0) | deprecated | | 8.8.2 | [1.2.0](https://github.com/haskell/haskell-language-server/releases/tag/1.2.0) | deprecated |
| 8.6.5 | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | deprecated | | 8.6.5 | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | deprecated |

View File

@ -12,7 +12,7 @@ synopsis: An LSP client for running performance experiments on HLS
description: 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 homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme
bug-reports: https://github.com/haskell/haskell-language-server/issues bug-reports: https://github.com/haskell/haskell-language-server/issues
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4 tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4
source-repository head source-repository head
type: git type: git

View File

@ -13,7 +13,7 @@ description:
A library for building Haskell IDE's on top of the GHC API. A library for building Haskell IDE's on top of the GHC API.
homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme
bug-reports: https://github.com/haskell/haskell-language-server/issues bug-reports: https://github.com/haskell/haskell-language-server/issues
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4 tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4
extra-source-files: README.md CHANGELOG.md extra-source-files: README.md CHANGELOG.md
test/data/**/*.project test/data/**/*.project
test/data/**/*.cabal test/data/**/*.cabal
@ -99,7 +99,7 @@ library
unliftio-core, unliftio-core,
ghc-boot-th, ghc-boot-th,
ghc-boot, ghc-boot,
ghc >= 8.8, ghc >= 8.10,
ghc-check >=0.5.0.8, ghc-check >=0.5.0.8,
ghc-paths, ghc-paths,
cryptohash-sha1 >=0.11.100 && <0.12, cryptohash-sha1 >=0.11.100 && <0.12,

View File

@ -104,10 +104,6 @@ import System.FilePath
import System.IO.Extra (fixIO, newTempFileWithin) import System.IO.Extra (fixIO, newTempFileWithin)
import Unsafe.Coerce import Unsafe.Coerce
#if !MIN_VERSION_ghc(8,10,0)
import ErrUtils
#endif
#if MIN_VERSION_ghc(9,0,1) #if MIN_VERSION_ghc(9,0,1)
import GHC.Tc.Gen.Splice import GHC.Tc.Gen.Splice
@ -482,11 +478,9 @@ mkHiFileResultCompile se session' tcm simplified_guts = catchErrs $ do
Nothing Nothing
#endif #endif
#elif MIN_VERSION_ghc(8,10,0) #else
let !partial_iface = force (mkPartialIface session details simplified_guts) let !partial_iface = force (mkPartialIface session details simplified_guts)
final_iface <- mkFullIface session partial_iface final_iface <- mkFullIface session partial_iface
#else
(final_iface,_) <- mkIface session Nothing details simplified_guts
#endif #endif
-- Write the core file now -- Write the core file now
@ -637,11 +631,7 @@ generateObjectCode session summary guts = do
#else #else
(outputFilename, _mStub, _foreign_files) <- hscGenHardCode session' guts (outputFilename, _mStub, _foreign_files) <- hscGenHardCode session' guts
#endif #endif
#if MIN_VERSION_ghc(8,10,0)
(ms_location summary) (ms_location summary)
#else
summary
#endif
fp fp
obj <- compileFile session' driverNoStop (outputFilename, Just (As False)) obj <- compileFile session' driverNoStop (outputFilename, Just (As False))
#if MIN_VERSION_ghc(9,3,0) #if MIN_VERSION_ghc(9,3,0)
@ -670,11 +660,7 @@ generateByteCode (CoreFileTime time) hscEnv summary guts = do
-- TODO: maybe settings ms_hspp_opts is unnecessary? -- TODO: maybe settings ms_hspp_opts is unnecessary?
summary' = summary { ms_hspp_opts = hsc_dflags session } summary' = summary { ms_hspp_opts = hsc_dflags session }
hscInteractive session guts hscInteractive session guts
#if MIN_VERSION_ghc(8,10,0)
(ms_location summary') (ms_location summary')
#else
summary'
#endif
let unlinked = BCOs bytecode sptEntries let unlinked = BCOs bytecode sptEntries
let linkable = LM time (ms_mod summary) [unlinked] let linkable = LM time (ms_mod summary) [unlinked]
pure (map snd warnings, linkable) pure (map snd warnings, linkable)
@ -739,9 +725,7 @@ unnecessaryDeprecationWarningFlags
, Opt_WarnUnusedMatches , Opt_WarnUnusedMatches
, Opt_WarnUnusedTypePatterns , Opt_WarnUnusedTypePatterns
, Opt_WarnUnusedForalls , Opt_WarnUnusedForalls
#if MIN_VERSION_ghc(8,10,0)
, Opt_WarnUnusedRecordWildcards , Opt_WarnUnusedRecordWildcards
#endif
, Opt_WarnInaccessibleCode , Opt_WarnInaccessibleCode
, Opt_WarnWarningsDeprecations , Opt_WarnWarningsDeprecations
] ]

View File

@ -16,30 +16,21 @@ module Development.IDE.GHC.CPP(doCpp, addOptP)
where where
import Development.IDE.GHC.Compat as Compat import Development.IDE.GHC.Compat as Compat
import GHC
#if !MIN_VERSION_ghc(8,10,0)
import qualified Development.IDE.GHC.Compat.CPP as CPP
#else
import Development.IDE.GHC.Compat.Util import Development.IDE.GHC.Compat.Util
#endif import GHC
#if MIN_VERSION_ghc(9,0,0) #if MIN_VERSION_ghc(9,0,0)
import qualified GHC.Driver.Pipeline as Pipeline import qualified GHC.Driver.Pipeline as Pipeline
import GHC.Settings import GHC.Settings
#else #elif MIN_VERSION_ghc (8,10,0)
#if MIN_VERSION_ghc (8,10,0)
import qualified DriverPipeline as Pipeline import qualified DriverPipeline as Pipeline
import ToolSettings import ToolSettings
#else
import DynFlags
#endif
#endif #endif
#if MIN_VERSION_ghc(9,3,0) #if MIN_VERSION_ghc(9,3,0)
import qualified GHC.Driver.Pipeline.Execute as Pipeline import qualified GHC.Driver.Pipeline.Execute as Pipeline
#endif #endif
addOptP :: String -> DynFlags -> DynFlags addOptP :: String -> DynFlags -> DynFlags
#if MIN_VERSION_ghc (8,10,0)
addOptP f = alterToolSettings $ \s -> s addOptP f = alterToolSettings $ \s -> s
{ toolSettings_opt_P = f : toolSettings_opt_P s { toolSettings_opt_P = f : toolSettings_opt_P s
, toolSettings_opt_P_fingerprint = fingerprintStrings (f : toolSettings_opt_P s) , toolSettings_opt_P_fingerprint = fingerprintStrings (f : toolSettings_opt_P s)
@ -47,20 +38,12 @@ addOptP f = alterToolSettings $ \s -> s
where where
fingerprintStrings ss = fingerprintFingerprints $ map fingerprintString ss fingerprintStrings ss = fingerprintFingerprints $ map fingerprintString ss
alterToolSettings f dynFlags = dynFlags { toolSettings = f (toolSettings dynFlags) } alterToolSettings f dynFlags = dynFlags { toolSettings = f (toolSettings dynFlags) }
#else
addOptP opt = onSettings (onOptP (opt:))
where
onSettings f x = x{settings = f $ settings x}
onOptP f x = x{sOpt_P = f $ sOpt_P x}
#endif
doCpp :: HscEnv -> Bool -> FilePath -> FilePath -> IO () doCpp :: HscEnv -> Bool -> FilePath -> FilePath -> IO ()
doCpp env raw input_fn output_fn = doCpp env raw input_fn output_fn =
#if MIN_VERSION_ghc (9,2,0) #if MIN_VERSION_ghc (9,2,0)
Pipeline.doCpp (hsc_logger env) (hsc_tmpfs env) (hsc_dflags env) (hsc_unit_env env) raw input_fn output_fn Pipeline.doCpp (hsc_logger env) (hsc_tmpfs env) (hsc_dflags env) (hsc_unit_env env) raw input_fn output_fn
#elif MIN_VERSION_ghc (8,10,0)
Pipeline.doCpp (hsc_dflags env) raw input_fn output_fn
#else #else
CPP.doCpp (hsc_dflags env) raw input_fn output_fn Pipeline.doCpp (hsc_dflags env) raw input_fn output_fn
#endif #endif

View File

@ -244,10 +244,6 @@ import Data.List (foldl')
import qualified Data.Map as Map import qualified Data.Map as Map
import qualified Data.Set as S import qualified Data.Set as S
#if !MIN_VERSION_ghc(8,10,0)
import Bag (unitBag)
#endif
#if MIN_VERSION_ghc(9,2,0) #if MIN_VERSION_ghc(9,2,0)
import GHC.Builtin.Uniques import GHC.Builtin.Uniques
import GHC.ByteCode.Types import GHC.ByteCode.Types
@ -404,17 +400,10 @@ pattern PFailedWithErrorMessages msgs
#else #else
<- PFailed (const . fmap pprError . getErrorMessages -> msgs) <- PFailed (const . fmap pprError . getErrorMessages -> msgs)
#endif #endif
#elif MIN_VERSION_ghc(8,10,0)
pattern PFailedWithErrorMessages :: (DynFlags -> ErrorMessages) -> ParseResult a
pattern PFailedWithErrorMessages msgs
<- PFailed (getErrorMessages -> msgs)
#else #else
pattern PFailedWithErrorMessages :: (DynFlags -> ErrorMessages) -> ParseResult a pattern PFailedWithErrorMessages :: (DynFlags -> ErrorMessages) -> ParseResult a
pattern PFailedWithErrorMessages msgs pattern PFailedWithErrorMessages msgs
<- ((fmap.fmap) unitBag . mkPlainErrMsgIfPFailed -> Just msgs) <- PFailed (getErrorMessages -> msgs)
mkPlainErrMsgIfPFailed (PFailed _ pst err) = Just (\dflags -> mkPlainErrMsg dflags pst err)
mkPlainErrMsgIfPFailed _ = Nothing
#endif #endif
{-# COMPLETE POk, PFailedWithErrorMessages #-} {-# COMPLETE POk, PFailedWithErrorMessages #-}
@ -488,11 +477,7 @@ nameListFromAvails as =
getModuleHash :: ModIface -> Fingerprint getModuleHash :: ModIface -> Fingerprint
#if MIN_VERSION_ghc(8,10,0)
getModuleHash = mi_mod_hash . mi_final_exts getModuleHash = mi_mod_hash . mi_final_exts
#else
getModuleHash = mi_mod_hash
#endif
disableWarningsAsErrors :: DynFlags -> DynFlags disableWarningsAsErrors :: DynFlags -> DynFlags
@ -500,12 +485,8 @@ disableWarningsAsErrors df =
flip gopt_unset Opt_WarnIsError $ foldl' wopt_unset_fatal df [toEnum 0 ..] flip gopt_unset Opt_WarnIsError $ foldl' wopt_unset_fatal df [toEnum 0 ..]
isQualifiedImport :: ImportDecl a -> Bool isQualifiedImport :: ImportDecl a -> Bool
#if MIN_VERSION_ghc(8,10,0)
isQualifiedImport ImportDecl{ideclQualified = NotQualified} = False isQualifiedImport ImportDecl{ideclQualified = NotQualified} = False
isQualifiedImport ImportDecl{} = True isQualifiedImport ImportDecl{} = True
#else
isQualifiedImport ImportDecl{ideclQualified} = ideclQualified
#endif
isQualifiedImport _ = False isQualifiedImport _ = False
@ -566,8 +547,7 @@ generatedNodeInfo = sourceNodeInfo -- before ghc 9.0, we don't distinguish the s
#endif #endif
data GhcVersion data GhcVersion
= GHC88 = GHC810
| GHC810
| GHC90 | GHC90
| GHC92 | GHC92
| GHC94 | GHC94
@ -585,8 +565,6 @@ ghcVersion = GHC92
ghcVersion = GHC90 ghcVersion = GHC90
#elif MIN_VERSION_GLASGOW_HASKELL(8,10,0,0) #elif MIN_VERSION_GLASGOW_HASKELL(8,10,0,0)
ghcVersion = GHC810 ghcVersion = GHC810
#elif MIN_VERSION_GLASGOW_HASKELL(8,8,0,0)
ghcVersion = GHC88
#endif #endif
runUnlit :: Logger -> DynFlags -> [Option] -> IO () runUnlit :: Logger -> DynFlags -> [Option] -> IO ()

View File

@ -48,11 +48,7 @@ doCpp dflags raw input_fn output_fn = do
let verbFlags = getVerbFlags dflags let verbFlags = getVerbFlags dflags
let cpp_prog args | raw = SysTools.runCpp dflags args let cpp_prog args | raw = SysTools.runCpp dflags args
#if MIN_VERSION_ghc(8,10,0)
| otherwise = SysTools.runCc Nothing | otherwise = SysTools.runCc Nothing
#else
| otherwise = SysTools.runCc
#endif
dflags (SysTools.Option "-E" : args) dflags (SysTools.Option "-E" : args)
let target_defs = let target_defs =

View File

@ -76,12 +76,8 @@ module Development.IDE.GHC.Compat.Core (
-- * Interface Files -- * Interface Files
IfaceExport, IfaceExport,
IfaceTyCon(..), IfaceTyCon(..),
#if MIN_VERSION_ghc(8,10,0)
ModIface, ModIface,
ModIface_(..), ModIface_(..),
#else
ModIface(..),
#endif
HscSource(..), HscSource(..),
WhereFrom(..), WhereFrom(..),
loadInterface, loadInterface,
@ -90,12 +86,8 @@ module Development.IDE.GHC.Compat.Core (
#endif #endif
loadModuleInterface, loadModuleInterface,
RecompileRequired(..), RecompileRequired(..),
#if MIN_VERSION_ghc(8,10,0)
mkPartialIface, mkPartialIface,
mkFullIface, mkFullIface,
#else
mkIface,
#endif
checkOldIface, checkOldIface,
#if MIN_VERSION_ghc(9,0,0) #if MIN_VERSION_ghc(9,0,0)
IsBootInterface(..), IsBootInterface(..),
@ -141,7 +133,7 @@ module Development.IDE.GHC.Compat.Core (
#if !MIN_VERSION_ghc(9,2,0) #if !MIN_VERSION_ghc(9,2,0)
Development.IDE.GHC.Compat.Core.splitForAllTyCoVars, Development.IDE.GHC.Compat.Core.splitForAllTyCoVars,
#endif #endif
Development.IDE.GHC.Compat.Core.mkVisFunTys, mkVisFunTys,
Development.IDE.GHC.Compat.Core.mkInfForAllTys, Development.IDE.GHC.Compat.Core.mkInfForAllTys,
-- * Specs -- * Specs
ImpDeclSpec(..), ImpDeclSpec(..),
@ -261,9 +253,6 @@ module Development.IDE.GHC.Compat.Core (
SrcLoc.noSrcSpan, SrcLoc.noSrcSpan,
SrcLoc.noSrcLoc, SrcLoc.noSrcLoc,
SrcLoc.noLoc, SrcLoc.noLoc,
#if !MIN_VERSION_ghc(8,10,0)
SrcLoc.dL,
#endif
-- * Finder -- * Finder
FindResult(..), FindResult(..),
mkHomeModLocation, mkHomeModLocation,
@ -403,10 +392,8 @@ module Development.IDE.GHC.Compat.Core (
#else #else
module BasicTypes, module BasicTypes,
module Class, module Class,
#if MIN_VERSION_ghc(8,10,0)
module Coercion, module Coercion,
module Predicate, module Predicate,
#endif
module ConLike, module ConLike,
module CoreUtils, module CoreUtils,
module DataCon, module DataCon,
@ -453,22 +440,7 @@ module Development.IDE.GHC.Compat.Core (
module GHC.Parser.Header, module GHC.Parser.Header,
module GHC.Parser.Lexer, module GHC.Parser.Lexer,
#else #else
#if MIN_VERSION_ghc(8,10,0)
module GHC.Hs, module GHC.Hs,
#else
module HsBinds,
module HsDecls,
module HsDoc,
module HsExtension,
noExtField,
module HsExpr,
module HsImpExp,
module HsLit,
module HsPat,
module HsSyn,
module HsTypes,
module HsUtils,
#endif
module ExtractDocs, module ExtractDocs,
module Parser, module Parser,
module Lexer, module Lexer,
@ -541,8 +513,7 @@ import GHC.Core.Predicate
import GHC.Core.TyCo.Ppr import GHC.Core.TyCo.Ppr
import qualified GHC.Core.TyCo.Rep as TyCoRep import qualified GHC.Core.TyCo.Rep as TyCoRep
import GHC.Core.TyCon import GHC.Core.TyCon
import GHC.Core.Type hiding (mkInfForAllTys, import GHC.Core.Type hiding (mkInfForAllTys)
mkVisFunTys)
import GHC.Core.Unify import GHC.Core.Unify
import GHC.Core.Utils import GHC.Core.Utils
@ -693,29 +664,13 @@ import ExtractDocs
import FamInst import FamInst
import FamInstEnv import FamInstEnv
import Finder hiding (mkHomeModLocation) import Finder hiding (mkHomeModLocation)
#if MIN_VERSION_ghc(8,10,0)
import GHC.Hs hiding (HsLet, LetStmt) import GHC.Hs hiding (HsLet, LetStmt)
#endif
import qualified GHCi import qualified GHCi
import GhcMonad import GhcMonad
import HeaderInfo hiding (getImports) import HeaderInfo hiding (getImports)
import Hooks import Hooks
import HscMain as GHC import HscMain as GHC
import HscTypes import HscTypes
#if !MIN_VERSION_ghc(8,10,0)
-- Syntax imports
import HsBinds
import HsDecls
import HsDoc
import HsExpr hiding (HsLet, LetStmt)
import HsExtension
import HsImpExp
import HsLit
import HsPat
import HsSyn hiding (wildCardName, HsLet, LetStmt)
import HsTypes hiding (wildCardName)
import HsUtils
#endif
import Id import Id
import IfaceSyn import IfaceSyn
import InstEnv import InstEnv
@ -755,12 +710,12 @@ import TcRnMonad hiding (Applicative (..), IORef,
allM, anyM, concatMapM, foldrM, allM, anyM, concatMapM, foldrM,
mapMaybeM, (<$>)) mapMaybeM, (<$>))
import TcRnTypes import TcRnTypes
import TcType hiding (mkVisFunTys) import TcType
import qualified TcType import qualified TcType
import TidyPgm as GHC import TidyPgm as GHC
import qualified TyCoRep import qualified TyCoRep
import TyCon import TyCon
import Type hiding (mkVisFunTys) import Type
import TysPrim import TysPrim
import TysWiredIn import TysWiredIn
import Unify import Unify
@ -769,16 +724,10 @@ import UniqSupply
import Var (Var (varName), setTyVarUnique, import Var (Var (varName), setTyVarUnique,
setVarUnique, varType) setVarUnique, varType)
#if MIN_VERSION_ghc(8,10,0)
import Coercion (coercionKind) import Coercion (coercionKind)
import Predicate import Predicate
import SrcLoc (Located, SrcLoc (UnhelpfulLoc), import SrcLoc (Located, SrcLoc (UnhelpfulLoc),
SrcSpan (UnhelpfulSpan)) SrcSpan (UnhelpfulSpan))
#else
import SrcLoc (RealLocated,
SrcLoc (UnhelpfulLoc),
SrcSpan (UnhelpfulSpan))
#endif
#endif #endif
@ -890,11 +839,7 @@ pattern ExposePackage s a mr = DynFlags.ExposePackage s a mr
#endif #endif
pattern FunTy :: Type -> Type -> Type pattern FunTy :: Type -> Type -> Type
#if MIN_VERSION_ghc(8,10,0)
pattern FunTy arg res <- TyCoRep.FunTy {ft_arg = arg, ft_res = res} pattern FunTy arg res <- TyCoRep.FunTy {ft_arg = arg, ft_res = res}
#else
pattern FunTy arg res <- TyCoRep.FunTy arg res
#endif
#if MIN_VERSION_ghc(9,0,0) #if MIN_VERSION_ghc(9,0,0)
-- type HasSrcSpan x a = (GenLocated SrcSpan a ~ x) -- type HasSrcSpan x a = (GenLocated SrcSpan a ~ x)
@ -941,14 +886,6 @@ unrestricted :: a -> Scaled a
unrestricted = id unrestricted = id
#endif #endif
mkVisFunTys :: [Scaled Type] -> Type -> Type
mkVisFunTys =
#if __GLASGOW_HASKELL__ == 808
mkFunTys
#else
TcType.mkVisFunTys
#endif
mkInfForAllTys :: [TyVar] -> Type -> Type mkInfForAllTys :: [TyVar] -> Type -> Type
mkInfForAllTys = mkInfForAllTys =
#if MIN_VERSION_ghc(9,0,0) #if MIN_VERSION_ghc(9,0,0)
@ -981,11 +918,6 @@ tcSplitForAllTyVarBinder_maybe =
#endif #endif
#if !MIN_VERSION_ghc(8,10,0)
noExtField :: GHC.NoExt
noExtField = GHC.noExt
#endif
#if !MIN_VERSION_ghc(9,0,0) #if !MIN_VERSION_ghc(9,0,0)
pattern NotBoot, IsBoot :: IsBootInterface pattern NotBoot, IsBoot :: IsBootInterface
pattern NotBoot = False pattern NotBoot = False
@ -1132,15 +1064,11 @@ makeSimpleDetails hsc_env =
#endif #endif
mkIfaceTc hsc_env sf details ms tcGblEnv = mkIfaceTc hsc_env sf details ms tcGblEnv =
#if MIN_VERSION_ghc(8,10,0)
GHC.mkIfaceTc hsc_env sf details GHC.mkIfaceTc hsc_env sf details
#if MIN_VERSION_ghc(9,3,0) #if MIN_VERSION_ghc(9,3,0)
ms ms
#endif #endif
tcGblEnv tcGblEnv
#else
fst <$> GHC.mkIfaceTc hsc_env Nothing sf details tcGblEnv
#endif
mkBootModDetailsTc :: HscEnv -> TcGblEnv -> IO ModDetails mkBootModDetailsTc :: HscEnv -> TcGblEnv -> IO ModDetails
mkBootModDetailsTc session = GHC.mkBootModDetailsTc mkBootModDetailsTc session = GHC.mkBootModDetailsTc

View File

@ -30,10 +30,8 @@ module Development.IDE.GHC.Compat.Util (
-- * Maybes -- * Maybes
MaybeErr(..), MaybeErr(..),
orElse, orElse,
#if MIN_VERSION_ghc(8,10,0)
-- * Pair -- * Pair
Pair(..), Pair(..),
#endif
-- * EnumSet -- * EnumSet
EnumSet, EnumSet,
toList, toList,
@ -97,10 +95,8 @@ import qualified Exception
import FastString import FastString
import Fingerprint import Fingerprint
import Maybes import Maybes
#if MIN_VERSION_ghc(8,10,0)
import Pair
#endif
import Outputable (pprHsString) import Outputable (pprHsString)
import Pair
import Panic hiding (try) import Panic hiding (try)
import StringBuffer import StringBuffer
import UniqDFM import UniqDFM

View File

@ -104,11 +104,6 @@ instance Show ParsedModule where
instance NFData ModSummary where instance NFData ModSummary where
rnf = rwhnf rnf = rwhnf
#if !MIN_VERSION_ghc(8,10,0)
instance NFData FastString where
rnf = rwhnf
#endif
#if MIN_VERSION_ghc(9,2,0) #if MIN_VERSION_ghc(9,2,0)
instance Ord FastString where instance Ord FastString where
compare a b = if a == b then EQ else compare (fs_sbs a) (fs_sbs b) compare a b = if a == b then EQ else compare (fs_sbs a) (fs_sbs b)

View File

@ -280,13 +280,6 @@ ioe_dupHandlesNotCompatible h =
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Tracing exactprint terms -- Tracing exactprint terms
-- Should in `Development.IDE.GHC.Orphans`,
-- leave it here to prevent cyclic module dependency
#if !MIN_VERSION_ghc(8,10,0)
instance Outputable SDoc where
ppr = id
#endif
-- | Print a GHC value in `defaultUserStyle` without unique symbols. -- | Print a GHC value in `defaultUserStyle` without unique symbols.
-- It uses `showSDocUnsafe` with `unsafeGlobalDynFlags` internally. -- It uses `showSDocUnsafe` with `unsafeGlobalDynFlags` internally.
-- --

View File

@ -248,11 +248,7 @@ documentSymbolForImport (L (locA -> (RealSrcSpan l _)) ImportDecl { ideclName, i
(defDocumentSymbol l :: DocumentSymbol) (defDocumentSymbol l :: DocumentSymbol)
{ _name = "import " <> printOutputable ideclName { _name = "import " <> printOutputable ideclName
, _kind = SkModule , _kind = SkModule
#if MIN_VERSION_ghc(8,10,0)
, _detail = case ideclQualified of { NotQualified -> Nothing; _ -> Just "qualified" } , _detail = case ideclQualified of { NotQualified -> Nothing; _ -> Just "qualified" }
#else
, _detail = if ideclQualified then Just "qualified" else Nothing
#endif
} }
documentSymbolForImport _ = Nothing documentSymbolForImport _ = Nothing

View File

@ -290,12 +290,8 @@ mkNameCompItem doc thingParent origName provenance thingType isInfix docs !imp =
then getArgs ret then getArgs ret
else Prelude.filter (not . isDictTy) $ map scaledThing args else Prelude.filter (not . isDictTy) $ map scaledThing args
| isPiTy t = getArgs $ snd (splitPiTys t) | isPiTy t = getArgs $ snd (splitPiTys t)
#if MIN_VERSION_ghc(8,10,0)
| Just (Pair _ t) <- coercionKind <$> isCoercionTy_maybe t | Just (Pair _ t) <- coercionKind <$> isCoercionTy_maybe t
= getArgs t = getArgs t
#else
| isCoercionTy t = maybe [] (getArgs . snd) (splitCoercionType_maybe t)
#endif
| otherwise = [] | otherwise = []
@ -766,9 +762,6 @@ uniqueCompl candidate unique =
importedFrom (provenance -> ImportedFrom m) = m importedFrom (provenance -> ImportedFrom m) = m
importedFrom (provenance -> DefinedIn m) = m importedFrom (provenance -> DefinedIn m) = m
importedFrom (provenance -> Local _) = "local" importedFrom (provenance -> Local _) = "local"
#if __GLASGOW_HASKELL__ < 810
importedFrom _ = ""
#endif
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- helper functions for infix backticks -- helper functions for infix backticks

View File

@ -416,23 +416,10 @@ mkLexerPState dynFlags stringBuffer =
startRealSrcLoc = mkRealSrcLoc "asdf" 1 1 startRealSrcLoc = mkRealSrcLoc "asdf" 1 1
updateDynFlags = flip gopt_unset Opt_Haddock . flip gopt_set Opt_KeepRawTokenStream updateDynFlags = flip gopt_unset Opt_Haddock . flip gopt_set Opt_KeepRawTokenStream
finalDynFlags = updateDynFlags dynFlags finalDynFlags = updateDynFlags dynFlags
#if !MIN_VERSION_ghc(8,10,1)
mkLexerParserFlags =
mkParserFlags'
<$> warningFlags
<*> extensionFlags
<*> homeUnitId_
<*> safeImportsOn
<*> gopt Opt_Haddock
<*> gopt Opt_KeepRawTokenStream
<*> const False
finalPState = mkPStatePure (mkLexerParserFlags finalDynFlags) stringBuffer startRealSrcLoc
#else
pState = initParserState (initParserOpts finalDynFlags) stringBuffer startRealSrcLoc pState = initParserState (initParserOpts finalDynFlags) stringBuffer startRealSrcLoc
PState{ options = pStateOptions } = pState PState{ options = pStateOptions } = pState
finalExtBitsMap = setBit (pExtsBitmap pStateOptions) (fromEnum UsePosPragsBit) finalExtBitsMap = setBit (pExtsBitmap pStateOptions) (fromEnum UsePosPragsBit)
finalPStateOptions = pStateOptions{ pExtsBitmap = finalExtBitsMap } finalPStateOptions = pStateOptions{ pExtsBitmap = finalExtBitsMap }
finalPState = pState{ options = finalPStateOptions } finalPState = pState{ options = finalPStateOptions }
#endif
in in
finalPState finalPState

View File

@ -1186,7 +1186,7 @@ checkFileCompiles fp diag =
pluginSimpleTests :: TestTree pluginSimpleTests :: TestTree
pluginSimpleTests = pluginSimpleTests =
ignoreInWindowsForGHC88And810 $ ignoreInWindowsForGHC810 $
ignoreForGHC92Plus "blocked on ghc-typelits-natnormalise" $ ignoreForGHC92Plus "blocked on ghc-typelits-natnormalise" $
testSessionWithExtraFiles "plugin-knownnat" "simple plugin" $ \dir -> do testSessionWithExtraFiles "plugin-knownnat" "simple plugin" $ \dir -> do
_ <- openDoc (dir </> "KnownNat.hs") "haskell" _ <- openDoc (dir </> "KnownNat.hs") "haskell"
@ -1201,7 +1201,7 @@ pluginSimpleTests =
pluginParsedResultTests :: TestTree pluginParsedResultTests :: TestTree
pluginParsedResultTests = pluginParsedResultTests =
ignoreInWindowsForGHC88And810 $ ignoreInWindowsForGHC810 $
ignoreForGHC92Plus "No need for this plugin anymore!" $ ignoreForGHC92Plus "No need for this plugin anymore!" $
testSessionWithExtraFiles "plugin-recorddot" "parsedResultAction plugin" $ \dir -> do testSessionWithExtraFiles "plugin-recorddot" "parsedResultAction plugin" $ \dir -> do
_ <- openDoc (dir</> "RecordDot.hs") "haskell" _ <- openDoc (dir</> "RecordDot.hs") "haskell"
@ -1370,7 +1370,7 @@ thTests =
_ <- createDoc "A.hs" "haskell" sourceA _ <- createDoc "A.hs" "haskell" sourceA
_ <- createDoc "B.hs" "haskell" sourceB _ <- createDoc "B.hs" "haskell" sourceB
expectDiagnostics [ ( "B.hs", [(DsWarning, (4, 0), "Top-level binding with no type signature: main :: IO ()")] ) ] expectDiagnostics [ ( "B.hs", [(DsWarning, (4, 0), "Top-level binding with no type signature: main :: IO ()")] ) ]
, ignoreInWindowsForGHC88 $ testCase "findsTHnewNameConstructor" $ runWithExtraFiles "THNewName" $ \dir -> do , testCase "findsTHnewNameConstructor" $ runWithExtraFiles "THNewName" $ \dir -> do
-- This test defines a TH value with the meaning "data A = A" in A.hs -- This test defines a TH value with the meaning "data A = A" in A.hs
-- Loads and export the template in B.hs -- Loads and export the template in B.hs
@ -2273,17 +2273,13 @@ xfail = flip expectFailBecause
ignoreInWindowsBecause :: String -> TestTree -> TestTree ignoreInWindowsBecause :: String -> TestTree -> TestTree
ignoreInWindowsBecause = ignoreFor (BrokenForOS Windows) ignoreInWindowsBecause = ignoreFor (BrokenForOS Windows)
ignoreInWindowsForGHC88And810 :: TestTree -> TestTree ignoreInWindowsForGHC810 :: TestTree -> TestTree
ignoreInWindowsForGHC88And810 = ignoreInWindowsForGHC810 =
ignoreFor (BrokenSpecific Windows [GHC88, GHC810]) "tests are unreliable in windows for ghc 8.8 and 8.10" ignoreFor (BrokenSpecific Windows [GHC810]) "tests are unreliable in windows for ghc 8.10"
ignoreForGHC92Plus :: String -> TestTree -> TestTree ignoreForGHC92Plus :: String -> TestTree -> TestTree
ignoreForGHC92Plus = ignoreFor (BrokenForGHC [GHC92, GHC94]) ignoreForGHC92Plus = ignoreFor (BrokenForGHC [GHC92, GHC94])
ignoreInWindowsForGHC88 :: TestTree -> TestTree
ignoreInWindowsForGHC88 =
ignoreFor (BrokenSpecific Windows [GHC88]) "tests are unreliable in windows for ghc 8.8"
knownBrokenForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree knownBrokenForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree
knownBrokenForGhcVersions ghcVers = knownBrokenFor (BrokenForGHC ghcVers) knownBrokenForGhcVersions ghcVers = knownBrokenFor (BrokenForGHC ghcVers)
@ -2455,7 +2451,7 @@ retryFailedCradle = testSession' "retry failed" $ \dir -> do
dependentFileTest :: TestTree dependentFileTest :: TestTree
dependentFileTest = testGroup "addDependentFile" dependentFileTest = testGroup "addDependentFile"
[testGroup "file-changed" [ignoreInWindowsForGHC88 $ testSession' "test" test] [testGroup "file-changed" [testSession' "test" test]
] ]
where where
test dir = do test dir = do

View File

@ -14,7 +14,7 @@ description:
Test utils for ghcide Test utils for ghcide
homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme
bug-reports: https://github.com/haskell/haskell-language-server/issues bug-reports: https://github.com/haskell/haskell-language-server/issues
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4 tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4
source-repository head source-repository head
type: git type: git

View File

@ -14,7 +14,7 @@ copyright: The Haskell IDE Team
license: Apache-2.0 license: Apache-2.0
license-file: LICENSE license-file: LICENSE
build-type: Simple build-type: Simple
tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4 tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4
extra-source-files: extra-source-files:
README.md README.md
ChangeLog.md ChangeLog.md
@ -251,7 +251,7 @@ common hlint
cpp-options: -Dhls_hlint cpp-options: -Dhls_hlint
common stan common stan
if flag(stan) && (impl(ghc >= 8.8) && impl(ghc < 9.0)) if flag(stan) && (impl(ghc >= 8.10) && impl(ghc < 9.0))
build-depends: hls-stan-plugin ^>= 1.0 build-depends: hls-stan-plugin ^>= 1.0
cpp-options: -Dhls_stan cpp-options: -Dhls_stan

View File

@ -46,8 +46,6 @@ library
Compat.HieDebug Compat.HieDebug
Compat.HieUtils Compat.HieUtils
if (impl(ghc > 8.7) && impl(ghc < 8.10))
hs-source-dirs: src-ghc88 src-reexport
if (impl(ghc > 8.9) && impl(ghc < 8.11)) if (impl(ghc > 8.9) && impl(ghc < 8.11))
hs-source-dirs: src-ghc810 src-reexport hs-source-dirs: src-ghc810 src-reexport
if (impl(ghc >= 9.0) && impl(ghc < 9.1) || flag(ghc-lib)) if (impl(ghc >= 9.0) && impl(ghc < 9.1) || flag(ghc-lib))

File diff suppressed because it is too large Load Diff

View File

@ -1,389 +0,0 @@
{-
Binary serialization for .hie files.
-}
{- HLINT ignore -}
{-# LANGUAGE ScopedTypeVariables #-}
module Compat.HieBin ( readHieFile, readHieFileWithVersion, HieHeader, writeHieFile, HieName(..), toHieName, HieFileResult(..), hieMagic,NameCacheUpdater(..)) where
import Config ( cProjectVersion )
import Binary
import BinIface ( getDictFastString )
import FastMutInt
import FastString ( FastString )
import Module ( Module )
import Name
import NameCache
import Outputable
import PrelInfo
import SrcLoc
import UniqSupply ( takeUniqFromSupply )
import Util ( maybeRead )
import Unique
import UniqFM
import IfaceEnv
import qualified Data.Array as A
import Data.IORef
import Data.ByteString ( ByteString )
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BSC
import Data.List ( mapAccumR )
import Data.Word ( Word8, Word32 )
import Control.Monad ( replicateM, when )
import System.Directory ( createDirectoryIfMissing )
import System.FilePath ( takeDirectory )
import HieTypes
-- | `Name`'s get converted into `HieName`'s before being written into @.hie@
-- files. See 'toHieName' and 'fromHieName' for logic on how to convert between
-- these two types.
data HieName
= ExternalName !Module !OccName !SrcSpan
| LocalName !OccName !SrcSpan
| KnownKeyName !Unique
deriving (Eq)
instance Ord HieName where
compare (ExternalName a b c) (ExternalName d e f) = compare (a,b,c) (d,e,f)
compare (LocalName a b) (LocalName c d) = compare (a,b) (c,d)
compare (KnownKeyName a) (KnownKeyName b) = nonDetCmpUnique a b
-- Not actually non determinstic as it is a KnownKey
compare ExternalName{} _ = LT
compare LocalName{} ExternalName{} = GT
compare LocalName{} _ = LT
compare KnownKeyName{} _ = GT
instance Outputable HieName where
ppr (ExternalName m n sp) = text "ExternalName" <+> ppr m <+> ppr n <+> ppr sp
ppr (LocalName n sp) = text "LocalName" <+> ppr n <+> ppr sp
ppr (KnownKeyName u) = text "KnownKeyName" <+> ppr u
data HieSymbolTable = HieSymbolTable
{ hie_symtab_next :: !FastMutInt
, hie_symtab_map :: !(IORef (UniqFM (Int, HieName)))
}
data HieDictionary = HieDictionary
{ hie_dict_next :: !FastMutInt -- The next index to use
, hie_dict_map :: !(IORef (UniqFM (Int,FastString))) -- indexed by FastString
}
initBinMemSize :: Int
initBinMemSize = 1024*1024
-- | The header for HIE files - Capital ASCII letters "HIE".
hieMagic :: [Word8]
hieMagic = [72,73,69]
hieMagicLen :: Int
hieMagicLen = length hieMagic
ghcVersion :: ByteString
ghcVersion = BSC.pack cProjectVersion
putBinLine :: BinHandle -> ByteString -> IO ()
putBinLine bh xs = do
mapM_ (putByte bh) $ BS.unpack xs
putByte bh 10 -- newline char
-- | Write a `HieFile` to the given `FilePath`, with a proper header and
-- symbol tables for `Name`s and `FastString`s
writeHieFile :: FilePath -> HieFile -> IO ()
writeHieFile hie_file_path hiefile = do
bh0 <- openBinMem initBinMemSize
-- Write the header: hieHeader followed by the
-- hieVersion and the GHC version used to generate this file
mapM_ (putByte bh0) hieMagic
putBinLine bh0 $ BSC.pack $ show hieVersion
putBinLine bh0 $ ghcVersion
-- remember where the dictionary pointer will go
dict_p_p <- tellBin bh0
put_ bh0 dict_p_p
-- remember where the symbol table pointer will go
symtab_p_p <- tellBin bh0
put_ bh0 symtab_p_p
-- Make some intial state
symtab_next <- newFastMutInt
writeFastMutInt symtab_next 0
symtab_map <- newIORef emptyUFM
let hie_symtab = HieSymbolTable {
hie_symtab_next = symtab_next,
hie_symtab_map = symtab_map }
dict_next_ref <- newFastMutInt
writeFastMutInt dict_next_ref 0
dict_map_ref <- newIORef emptyUFM
let hie_dict = HieDictionary {
hie_dict_next = dict_next_ref,
hie_dict_map = dict_map_ref }
-- put the main thing
let bh = setUserData bh0 $ newWriteState (putName hie_symtab)
(putName hie_symtab)
(putFastString hie_dict)
put_ bh hiefile
-- write the symtab pointer at the front of the file
symtab_p <- tellBin bh
putAt bh symtab_p_p symtab_p
seekBin bh symtab_p
-- write the symbol table itself
symtab_next' <- readFastMutInt symtab_next
symtab_map' <- readIORef symtab_map
putSymbolTable bh symtab_next' symtab_map'
-- write the dictionary pointer at the front of the file
dict_p <- tellBin bh
putAt bh dict_p_p dict_p
seekBin bh dict_p
-- write the dictionary itself
dict_next <- readFastMutInt dict_next_ref
dict_map <- readIORef dict_map_ref
putDictionary bh dict_next dict_map
-- and send the result to the file
createDirectoryIfMissing True (takeDirectory hie_file_path)
writeBinMem bh hie_file_path
return ()
data HieFileResult
= HieFileResult
{ hie_file_result_version :: Integer
, hie_file_result_ghc_version :: ByteString
, hie_file_result :: HieFile
}
type HieHeader = (Integer, ByteString)
-- | Read a `HieFile` from a `FilePath`. Can use
-- an existing `NameCache`. Allows you to specify
-- which versions of hieFile to attempt to read.
-- `Left` case returns the failing header versions.
readHieFileWithVersion :: (HieHeader -> Bool) -> NameCacheUpdater -> FilePath -> IO (Either HieHeader HieFileResult)
readHieFileWithVersion readVersion ncu file = do
bh0 <- readBinMem file
(hieVersion, ghcVersion) <- readHieFileHeader file bh0
if readVersion (hieVersion, ghcVersion)
then do
hieFile <- readHieFileContents bh0 ncu
return $ Right (HieFileResult hieVersion ghcVersion hieFile)
else return $ Left (hieVersion, ghcVersion)
-- | Read a `HieFile` from a `FilePath`. Can use
-- an existing `NameCache`.
readHieFile :: NameCacheUpdater -> FilePath -> IO HieFileResult
readHieFile ncu file = do
bh0 <- readBinMem file
(readHieVersion, ghcVersion) <- readHieFileHeader file bh0
-- Check if the versions match
when (readHieVersion /= hieVersion) $
panic $ unwords ["readHieFile: hie file versions don't match for file:"
, file
, "Expected"
, show hieVersion
, "but got", show readHieVersion
]
hieFile <- readHieFileContents bh0 ncu
return $ HieFileResult hieVersion ghcVersion hieFile
readBinLine :: BinHandle -> IO ByteString
readBinLine bh = BS.pack . reverse <$> loop []
where
loop acc = do
char <- get bh :: IO Word8
if char == 10 -- ASCII newline '\n'
then return acc
else loop (char : acc)
readHieFileHeader :: FilePath -> BinHandle -> IO HieHeader
readHieFileHeader file bh0 = do
-- Read the header
magic <- replicateM hieMagicLen (get bh0)
version <- BSC.unpack <$> readBinLine bh0
case maybeRead version of
Nothing ->
panic $ unwords ["readHieFileHeader: hieVersion isn't an Integer:"
, show version
]
Just readHieVersion -> do
ghcVersion <- readBinLine bh0
-- Check if the header is valid
when (magic /= hieMagic) $
panic $ unwords ["readHieFileHeader: headers don't match for file:"
, file
, "Expected"
, show hieMagic
, "but got", show magic
]
return (readHieVersion, ghcVersion)
readHieFileContents :: BinHandle -> NameCacheUpdater -> IO HieFile
readHieFileContents bh0 ncu = do
dict <- get_dictionary bh0
-- read the symbol table so we are capable of reading the actual data
bh1 <- do
let bh1 = setUserData bh0 $ newReadState (error "getSymtabName")
(getDictFastString dict)
symtab <- get_symbol_table bh1
let bh1' = setUserData bh1
$ newReadState (getSymTabName symtab)
(getDictFastString dict)
return bh1'
-- load the actual data
hiefile <- get bh1
return hiefile
where
get_dictionary bin_handle = do
dict_p <- get bin_handle
data_p <- tellBin bin_handle
seekBin bin_handle dict_p
dict <- getDictionary bin_handle
seekBin bin_handle data_p
return dict
get_symbol_table bh1 = do
symtab_p <- get bh1
data_p' <- tellBin bh1
seekBin bh1 symtab_p
symtab <- getSymbolTable bh1 ncu
seekBin bh1 data_p'
return symtab
putFastString :: HieDictionary -> BinHandle -> FastString -> IO ()
putFastString HieDictionary { hie_dict_next = j_r,
hie_dict_map = out_r} bh f
= do
out <- readIORef out_r
let unique = getUnique f
case lookupUFM out unique of
Just (j, _) -> put_ bh (fromIntegral j :: Word32)
Nothing -> do
j <- readFastMutInt j_r
put_ bh (fromIntegral j :: Word32)
writeFastMutInt j_r (j + 1)
writeIORef out_r $! addToUFM out unique (j, f)
putSymbolTable :: BinHandle -> Int -> UniqFM (Int,HieName) -> IO ()
putSymbolTable bh next_off symtab = do
put_ bh next_off
let names = A.elems (A.array (0,next_off-1) (nonDetEltsUFM symtab))
mapM_ (putHieName bh) names
getSymbolTable :: BinHandle -> NameCacheUpdater -> IO SymbolTable
getSymbolTable bh ncu = do
sz <- get bh
od_names <- replicateM sz (getHieName bh)
updateNameCache ncu $ \nc ->
let arr = A.listArray (0,sz-1) names
(nc', names) = mapAccumR fromHieName nc od_names
in (nc',arr)
getSymTabName :: SymbolTable -> BinHandle -> IO Name
getSymTabName st bh = do
i :: Word32 <- get bh
return $ st A.! (fromIntegral i)
putName :: HieSymbolTable -> BinHandle -> Name -> IO ()
putName (HieSymbolTable next ref) bh name = do
symmap <- readIORef ref
case lookupUFM symmap name of
Just (off, ExternalName mod occ (UnhelpfulSpan _))
| isGoodSrcSpan (nameSrcSpan name) -> do
let hieName = ExternalName mod occ (nameSrcSpan name)
writeIORef ref $! addToUFM symmap name (off, hieName)
put_ bh (fromIntegral off :: Word32)
Just (off, LocalName _occ span)
| notLocal (toHieName name) || nameSrcSpan name /= span -> do
writeIORef ref $! addToUFM symmap name (off, toHieName name)
put_ bh (fromIntegral off :: Word32)
Just (off, _) -> put_ bh (fromIntegral off :: Word32)
Nothing -> do
off <- readFastMutInt next
writeFastMutInt next (off+1)
writeIORef ref $! addToUFM symmap name (off, toHieName name)
put_ bh (fromIntegral off :: Word32)
where
notLocal :: HieName -> Bool
notLocal LocalName{} = False
notLocal _ = True
-- ** Converting to and from `HieName`'s
toHieName :: Name -> HieName
toHieName name
| isKnownKeyName name = KnownKeyName (nameUnique name)
| isExternalName name = ExternalName (nameModule name)
(nameOccName name)
(nameSrcSpan name)
| otherwise = LocalName (nameOccName name) (nameSrcSpan name)
fromHieName :: NameCache -> HieName -> (NameCache, Name)
fromHieName nc (ExternalName mod occ span) =
let cache = nsNames nc
in case lookupOrigNameCache cache mod occ of
Just name
| nameSrcSpan name == span -> (nc, name)
| otherwise ->
let name' = setNameLoc name span
new_cache = extendNameCache cache mod occ name'
in ( nc{ nsNames = new_cache }, name' )
Nothing ->
let (uniq, us) = takeUniqFromSupply (nsUniqs nc)
name = mkExternalName uniq mod occ span
new_cache = extendNameCache cache mod occ name
in ( nc{ nsUniqs = us, nsNames = new_cache }, name )
fromHieName nc (LocalName occ span) =
let (uniq, us) = takeUniqFromSupply (nsUniqs nc)
name = mkInternalName uniq occ span
in ( nc{ nsUniqs = us }, name )
fromHieName nc (KnownKeyName u) = case lookupKnownKeyName u of
Nothing -> pprPanic "fromHieName:unknown known-key unique"
(ppr (unpkUnique u))
Just n -> (nc, n)
-- ** Reading and writing `HieName`'s
putHieName :: BinHandle -> HieName -> IO ()
putHieName bh (ExternalName mod occ span) = do
putByte bh 0
put_ bh (mod, occ, span)
putHieName bh (LocalName occName span) = do
putByte bh 1
put_ bh (occName, span)
putHieName bh (KnownKeyName uniq) = do
putByte bh 2
put_ bh $ unpkUnique uniq
getHieName :: BinHandle -> IO HieName
getHieName bh = do
t <- getByte bh
case t of
0 -> do
(modu, occ, span) <- get bh
return $ ExternalName modu occ span
1 -> do
(occ, span) <- get bh
return $ LocalName occ span
2 -> do
(c,i) <- get bh
return $ KnownKeyName $ mkUnique c i
_ -> panic "HieBin.getHieName: invalid tag"

View File

@ -62,17 +62,8 @@ getLiteral (L (locA -> (RealSrcSpan sSpan _)) expr) = case expr of
_ -> Nothing _ -> Nothing
getLiteral _ = Nothing getLiteral _ = Nothing
-- GHC 8.8 typedefs LPat = Pat
#if __GLASGOW_HASKELL__ == 808
type LocPat a = GenLocated SrcSpan (Pat a)
#else
type LocPat a = LPat a
#endif
-- | Destructure Patterns to unwrap any Literals -- | Destructure Patterns to unwrap any Literals
getPattern :: LocPat GhcPs -> Maybe Literal getPattern :: LPat GhcPs -> Maybe Literal
getPattern (L (locA -> (RealSrcSpan patSpan _)) pat) = case pat of getPattern (L (locA -> (RealSrcSpan patSpan _)) pat) = case pat of
LitPat _ lit -> case lit of LitPat _ lit -> case lit of
HsInt _ val -> fromIntegralLit patSpan val HsInt _ val -> fromIntegralLit patSpan val

View File

@ -305,9 +305,6 @@ runEvalCmd plId st EvalParams{..} =
#endif #endif
-- Load the module with its current content (as the saved module might not be up to date) -- Load the module with its current content (as the saved module might not be up to date)
-- BUG: this fails for files that requires preprocessors (e.g. CPP) for ghc < 8.8
-- see https://gitlab.haskell.org/ghc/ghc/-/issues/17066
-- and https://hackage.haskell.org/package/ghc-8.10.1/docs/GHC.html#v:TargetFile
eSetTarget <- gStrictTry $ setTargets [thisModuleTarget] eSetTarget <- gStrictTry $ setTargets [thisModuleTarget]
dbg "setTarget" eSetTarget dbg "setTarget" eSetTarget

View File

@ -3,11 +3,7 @@ module Development.IDE.GHC.Dump(showAstDataHtml) where
import Data.Data hiding (Fixity) import Data.Data hiding (Fixity)
import Development.IDE.GHC.Compat hiding (NameAnn) import Development.IDE.GHC.Compat hiding (NameAnn)
import Development.IDE.GHC.Compat.ExactPrint import Development.IDE.GHC.Compat.ExactPrint
#if MIN_VERSION_ghc(8,10,1)
import GHC.Hs.Dump import GHC.Hs.Dump
#else
import HsDumpAst
#endif
#if MIN_VERSION_ghc(9,2,1) #if MIN_VERSION_ghc(9,2,1)
import qualified Data.ByteString as B import qualified Data.ByteString as B
import Development.IDE.GHC.Compat.Util import Development.IDE.GHC.Compat.Util

View File

@ -489,13 +489,8 @@ instance p ~ GhcPs => ASTElement AnnListItem (HsExpr p) where
graft = graftExpr graft = graftExpr
instance p ~ GhcPs => ASTElement AnnListItem (Pat p) where instance p ~ GhcPs => ASTElement AnnListItem (Pat p) where
#if __GLASGOW_HASKELL__ == 808
parseAST = fmap (fmap $ right $ second dL) . parsePattern
maybeParensAST = dL . parenthesizePat appPrec . unLoc
#else
parseAST = parsePattern parseAST = parsePattern
maybeParensAST = parenthesizePat appPrec maybeParensAST = parenthesizePat appPrec
#endif
instance p ~ GhcPs => ASTElement AnnListItem (HsType p) where instance p ~ GhcPs => ASTElement AnnListItem (HsType p) where
parseAST = parseType parseAST = parseType

View File

@ -559,8 +559,4 @@ toImportDecl AddImport {..} = GHC.ImportDecl {ideclSource = ideclSource', ..}
ideclExt = GHC.noExtField ideclExt = GHC.noExtField
#endif #endif
ideclAs = toMod <$> ideclAsString ideclAs = toMod <$> ideclAsString
#if MIN_VERSION_ghc(8,10,0)
ideclQualified = if ideclQualifiedBool then GHC.QualifiedPre else GHC.NotQualified ideclQualified = if ideclQualifiedBool then GHC.QualifiedPre else GHC.NotQualified
#else
ideclQualified = ideclQualifiedBool
#endif

View File

@ -126,9 +126,6 @@ expandTHSplice _eStyle ideState params@ExpandSpliceParams {..} = do
let exprSuperSpans = let exprSuperSpans =
listToMaybe $ findSubSpansDesc srcSpan exprSplices listToMaybe $ findSubSpansDesc srcSpan exprSplices
_patSuperSpans = _patSuperSpans =
#if __GLASGOW_HASKELL__ == 808
fmap (second dL) $
#endif
listToMaybe $ findSubSpansDesc srcSpan patSplices listToMaybe $ findSubSpansDesc srcSpan patSplices
typeSuperSpans = typeSuperSpans =
listToMaybe $ findSubSpansDesc srcSpan typeSplices listToMaybe $ findSubSpansDesc srcSpan typeSplices

View File

@ -26,7 +26,7 @@ flag pedantic
manual: True manual: True
library library
if impl(ghc < 8.8) || impl(ghc >= 9.0) if impl(ghc < 8.10) || impl(ghc >= 9.0)
buildable: False buildable: False
else else
buildable: True buildable: True
@ -58,7 +58,7 @@ library
OverloadedStrings OverloadedStrings
test-suite test test-suite test
if impl(ghc < 8.8) || impl(ghc >= 9.0) if impl(ghc < 8.10) || impl(ghc >= 9.0)
buildable: False buildable: False
else else
buildable: True buildable: True

View File

@ -18,7 +18,7 @@ import Development.IDE.GHC.ExactPrint
import Generics.SYB.GHC (mkBindListT, everywhereM') import Generics.SYB.GHC (mkBindListT, everywhereM')
import Wingman.AbstractLSP.Types import Wingman.AbstractLSP.Types
import Wingman.CaseSplit import Wingman.CaseSplit
import Wingman.GHC (liftMaybe, isHole, pattern AMatch, unXPat) import Wingman.GHC (liftMaybe, isHole, pattern AMatch)
import Wingman.Judgements (jNeedsToBindArgs) import Wingman.Judgements (jNeedsToBindArgs)
import Wingman.LanguageServer (runStaleIde) import Wingman.LanguageServer (runStaleIde)
import Wingman.LanguageServer.TacticProviders import Wingman.LanguageServer.TacticProviders
@ -133,7 +133,7 @@ graftHole span rtr
) )
(occName name) (occName name)
$ iterateSplit $ iterateSplit
$ mkFirstAgda (fmap unXPat pats) $ mkFirstAgda pats
$ unLoc $ unLoc
$ rtr_extract rtr $ rtr_extract rtr
graftHole span rtr graftHole span rtr

View File

@ -277,17 +277,6 @@ class PatCompattable p where
fromPatCompat :: PatCompat p -> Pat p fromPatCompat :: PatCompat p -> Pat p
toPatCompat :: Pat p -> PatCompat p toPatCompat :: Pat p -> PatCompat p
#if __GLASGOW_HASKELL__ == 808
instance PatCompattable GhcTc where
fromPatCompat = id
toPatCompat = id
instance PatCompattable GhcPs where
fromPatCompat = id
toPatCompat = id
type PatCompat pass = Pat pass
#else
instance PatCompattable GhcTc where instance PatCompattable GhcTc where
fromPatCompat = unLoc fromPatCompat = unLoc
toPatCompat = noLoc toPatCompat = noLoc
@ -297,7 +286,6 @@ instance PatCompattable GhcPs where
toPatCompat = noLoc toPatCompat = noLoc
type PatCompat pass = LPat pass type PatCompat pass = LPat pass
#endif
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- | Should make sure it's a fun bind -- | Should make sure it's a fun bind
@ -314,19 +302,6 @@ pattern TopLevelRHS name ps body where_binds <-
(GRHSs _ (GRHSs _
[L _ (GRHS _ [] body)] (L _ where_binds)) [L _ (GRHS _ [] body)] (L _ where_binds))
------------------------------------------------------------------------------
-- | In GHC 8.8, sometimes patterns are wrapped in 'XPat'.
-- The nitty gritty details are explained at
-- https://blog.shaynefletcher.org/2020/03/ghc-haskell-pats-and-lpats.html
--
-- We need to remove these in order to succesfull find patterns.
unXPat :: Pat GhcPs -> Pat GhcPs
#if __GLASGOW_HASKELL__ == 808
unXPat (XPat (L _ pat)) = unXPat pat
#endif
unXPat pat = pat
liftMaybe :: Monad m => Maybe a -> MaybeT m a liftMaybe :: Monad m => Maybe a -> MaybeT m a
liftMaybe a = MaybeT $ pure a liftMaybe a = MaybeT $ pure a

View File

@ -426,9 +426,6 @@ buildPatHy prov (fromPatCompat -> p0) =
RecCon r -> RecCon r ->
mkDerivedRecordHypothesis prov con args r mkDerivedRecordHypothesis prov con args r
SigPat _ p _ -> buildPatHy prov p SigPat _ p _ -> buildPatHy prov p
#if __GLASGOW_HASKELL__ == 808
XPat p -> buildPatHy prov $ unLoc p
#endif
_ -> pure mempty _ -> pure mempty
@ -583,10 +580,6 @@ wingmanRules recorder plId = do
#endif #endif
| isHole occ -> | isHole occ ->
maybeToList $ srcSpanToRange span maybeToList $ srcSpanToRange span
#if __GLASGOW_HASKELL__ == 808
L span (EWildPat _) ->
maybeToList $ srcSpanToRange span
#endif
(_ :: LHsExpr GhcPs) -> mempty (_ :: LHsExpr GhcPs) -> mempty
) $ pm_parsed_source pm ) $ pm_parsed_source pm
pure pure

View File

@ -1,129 +0,0 @@
resolver: lts-16.31 # last 8.8.4 lts
packages:
- .
- ./hie-compat
- ./hls-graph
- ./ghcide/
- ./ghcide/test
- ./shake-bench
- ./hls-plugin-api
- ./hls-test-utils
- ./plugins/hls-call-hierarchy-plugin
- ./plugins/hls-class-plugin
- ./plugins/hls-haddock-comments-plugin
- ./plugins/hls-eval-plugin
- ./plugins/hls-explicit-imports-plugin
- ./plugins/hls-refine-imports-plugin
- ./plugins/hls-hlint-plugin
- ./plugins/hls-stan-plugin
- ./plugins/hls-rename-plugin
- ./plugins/hls-retrie-plugin
- ./plugins/hls-splice-plugin
- ./plugins/hls-tactics-plugin
- ./plugins/hls-qualify-imported-names-plugin
- ./plugins/hls-brittany-plugin
- ./plugins/hls-stylish-haskell-plugin
- ./plugins/hls-floskell-plugin
- ./plugins/hls-fourmolu-plugin
- ./plugins/hls-pragmas-plugin
- ./plugins/hls-module-name-plugin
- ./plugins/hls-ormolu-plugin
- ./plugins/hls-alternate-number-format-plugin
- ./plugins/hls-code-range-plugin
- ./plugins/hls-change-type-signature-plugin
- ./plugins/hls-gadt-plugin
- ./plugins/hls-explicit-fixity-plugin
- ./plugins/hls-refactor-plugin
ghc-options:
"$everything": -haddock
extra-deps:
- aeson-1.5.2.0
- apply-refact-0.9.3.0
- brittany-0.13.1.2
- bytestring-trie-0.2.5.0
- cabal-plan-0.6.2.0
- clock-0.7.2
- constrained-dynamic-0.1.0.0
- extra-1.7.10
- floskell-0.10.4
- fourmolu-0.3.0.0
- ghc-check-0.5.0.8
- ghc-exactprint-0.6.4
- ghc-lib-8.10.7.20210828
- ghc-lib-parser-8.10.7.20210828
- ghc-source-gen-0.4.1.0
- ghc-trace-events-0.1.2.1
- haskell-src-exts-1.21.1
- hlint-3.2.8
- HsYAML-aeson-0.2.0.0@rev:2
- hoogle-5.0.17.11
- hsimport-0.11.0
- ilist-0.3.1.0
- implicit-hie-cradle-0.3.0.5
- implicit-hie-0.1.2.6
- megaparsec-9.0.1
- monad-dijkstra-0.1.1.2
- opentelemetry-0.6.1
- opentelemetry-extra-0.6.1
- refinery-0.4.0.0
- retrie-1.1.0.0
- semigroups-0.18.5
- shake-0.19.4
- stylish-haskell-0.12.2.0
- temporary-1.2.1.1
- th-compat-0.1.2@sha256:3d55de1adc542c1a870c9ada90da2fbbe5f4e8bcd3eed545a55c3df9311b32a8,2854
- bytestring-encoding-0.1.0.0@sha256:460b49779fbf0112e8e2f1753c1ed9131eb18827600c298f4d6bb51c4e8c1c0d,1727
- hiedb-0.4.2.0
- sqlite-simple-0.4.18.0@sha256:3ceea56375c0a3590c814e411a4eb86943f8d31b93b110ca159c90689b6b39e5,3002
- direct-sqlite-2.3.26@sha256:04e835402f1508abca383182023e4e2b9b86297b8533afbd4e57d1a5652e0c23,3718
- dependent-map-0.4.0.0@sha256:ca2b131046f4340a1c35d138c5a003fe4a5be96b14efc26291ed35fd08c62221,1657
- dependent-sum-0.7.1.0@sha256:5599aa89637db434431b1dd3fa7c34bc3d565ee44f0519bfbc877be1927c2531,2068
- dependent-sum-template-0.1.0.3@sha256:0bbbacdfbd3abf2a15aaf0cf2c27e5bdd159b519441fec39e1e6f2f54424adde,1682
- constraints-extras-0.3.0.2@sha256:013b8d0392582c6ca068e226718a4fe8be8e22321cc0634f6115505bf377ad26,1853
- some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055
- unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082
- stm-containers-1.1.0.4
- stm-hamt-1.2.0.6@sha256:fba86ccb4b45c5706c19b0e1315ba63dcac3b5d71de945ec001ba921fae80061,3972
- primitive-extras-0.10.1
- primitive-unlifted-0.1.3.1
- githash-0.1.6.2
- stan-0.0.1.0
- dir-traverse-0.2.3.0@sha256:adcc128f201ff95131b15ffe41365dc99c50dc3fa3a910f021521dc734013bfa,2137
- extensions-0.0.0.1@sha256:16517ab9df3dd6c7a20da746c8ed02cfd59c8cb40ae5719aef8b5dd4edceadc0,3993
- microaeson-0.1.0.1@sha256:88ba1cc52181b57abc453e222bbb76ca6ab252e38c6507d15a596d6a582fdf69,3968
- trial-0.0.0.0@sha256:834d3be439dc9b52a759a45a4d3944e5e55c3d50fd5874003147cc1f6231d4aa,4301
- trial-optparse-applicative-0.0.0.0@sha256:ba05edfc327a281766df5e0f44d91229e6a98afaf59abe1894b293453f076192,2449
- trial-tomland-0.0.0.0@sha256:743a9baaa36891ed3a44618fdfd5bc4ed9afc39cf9b9fa23ea1b96f3787f5ec0,2526
- text-rope-0.2
- co-log-core-0.3.1.0
- lsp-1.6.0.0
- lsp-types-1.6.0.0
- lsp-test-0.14.1.0
- hie-bios-0.11.0
- prettyprinter-1.7.1@sha256:9c43c9d8c3cd9f445596e5a2379574bba87f935a4d1fa41b5407ee3cf4edc743,6987
configure-options:
ghcide:
- --disable-library-for-ghci
haskell-language-server:
- --disable-library-for-ghci
heapsize:
- --disable-library-for-ghci
flags:
haskell-language-server:
pedantic: true
retrie:
BuildExecutable: false
hyphenation:
embed: true
hlint:
ghc-lib: true
nix:
packages: [icu libcxx zlib]
concurrent-tests: false

View File

@ -376,4 +376,4 @@ compls `shouldNotContainCompl` lbl =
@? "Should not contain completion: " ++ show lbl @? "Should not contain completion: " ++ show lbl
expectFailIfBeforeGhc92 :: String -> TestTree -> TestTree expectFailIfBeforeGhc92 :: String -> TestTree -> TestTree
expectFailIfBeforeGhc92 = knownBrokenForGhcVersions [GHC810, GHC88, GHC90] expectFailIfBeforeGhc92 = knownBrokenForGhcVersions [GHC810, GHC90]

View File

@ -13,8 +13,7 @@ tests = testGroup "type definitions" [
$ getTypeDefinitionTest' 15 21 12 0 $ getTypeDefinitionTest' 15 21 12 0
, testCase "finds local definition of sum type variable" , testCase "finds local definition of sum type variable"
$ getTypeDefinitionTest' 20 13 17 0 $ getTypeDefinitionTest' 20 13 17 0
, knownBrokenForGhcVersions [GHC88] "Definition of sum type not found from data constructor in GHC 8.8.x" $ , testCase "finds local definition of sum type constructor"
testCase "finds local definition of sum type constructor"
$ getTypeDefinitionTest' 23 7 17 0 $ getTypeDefinitionTest' 23 7 17 0
, testCase "finds non-local definition of type def" , testCase "finds non-local definition of type def"
$ getTypeDefinitionTest' 29 19 26 0 $ getTypeDefinitionTest' 29 19 26 0

View File

@ -12,7 +12,6 @@ main = do
projectGhcVersionTests :: TestTree projectGhcVersionTests :: TestTree
projectGhcVersionTests = testGroup "--project-ghc-version" projectGhcVersionTests = testGroup "--project-ghc-version"
[ stackTest "8.10.7" [ stackTest "8.10.7"
, stackTest "8.8.4"
, testCase "cabal with global ghc" $ do , testCase "cabal with global ghc" $ do
ghcVer <- trimEnd <$> readProcess "ghc" ["--numeric-version"] "" ghcVer <- trimEnd <$> readProcess "ghc" ["--numeric-version"] ""
testDir "test/wrapper/testdata/cabal-cur-ver" ghcVer testDir "test/wrapper/testdata/cabal-cur-ver" ghcVer

View File

@ -1,2 +0,0 @@
module Lib where
foo = 42

View File

@ -1,7 +0,0 @@
cabal-version: 2.4
name: foo
version: 0.1.0.0
library
exposed-modules: Lib
build-depends: base
default-language: Haskell2010

View File

@ -1 +0,0 @@
resolver: ghc-8.8.4