From 39afabcd53060b90f5d4b57a94ec3bb96ad9156d Mon Sep 17 00:00:00 2001 From: Lukasz Golebiewski Date: Sat, 25 Jan 2020 15:08:02 +0100 Subject: [PATCH 01/18] First draft of the Stylish (Haskell) plugin --- haskell-ide-engine.cabal | 2 ++ src/Haskell/Ide/Engine/Plugin/Stylish.hs | 23 +++++++++++++++++++++++ stack.yaml | 1 + 3 files changed, 26 insertions(+) create mode 100644 src/Haskell/Ide/Engine/Plugin/Stylish.hs diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 408ff03d2..3cb344ae0 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -38,6 +38,7 @@ library Haskell.Ide.Engine.Plugin.Package Haskell.Ide.Engine.Plugin.Package.Compat Haskell.Ide.Engine.Plugin.Pragmas + Haskell.Ide.Engine.Plugin.Stylish Haskell.Ide.Engine.Plugin.Generic Haskell.Ide.Engine.Plugin.GhcMod Haskell.Ide.Engine.Scheduler @@ -90,6 +91,7 @@ library , safe , sorted-list >= 0.2.1.0 , stm + , stylish-haskell , syb , tagsoup , text diff --git a/src/Haskell/Ide/Engine/Plugin/Stylish.hs b/src/Haskell/Ide/Engine/Plugin/Stylish.hs new file mode 100644 index 000000000..6d90dc77e --- /dev/null +++ b/src/Haskell/Ide/Engine/Plugin/Stylish.hs @@ -0,0 +1,23 @@ +{-# LANGUAGE OverloadedStrings #-} +module Haskell.Ide.Engine.Plugin.Stylish where + +import Data.Aeson (Value (Null)) +import qualified Data.Text as T +import Haskell.Ide.Engine.MonadTypes + +stylishDescriptor :: PluginId -> PluginDescriptor +stylishDescriptor plId = PluginDescriptor + { pluginId = plId + , pluginName = "Stylish" + , pluginDesc = "Stylish is a tool to format source code." + , pluginCommands = [] + , pluginCodeActionProvider = Nothing + , pluginDiagnosticProvider = Nothing + , pluginHoverProvider = Nothing + , pluginSymbolProvider = Nothing + , pluginFormattingProvider = Just provider + } + +provider :: FormattingProvider +provider _contents _uri _typ _opts = + return $ IdeResultFail (IdeError PluginError (T.pack "Formatting with Stylish is not currently supported.") Null) diff --git a/stack.yaml b/stack.yaml index 043c61c3d..858788239 100644 --- a/stack.yaml +++ b/stack.yaml @@ -30,6 +30,7 @@ extra-deps: - monad-dijkstra-0.1.1.2@rev:1 - parser-combinators-1.2.1 - ormolu-0.0.3.1 +- stylish-haskell-0.9.4.4 - syz-0.2.0.0 - temporary-1.2.1.1 - unix-compat-0.5.2 From 577519ffa4c1a4e4fae8d1bc3a9f89d51d3e22a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Szulc?= Date: Sat, 25 Jan 2020 16:54:20 +0000 Subject: [PATCH 02/18] Add stylish formatter provider to HSImportSpec (failing) --- test/unit/HsImportSpec.hs | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/test/unit/HsImportSpec.hs b/test/unit/HsImportSpec.hs index 5bc2107a7..0816d9f64 100644 --- a/test/unit/HsImportSpec.hs +++ b/test/unit/HsImportSpec.hs @@ -11,6 +11,7 @@ import qualified Haskell.Ide.Engine.Config as Config import qualified Haskell.Ide.Engine.Plugin.Brittany as Brittany import qualified Haskell.Ide.Engine.Plugin.Ormolu as Ormolu import qualified Haskell.Ide.Engine.Plugin.Floskell as Floskell +import qualified Haskell.Ide.Engine.Plugin.Stylish as Stylish import System.Directory import System.FilePath import Test.Hspec @@ -31,6 +32,7 @@ testPlugins = pluginDescToIdePlugins [ Brittany.brittanyDescriptor "brittany" , Floskell.floskellDescriptor "floskell" , Ormolu.ormoluDescriptor "ormolu" + , Stylish.stylishDescriptor "stylish" ] codeActionImportList :: FilePath @@ -126,7 +128,27 @@ hsImportSpec = do ] _ -> it "is NOP formatter" $ pendingWith "Ormolu only supported by GHC >= 8.6. Need to restore this." - + describe "formats with stylish" $ hsImportSpecRunner "stylish" + [ -- Expected output for simple format. + [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Control.Monad\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Control.Monad (when)\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe)\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe(..))\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe(Nothing))\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Function (($))\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 32))) "import System.IO (IO, hPutStrLn)" + ] + , [ TextEdit (Range (toPos (3, 1)) (toPos (3, 99))) $ + "import Data.List (find, head, last, tail, init, union, (\\\\), null\n" <> + " , length, cons, uncons, reverse)" + ] + ] -- --------------------------------------------------------------------- -- Parameterized HsImport Spec. -- --------------------------------------------------------------------- @@ -196,4 +218,4 @@ expectHsImportResult formatterName fp uri expectedChanges act = do IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act case Map.lookup uri changes of Just (List val) -> val `shouldBe` expectedChanges - Nothing -> fail "No Change found" \ No newline at end of file + Nothing -> fail "No Change found" From 50f0a651e847d675f03ae485df16a989ee495af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Szulc?= Date: Sun, 26 Jan 2020 10:11:50 +0000 Subject: [PATCH 03/18] Extract formatLspConfig in FormatSpec --- test/functional/FormatSpec.hs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index bbb8052cd..17082a0af 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -32,9 +32,7 @@ spec = do documentContents doc >>= liftIO . (`shouldBe` formattedRangeTabSize5) describe "formatting provider" $ do - let formatLspConfig provider = - object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ] - formatConfig provider = defaultConfig { lspConfig = Just (formatLspConfig provider) } + let formatConfig provider = defaultConfig { lspConfig = Just (formatLspConfig provider) } it "respects none" $ runSessionWithConfig (formatConfig "none") hieCommand fullCaps "test/testdata" $ do doc <- openDoc "Format.hs" "haskell" @@ -93,9 +91,7 @@ spec = do "foo x y = do\n print x\n return 42\n"] describe "ormolu" $ do - let formatLspConfig provider = - object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ] - + it "formats correctly" $ runSession hieCommand fullCaps "test/testdata" $ do sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "ormolu")) doc <- openDoc "Format.hs" "haskell" @@ -107,6 +103,9 @@ spec = do GHC86 -> formatted _ -> liftIO $ docContent `shouldBe` unchangedOrmolu +formatLspConfig :: Value -> Value +formatLspConfig provider = + object [ "languageServerHaskell" .= object ["formattingProvider" .= provider] ] formattedDocTabSize2 :: T.Text formattedDocTabSize2 = From 456661759a5d4d1be6d2beb0409308017a5f9f24 Mon Sep 17 00:00:00 2001 From: Lukasz Golebiewski Date: Thu, 30 Jan 2020 21:49:44 +0100 Subject: [PATCH 04/18] Add first working draft of the stylish plugin --- app/MainHie.hs | 2 ++ src/Haskell/Ide/Engine/Plugin/Stylish.hs | 28 ++++++++++++++++++++---- stack.yaml | 4 +++- test/unit/HsImportSpec.hs | 22 +++++++++---------- 4 files changed, 40 insertions(+), 16 deletions(-) diff --git a/app/MainHie.hs b/app/MainHie.hs index 094e3e4b5..149153466 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -51,6 +51,7 @@ import Haskell.Ide.Engine.Plugin.Liquid import Haskell.Ide.Engine.Plugin.Ormolu import Haskell.Ide.Engine.Plugin.Package import Haskell.Ide.Engine.Plugin.Pragmas +import Haskell.Ide.Engine.Plugin.Stylish (stylishDescriptor) -- --------------------------------------------------------------------- @@ -74,6 +75,7 @@ plugins includeExamples = pluginDescToIdePlugins allPlugins , genericDescriptor "generic" , ghcmodDescriptor "ghcmod" , ormoluDescriptor "ormolu" + , stylishDescriptor "stylish" ] examplePlugins = [example2Descriptor "eg2" diff --git a/src/Haskell/Ide/Engine/Plugin/Stylish.hs b/src/Haskell/Ide/Engine/Plugin/Stylish.hs index 6d90dc77e..67625c4d7 100644 --- a/src/Haskell/Ide/Engine/Plugin/Stylish.hs +++ b/src/Haskell/Ide/Engine/Plugin/Stylish.hs @@ -1,9 +1,14 @@ {-# LANGUAGE OverloadedStrings #-} module Haskell.Ide.Engine.Plugin.Stylish where -import Data.Aeson (Value (Null)) -import qualified Data.Text as T +import Control.Monad.IO.Class (liftIO) +import Data.Aeson (Value (Null)) +import Data.List (intercalate) +import qualified Data.Text as T import Haskell.Ide.Engine.MonadTypes +import Haskell.Ide.Engine.PluginUtils (fullRange, pluginGetFile) +import Language.Haskell.Stylish (ConfigPath (..), format) + stylishDescriptor :: PluginId -> PluginDescriptor stylishDescriptor plId = PluginDescriptor @@ -19,5 +24,20 @@ stylishDescriptor plId = PluginDescriptor } provider :: FormattingProvider -provider _contents _uri _typ _opts = - return $ IdeResultFail (IdeError PluginError (T.pack "Formatting with Stylish is not currently supported.") Null) +provider contents uri typ _ = + case typ of + FormatRange _ -> + return $ IdeResultFail (IdeError PluginError (T.pack "Selection formatting for Stylish is not currently supported.") Null) + FormatText -> pluginGetFile "stylish:" uri $ \file -> do + res <- liftIO $ runStylish Nothing file contents + case res of + Left err -> return $ IdeResultFail + (IdeError PluginError + (T.pack $ "stylish: " ++ err) + Null + ) + Right new -> return $ IdeResultOk [TextEdit (fullRange contents) (T.pack $ ((intercalate "\n" new) <> "\n"))] + + +runStylish :: Maybe ConfigPath -> FilePath -> T.Text -> IO (Either String [String]) +runStylish config file contents = format config (Just file) (T.unpack contents) diff --git a/stack.yaml b/stack.yaml index 858788239..6bb189943 100644 --- a/stack.yaml +++ b/stack.yaml @@ -26,11 +26,13 @@ extra-deps: - hie-bios-0.3.2 - hlint-2.2.8 - hsimport-0.11.0 +- HsYAML-0.2.1.0@sha256:e4677daeba57f7a1e9a709a1f3022fe937336c91513e893166bd1f023f530d68,5311 +- HsYAML-aeson-0.2.0.0@sha256:04796abfc01cffded83f37a10e6edba4f0c0a15d45bef44fc5bb4313d9c87757,1791 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 - parser-combinators-1.2.1 +- stylish-haskell-0.10.0.0 - ormolu-0.0.3.1 -- stylish-haskell-0.9.4.4 - syz-0.2.0.0 - temporary-1.2.1.1 - unix-compat-0.5.2 diff --git a/test/unit/HsImportSpec.hs b/test/unit/HsImportSpec.hs index 0816d9f64..dbad6b2a2 100644 --- a/test/unit/HsImportSpec.hs +++ b/test/unit/HsImportSpec.hs @@ -2,16 +2,16 @@ module HsImportSpec where import Control.Monad.IO.Class -import qualified Data.Text as T -import qualified Data.HashMap.Strict as Map +import qualified Data.HashMap.Strict as Map +import qualified Data.Text as T +import qualified Haskell.Ide.Engine.Config as Config import Haskell.Ide.Engine.MonadTypes -import Haskell.Ide.Engine.PluginUtils -import Haskell.Ide.Engine.Plugin.HsImport -import qualified Haskell.Ide.Engine.Config as Config import qualified Haskell.Ide.Engine.Plugin.Brittany as Brittany -import qualified Haskell.Ide.Engine.Plugin.Ormolu as Ormolu import qualified Haskell.Ide.Engine.Plugin.Floskell as Floskell +import Haskell.Ide.Engine.Plugin.HsImport +import qualified Haskell.Ide.Engine.Plugin.Ormolu as Ormolu import qualified Haskell.Ide.Engine.Plugin.Stylish as Stylish +import Haskell.Ide.Engine.PluginUtils import System.Directory import System.FilePath import Test.Hspec @@ -136,17 +136,17 @@ hsImportSpec = do ] , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe)\n" ] - , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe(..))\n" + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe (..))\n" ] - , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe(Nothing))\n" + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe (Nothing))\n" ] , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Function (($))\n" ] , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 32))) "import System.IO (IO, hPutStrLn)" ] , [ TextEdit (Range (toPos (3, 1)) (toPos (3, 99))) $ - "import Data.List (find, head, last, tail, init, union, (\\\\), null\n" <> - " , length, cons, uncons, reverse)" + "import Data.List (cons, find, head, init, last, length, null, reverse,\n" <> + " tail, uncons, union, (\\\\))" ] ] -- --------------------------------------------------------------------- @@ -218,4 +218,4 @@ expectHsImportResult formatterName fp uri expectedChanges act = do IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act case Map.lookup uri changes of Just (List val) -> val `shouldBe` expectedChanges - Nothing -> fail "No Change found" + Nothing -> fail "No Change found" From e631aa994046c5b0efe14d9c73056d786f38aa73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Fri, 31 Jan 2020 18:50:30 +0100 Subject: [PATCH 05/18] Update stack.yaml Co-Authored-By: Avi Dessauer --- stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index 6bb189943..8c21357d2 100644 --- a/stack.yaml +++ b/stack.yaml @@ -26,7 +26,7 @@ extra-deps: - hie-bios-0.3.2 - hlint-2.2.8 - hsimport-0.11.0 -- HsYAML-0.2.1.0@sha256:e4677daeba57f7a1e9a709a1f3022fe937336c91513e893166bd1f023f530d68,5311 +- HsYAML-0.2.1.0 - HsYAML-aeson-0.2.0.0@sha256:04796abfc01cffded83f37a10e6edba4f0c0a15d45bef44fc5bb4313d9c87757,1791 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 From a64db52b3f482da7dce2d5e299fdfaf52898d84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Fri, 31 Jan 2020 18:50:36 +0100 Subject: [PATCH 06/18] Update stack.yaml Co-Authored-By: Avi Dessauer --- stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index 8c21357d2..b454ca05e 100644 --- a/stack.yaml +++ b/stack.yaml @@ -27,7 +27,7 @@ extra-deps: - hlint-2.2.8 - hsimport-0.11.0 - HsYAML-0.2.1.0 -- HsYAML-aeson-0.2.0.0@sha256:04796abfc01cffded83f37a10e6edba4f0c0a15d45bef44fc5bb4313d9c87757,1791 +- HsYAML-aeson-0.2.0.0 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 - parser-combinators-1.2.1 From 3bb0de8ffe3966782173bb4e5e2649d0436d7da9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Sun, 2 Feb 2020 20:12:04 +0100 Subject: [PATCH 07/18] Add stylish-haskell version to *.cabal --- haskell-ide-engine.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 3cb344ae0..bc12fbb8e 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -91,7 +91,7 @@ library , safe , sorted-list >= 0.2.1.0 , stm - , stylish-haskell + , stylish-haskell >= 0.10.0.0 , syb , tagsoup , text From 97540654d006e83764146ebe2562b16e4f16056a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Sun, 2 Feb 2020 20:14:04 +0100 Subject: [PATCH 08/18] Add stylish-haskell to stack*.yaml --- stack-8.4.2.yaml | 1 + stack-8.4.3.yaml | 1 + stack-8.4.4.yaml | 1 + stack-8.6.4.yaml | 1 + stack-8.6.5.yaml | 1 + stack-8.8.1.yaml | 1 + 6 files changed, 6 insertions(+) diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 32a474726..ffe33fc7f 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -41,6 +41,7 @@ extra-deps: - rope-utf16-splay-0.3.1.0 - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd +- stylish-haskell-0.10.0.0 - syz-0.2.0.0 - temporary-1.2.1.1 - unix-compat-0.5.2 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index f617d39be..5aa538ba1 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -41,6 +41,7 @@ extra-deps: - rope-utf16-splay-0.3.1.0 - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd +- stylish-haskell-0.10.0.0 - syz-0.2.0.0 - unix-compat-0.5.2 - unordered-containers-0.2.10.0 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index a8f35f4c6..a33d6a5b7 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -41,6 +41,7 @@ extra-deps: - rope-utf16-splay-0.3.1.0 - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd +- stylish-haskell-0.10.0.0 - syz-0.2.0.0 - unix-compat-0.5.2 - unordered-containers-0.2.10.0 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index cac64a192..720b935d6 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -32,6 +32,7 @@ extra-deps: - ormolu-0.0.3.1 - parser-combinators-1.2.1 - rope-utf16-splay-0.3.1.0 +- stylish-haskell-0.10.0.0 - syz-0.2.0.0 - temporary-1.2.1.1 - unix-compat-0.5.2 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 8480ea00e..9717997ed 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -29,6 +29,7 @@ extra-deps: - monad-dijkstra-0.1.1.2@rev:1 - ormolu-0.0.3.1 - parser-combinators-1.2.1 +- stylish-haskell-0.10.0.0 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 36e79a1d0..a30eac496 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -24,6 +24,7 @@ extra-deps: - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 - semigroups-0.18.5 +- stylish-haskell-0.10.0.0 - temporary-1.2.1.1 flags: From 87ca5fd200fa57efa02969ba5bd2d3ea0a584205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Sun, 2 Feb 2020 20:25:06 +0100 Subject: [PATCH 09/18] Force HsYaml versions --- stack-8.4.2.yaml | 2 ++ stack-8.4.3.yaml | 2 ++ stack-8.4.4.yaml | 2 ++ stack-8.6.4.yaml | 2 ++ stack-8.6.5.yaml | 2 ++ stack-8.8.1.yaml | 2 ++ 6 files changed, 12 insertions(+) diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index ffe33fc7f..37d932517 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -31,6 +31,8 @@ extra-deps: - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 +- HsYAML-0.2.1.0 +- HsYAML-aeson-0.2.0.0 - libyaml-0.1.1.0 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 5aa538ba1..cc5de6ced 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -31,6 +31,8 @@ extra-deps: - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 +- HsYAML-0.2.1.0 +- HsYAML-aeson-0.2.0.0 - libyaml-0.1.1.0 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index a33d6a5b7..85b7cacab 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -30,6 +30,8 @@ extra-deps: - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 +- HsYAML-0.2.1.0 +- HsYAML-aeson-0.2.0.0 - libyaml-0.1.1.0 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 720b935d6..bea14989d 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -25,6 +25,8 @@ extra-deps: - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 +- HsYAML-0.2.1.0 +- HsYAML-aeson-0.2.0.0 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 - monad-memo-0.4.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 9717997ed..a6add7915 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -25,6 +25,8 @@ extra-deps: - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 +- HsYAML-0.2.1.0 +- HsYAML-aeson-0.2.0.0 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 - ormolu-0.0.3.1 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index a30eac496..354b285e4 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -20,6 +20,8 @@ extra-deps: - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 +- HsYAML-0.2.1.0 +- HsYAML-aeson-0.2.0.0 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 From ea10da50aed73d3fee8adba96bb3840d01265292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Sun, 2 Feb 2020 23:03:05 +0100 Subject: [PATCH 10/18] Add HsYaml to .cabal --- haskell-ide-engine.cabal | 2 ++ 1 file changed, 2 insertions(+) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index bc12fbb8e..bec0fad11 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -81,6 +81,8 @@ library , hoogle >= 5.0.13 , hsimport , hslogger + , HsYAML >= 0.2.1.0 + , HsYAML-aeson >= 0.2.0.0 , lifted-async , lens >= 4.15.2 , monoid-subclasses > 0.4 From 1ef965028ded8b911882c6bcde4eaff6d2f4f935 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Sun, 2 Feb 2020 18:23:41 -0500 Subject: [PATCH 11/18] Update cabal index snapshot --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index 72a4b52e9..91103aeb8 100644 --- a/cabal.project +++ b/cabal.project @@ -16,4 +16,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-01-24T16:47:33Z +index-state: 2020-02-02T18:20:00Z From d1430528134a3fe1960e21208fdfc014dbeec49b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Tue, 4 Feb 2020 20:11:00 +0100 Subject: [PATCH 12/18] Add stylish with deps to stack yaml 8.8.2 --- stack-8.8.2.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 7486f1971..e4501626d 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -23,10 +23,13 @@ extra-deps: - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 +- HsYAML-0.2.1.0 +- HsYAML-aeson-0.2.0.0 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 - semigroups-0.18.5 +- stylish-haskell-0.10.0.0 - temporary-1.2.1.1 flags: From 9e59e29ffff458bc6781c6c1d1454dca098e9f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Tue, 4 Feb 2020 20:11:21 +0100 Subject: [PATCH 13/18] Add cabal-3.0.0.0 --- stack-8.4.4.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 972cbb743..f5258ca26 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -12,6 +12,7 @@ extra-deps: - bifunctors-5.5.6 - brittany-0.12.1.0 - bytestring-trie-0.2.5.0 +- cabal-3.0.0.0 - cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd From 26f9e87c6d68c4b643d91669e0e6a417f6bd0424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Tue, 4 Feb 2020 21:14:16 +0100 Subject: [PATCH 14/18] Revert "Add cabal-3.0.0.0" This reverts commit 9e59e29ffff458bc6781c6c1d1454dca098e9f7f. --- stack-8.4.4.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index b27d5521f..fcb2bf0a2 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -12,7 +12,6 @@ extra-deps: - bifunctors-5.5.6 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -- cabal-3.0.0.0 - cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd From 6f91f83db54d7e6f3f103aa519860a1a5d767faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Wed, 5 Feb 2020 21:34:39 +0100 Subject: [PATCH 15/18] Add dependency on vector to stack-8.4.4 --- stack-8.4.4.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index fcb2bf0a2..6bd3d5eac 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -64,6 +64,7 @@ extra-deps: - temporary-1.2.1.1 - time-compat-1.9.2.2 - time-manager-0.0.0 # for http2 +- vector-0.12.1.2 - warp-3.2.28 # for network and network-bsd - wai-3.2.2.1 # for network and network-bsd From a1a6f75675153128bf4f4817769c00b35c2fa902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Wed, 5 Feb 2020 22:14:55 +0100 Subject: [PATCH 16/18] Add dependency on Cabal-3.0.0.0 --- stack-8.4.4.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 6bd3d5eac..aa32bdf94 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -12,6 +12,7 @@ extra-deps: - bifunctors-5.5.6 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 +- Cabal-3.0.0.0@sha256:1ba37b8d80e89213b17db7b8b9ea0108da55ca65f8c0cbb7433881a284c5cf67,26027 - cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd From 15e816d57436e6df631186d821b36fd4e29df68a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Wed, 5 Feb 2020 22:34:29 +0100 Subject: [PATCH 17/18] Set cabal to 2.4.1.0 --- stack-8.4.4.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index aa32bdf94..9ed1f9c8e 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -12,7 +12,7 @@ extra-deps: - bifunctors-5.5.6 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -- Cabal-3.0.0.0@sha256:1ba37b8d80e89213b17db7b8b9ea0108da55ca65f8c0cbb7433881a284c5cf67,26027 +- Cabal-2.4.1.0 - cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd From 5988529115c3b80088b5f21bcc08eb597c77e656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Go=C5=82=C4=99biewski?= Date: Sat, 8 Feb 2020 12:46:31 +0100 Subject: [PATCH 18/18] Downgrade cabal to 2.2.0.1 --- stack-8.4.4.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 9ed1f9c8e..a9c62f68a 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -12,7 +12,7 @@ extra-deps: - bifunctors-5.5.6 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -- Cabal-2.4.1.0 +- Cabal-2.2.0.1 - cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd