file-embed 0.0.4.1 → 0.0.4.2
raw patch · 2 files changed
+12/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/FileEmbed.hs +11/−1
- file-embed.cabal +1/−1
Data/FileEmbed.hs view
@@ -23,6 +23,9 @@ #endif , Q , runIO+#if MIN_VERSION_template_haskell(2,7,0)+ , Quasi(qAddDependentFile)+#endif ) import System.Directory (doesDirectoryExist, doesFileExist, getDirectoryContents)@@ -42,7 +45,11 @@ -- > myFile :: Data.ByteString.ByteString -- > myFile = $(embedFile "dirName/fileName") embedFile :: FilePath -> Q Exp-embedFile fp = (runIO $ B.readFile fp) >>= bsToExp+embedFile fp =+#if MIN_VERSION_template_haskell(2,7,0)+ qAddDependentFile fp >>+#endif+ (runIO $ B.readFile fp) >>= bsToExp -- | Embed a directory recusrively in your source code. --@@ -61,6 +68,9 @@ pairToExp :: (FilePath, B.ByteString) -> Q Exp pairToExp (path, bs) = do+#if MIN_VERSION_template_haskell(2,7,0)+ qAddDependentFile path+#endif exp' <- bsToExp bs return $! TupE [LitE $ StringL path, exp']
file-embed.cabal view
@@ -1,5 +1,5 @@ name: file-embed-version: 0.0.4.1+version: 0.0.4.2 license: BSD3 license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>