Some docs

This commit is contained in:
Michael Snoyman 2013-06-03 16:18:19 +03:00
parent 5f9df52bc8
commit 3d21ff3618
2 changed files with 16 additions and 1 deletions

View File

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

View File

@ -1,5 +1,5 @@
name: file-embed
version: 0.0.4.7
version: 0.0.4.8
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>