@@ -58,7 +58,7 @@ embedFile fp =
5858-- > myDir :: [(FilePath, Data.ByteString.ByteString)]
5959-- > myDir = $(embedDir "dirName")
6060embedDir :: FilePath -> Q Exp
61−embedDir fp = ListE <$> ((runIO $ fileList fp) >>= mapM pairToExp)
61+embedDir fp = ListE <$> ((runIO $ fileList fp) >>= mapM (pairToExp fp))
6262
6363-- | Get a directory tree in the IO monad.
6464--
@@ -66,10 +66,10 @@ embedDir fp = ListE <$> ((runIO $ fileList fp) >>= mapM pairToExp)
6666getDir :: FilePath -> IO [(FilePath, B.ByteString)]
6767getDir = fileList
6868
69−pairToExp :: (FilePath, B.ByteString) -> Q Exp
70−pairToExp (path, bs) = do
69+pairToExp :: FilePath -> (FilePath, B.ByteString) -> Q Exp
70+pairToExp root (path, bs) = do
7171#if MIN_VERSION_template_haskell(2,7,0)
72− qAddDependentFile path
72+ qAddDependentFile $ root ++ '/' : path
7373#endif
7474 exp' <- bsToExp bs
7575 return $! TupE [LitE $ StringL path, exp']