mirror of
https://github.com/haskell/haskell-language-server.git
synced 2024-10-26 17:32:57 +03:00
Support hls-hlint-plugin and hls-stylish-plugin for ghc9.0 and ghc9.2 (#2854)
* hls-hlint-plugin & hls-stylish-haskell-plugin rush to ghc92 * Restore allow-newer * Add BufSpan for lower version ghc * Add Cabal constraint for stack-9.0.1.yaml * Try ghc-lib-parser for BufSpan * Loose tactic compiling constraint * Rename hlint34 * Rerun test * Update doc * Comment ghc-exactprint requirements * Add test for apply-refact-0.10 * Use hackage stylish-haskell * ghc-exactprint constraints for hls-class-plugin * Remove uncompiled if Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
a541ae8bc7
commit
c14cbdbdd4
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -190,7 +190,7 @@ jobs:
|
||||
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"
|
||||
|
||||
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.0.2'
|
||||
- if: matrix.test
|
||||
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"
|
||||
|
||||
@ -222,7 +222,7 @@ jobs:
|
||||
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"
|
||||
|
||||
- if: matrix.test && matrix.ghc != '9.2.2'
|
||||
- if: matrix.test
|
||||
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"
|
||||
|
||||
|
@ -30,6 +30,7 @@ The official Haskell language server (LSP) implementation. Consult the [project
|
||||
|
||||
- [Features](https://haskell-language-server.readthedocs.io/en/latest/features.html)
|
||||
- [Installation](https://haskell-language-server.readthedocs.io/en/latest/installation.html)
|
||||
- [Supported GHC Versions](https://haskell-language-server.readthedocs.io/en/latest/supported-versions.html)
|
||||
- [Configuration](https://haskell-language-server.readthedocs.io/en/latest/configuration.html)
|
||||
- [Troubleshooting](https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html)
|
||||
- [Contributing](https://haskell-language-server.readthedocs.io/en/latest/contributing/index.html)
|
||||
|
@ -37,13 +37,10 @@ package *
|
||||
|
||||
write-ghc-environment-files: never
|
||||
|
||||
index-state: 2022-03-08T10:53:01Z
|
||||
index-state: 2022-04-27T09:22:49Z
|
||||
|
||||
constraints:
|
||||
-- These plugins don't work on GHC9 yet
|
||||
-- Add a plugin needs remove the -flag but also update ghc bounds in hls.cabal
|
||||
haskell-language-server +ignore-plugins-ghc-bounds -stylishhaskell,
|
||||
ghc-lib-parser ^>= 9.0
|
||||
hls-hlint-plugin +ghc-lib
|
||||
|
||||
-- although we are not building all plugins cabal solver phase is run for all packages
|
||||
-- this way we track explicitly all transitive dependencies which need support for ghc-9
|
||||
@ -57,10 +54,6 @@ allow-newer:
|
||||
-- https://github.com/lspitzner/butcher/pull/8
|
||||
butcher:base,
|
||||
|
||||
stylish-haskell:Cabal,
|
||||
stylish-haskell:ghc-lib-parser,
|
||||
stylish-haskell:aeson,
|
||||
|
||||
-- ghc-9.0.2 specific
|
||||
-- for ghcide:test via ghc-typelits-knownnat
|
||||
ghc-typelits-natnormalise:ghc-bignum
|
||||
|
@ -39,7 +39,7 @@ package *
|
||||
|
||||
write-ghc-environment-files: never
|
||||
|
||||
index-state: 2022-04-19T07:18:40Z
|
||||
index-state: 2022-04-27T09:22:49Z
|
||||
|
||||
constraints:
|
||||
-- These plugins don't build/work on GHC92 yet
|
||||
@ -47,10 +47,14 @@ constraints:
|
||||
+ignore-plugins-ghc-bounds
|
||||
-brittany
|
||||
-haddockComments
|
||||
-hlint
|
||||
-retrie
|
||||
-splice
|
||||
-tactic,
|
||||
hls-hlint-plugin +ghc-lib,
|
||||
-- # Use ghc-lib force instead of ghc itself
|
||||
ghc-lib-parser-ex -auto,
|
||||
hlint +ghc-lib,
|
||||
stylish-haskell +ghc-lib
|
||||
|
||||
allow-newer:
|
||||
-- for shake-bench
|
||||
@ -73,19 +77,6 @@ allow-newer:
|
||||
-- https://github.com/lspitzner/butcher/pull/8
|
||||
butcher:base,
|
||||
|
||||
ormolu:ghc-lib-parser,
|
||||
|
||||
fourmolu:ghc-lib-parser,
|
||||
fourmolu:Cabal,
|
||||
|
||||
hls-hlint-plugin:ghc-lib,
|
||||
hls-hlint-plugin:ghc-lib-parser,
|
||||
hls-hlint-plugin:ghc-lib-parser-ex,
|
||||
hlint:ghc-lib-parser,
|
||||
hlint:ghc-lib-parser-ex,
|
||||
-- See https://github.com/mpickering/apply-refact/pull/116
|
||||
apply-refact:base,
|
||||
|
||||
implicit-hie-cradle:bytestring,
|
||||
implicit-hie-cradle:time,
|
||||
|
||||
@ -95,7 +86,8 @@ allow-newer:
|
||||
-- for ghcide:test via ghc-typelits-knownnat
|
||||
ghc-typelits-natnormalise:ghc-bignum,
|
||||
|
||||
hiedb:base
|
||||
hiedb:base,
|
||||
retrie:ghc-exactprint
|
||||
|
||||
allow-older:
|
||||
primitive-extras:primitive-unlifted
|
||||
|
@ -43,7 +43,7 @@ Sometimes a plugin will be supported in the prebuilt binaries but not in a HLS b
|
||||
| `hls-floskell-plugin` | |
|
||||
| `hls-fourmolu-plugin` | |
|
||||
| `hls-haddock-comments-plugin` | 9.2 |
|
||||
| `hls-hlint-plugin` | 9.2 |
|
||||
| `hls-hlint-plugin` | |
|
||||
| `hls-module-name-plugin` | |
|
||||
| `hls-ormolu-plugin` | |
|
||||
| `hls-pragmas-plugin` | |
|
||||
@ -52,7 +52,7 @@ Sometimes a plugin will be supported in the prebuilt binaries but not in a HLS b
|
||||
| `hls-rename-plugin` | |
|
||||
| `hls-retrie-plugin` | 9.2 |
|
||||
| `hls-splice-plugin` | 9.2 |
|
||||
| `hls-stylish-haskell-plugin` | 9.0 |
|
||||
| `hls-stylish-haskell-plugin` | |
|
||||
| `hls-tactics-plugin` | 9.2 |
|
||||
| `hls-selection-range-plugin` | |
|
||||
|
||||
|
@ -224,7 +224,7 @@ common example-plugins
|
||||
Ide.Plugin.Example2
|
||||
|
||||
common class
|
||||
if flag(class) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
|
||||
if flag(class)
|
||||
build-depends: hls-class-plugin ^>= 1.0
|
||||
cpp-options: -Dclass
|
||||
|
||||
@ -264,12 +264,12 @@ common retrie
|
||||
cpp-options: -Dretrie
|
||||
|
||||
common tactic
|
||||
if flag(tactic) && (impl(ghc < 9.0.1) || flag(ignore-plugins-ghc-bounds))
|
||||
if flag(tactic) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
|
||||
build-depends: hls-tactics-plugin >=1.2.0.0 && <1.7
|
||||
cpp-options: -Dtactic
|
||||
|
||||
common hlint
|
||||
if flag(hlint) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
|
||||
if flag(hlint)
|
||||
build-depends: hls-hlint-plugin ^>= 1.0
|
||||
cpp-options: -Dhlint
|
||||
|
||||
@ -326,7 +326,7 @@ common ormolu
|
||||
cpp-options: -Dormolu
|
||||
|
||||
common stylishHaskell
|
||||
if flag(stylishHaskell) && (impl(ghc < 9.0.1) || flag(ignore-plugins-ghc-bounds))
|
||||
if flag(stylishHaskell)
|
||||
build-depends: hls-stylish-haskell-plugin ^>= 1.0
|
||||
cpp-options: -DstylishHaskell
|
||||
|
||||
|
@ -25,6 +25,7 @@ module Test.Hls.Util
|
||||
, noLiteralCaps
|
||||
, ignoreForGhcVersions
|
||||
, ignoreInEnv
|
||||
, onlyRunForGhcVersions
|
||||
, inspectCodeAction
|
||||
, inspectCommand
|
||||
, inspectDiagnostic
|
||||
@ -148,6 +149,12 @@ ignoreInEnv envSpecs reason
|
||||
ignoreForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree
|
||||
ignoreForGhcVersions vers = ignoreInEnv (map GhcVer vers)
|
||||
|
||||
onlyRunForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree
|
||||
onlyRunForGhcVersions vers =
|
||||
if ghcVersion `elem` vers
|
||||
then const id
|
||||
else ignoreTestBecause
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
hieYamlCradleDirectContents :: String
|
||||
|
@ -28,7 +28,6 @@ library
|
||||
, base >=4.12 && <5
|
||||
, containers
|
||||
, ghc
|
||||
, ghc-exactprint >= 0.6.4
|
||||
, ghcide ^>=1.7
|
||||
, hls-plugin-api ^>=1.4
|
||||
, lens
|
||||
@ -36,6 +35,11 @@ library
|
||||
, text
|
||||
, transformers
|
||||
|
||||
if impl(ghc >=9.2.1)
|
||||
build-depends: ghc-exactprint ^>= 1.5
|
||||
else
|
||||
build-depends: ghc-exactprint >= 0.6.4 && <1.1
|
||||
|
||||
default-language: Haskell2010
|
||||
default-extensions:
|
||||
DataKinds
|
||||
|
@ -128,7 +128,7 @@ addMethodPlaceholders state AddMinimalMethodsParams{..} = do
|
||||
addWhere decl = decl
|
||||
|
||||
newLine (L l e) =
|
||||
let dp = deltaPos 1 (indent + 1) -- Not sure why there need one more space
|
||||
let dp = deltaPos 1 indent
|
||||
in L (noAnnSrcSpanDP (locA l) dp <> l) e
|
||||
|
||||
#else
|
||||
|
@ -23,7 +23,7 @@ library
|
||||
build-depends:
|
||||
, base >=4.12 && <5
|
||||
, filepath
|
||||
, fourmolu ^>=0.3 || ^>=0.4 || ^>= 0.5
|
||||
, fourmolu ^>=0.3 || ^>=0.4 || ^>= 0.6
|
||||
, ghc
|
||||
, ghc-boot-th
|
||||
, ghcide ^>=1.7
|
||||
|
@ -31,11 +31,11 @@ flag ghc-lib
|
||||
description:
|
||||
Force dependency on ghc-lib-parser even if GHC API in the ghc package is supported
|
||||
|
||||
flag hlint33
|
||||
flag hlint34
|
||||
default: True
|
||||
manual: False
|
||||
description:
|
||||
Hlint-3.3 doesn't support versions ghc-lib < 9.0.1 nor ghc <= 8.6, so we can use hlint-3.2 for backwards compat
|
||||
Hlint-3.4 doesn't support versions ghc-lib < 9.0.1 nor ghc <= 8.6, so we can use hlint-3.2 for backwards compat
|
||||
This flag can be removed when all dependencies support ghc-lib-9.0.* and we drop support for ghc-8.6
|
||||
|
||||
library
|
||||
@ -43,7 +43,6 @@ library
|
||||
hs-source-dirs: src
|
||||
build-depends:
|
||||
, aeson
|
||||
, apply-refact >=0.9.3.0
|
||||
, base >=4.12 && <5
|
||||
, binary
|
||||
, bytestring
|
||||
@ -69,30 +68,32 @@ library
|
||||
, text
|
||||
, transformers
|
||||
, unordered-containers
|
||||
, apply-refact >=0.9.0.0
|
||||
-- can be removed if https://github.com/ndmitchell/hlint/pull/1325#issue-1077062712 is merged
|
||||
-- and https://github.com/haskell/haskell-language-server/pull/2464#issue-1077133441 is updated
|
||||
-- accordingly
|
||||
, ghc-lib-parser-ex
|
||||
|
||||
if (flag(hlint33))
|
||||
if (flag(hlint34))
|
||||
-- This mirrors the logic in hlint.cabal for hlint-3.3
|
||||
-- https://github.com/ndmitchell/hlint/blob/d3576de4529d8df6cca5a345f5b7e04474ff7bff/hlint.cabal#L79-L88
|
||||
-- so we can make sure that we do the same thing as hlint
|
||||
build-depends: hlint ^>=3.3
|
||||
build-depends: hlint ^>=3.4
|
||||
|
||||
if (!flag(ghc-lib) && impl(ghc >=9.0.1) && impl(ghc <9.1.0))
|
||||
build-depends: ghc ==9.0.*
|
||||
build-depends: ghc ==9.0.*
|
||||
else
|
||||
build-depends:
|
||||
, ghc
|
||||
, ghc-lib ^>=9.0
|
||||
, ghc-lib-parser-ex ^>=9.0
|
||||
, ghc-lib ^>=9.2
|
||||
, ghc-lib-parser-ex ^>=9.2
|
||||
, ghc-lib-parser ^>=9.2
|
||||
|
||||
cpp-options: -DHLINT_ON_GHC_LIB
|
||||
|
||||
else
|
||||
-- This mirrors the logic in hlint.cabal for hlint-3.2
|
||||
-- https://github.com/ndmitchell/hlint/blob/c7354e473c7d09213c8adc3dc94bf50a6eb4a42d/hlint.cabal#L79-L88
|
||||
build-depends: hlint ^>=3.2
|
||||
build-depends: hlint ^>=3.2
|
||||
if (!flag(ghc-lib) && impl(ghc >=8.10.1) && impl(ghc < 8.11.0))
|
||||
build-depends: ghc >=8.10 && <9.0
|
||||
else
|
||||
|
@ -60,8 +60,7 @@ import qualified Refact.Apply as Refact
|
||||
import qualified Refact.Types as Refact
|
||||
|
||||
#ifdef HLINT_ON_GHC_LIB
|
||||
import Development.IDE.GHC.Compat (BufSpan,
|
||||
DynFlags,
|
||||
import Development.IDE.GHC.Compat (DynFlags,
|
||||
WarningFlag (Opt_WarnUnrecognisedPragmas),
|
||||
extensionFlags,
|
||||
ms_hspp_opts,
|
||||
@ -73,6 +72,9 @@ import "ghc-lib" GHC hiding
|
||||
RealSrcSpan,
|
||||
ms_hspp_opts)
|
||||
import qualified "ghc-lib" GHC
|
||||
#if MIN_GHC_API_VERSION(9,0,0)
|
||||
import "ghc-lib-parser" GHC.Types.SrcLoc (BufSpan)
|
||||
#endif
|
||||
import "ghc-lib-parser" GHC.LanguageExtensions (Extension)
|
||||
import Language.Haskell.GhclibParserEx.GHC.Driver.Session as GhclibParserEx (readExtension)
|
||||
import System.FilePath (takeFileName)
|
||||
@ -89,7 +91,11 @@ import System.IO.Temp
|
||||
import Development.IDE.GHC.Compat hiding
|
||||
(setEnv, (<+>))
|
||||
import GHC.Generics (Associativity (LeftAssociative, NotAssociative, RightAssociative))
|
||||
#if MIN_GHC_API_VERSION(9,2,0)
|
||||
import Language.Haskell.GHC.ExactPrint.ExactPrint (deltaOptions)
|
||||
#else
|
||||
import Language.Haskell.GHC.ExactPrint.Delta (deltaOptions)
|
||||
#endif
|
||||
import Language.Haskell.GHC.ExactPrint.Parsers (postParseTransform)
|
||||
import Language.Haskell.GHC.ExactPrint.Types (Rigidity (..))
|
||||
import Language.Haskell.GhclibParserEx.Fixity as GhclibParserEx (applyFixities)
|
||||
@ -145,8 +151,11 @@ instance Pretty Log where
|
||||
|
||||
#ifdef HLINT_ON_GHC_LIB
|
||||
-- Reimplementing this, since the one in Development.IDE.GHC.Compat isn't for ghc-lib
|
||||
#if !MIN_GHC_API_VERSION(9,0,0)
|
||||
type BufSpan = ()
|
||||
#endif
|
||||
pattern RealSrcSpan :: GHC.RealSrcSpan -> Maybe BufSpan -> GHC.SrcSpan
|
||||
#if MIN_VERSION_ghc(9,0,0)
|
||||
#if MIN_GHC_API_VERSION(9,0,0)
|
||||
pattern RealSrcSpan x y = GHC.RealSrcSpan x y
|
||||
#else
|
||||
pattern RealSrcSpan x y <- ((,Nothing) -> (GHC.RealSrcSpan x, y))
|
||||
@ -323,8 +332,7 @@ getExtensions nfp = do
|
||||
dflags <- getFlags
|
||||
let hscExts = EnumSet.toList (extensionFlags dflags)
|
||||
let hscExts' = mapMaybe (GhclibParserEx.readExtension . show) hscExts
|
||||
let hlintExts = hscExts'
|
||||
return hlintExts
|
||||
return hscExts'
|
||||
where getFlags :: Action DynFlags
|
||||
getFlags = do
|
||||
modsum <- use_ GetModSummary nfp
|
||||
|
@ -181,9 +181,14 @@ suggestionsTests =
|
||||
doc <- openDoc "IgnoreAnnHlint.hs" "haskell"
|
||||
expectNoMoreDiagnostics 3 doc "hlint"
|
||||
|
||||
, testCase "apply-refact preserve regular comments" $ runHlintSession "" $ do
|
||||
, knownBrokenForGhcVersions [GHC92] "apply-refact has different behavior on v0.10" $
|
||||
testCase "apply-refact preserve regular comments" $ runHlintSession "" $ do
|
||||
testRefactor "Comments.hs" "Redundant bracket" expectedComments
|
||||
|
||||
, onlyRunForGhcVersions [GHC92] "only run test for apply-refact-0.10" $
|
||||
testCase "apply-refact preserve regular comments" $ runHlintSession "" $ do
|
||||
testRefactor "Comments.hs" "Redundant bracket" expectedComments'
|
||||
|
||||
, testCase "[#2290] apply all hints works with a trailing comment" $ runHlintSession "" $ do
|
||||
testRefactor "TwoHintsAndComment.hs" "Apply all hints" expectedComments2
|
||||
|
||||
@ -257,6 +262,14 @@ suggestionsTests =
|
||||
, "f = {- inline comment -}{- inline comment inside refactored code -} 1 -- ending comment", ""
|
||||
, "-- final comment"
|
||||
]
|
||||
expectedComments' = [ "-- comment before header"
|
||||
, "module Comments where", ""
|
||||
, "{-# standalone annotation #-}", ""
|
||||
, "-- standalone comment", ""
|
||||
, "-- | haddock comment"
|
||||
, "f = {- inline comment -} {- inline comment inside refactored code -}1 -- ending comment", ""
|
||||
, "-- final comment"
|
||||
]
|
||||
expectedComments2 = [ "module TwoHintsAndComment where"
|
||||
, "biggest = foldr1 max -- the line above will show two hlint hints, \"eta reduce\" and \"use maximum\""
|
||||
]
|
||||
@ -358,10 +371,7 @@ disableHlint = sendConfigurationChanged $ toJSON $ def { Plugin.plugins = Map.fr
|
||||
-- Although a given hlint version supports one direct ghc, we could use several versions of hlint
|
||||
-- each one supporting a different ghc version. It should be a temporary situation though.
|
||||
knownBrokenForHlintOnGhcLib :: String -> TestTree -> TestTree
|
||||
knownBrokenForHlintOnGhcLib = knownBrokenForGhcVersions [GHC88, GHC86]
|
||||
|
||||
knownBrokenForHlintOnRawGhc :: String -> TestTree -> TestTree
|
||||
knownBrokenForHlintOnRawGhc = knownBrokenForGhcVersions [GHC810, GHC90]
|
||||
knownBrokenForHlintOnGhcLib = knownBrokenForGhcVersions [GHC86, GHC88, GHC90, GHC92]
|
||||
|
||||
-- 1's based
|
||||
data Point = Point {
|
||||
|
@ -27,7 +27,7 @@ library
|
||||
, ghcide ^>=1.7
|
||||
, hls-plugin-api ^>=1.4
|
||||
, lsp-types
|
||||
, stylish-haskell ^>=0.12 || ^>=0.13 || ^>=0.14
|
||||
, stylish-haskell ^>=0.12 || ^>=0.13 || ^>=0.14.2
|
||||
, text
|
||||
|
||||
default-language: Haskell2010
|
||||
|
@ -82,7 +82,7 @@ flags:
|
||||
# Stack doesn't support automatic flags.
|
||||
# Until the formatters support ghc-lib-9, we need this flag disabled
|
||||
hls-hlint-plugin:
|
||||
hlint33: false
|
||||
hlint34: false
|
||||
hyphenation:
|
||||
embed: true
|
||||
|
||||
|
@ -83,7 +83,7 @@ flags:
|
||||
# Stack doesn't support automatic flags.
|
||||
# Until the formatters support ghc-lib-9, we need this flag disabled
|
||||
hls-hlint-plugin:
|
||||
hlint33: false
|
||||
hlint34: false
|
||||
hyphenation:
|
||||
embed: true
|
||||
|
||||
|
@ -131,7 +131,7 @@ flags:
|
||||
BuildExecutable: false
|
||||
# Stack doesn't support automatic flags.
|
||||
hls-hlint-plugin:
|
||||
hlint33: false
|
||||
hlint34: false
|
||||
hyphenation:
|
||||
embed: true
|
||||
|
||||
|
@ -107,7 +107,7 @@ flags:
|
||||
# Stack doesn't support automatic flags.
|
||||
# Until the formatters support ghc-lib-9, we need this flag disabled
|
||||
hls-hlint-plugin:
|
||||
hlint33: false
|
||||
hlint34: false
|
||||
hyphenation:
|
||||
embed: true
|
||||
|
||||
|
@ -21,7 +21,7 @@ packages:
|
||||
- ./plugins/hls-splice-plugin
|
||||
- ./plugins/hls-tactics-plugin
|
||||
- ./plugins/hls-brittany-plugin
|
||||
# - ./plugins/hls-stylish-haskell-plugin
|
||||
- ./plugins/hls-stylish-haskell-plugin
|
||||
- ./plugins/hls-floskell-plugin
|
||||
- ./plugins/hls-fourmolu-plugin
|
||||
- ./plugins/hls-pragmas-plugin
|
||||
@ -56,6 +56,14 @@ extra-deps:
|
||||
- lsp-types-1.4.0.1
|
||||
- lsp-test-0.14.0.2
|
||||
- refinery-0.4.0.0
|
||||
- ghc-lib-9.2.2.20220307
|
||||
- ghc-lib-parser-9.2.2.20220307
|
||||
- ghc-lib-parser-ex-9.2.0.3
|
||||
- hlint-3.4
|
||||
- stylish-haskell-0.14.2.0
|
||||
- ormolu-0.4.0.0
|
||||
- fourmolu-0.6.0.0
|
||||
- Cabal-3.6.0.0
|
||||
|
||||
# shake-bench dependencies
|
||||
- Chart-1.9.3
|
||||
@ -65,12 +73,11 @@ extra-deps:
|
||||
- statestack-0.3
|
||||
- operational-0.2.4.1
|
||||
|
||||
# currently needed for ghcide>extra, etc.
|
||||
allow-newer: true
|
||||
|
||||
ghc-options:
|
||||
"$everything": -haddock
|
||||
|
||||
allow-newer: true
|
||||
|
||||
configure-options:
|
||||
ghcide:
|
||||
- --disable-library-for-ghci
|
||||
@ -82,15 +89,11 @@ configure-options:
|
||||
flags:
|
||||
haskell-language-server:
|
||||
pedantic: true
|
||||
|
||||
ignore-plugins-ghc-bounds: true
|
||||
stylishHaskell: false
|
||||
|
||||
retrie:
|
||||
BuildExecutable: false
|
||||
# Stack doesn't support automatic flags.
|
||||
hls-hlint-plugin:
|
||||
hlint33: true
|
||||
hlint34: true
|
||||
ghc-lib: true
|
||||
hyphenation:
|
||||
embed: true
|
||||
|
||||
|
@ -21,7 +21,7 @@ packages:
|
||||
- ./plugins/hls-splice-plugin
|
||||
- ./plugins/hls-tactics-plugin
|
||||
- ./plugins/hls-brittany-plugin
|
||||
# - ./plugins/hls-stylish-haskell-plugin
|
||||
- ./plugins/hls-stylish-haskell-plugin
|
||||
- ./plugins/hls-floskell-plugin
|
||||
- ./plugins/hls-fourmolu-plugin
|
||||
- ./plugins/hls-pragmas-plugin
|
||||
@ -57,6 +57,13 @@ extra-deps:
|
||||
- lsp-types-1.4.0.1
|
||||
- lsp-test-0.14.0.2
|
||||
- unix-compat-0.5.4
|
||||
- ghc-lib-9.2.2.20220307
|
||||
- ghc-lib-parser-9.2.2.20220307
|
||||
- ghc-lib-parser-ex-9.2.0.3
|
||||
- hlint-3.4
|
||||
- stylish-haskell-0.14.2.0
|
||||
- ormolu-0.4.0.0
|
||||
- fourmolu-0.6.0.0
|
||||
|
||||
# shake-bench dependencies
|
||||
- Chart-1.9.3
|
||||
@ -80,19 +87,18 @@ extra-deps:
|
||||
- ghc-typelits-natnormalise-0.7.6
|
||||
|
||||
# boot libraries
|
||||
- Cabal-3.4.1.0
|
||||
- Cabal-3.6.0.0
|
||||
- directory-1.3.6.2
|
||||
- process-1.6.13.2
|
||||
- time-1.9.3
|
||||
- unix-2.7.2.2
|
||||
- Win32-2.12.0.1
|
||||
|
||||
# currently needed for ghcide>extra, etc.
|
||||
allow-newer: true
|
||||
|
||||
ghc-options:
|
||||
"$everything": -haddock
|
||||
|
||||
allow-newer: true
|
||||
|
||||
configure-options:
|
||||
ghcide:
|
||||
- --disable-library-for-ghci
|
||||
@ -104,15 +110,12 @@ configure-options:
|
||||
flags:
|
||||
haskell-language-server:
|
||||
pedantic: true
|
||||
|
||||
ignore-plugins-ghc-bounds: true
|
||||
stylishHaskell: false
|
||||
|
||||
retrie:
|
||||
BuildExecutable: false
|
||||
# Stack doesn't support automatic flags.
|
||||
hls-hlint-plugin:
|
||||
hlint33: true
|
||||
hlint34: true
|
||||
ghc-lib: true
|
||||
hyphenation:
|
||||
embed: true
|
||||
|
||||
|
@ -16,7 +16,7 @@ packages:
|
||||
- ./plugins/hls-explicit-imports-plugin
|
||||
- ./plugins/hls-qualify-imported-names-plugin
|
||||
- ./plugins/hls-refine-imports-plugin
|
||||
# - ./plugins/hls-hlint-plugin
|
||||
- ./plugins/hls-hlint-plugin
|
||||
- ./plugins/hls-rename-plugin
|
||||
# - ./plugins/hls-retrie-plugin
|
||||
# - ./plugins/hls-splice-plugin
|
||||
@ -44,11 +44,11 @@ extra-deps:
|
||||
- dependent-sum-0.7.1.0
|
||||
- extra-1.7.10
|
||||
- floskell-0.10.6
|
||||
- fourmolu-0.5.0.0
|
||||
- ghc-exactprint-1.4.1
|
||||
- fourmolu-0.6.0.0
|
||||
- ghc-exactprint-1.5.0
|
||||
- ghc-lib-9.2.2.20220307
|
||||
- ghc-lib-parser-9.2.2.20220307
|
||||
- ghc-lib-parser-ex-9.2.0.1
|
||||
- ghc-lib-parser-ex-9.2.0.3
|
||||
- heapsize-0.3.0.1
|
||||
- hiedb-0.4.1.0
|
||||
- hie-bios-0.9.1
|
||||
@ -94,7 +94,9 @@ extra-deps:
|
||||
- unix-2.7.2.2
|
||||
- Win32-2.12.0.1
|
||||
|
||||
- stylish-haskell-0.14.1.0
|
||||
- stylish-haskell-0.14.2.0
|
||||
- hlint-3.4
|
||||
- apply-refact-0.10.0.0
|
||||
|
||||
# currently needed for ghcide>extra, etc.
|
||||
allow-newer: true
|
||||
@ -119,7 +121,6 @@ flags:
|
||||
brittany: false
|
||||
eval: false
|
||||
haddockComments: false
|
||||
hlint: false
|
||||
retrie: false
|
||||
splice: false
|
||||
tactic: false
|
||||
@ -127,8 +128,16 @@ flags:
|
||||
retrie:
|
||||
BuildExecutable: false
|
||||
# Stack doesn't support automatic flags.
|
||||
# hls-hlint-plugin:
|
||||
# hlint33: true
|
||||
hls-hlint-plugin:
|
||||
hlint34: true
|
||||
ghc-lib: true
|
||||
# Use ghc-lib force instead of ghc itself
|
||||
ghc-lib-parser-ex:
|
||||
auto: false
|
||||
hlint:
|
||||
ghc-lib: true
|
||||
stylish-haskell:
|
||||
ghc-lib: true
|
||||
hyphenation:
|
||||
embed: true
|
||||
|
||||
|
@ -83,7 +83,7 @@ flags:
|
||||
# Stack doesn't support automatic flags.
|
||||
# Until the formatters support ghc-lib-9, we need this flag disabled
|
||||
hls-hlint-plugin:
|
||||
hlint33: false
|
||||
hlint34: false
|
||||
hyphenation:
|
||||
embed: true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user