packages feed

file-embed 0.0.12.0 → 0.0.13.0

raw patch · 4 files changed

+10/−4 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # ChangeLog for file-embed +## 0.0.13.0++* Ensure that directory listings are returned in sorted order for reproducibility [yesodweb/yesod#1684](https://github.com/yesodweb/yesod/issues/1684)+ ## 0.0.12.0  * Use the `Bytes` literal on newer GHCs to reduce memory usage during compilation [#36](https://github.com/snoyberg/file-embed/pull/36)
Data/FileEmbed.hs view
@@ -71,6 +71,8 @@ import System.FilePath ((</>), takeDirectory, takeExtension) import Data.String (fromString) import Prelude as P+import Data.List (sortBy)+import Data.Ord (comparing)  -- | Embed a single file in your source code. --@@ -234,7 +236,7 @@              mapM (liftPair2 . second B.readFile)     dirs <- filterM (doesDirectoryExist . snd) all' >>=             mapM (fileList' realTop . fst)-    return $ concat $ files : dirs+    return $ sortBy (comparing fst) $ concat $ files : dirs  liftPair2 :: Monad m => (a, m b) -> m (a, b) liftPair2 (a, b) = b >>= \b' -> return (a, b')
file-embed.cabal view
@@ -1,5 +1,5 @@ name:            file-embed-version:         0.0.12.0+version:         0.0.13.0 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>
test/main.hs view
@@ -14,8 +14,8 @@ main = do     let received = $(embedDir "test/sample")     received @?=-        [ ("foo", "foo\r\n")-        , ("bar" </> "baz", "baz\r\n")+        [ ("bar" </> "baz", "baz\r\n")+        , ("foo", "foo\r\n")         ]     let str = $(embedStringFile "test/sample/foo") :: String     filter (/= '\r') str @?= "foo\n"