From 610b82e0a12e2a652e97ccbc7ab5f09cad8591c7 Mon Sep 17 00:00:00 2001 From: Fendor Date: Wed, 29 Jul 2020 09:50:25 +0200 Subject: [PATCH 1/2] Make the AGPL flag manual in cabal --- haskell-language-server.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 120f1dcce2..74c06e94ae 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -19,7 +19,7 @@ extra-source-files: flag agpl Description: Enable AGPL dependencies Default: True - Manual: False + Manual: True flag pedantic Description: Enable -Werror From 1f26704e766c1e1fd2a87f6c35d3cc88ada18a60 Mon Sep 17 00:00:00 2001 From: Fendor Date: Wed, 29 Jul 2020 10:28:01 +0200 Subject: [PATCH 2/2] Disable Brittany for GHC Versions >= 8.10.1 --- exe/Main.hs | 2 ++ haskell-language-server.cabal | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/exe/Main.hs b/exe/Main.hs index 081f261cac..329121ddcc 100644 --- a/exe/Main.hs +++ b/exe/Main.hs @@ -106,7 +106,9 @@ idePlugins includeExamples = pluginDescToIdePlugins allPlugins , Ormolu.descriptor "ormolu" , StylishHaskell.descriptor "stylish-haskell" #if AGPL +#if !MIN_VERSION_ghc(8,10,1) , Brittany.descriptor "brittany" +#endif #endif , Eval.descriptor "eval" ] diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 74c06e94ae..8787a86df7 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -95,10 +95,11 @@ library else build-depends: unix if flag(agpl) - build-depends: - brittany - exposed-modules: - Ide.Plugin.Brittany + if impl(ghc < 8.10) + build-depends: + brittany + exposed-modules: + Ide.Plugin.Brittany ghc-options: -Wall