-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Snap: A Haskell Web Framework: dynamic loader
--   
--   Snap Framework dynamic loader
@package snap-loader-dynamic
@version 0.10


-- | This module includes the machinery necessary to use hint to load
--   action code dynamically. It includes a Template Haskell function to
--   gather the necessary compile-time information about code location,
--   compiler arguments, etc, and bind that information into the calls to
--   the dynamic loader.
module Snap.Loader.Dynamic

-- | This function derives all the information necessary to use the
--   interpreter from the compile-time environment, and compiles it in to
--   the generated code.
--   
--   This could be considered a TH wrapper around a function
--   
--   <pre>
--   loadSnap :: Typeable a =&gt; IO a -&gt; (a -&gt; IO (Snap (), IO ()))
--                          -&gt; [String] -&gt; IO (a, Snap (), IO ())
--   </pre>
--   
--   with a magical implementation. The [String] argument is a list of
--   directories to watch for updates to trigger a reloading. Directories
--   containing code should be automatically picked up by this splice.
--   
--   The generated splice executes the initialiser once, sets up the
--   interpreter for the load function, and returns the initializer's
--   result along with the interpreter's proxy handler and cleanup actions.
--   The behavior of the proxy actions will change to reflect changes in
--   the watched files, reinterpreting the load function as needed and
--   applying it to the initializer result.
--   
--   This will handle reloading the application successfully in most cases.
--   The cases in which it is certain to fail are those involving changing
--   the types of the initializer or the load function, or changing the
--   compiler options required, such as by changing/adding dependencies in
--   the project's .cabal file. In those cases, a full recompile will be
--   needed.
loadSnapTH :: Q Exp -> Name -> [String] -> Q Exp
