Skip to content

Commit 5e3b761

Browse files
committed
update Floskell to 0.11.*
Floskell 0.11.* supports Aeson 2.2.*
1 parent 93b6bf5 commit 5e3b761

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

haskell-language-server.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 3.0
22
category: Development
33
name: haskell-language-server
4-
version: 2.5.0.0
4+
version: 2.5.0.1
55
synopsis: LSP server for GHC
66
description:
77
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
@@ -310,7 +310,7 @@ common overloadedRecordDot
310310

311311
common floskell
312312
if flag(floskell) && (impl(ghc < 9.7) || flag(ignore-plugins-ghc-bounds))
313-
build-depends: hls-floskell-plugin == 2.5.0.0
313+
build-depends: hls-floskell-plugin == 2.5.*
314314
cpp-options: -Dhls_floskell
315315

316316
common fourmolu
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Revision history for hls-floskell-plugin
2+
3+
## 2.5.1.0 -- 2024-01-05
4+
Updates Floskell dependency to 0.11.*, which supports Aeson 2.2.*

plugins/hls-floskell-plugin/hls-floskell-plugin.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.4
22
name: hls-floskell-plugin
3-
version: 2.5.0.0
3+
version: 2.5.1.0
44
synopsis: Integration with the Floskell code formatter
55
description:
66
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
@@ -28,7 +28,7 @@ library
2828
hs-source-dirs: src
2929
build-depends:
3030
, base >=4.12 && <5
31-
, floskell ^>=0.10.8
31+
, floskell ^>=0.11.0
3232
, ghcide == 2.5.0.0
3333
, hls-plugin-api == 2.5.0.0
3434
, lsp-types ^>=2.1

plugins/hls-floskell-plugin/src/Ide/Plugin/Floskell.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ provider _ideState typ contents fp _ = do
3939
let (range, selectedContents) = case typ of
4040
FormatText -> (fullRange contents, contents)
4141
FormatRange r -> (normalize r, extractTextInRange (extendToFullLines r) contents)
42-
result = reformat config (Just file) . TL.encodeUtf8 $ TL.fromStrict selectedContents
42+
result = reformat config (Just file) $ TL.fromStrict selectedContents
4343
case result of
4444
Left err -> throwError $ PluginInternalError $ T.pack $ "floskellCmd: " ++ err
45-
Right new -> pure $ InL [TextEdit range . TL.toStrict $ TL.decodeUtf8 new]
45+
Right new -> pure $ InL [TextEdit range $ TL.toStrict new]
4646

4747
-- | Find Floskell Config, user and system wide or provides a default style.
4848
-- Every directory of the filepath will be searched to find a user configuration.

0 commit comments

Comments
 (0)