From a8c22661185a0e6b5d49b38f379bea90b4536e9e Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Tue, 14 Nov 2023 10:38:30 +0000 Subject: [PATCH 1/2] Some versions of stylish-haskell do need the ghc-lib flag --- cabal.project | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cabal.project b/cabal.project index 9c4a520b93..8c36543230 100644 --- a/cabal.project +++ b/cabal.project @@ -54,6 +54,10 @@ constraints: text -simdutf, ghc-check -ghc-check-use-package-abis, ghc-lib-parser-ex -auto, + -- This is only present in some versions, and it's on by default since + -- 0.14.5.0, but there are some versions we allow that need this + -- setting + stylish-haskell +ghc-lib, -- Centos 7 comes with an old gcc version that doesn't know about -- the flag '-fopen-simd', which blocked the release 2.2.0.0. -- We want to be able to benefit from the performance optimisations From 748695eeb7f0b4bf73c26cda4f8f584b7a9615b2 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Tue, 14 Nov 2023 11:06:58 +0000 Subject: [PATCH 2/2] Set it in the stack config not the cabal config --- stack-lts21.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stack-lts21.yaml b/stack-lts21.yaml index 5ac2245933..34c75f56d5 100644 --- a/stack-lts21.yaml +++ b/stack-lts21.yaml @@ -65,6 +65,8 @@ configure-options: flags: haskell-language-server: pedantic: true + stylish-haskell: + ghc-lib: true retrie: BuildExecutable: false