From d5ffea70f1a005208dd1af9effa36035413e335a Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 21 Jan 2020 21:49:34 +0100 Subject: [PATCH 1/2] Add ormolu to stack-8.8.1 including allow-newer --- stack-8.8.1.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 7e6e43360..40dac19c0 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -22,6 +22,8 @@ extra-deps: - haskell-src-exts-1.21.1 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 +- ormolu-0.0.3.0 +- optparse-applicative-0.15.1.0 flags: haskell-ide-engine: @@ -29,8 +31,8 @@ flags: hie-plugin-api: pedantic: true - -# allow-newer: true +# Required to build ormolu with optparse-applicative-0.15.1.0 +allow-newer: true nix: packages: [ icu libcxx zlib ] From f1436857730ecefcbbe9e2640b93f0c220cd3359 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Tue, 21 Jan 2020 16:42:37 -0500 Subject: [PATCH 2/2] Update ormolu test for 8.8 --- test/functional/FormatSpec.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index 704d62a39..bbb8052cd 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -101,8 +101,10 @@ spec = do doc <- openDoc "Format.hs" "haskell" formatDoc doc (FormattingOptions 2 True) docContent <- documentContents doc + let formatted = liftIO $ docContent `shouldBe` formattedOrmolu case ghcVersion of - GHC86 -> liftIO $ docContent `shouldBe` formattedOrmolu + GHC88 -> formatted + GHC86 -> formatted _ -> liftIO $ docContent `shouldBe` unchangedOrmolu