4H"      !"?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. ()()*+,-...?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. 'This is the backing implementation for . This 2 interface can be used when the types involved don' t include a  SnapExtend and an Initializer. !the list of modules to interpret *the list of modules to import in addition  to those being interpreted $additional directories to watch for  changes to trigger to recompile/reload #the expression to interpret in the , context of the loaded modules and imports.  It should have the type ( /@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. 0BThis function extracts the source paths from the compilation args 18This 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 modules that need to be be 0 imported, in addition to the ones that need to - be interpreted. This only needs to contain  modules that aren't being interpreted, such as . those from other libraries, that are used in  the expression passed in. %A list of paths to watch for updates The string to execute 29Convert an InterpreterError to a String for presentation The * type class. Minimal complete definition: ,  . Renders a template as text/*html. If the given template is not found,  this returns 3. ERenders a template as the given content type. If the given template  is not found, this returns 3. Runs an action with a modified 4. 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 5+. If the template specified in the request  path is not found, it returns 3.  Analogous to 6&. 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. 78The 98$ datatype is used internally by the   monad to store  the application'-s state, cleanup actions and reload actions. 9:%The internal state of the application's Snap Extensions. ;5IO action which when run will cleanup the application' s state, ! e.g., closing open connections. <4IO 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 = and a > 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 A action, a % cleanup action and a reload action. Verbosity; info is printed to B when this is C The Initializer value !A web handler in your application's monad  Returns a A5 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 B when this is C 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 A 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. D 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. EF     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. GHIJKLThe   for . (Path to a template directory containing .tpl files .Function to modify the initial template state MTake 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  ". The splices registered by this J function do not persist through template reloads. Those splices must be , passed as a parameter to heistInitializer. L(NOTE: In the future we may decide to deprecate registerSplices in favor of ! the heistInitializer argument.) 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.   is similar to the N 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) OCompletes a partial N+ 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  P. The   function for the application's monad The application to be served Q*PRSTUVWXYZ[\]^_`abcdefghijklmnopqrsN ! ! !t      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFDEGHHIJKLMNDOP>QRDOS>TUVWXYZ["\]^_`abcdebcfZbcgbchbcibcjbckbclbcmbcnbcobcpbcqbcrbcsbctbcubcvbcwbcxbcybczbc{bc|bc}bc~bcbcbcbcbcbcbcbcbcbc snap-0.5.1.3Snap.Extension.Loader.DevelSnap.Extension.HeistSnap.ExtensionSnap.Extension.Heist.ImplSnap.Extension.Server'Snap.Extension.Loader.Devel.TreeWatcher%Snap.Extension.Loader.Devel.Evaluator"Snap.Extension.Loader.Devel.Signal loadSnapTH loadSnapTH' MonadHeistrenderrenderAs heistLocal heistServeheistServeSinglerenderWithSplicesInitializerState extensionId mkCleanupmkReload Initializer SnapExtend mkInitializerrunInitializerrunInitializerWithReloadAction!runInitializerWithoutReloadActiondefaultReloadHandlernullReloadHandler HasHeistState getHeistState setHeistStatemodifyHeistState HeistStateheistInitializerregisterSplices ConfigExtendgetReloadHandlersetReloadHandler defaultConfig httpServequickHttpServe TreeStatusTS getTreeStatuscheckTreeStatusreadModificationTimesdirectory-tree-0.10.0System.Directory.TreeAnchoredDirTree HintLoadableprotectedHintEvaluatorhelpersignals saveHandlersrestoreHandlersprotectHandlers getHintOpts getSrcPathshintSnapformatbaseControl.Applicativeempty heist-0.5.2Text.Templating.Heist.Types TemplateStatesnap-core-0.5.1.4Snap.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 renderHelpersnap-server-0.5.1.4Snap.Http.Server.ConfigConfigcompleteConfigcommandLineConfig setBackendsetDefaultTimeoutsetErrorHandler setVerbosesetCompression setSSLKey setSSLCert setSSLBind setSSLPortsetBindsetPort setLocale setErrorLog setAccessLog setHostname getBackendgetDefaultTimeoutgetErrorHandler getVerbosegetCompression getSSLKey getSSLCert getSSLBind getSSLPortgetBindgetPort getLocale getErrorLog getAccessLog getHostname emptyConfigConfigSimpleBackendConfigLibEvBackend ConfigBackend