@@ -14,7 +14,7 @@ module Data.FileEmbed
16import Language.Haskell.TH.Syntax
16import Language.Haskell.TH.Syntax
17− ( Exp (AppE, ListE, LitE, TupE)
17+ ( Exp (AppE, ListE, LitE, TupE, SigE)
18#if MIN_VERSION_template_haskell(2,5,0)
18#if MIN_VERSION_template_haskell(2,5,0)
19 , Lit (StringL, StringPrimL, IntegerL)
19 , Lit (StringL, StringPrimL, IntegerL)
@@ -57,7 +57,10 @@ embedFile fp =
57-- > myDir :: [(FilePath, Data.ByteString.ByteString)]
57-- > myDir :: [(FilePath, Data.ByteString.ByteString)]
58-- > myDir = $(embedDir "dirName")
58-- > myDir = $(embedDir "dirName")
59embedDir :: FilePath -> Q Exp
59embedDir :: FilePath -> Q Exp
61+ typ <- [t| [(FilePath, B.ByteString)] |]
60−embedDir fp = ListE <$> ((runIO $ fileList fp) >>= mapM (pairToExp fp))
62+ e <- ListE <$> ((runIO $ fileList fp) >>= mapM (pairToExp fp))
62-- | Get a directory tree in the IO monad.
65-- | Get a directory tree in the IO monad.