packages feed

hindent 5.3.2 → 5.3.3

raw patch · 5 files changed

+16/−7 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ HIndent.Pretty: instance HIndent.Pretty.Pretty Language.Haskell.Exts.Syntax.Kind
- HIndent.Types: readExtension :: (Monad m, MonadFail m) => String -> m Extension
+ HIndent.Types: readExtension :: Monad m => String -> m Extension

Files

README.md view
@@ -52,7 +52,7 @@  By default, hindent preserves the newline or lack of newline in your input. With `force-trailing-newline`, it will make sure there is always a trailing newline. -hindent can be forced to insert a newline before specific operators and tokens with `line-breaks`. This is especially useful when utilizing libraries like [`servant`](https://www.servant.dev/) which use long type aliases.+hindent can be forced to insert a newline before specific operators and tokens with `line-breaks`. This is especially useful when utilizing libraries like [`servant`](https://docs.servant.dev/) which use long type aliases.  Using `extensions`, hindent can be made aware of valid syntactic compiler extensions that would normally be considered invalid syntax. 
hindent.cabal view
@@ -1,5 +1,5 @@ name:                hindent-version:             5.3.2+version:             5.3.3 synopsis:            Extensible Haskell pretty printer description:         Extensible Haskell pretty printer. Both a library and an executable.                      .
src/HIndent/CabalFile.hs view
@@ -12,6 +12,9 @@ import Distribution.ModuleName import Distribution.PackageDescription import Distribution.PackageDescription.Configuration+#if MIN_VERSION_Cabal(3, 6, 0)+import Distribution.Utils.Path (getSymbolicPath)+#endif #if MIN_VERSION_Cabal(2, 2, 0) import Distribution.PackageDescription.Parsec #else@@ -47,7 +50,13 @@         Just relpath ->           any (equalFilePath $ dropExtension relpath) modpaths ||           any (equalFilePath relpath) fpaths-    in any inDir $ hsSourceDirs bi+    in any inDir $ hsSourceDirs' bi+      where+#if MIN_VERSION_Cabal(3, 6, 0)+        hsSourceDirs' =  (map getSymbolicPath) . hsSourceDirs+#else+        hsSourceDirs' = hsSourceDirs+#endif  -- | Extract `Stanza`s from a package packageStanzas :: PackageDescription -> [Stanza]
src/main/Benchmark.hs view
@@ -9,8 +9,8 @@ import           Criterion import           Criterion.Main import qualified Data.ByteString as S+import qualified Data.ByteString.Builder as S import qualified Data.ByteString.Char8 as S8-import qualified Data.ByteString.Lazy.Builder as L import qualified Data.ByteString.UTF8 as UTF8 import           HIndent import           HIndent.Types@@ -34,7 +34,7 @@         then (bench                 (UTF8.toString desc)                 (nf-                   (either error L.toLazyByteString .+                   (either error S.toLazyByteString .                     reformat                       HIndent.Types.defaultConfig                       (Just defaultExtensions)
src/main/Test.hs view
@@ -6,9 +6,9 @@ import           Data.Algorithm.Diff import           Data.Algorithm.DiffOutput import qualified Data.ByteString as S+import qualified Data.ByteString.Builder as S import           Data.ByteString.Lazy (ByteString) import qualified Data.ByteString.Lazy as L-import qualified Data.ByteString.Lazy.Builder as L import qualified Data.ByteString.Lazy.Char8 as L8 import qualified Data.ByteString.Lazy.UTF8 as LUTF8 import qualified Data.ByteString.UTF8 as UTF8@@ -32,7 +32,7 @@  reformat :: Config -> S.ByteString -> ByteString reformat cfg code =-  either (("-- " <>) . L8.pack) L.toLazyByteString $+  either (("-- " <>) . L8.pack) S.toLazyByteString $   HIndent.reformat cfg (Just HIndent.defaultExtensions) Nothing code  -- | Convert the Markdone document to Spec benchmarks.