packages feed

fourmolu 0.7.0.0 → 0.7.0.1

raw patch · 16 files changed

+183/−5 lines, 16 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+## Fourmolu 0.7.0.1++* Fix bad copy/paste where parsing errors for `haddock-style` would mention `CommaStyle`+* Include relevant test files in sdist bundle+ ## Fourmolu 0.7.0.0  * Add `--quiet` flag to make the output quieter
+ fixity-tests/test-0-input.hs view
@@ -0,0 +1,7 @@+instance A.ToJSON UpdateTable where+    toJSON a = A.object+        $ "TableName" .= updateTableName a+        : "ProvisionedThroughput" .= updateProvisionedThroughput a+        : case updateGlobalSecondaryIndexUpdates a of+            [] -> []+            l -> [ "GlobalSecondaryIndexUpdates" .= l ]
+ fixity-tests/test-0-no-extra-info-expected.hs view
@@ -0,0 +1,10 @@+instance A.ToJSON UpdateTable where+  toJSON a =+    A.object $+      "TableName"+        .= updateTableName a+        : "ProvisionedThroughput"+        .= updateProvisionedThroughput a+        : case updateGlobalSecondaryIndexUpdates a of+          [] -> []+          l -> ["GlobalSecondaryIndexUpdates" .= l]
+ fixity-tests/test-0-with-fixity-info-expected.hs view
@@ -0,0 +1,8 @@+instance A.ToJSON UpdateTable where+  toJSON a =+    A.object $+      "TableName" .= updateTableName a+        : "ProvisionedThroughput" .= updateProvisionedThroughput a+        : case updateGlobalSecondaryIndexUpdates a of+          [] -> []+          l -> ["GlobalSecondaryIndexUpdates" .= l]
+ fixity-tests/test-1-input.hs view
@@ -0,0 +1,7 @@+lenses = Just $ M.fromList+  $ "type"       .= ("user.connection" :: Text)+  # "connection" .= uc+  # "user"       .= case name of+      Just  n -> Just $ object ["name" .= n]+      Nothing -> Nothing+  # []
+ fixity-tests/test-1-no-extra-info-expected.hs view
@@ -0,0 +1,12 @@+lenses =+  Just $+    M.fromList $+      "type"+        .= ("user.connection" :: Text)+        # "connection"+        .= uc+        # "user"+        .= case name of+          Just n -> Just $ object ["name" .= n]+          Nothing -> Nothing+        # []
+ fixity-tests/test-1-with-fixity-info-expected.hs view
@@ -0,0 +1,9 @@+lenses =+  Just $+    M.fromList $+      "type" .= ("user.connection" :: Text)+        # "connection" .= uc+        # "user" .= case name of+          Just n -> Just $ object ["name" .= n]+          Nothing -> Nothing+        # []
fourmolu.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               fourmolu-version:            0.7.0.0+version:            0.7.0.1 license:            BSD-3-Clause license-file:       LICENSE.md maintainer:@@ -18,6 +18,10 @@     data/**/*.hs     data/**/*.txt     extract-hackage-info/hackage-info.json+    -- needed for integration tests+    fixity-tests/*.hs+    region-tests/*.hs+    fourmolu.yaml  extra-doc-files:     CHANGELOG.md@@ -212,8 +216,8 @@     type:               exitcode-stdio-1.0     main-is:            Main.hs     hs-source-dirs:     region-tests-     default-language:   Haskell2010+    build-tool-depends: fourmolu:fourmolu     build-depends:         base >=4.14 && <5.0,         directory >=1.3 && <1.4,@@ -229,10 +233,9 @@     type:               exitcode-stdio-1.0     main-is:            Main.hs     hs-source-dirs:     fixity-tests-     default-language:   Haskell2010+    build-tool-depends: fourmolu:fourmolu     build-depends:-        fourmolu,         base >=4.14 && <5.0,         directory >=1.3 && <1.4,         hspec >=2.0 && <3.0,
+ fourmolu.yaml view
@@ -0,0 +1,11 @@+# Options should imitate Ormolu's style+indentation: 2+comma-style: trailing+import-export-comma-style: trailing+indent-wheres: true+record-brace-space: true+diff-friendly-import-export: false+respectful: false+haddock-style: single-line+newlines-between-decls: 1+fixities: []
+ region-tests/expected-result-17-18.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE LambdaCase #-}++module Foo (+  foo, bar, baz) where++foo :: Int+foo  =  5++bar :: Int -> Int+bar = \case+         0 -> foo+         x -> x   -   foo++baz :: Int -> Int+baz = gege+  where+    gege = 1 + 2
+ region-tests/expected-result-6-7.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE LambdaCase #-}++module Foo (+  foo, bar, baz) where++foo :: Int+foo = 5++bar :: Int -> Int+bar = \case+         0 -> foo+         x -> x   -   foo++baz :: Int -> Int+baz = gege+  where+    gege = 1   + 2
+ region-tests/expected-result-6-8.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE LambdaCase #-}++module Foo (+  foo, bar, baz) where++foo :: Int+foo = 5++bar :: Int -> Int+bar = \case+         0 -> foo+         x -> x   -   foo++baz :: Int -> Int+baz = gege+  where+    gege = 1   + 2
+ region-tests/expected-result-9-12.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE LambdaCase #-}++module Foo (+  foo, bar, baz) where++foo :: Int+foo  =  5++bar :: Int -> Int+bar = \case+  0 -> foo+  x -> x - foo++baz :: Int -> Int+baz = gege+  where+    gege = 1   + 2
+ region-tests/expected-result-all.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE LambdaCase #-}++module Foo+  ( foo,+    bar,+    baz,+  )+where++foo :: Int+foo = 5++bar :: Int -> Int+bar = \case+  0 -> foo+  x -> x - foo++baz :: Int -> Int+baz = gege+  where+    gege = 1 + 2
+ region-tests/src.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE LambdaCase #-}++module Foo (+  foo, bar, baz) where++foo :: Int+foo  =  5++bar :: Int -> Int+bar = \case+         0 -> foo+         x -> x   -   foo++baz :: Int -> Int+baz = gege+  where+    gege = 1   + 2
src/Ormolu/Config.hs view
@@ -398,7 +398,7 @@   showText = show . showTextWith commaStyleMap  instance PrinterOptsFieldType HaddockPrintStyle where-  parseJSON = parseJSONWith haddockPrintStyleMap "CommaStyle"+  parseJSON = parseJSONWith haddockPrintStyleMap "HaddockPrintStyle"   parseText = parseTextWith haddockPrintStyleMap   showText = show . showTextWith haddockPrintStyleMap