Use Template Haskell to embed file contents directly.

Version on this page:
LTS Haskell 20.23:
Stackage Nightly 2023-05-31:
Latest on Hackage:

See all snapshots file-embed appears in

BSD-3-Clause licensed and maintained by Michael Snoyman
This version can be pinned in stack with:file-embed-,1351

Module documentation for


Use Template Haskell to read a file or all the files in a directory, and turn them into (path, bytestring) pairs embedded in your haskell code.


  • Improve inject documentation #11

Minor cleanup


  • Custom postfix for magic string #7

Minor cleanup