dingo-core-0.1.0: Dingo is a Rich Internet Application platform based on the Warp web server.



This module is used to embed resource bundles for use by widgets and applications.

Typical usage looks like:

 import Dingo.ResourceBundle

 myResourceDirectory :: ResourceDirectory
 myResourceDirectory = $(embedDir "bundles/my-resources")

 myResourceBundle :: ResourceBundle
 myResourceBundle = makeResourceBundle myResourceDirecory

You can then use myResourceBundle as a resource bundle in a widget or supply it in the application settings when starting the Dingo server.



data ResourceBundle Source

Resource bundle data structure.

type ResourceDirectory = [(String, ByteString)]Source

Type alias for convience for using embedDir.

makeResourceBundle :: ResourceDirectory -> ResourceBundleSource

Make a resource bundle from an embedded directory structure returned by embedDir.

embedDir :: FilePath -> Q Exp

Embed a directory recusrively in your source code.

 import qualified Data.ByteString

 myDir :: [(FilePath, Data.ByteString.ByteString)]
 myDir = $(embedDir "dirName")