packages feed

hls-stylish-haskell-plugin 1.0.0.0 → 1.0.0.1

raw patch · 3 files changed

+19/−21 lines, 3 filesdep −bytestringdep −mtldep ~ghcidenew-uploaderPVP ok

version bump matches the API change (PVP)

Dependencies removed: bytestring, mtl

Dependency ranges changed: ghcide

API changes (from Hackage documentation)

Files

hls-stylish-haskell-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               hls-stylish-haskell-plugin-version:            1.0.0.0+version:            1.0.0.1 synopsis:           Integration with the Stylish Haskell code formatter license:            Apache-2.0 license-file:       LICENSE@@ -22,10 +22,9 @@     , filepath     , ghc     , ghc-boot-th-    , ghcide           ^>=1.2+    , ghcide           >=1.2  && <1.5     , hls-plugin-api   ^>=1.1     , lsp-types-    , mtl     , stylish-haskell  ^>=0.12     , text @@ -39,7 +38,6 @@   ghc-options:      -threaded -rtsopts -with-rtsopts=-N   build-depends:     , base-    , bytestring+    , filepath     , hls-stylish-haskell-plugin     , hls-test-utils              ^>=1.0-    , text
src/Ide/Plugin/StylishHaskell.hs view
@@ -1,7 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} module Ide.Plugin.StylishHaskell-  (-    descriptor+  ( descriptor   , provider   ) where@@ -18,7 +17,6 @@ import           Ide.Types import           Language.Haskell.Stylish import           Language.LSP.Types          as J- import           System.Directory import           System.FilePath 
test/Main.hs view
@@ -1,26 +1,28 @@ {-# LANGUAGE OverloadedStrings #-}-module Main(main) where+module Main+  ( main+  ) where -import qualified Data.ByteString.Lazy      as BS-import qualified Data.Text.Encoding        as T-import qualified Data.Text.IO              as T import qualified Ide.Plugin.StylishHaskell as StylishHaskell+import           System.FilePath import           Test.Hls  main :: IO () main = defaultTestRunner tests -plugin :: PluginDescriptor IdeState-plugin = StylishHaskell.descriptor "stylishHaskell"+stylishHaskellPlugin :: PluginDescriptor IdeState+stylishHaskellPlugin = StylishHaskell.descriptor "stylishHaskell"  tests :: TestTree-tests = testGroup "stylish-haskell" [-  goldenGitDiff "formats a document" "test/testdata/StylishHaskell.formatted_document.hs" $ runSessionWithServerFormatter plugin "stylishHaskell" "test/testdata" $ do-      doc <- openDoc "StylishHaskell.hs" "haskell"+tests = testGroup "stylish-haskell"+  [ goldenWithStylishHaskell "formats a document" "StylishHaskell" "formatted_document" $ \doc -> do       formatDoc doc (FormattingOptions 2 True Nothing Nothing Nothing)-      BS.fromStrict . T.encodeUtf8 <$> documentContents doc-  , goldenGitDiff "formats a range" "test/testdata/StylishHaskell.formatted_range.hs" $ runSessionWithServerFormatter plugin "stylishHaskell" "test/testdata" $ do-      doc <- openDoc "StylishHaskell.hs" "haskell"+  , goldenWithStylishHaskell "formats a range" "StylishHaskell" "formatted_range" $ \doc -> do       formatRange doc (FormattingOptions 2 True Nothing Nothing Nothing) (Range (Position 0 0) (Position 2 21))-      BS.fromStrict . T.encodeUtf8 <$> documentContents doc   ]++goldenWithStylishHaskell :: TestName -> FilePath -> FilePath -> (TextDocumentIdentifier -> Session ()) -> TestTree+goldenWithStylishHaskell title fp desc = goldenWithHaskellDocFormatter stylishHaskellPlugin "stylishHaskell" title testDataDir fp desc "hs"++testDataDir :: FilePath+testDataDir = "test" </> "testdata"