packages feed

file-embed 0.0.11.2 → 0.0.12.0

raw patch · 4 files changed

+19/−11 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.12.0++* Use the `Bytes` literal on newer GHCs to reduce memory usage during compilation [#36](https://github.com/snoyberg/file-embed/pull/36)+ ## 0.0.11.2  * Haddock markup fix
Data/FileEmbed.hs view
@@ -46,11 +46,7 @@  import Language.Haskell.TH.Syntax     ( Exp (AppE, ListE, LitE, TupE, SigE, VarE)-#if MIN_VERSION_template_haskell(2,5,0)-    , Lit (StringL, StringPrimL, IntegerL)-#else-    , Lit (StringL, IntegerL)-#endif+    , Lit (..)     , Q     , runIO     , qLocation, loc_filename@@ -58,6 +54,10 @@     , Quasi(qAddDependentFile) #endif     )+#if MIN_VERSION_template_haskell(2,16,0)+import Language.Haskell.TH ( mkBytes, bytesPrimL )+import qualified Data.ByteString.Internal as B+#endif import System.Directory (doesDirectoryExist, doesFileExist,                          getDirectoryContents, canonicalizePath) import Control.Exception (throw, ErrorCall(..))@@ -155,7 +155,11 @@     return $ VarE 'unsafePerformIO       `AppE` (VarE 'unsafePackAddressLen       `AppE` LitE (IntegerL $ fromIntegral $ B8.length bs)-#if MIN_VERSION_template_haskell(2, 8, 0)+#if MIN_VERSION_template_haskell(2, 16, 0)+      `AppE` LitE (bytesPrimL (+                let B.PS ptr off sz = bs+                in  mkBytes ptr (fromIntegral off) (fromIntegral sz))))+#elif MIN_VERSION_template_haskell(2, 8, 0)       `AppE` LitE (StringPrimL $ B.unpack bs)) #else       `AppE` LitE (StringPrimL $ B8.unpack bs))
README.md view
@@ -1,8 +1,6 @@ ## file-embed -[![Build Status](https://travis-ci.org/snoyberg/file-embed.svg?branch=master)](https://travis-ci.org/snoyberg/file-embed)-[![Build status](https://ci.appveyor.com/api/projects/status/vlgo8uudpt374uoy/branch/master?svg=true)](https://ci.appveyor.com/project/snoyberg/file-embed/branch/master)-+![Tests](https://github.com/snoyberg/file-embed/workflows/Tests/badge.svg)  Use Template Haskell to read a file or all the files in a directory, and turn them into (path, bytestring) pairs embedded in your haskell code.
file-embed.cabal view
@@ -1,5 +1,5 @@ name:            file-embed-version:         0.0.11.2+version:         0.0.12.0 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>@@ -10,7 +10,7 @@                  embedded in your Haskell code. category:        Data stability:       Stable-cabal-version:   >= 1.8+cabal-version:   >= 1.10 build-type:      Simple homepage:        https://github.com/snoyberg/file-embed extra-source-files: test/main.hs, test/sample/foo, test/sample/bar/baz,@@ -18,6 +18,7 @@                     README.md  library+    default-language: Haskell2010     build-depends:   base               >= 4.9.1   && < 5                    , bytestring         >= 0.9.1.4                    , directory          >= 1.0.0.3@@ -27,6 +28,7 @@     ghc-options:     -Wall  test-suite test+    default-language: Haskell2010     type: exitcode-stdio-1.0     main-is: main.hs     hs-source-dirs: test