Skip to content

update Floskell to 0.11.* #3933

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
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/plugins/hls-class-plugin @Ailrun
/plugins/hls-eval-plugin
/plugins/hls-explicit-imports-plugin @pepeiborra
/plugins/hls-floskell-plugin @Ailrun
/plugins/hls-floskell-plugin @Ailrun @peterbecich
/plugins/hls-fourmolu-plugin @georgefst
/plugins/hls-gadt-plugin @July541
/plugins/hls-hlint-plugin @eddiemundo
Expand Down
4 changes: 4 additions & 0 deletions plugins/hls-floskell-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Revision history for hls-floskell-plugin

## 2.5.1.0 -- 2024-01-05
Updates Floskell dependency to 0.11.*, which supports Aeson 2.2.*
2 changes: 1 addition & 1 deletion plugins/hls-floskell-plugin/hls-floskell-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ library
hs-source-dirs: src
build-depends:
, base >=4.12 && <5
, floskell ^>=0.10.8
, floskell ^>=0.11.0
, ghcide == 2.5.0.0
, hls-plugin-api == 2.5.0.0
, lsp-types ^>=2.1
Expand Down
4 changes: 2 additions & 2 deletions plugins/hls-floskell-plugin/src/Ide/Plugin/Floskell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ provider _ideState typ contents fp _ = do
let (range, selectedContents) = case typ of
FormatText -> (fullRange contents, contents)
FormatRange r -> (normalize r, extractTextInRange (extendToFullLines r) contents)
result = reformat config (Just file) . TL.encodeUtf8 $ TL.fromStrict selectedContents
result = reformat config (Just file) $ TL.fromStrict selectedContents
case result of
Left err -> throwError $ PluginInternalError $ T.pack $ "floskellCmd: " ++ err
Right new -> pure $ InL [TextEdit range . TL.toStrict $ TL.decodeUtf8 new]
Right new -> pure $ InL [TextEdit range $ TL.toStrict new]

-- | Find Floskell Config, user and system wide or provides a default style.
-- Every directory of the filepath will be searched to find a user configuration.
Expand Down
8 changes: 2 additions & 6 deletions stack-lts21.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-21.2 # ghc-9.4
resolver: lts-21.25 # ghc-9.4

packages:
- .
Expand Down Expand Up @@ -44,12 +44,11 @@ ghc-options:
allow-newer: true

extra-deps:
- floskell-0.10.7
- floskell-0.11.1
- hiedb-0.4.4.0
- hie-bios-0.13.1
- implicit-hie-0.1.4.0
- monad-dijkstra-0.1.1.3
- algebraic-graphs-0.6.1
- retrie-1.2.2
- stylish-haskell-0.14.4.0
- lsp-2.3.0.0
Expand All @@ -59,11 +58,8 @@ extra-deps:
# stan dependencies not found in the stackage snapshot
- stan-0.1.0.2
- clay-0.14.0
- colourista-0.1.0.2
- dir-traverse-0.2.3.0
- extensions-0.1.0.0
- relude-1.2.1.0
- slist-0.2.1.0
- tomland-1.3.3.2
- trial-0.0.0.0
- trial-optparse-applicative-0.0.0.0
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ghc-options:
allow-newer: true

extra-deps:
- floskell-0.10.8
- floskell-0.11.1
- retrie-1.2.2
- hiedb-0.4.4.0
- implicit-hie-0.1.4.0
Expand Down