@@ -1,5 +1,20 @@
11{-# LANGUAGE TemplateHaskell #-}
22{-# LANGUAGE CPP #-}
3+-- | This module uses template Haskell. Following is a simplified explanation of usage for those unfamiliar with calling Template Haskell functions.
4+--
5+-- The function @embedFile@ in this modules embeds a file into the exceutable
6+-- that you can use it at runtime. A file is represented as a @ByteString@.
7+-- However, as you can see below, the type signature indicates a value of type
8+-- @Q Exp@ will be returned. In order to convert this into a @ByteString@, you
9+-- must use Template Haskell syntax, e.g.:
10+--
11+-- > $(embedFile "myfile.txt")
12+--
13+-- This expression will have type @ByteString@. Be certain to enable the
14+-- TemplateHaskell language extension, usually by adding the following to the
15+-- top of your module:
16+--
17+-- > {-# LANGUAGE TemplateHaskell #-}
318module Data.FileEmbed
419 ( -- * Embed at compile time
520 embedFile