packages feed

file-embed 0.0.4.2 → 0.0.4.3

raw patch · 4 files changed

+27/−8 lines, 4 filesdep +file-embeddep ~basePVP ok

version bump matches the API change (PVP)

Dependencies added: file-embed

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

Data/FileEmbed.hs view
@@ -58,7 +58,7 @@ -- > myDir :: [(FilePath, Data.ByteString.ByteString)] -- > myDir = $(embedDir "dirName") embedDir :: FilePath -> Q Exp-embedDir fp = ListE <$> ((runIO $ fileList fp) >>= mapM pairToExp)+embedDir fp = ListE <$> ((runIO $ fileList fp) >>= mapM (pairToExp fp))  -- | Get a directory tree in the IO monad. --@@ -66,10 +66,10 @@ getDir :: FilePath -> IO [(FilePath, B.ByteString)] getDir = fileList -pairToExp :: (FilePath, B.ByteString) -> Q Exp-pairToExp (path, bs) = do+pairToExp :: FilePath -> (FilePath, B.ByteString) -> Q Exp+pairToExp root (path, bs) = do #if MIN_VERSION_template_haskell(2,7,0)-    qAddDependentFile path+    qAddDependentFile $ root ++ '/' : path #endif     exp' <- bsToExp bs     return $! TupE [LitE $ StringL path, exp']
file-embed.cabal view
@@ -1,15 +1,16 @@ name:            file-embed-version:         0.0.4.2+version:         0.0.4.3 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com> maintainer:      Michael Snoyman <michael@snoyman.com> synopsis:        Use Template Haskell to embed file contents directly. category:        Data-stability:       unstable-cabal-version:   >= 1.2+stability:       Stable+cabal-version:   >= 1.8 build-type:      Simple-homepage:        http://github.com/snoyberg/file-embed/tree/master+homepage:        https://github.com/snoyberg/file-embed+extra-source-files: test/main.hs, test/sample/foo  library     build-depends:   base >= 4 && < 5,@@ -18,3 +19,14 @@                      template-haskell     exposed-modules: Data.FileEmbed     ghc-options:     -Wall++test-suite test+    type: exitcode-stdio-1.0+    main-is: main.hs+    hs-source-dirs: test+    build-depends: base+                 , file-embed++source-repository head+  type:     git+  location: https://github.com/snoyberg/file-embed
+ test/main.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE TemplateHaskell #-}++import Data.FileEmbed++main :: IO ()+main = print $(embedDir "test/sample")
+ test/sample/foo view
@@ -0,0 +1,1 @@+foo