@@ -156,6 +156,8 @@ stringToBs = B8.pack
157-- > myFile :: IsString a => a
157-- > myFile :: IsString a => a
158-- > myFile = $(embedStringFile "dirName/fileName")
158-- > myFile = $(embedStringFile "dirName/fileName")
159embedStringFile :: FilePath -> Q Exp
161embedStringFile :: FilePath -> Q Exp
160embedStringFile fp =
162embedStringFile fp =
161#if MIN_VERSION_template_haskell(2,7,0)
163#if MIN_VERSION_template_haskell(2,7,0)
@@ -165,6 +167,8 @@ embedStringFile fp =
166-- | Embed a single existing string file in your source code
168-- | Embed a single existing string file in your source code
167-- out of list a list of paths supplied.
169-- out of list a list of paths supplied.
168embedOneStringFileOf :: [FilePath] -> Q Exp
172embedOneStringFileOf :: [FilePath] -> Q Exp
169embedOneStringFileOf ps =
173embedOneStringFileOf ps =
170 (runIO $ readExistingFile ps) >>= \ ( path, content ) -> do
174 (runIO $ readExistingFile ps) >>= \ ( path, content ) -> do