G!      !?An opaque representation of the contents and last modification ' times of a forest of directory trees. "# Create a ! for later checking with $ $BChecks that all the files present in the initial set of paths are M the exact set of files currently present, with unchanged modifcations times %AThis is the core of the functions in this module. It converts a " list of filepaths into a list of & annotated with = the modification times of the files located in those paths. !#$!#$'@A type synonym to simply talking about the type loaded by hint. (Convert an action to generate 's into an action to E generate Snap actions. The resulting action will share initialized D state until the next execution of the input action. At this time, & the cleanup action will be executed. ?The first two arguments control when recompiles are done. The ? first argument is an action that is executed when compilation @ starts. The second is a function from the result of the first @ action to an action that determines whether the value from the = previous compilation is still good. This abstracts out the C strategy for determining when a cached result is no longer valid. BIf an exception is raised during the processing of the action, it B will be thrown to all waiting threads, and for all requests made , before the recompile condition is reached. '('()*+,---The * type class. Minimal complete definition: ,  . Renders a template as text/*html. If the given template is not found,  this returns .. ERenders a template as the given content type. If the given template  is not found, this returns .. Runs an action with a modified /. You might want to use G this if you had a set of splices which were customised for a specific " action. To do that you would do: : heistLocal (bindSplices mySplices) $ render "myTemplate"  Analogous to 0+. If the template specified in the request  path is not found, it returns ..  Analogous to 1&. If the given template is not found,  this throws an error. %Helper function for common use case: 0 Render a template with a given set of splices. Template to render Splice mapping 'Values of types which are instances of  have  cleanup/1destroy and reload actions associated with them.  The  2 monad. The code that initialises your application's  state is written in the   monad. It's used for constructing  values which have cleanup/1destroy and reload actions associated with them. 23The 43$ datatype is used internally by the   monad to store  the application'-s state, cleanup actions and reload actions. 45%The internal state of the application's Snap Extensions. 65IO action which when run will cleanup the application' s state, ! e.g., closing open connections. 74IO action which when run will reload the application's state, e.g., 3 refreshing any cached values stored in the state. "It returns a list of tuples whose "keys" are the names of the Snap * Extensions which were reloaded and whose "values" are Nothing  when run successfully and Just x on failure, where x is an error  message. A   is a 8 and a 9 whose environment is H the application state for a given progam. You would usually type alias  SnapExtend AppState to something like App to form the monad in which  you write your application. : AAlthough it has the same type signature, this is not the same as ;  in the  - monad. Return simply lifts a value into the   0 monad, but this lifts the value and its destroy/reload ( actions. Use this when making your own   actions. *Given the Initializer for your application's state, and a value in the  monad formed by   wrapped it, this returns a < action, a % cleanup action and a reload action. Verbosity; info is printed to = when this is > The Initializer value !A web handler in your application's monad  Returns a <5 handler, a cleanup action, and a reload action. The E list returned by the reload action is for error reporting. There is E one tuple in the list for each Snap extension; the first element of H the tuple is the name of the Snap extension, and the second is a Maybe G which contains Nothing if there was no error reloading that extension F and a Just with the ByteString containing the error message if there  was. Serves the same purpose as , but combines the  application'>s web handler with a user-supplied action to be run to reload  the application' s state. Verbosity; info is printed to = when this is > The Initializer value !A web handler in your application' s monad.  Your desired "reload"$ handler; it gets passed the reload C action. This handler is always run, so you have to guard the path  yourself (with. Your < handler and a cleanup action. A cut-down version of , for use by the hint  loading code The Initializer value An action in your application' s monad. ? Join for the  / monad. This is used in the definition of bind  for the   monad. 3This takes the last value of the tuple returned by , F which is a list representing the results of an attempt to reload the  application'9s Snap Extensions, and turns it into a Snap action which  displays the these results. EUse this reload handler to disable the ability to have a web handler  which reloads Snap extensions. @A        For your application's monad to be a , your application's " state needs to be an instance of . Minimal complete  definition: , .  Unlike other HasState, type classes, this is a type class has two M parameters. Among other things, this means that you will need to enable the  FlexibleInstances and MultiParameterTypeClasses language extensions to " be able to create an instance of  HasHeistState. In most cases, the last , parameter will as usual be your application's state, and the additional 0 first one will be the monad formed by wrapping   around your  application' s state. JHowever, if you are developing your own Snap Extension which uses its own  internal 0, the last parameter will be your Snap Extension's M internal state, and the additional first parameter will be any monad formed  by wrapping  SnapExtend, around a type which has an instance of the  HasStateA class for your monad. These two use cases are subtly different,  which is why  needs two type parameters. Your application's state must include a  in order for your  application to be a .  Unlike other -State types, this is of kind  (* -> *) -> * . Unless you're ? developing your own Snap Extension which has its own internal , ' the type argument you want to pass to  is your application's  monad, which should be   wrapped around your application's  state. BCDEFGThe   for %. It takes one argument, a path to a  template directory containing .tpl files. HTake your application',s state and register these splices in it so  that you don'?t have to re-list them in every handler. Should be called from  inside your application's  . KTypical use cases are dynamically generated components that are present in  many of your views. Example Usage:  ! appInit :: Initializer AppState  appInit = do  hs <- heistInitializer " templates"  registerSplices hs $  [ ("tabs", tabsSplice)  , (" loginLogout", loginLogoutSplice) ] ;Heist state that you are going to embed in your application' s state. Your splices.  ?This function derives all the information necessary to use the C interpreter from the compile-time environment, and compiles it in  to the generated code. 8This could be considered a TH wrapper around a function  J loadSnap :: Initializer s -> SnapExtend s () -> [String] -> IO (Snap ()) with a magical implementation. The upshot is that you shouldn' t need to recompile your server A during development unless your .cabal file changes, or the code  that uses this splice changes. I@Convert the command-line arguments passed in to options for the B hint interpreter. This is somewhat brittle code, based on a few E experimental datapoints regarding the structure of the command-line  arguments cabal produces. JBThis function extracts the source paths from the compilation args K8This function creates the Snap handler that actually is @ responsible for doing the dynamic loading of actions via hint, A given all of the configuration information that the interpreter D needs. It also ensures safe concurrent access to the interpreter, E and caches the interpreter results for a short time before allowing  it to run again. Generally, this won'0t be called manually. Instead, loadSnapTH will < generate a call to it at compile-time, calculating all the ! arguments from its environment. 3A list of command-line options for the interpreter "A list of modules that need to be + interpreted. This should contain only the + modules which contain the initialization, 0 cleanup, and handler actions. Everything else + they require will be loaded transitively. %A list of paths to watch for updates #The name of the initializer action "The name of the SnapExtend action L9Convert an InterpreterError to a String for presentation  is similar to the M exported by Snap.Http.Server,  but is augmented with a  reloadHandler# field which can be accessed using   and . 3These are the default values for all the fields in .  hostname = "localhost"  address = "0.0.0.0"  port = 8000 " accessLog = "log/access.log" ! errorLog = "log/error.log"  locale = "en_US"  compression = True  verbose = True * errorHandler = prints the error message J reloadHandler = prints the result of each reload handler (error/success) NCompletes a partial M+ by filling in the unspecified values with  the default values from . IStarts serving HTTP requests using the given handler, with settings from  the 6 passed in. This function never returns; to shut down / the HTTP server, kill the controlling thread. 6Any configuration options which override the defaults The   function for the application's monad The application to be served GStarts serving HTTP using the given handler. The configuration is read < from the options given on the command-line, as returned by  O. The   function for the application's monad The application to be served P#QRSTUVWXYZ[\]^_`abcdOefghijkM   l      !"#$%&'()*+,-./0123456789:;<=>?@A?@BCCDEFGHI?JK9LM?JN9OPQRSTUV WXYZ[\]^_`abcdabeUabfabgabhabiabjabkablabmabnaboabpabqabrabsabtabuabvabwabxabyabzab{ab|ab}ab~abab snap-0.4.2Snap.Extension.HeistSnap.ExtensionSnap.Extension.Heist.ImplSnap.Extension.Loader.DevelSnap.Extension.Server'Snap.Extension.Loader.Devel.TreeWatcher%Snap.Extension.Loader.Devel.Evaluator"Snap.Extension.Loader.Devel.Signal MonadHeistrenderrenderAs heistLocal heistServeheistServeSinglerenderWithSplicesInitializerState extensionId mkCleanupmkReload Initializer SnapExtend mkInitializerrunInitializerrunInitializerWithReloadAction!runInitializerWithoutReloadActiondefaultReloadHandlernullReloadHandler HasHeistState getHeistState setHeistStatemodifyHeistState HeistStateheistInitializerregisterSplices loadSnapTH ConfigExtendgetReloadHandlersetReloadHandler defaultConfig httpServequickHttpServe TreeStatusTS getTreeStatuscheckTreeStatusreadModificationTimesdirectory-tree-0.10.0System.Directory.TreeAnchoredDirTree HintLoadableprotectedHintEvaluatorhelpersignals saveHandlersrestoreHandlersprotectHandlersbaseControl.Applicativeempty heist-0.5.2Text.Templating.Heist.Types TemplateStatesnap-core-0.4.2Snap.Util.FileServe fileServefileServeSingleSCR_state_cleanup_reload mtl-2.0.1.0Control.Monad.Reader.Class MonadReaderSnap.Internal.Types MonadSnapGHC.BasereturnSnapGHC.IO.Handle.FDstderrghc-primGHC.BoolTruejoin'fromUTF8toUTF8_path_origTs_tsMVar_sts _modifier renderHelper getHintOpts getSrcPathshintSnapformatsnap-server-0.4.2Snap.Http.Server.ConfigConfigcompleteConfigcommandLineConfigsetDefaultTimeoutsetErrorHandler setVerbosesetCompression setBackend setLocale setErrorLog setAccessLog addListen setHostnamegetDefaultTimeoutgetErrorHandler getVerbosegetCompression getBackend getLocale getErrorLog getAccessLog getListen getHostname emptyConfig ListenHttp ListenHttps ConfigListenConfigSimpleBackendConfigLibEvBackend ConfigBackend