Skip to content

Support hls-hlint-plugin and hls-stylish-plugin for ghc9.0 and ghc9.2 #2854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Apr 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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"

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
11 changes: 2 additions & 9 deletions cabal-ghc90.project
Original file line number Diff line number Diff line change
@@ -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
24 changes: 8 additions & 16 deletions cabal-ghc92.project
Original file line number Diff line number Diff line change
@@ -39,18 +39,22 @@ 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
haskell-language-server
+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
4 changes: 2 additions & 2 deletions docs/supported-versions.md
Original file line number Diff line number Diff line change
@@ -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` | |

8 changes: 4 additions & 4 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
@@ -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

9 changes: 8 additions & 1 deletion hls-test-utils/src/Test/Hls/Util.hs
Original file line number Diff line number Diff line change
@@ -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
@@ -362,7 +369,7 @@ actual `expectSameLocations` expected = do

-- ---------------------------------------------------------------------
getCompletionByLabel :: MonadIO m => T.Text -> [CompletionItem] -> m CompletionItem
getCompletionByLabel desiredLabel compls =
getCompletionByLabel desiredLabel compls =
case find (\c -> c ^. L.label == desiredLabel) compls of
Just c -> pure c
Nothing -> liftIO . assertFailure $
6 changes: 5 additions & 1 deletion plugins/hls-class-plugin/hls-class-plugin.cabal
Original file line number Diff line number Diff line change
@@ -28,14 +28,18 @@ library
, base >=4.12 && <5
, containers
, ghc
, ghc-exactprint >= 0.6.4
, ghcide ^>=1.7
, hls-plugin-api ^>=1.4
, lens
, lsp
, 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
2 changes: 1 addition & 1 deletion plugins/hls-class-plugin/src/Ide/Plugin/Class.hs
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion plugins/hls-fourmolu-plugin/hls-fourmolu-plugin.cabal
Original file line number Diff line number Diff line change
@@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to disallow 0.5 or should we just add 0.6?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.5 and 0.6 have the same requirements but 0.6 has bug fix, I don't think we have a reason to allow 0.5. https://github.com/fourmolu/fourmolu/blob/master/CHANGELOG.md

, ghc
, ghc-boot-th
, ghcide ^>=1.7
21 changes: 11 additions & 10 deletions plugins/hls-hlint-plugin/hls-hlint-plugin.cabal
Original file line number Diff line number Diff line change
@@ -31,19 +31,18 @@ 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
exposed-modules: Ide.Plugin.Hlint
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
20 changes: 14 additions & 6 deletions plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs
Original file line number Diff line number Diff line change
@@ -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)
@@ -141,12 +147,15 @@ instance Pretty Log where
LogApplying fp res -> "Applying hint(s) for" <+> viaShow fp <> ":" <+> viaShow res
LogGeneratedIdeas fp ideas -> "Generated hlint ideas for for" <+> viaShow fp <> ":" <+> viaShow ideas
LogUsingExtensions fp exts -> "Using extensions for " <+> viaShow fp <> ":" <+> pretty exts
LogGetIdeas fp -> "Getting hlint ideas for " <+> viaShow fp
LogGetIdeas fp -> "Getting hlint ideas for " <+> viaShow fp

#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
20 changes: 15 additions & 5 deletions plugins/hls-hlint-plugin/test/Main.hs
Original file line number Diff line number Diff line change
@@ -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 {
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion stack-8.10.6.yaml
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion stack-8.10.7.yaml
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion stack-8.6.5.yaml
Original file line number Diff line number Diff line change
@@ -131,7 +131,7 @@ flags:
BuildExecutable: false
# Stack doesn't support automatic flags.
hls-hlint-plugin:
hlint33: false
hlint34: false
hyphenation:
embed: true

2 changes: 1 addition & 1 deletion stack-8.8.4.yaml
Original file line number Diff line number Diff line change
@@ -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

23 changes: 13 additions & 10 deletions stack-9.0.1.yaml
Original file line number Diff line number Diff line change
@@ -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

23 changes: 13 additions & 10 deletions stack-9.0.2.yaml
Original file line number Diff line number Diff line change
@@ -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

25 changes: 17 additions & 8 deletions stack-9.2.yaml
Original file line number Diff line number Diff line change
@@ -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,16 +121,23 @@ flags:
brittany: false
eval: false
haddockComments: false
hlint: false
retrie: false
splice: false
tactic: false

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

2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -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