binembed-0.1: Embed data into object files.



Support code used by the output of binembed --output-hs=.

For example, given MyData.binembed listing some files, you might get at the contents embedded into your executable using:

 import MyData   -- which re-exports this module
 main = do
   myData' <- unBinEmbed myData

See the 'binembed-example' package for a more detailed example.



data Node a Source

A directory tree


File a

A file has contents.

Dir (Map String (Node a))

A directory has named Nodes.


Functor Node 
Foldable Node 
Traversable Node 
Eq a => Eq (Node a) 
Ord a => Ord (Node a) 
Read a => Read (Node a) 
Show a => Show (Node a) 

unBinEmbed :: Node (IO ByteString) -> IO (Node ByteString)Source

Unpack embedded data.

unBinEmbedFile :: Ptr () -> Ptr () -> IO ByteStringSource

Repack the contents between two pointers. Your code probably doesn't need to call this, but it's needed in generated code.