packages feed

directory-layout 0.7.3.1 → 0.7.4

raw patch · 3 files changed

+19/−10 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- System.Directory.Layout.Internal: instance IsList Contents
- System.Directory.Layout.Internal: instance Typeable F
- System.Directory.Layout.Internal: instance Typeable Layout
- System.Directory.Layout.Interpreter: instance Typeable (\/)
+ System.Directory.Layout.Internal: instance Typeable1 F
+ System.Directory.Layout.Internal: instance Typeable1 Layout
+ System.Directory.Layout.Interpreter: instance Typeable2 \/

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+0.7.4+=====++  * Adjusted dedentation algorithm to ignore empty lines when calculating an amount+  of spaces to drop+ 0.7.3.0 ======= 
directory-layout.cabal view
@@ -1,5 +1,5 @@ name:                directory-layout-version:             0.7.3.1+version:             0.7.4 synopsis:            Directory layout DSL description:   Making, fitting, printing directory layouts@@ -21,7 +21,7 @@ source-repository this   type:     git   location: https://github.com/supki/directory-layout-  tag:      0.7.3.1+  tag:      0.7.4  library   default-language:@@ -58,7 +58,7 @@   type:     exitcode-stdio-1.0   build-depends:-      base          == 4.*+      base      == 4.*     , directory     , doctest     , filepath@@ -81,10 +81,10 @@     , filepath     , free     , hspec-    , lens >= 4+    , lens                 >= 4     , semigroups     , template-haskell-    , temporary >= 1.2.0.3+    , temporary            >= 1.2.0.3     , text     , transformers     , unix
src/System/Directory/Layout/QQ.hs view
@@ -66,6 +66,7 @@ split sep xs = case break (== sep) xs of   (ys, [])     -> ys : []   (ys, _ : zs) -> ys : split sep zs+{-# ANN split "HLint: ignore Use list literal" #-}  unsplit :: a -> [[a]] -> [a] unsplit = intercalate . pure@@ -90,15 +91,17 @@   vs :> "" -> stripCommonLeadingWhitespace vs |> ""   _        -> stripCommonLeadingWhitespace xs -stripCommonLeadingWhitespace :: (Functor f, Foldable f) => f String -> f String+stripCommonLeadingWhitespace :: Seq String -> Seq String stripCommonLeadingWhitespace xs = drop (commonLeadingWhitespace xs) <$> xs -commonLeadingWhitespace :: (Functor f, Foldable f) => f String -> Int-commonLeadingWhitespace = minimumOr 0 . fmap (length . takeWhile isSpace)+commonLeadingWhitespace :: Seq String -> Int+commonLeadingWhitespace =+  minimumOr 0 . fmap (length . takeWhile isSpace) . Seq.filter (not . null)  minimumOr :: (Foldable f, Ord a) => a -> f a -> a minimumOr n = maybe n id . foldr (lmin . Just) Nothing  where   lmin (Just x) (Just y) = Just (min x y)-  lmin Nothing x = x-  lmin x Nothing = x+  lmin Nothing  x        = x+  lmin x        Nothing  = x+{-# ANN minimumOr "HLint: ignore Use fromMaybe" #-}