Խ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None$+0=BHJKMID! None   None$HM #Get the original Wai Request object Read a header +Read a header without converting it to text! Read a cookie"LTries to dected the preferred format of the response using the Accept header#Get the raw request body$Parse the request body as json%FParse the request body as json and fails with 500 status code on error&Get uploaded files'Get all request params(nRead a request param. Spock looks in route captures first, then in POST variables and at last in GET variables)Like (., but outputs an error when a param is missing*Set a response status+Set a response header. If the response header is allowed to occur multiple times (as in RFC 2616), it will be appended. Otherwise the previous value is overwritten. See .RINTERNAL: Set a response header that can occur multiple times. (eg: Cache-Control)TINTERNAL: Unsafely set a header (no checking if the header can occur multiple times),AAbort the current action and jump the next one matching the route-Redirect to a given url.If the Spock application is used as a middleware, you can use this to pass request handling to the underlying application. If Spock is not uses as a middleware, or there is no underlying application this will result in 404 error./EModify the vault (useful for sharing data between middleware and app)0Query the vault11Set a cookie living for a given number of seconds3%Set a cookie living until a specific 4 Use a custom  generator as response body.5Send a  ByteString$ as response body. Provide your own  Content-Type6 Send a lazy  ByteString$ as response body. Provide your own  Content-Type7?Send text as a response body. Content-Type will be "text/plain"8>Send a text as response body. Content-Type will be "text/html"9Send a file as response:>Send json as response. Content-Type will be "application/json";Use a  to generate a response.<tBasic authentification provide a title for the prompt and a function to validate user and password. Usage example: get "/my-secret-page" $ requireBasicAuth "Secret Page" (\user pass -> return (user == "admin" && pass == "1234")) $ do html "This is top secret content. Login using that secret code I provided ;-)"! !"#$%&'()*+,-./0123456789:;<+ !"#$%&'()*+,-./0123456789:;<! !"#$%&'()*+,-./0123456789:;<None246:=BHKM?CSafeActions are actions that need to be protected from csrf attacks@/The body of the safe action. Either GET or POSTEGive you access to a database connectin from the connection pool. The connection is released back to the pool once the function terminates.FRRead the application's state. If you wish to have mutable state, you could use a TVar from the STM packge.Get the session managerL%Configuration for the session managerNname of the client side cookieO$how long shoud a client session liveP,entropy of the session id sent to the clientQNif this is true, every page reload will renew the session time to live counterRinitial session for visitorsS"persistence interface for sessionsTFhow often should the session manager check for dangeling dead sessionsUjYou can feed Spock with either a connection pool, or instructions on how to build a connection pool. See XXMThe ConnBuilder instructs Spock how to create or close a database connection.]fIf Spock should take care of connection pooling, you need to configure it depending on what you need.bSpock configurationd initial application global stateeSee UfSee LgMaximum request size in bytes. % means no limit. Defaults to 5 MB in defaultSpockCfg.h{The SpockAction is the monad of all route-actions. You have access to the database, session and state of your application.AInside the SpockAllM monad, you may define routes and middleware.i,Spock configuration with reasonable defaultsj.Session configuration with reasonable defaultsW=>     ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijQ=>     ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij =>     ?@ABCDEFGHIJKLMNOPQRSTUWVXYZ[\]^_`abcdefghijNone3=KqCreate a new session vaultrLoad a sessions0Store a session, overwriting any previous valuestRemovea sessionuGet all sessions as listv3Remove all sessions that do not match the predicate klmnopqrstuvw klmnopqrstuv nopwklmqrstuv klmnopqrstuvw None24=KxRead the heart of Spock. This is useful if you want to construct your own monads that work with runQuery and getState using "runSpockIO"yWRun an action inside of Spocks core monad. This allows you to use runQuery and getStatexy !xyxy ! None$3HM"#$%&'()*+,-./01234="#"#$%&'()*+,-./01234None !"$(3HM z9Run a Spock application. Basically just a wrapper aroung Warp.run.{WConvert a middleware to an application. All failing requests will result in a 404 page|}Get the current users sessionId. Note that this ID should only be shown to it's owner as otherwise sessions can be hijacked.}Write to the current session. Note that all data is stored on the server. The user only reciedes a sessionId to be identified.~Modify the stored session,Modify the stored session and return a valueEModify the stored session and return the new value after modificationRead the stored sessionnGlobally delete all existing sessions. This is useful for example if you want to require all users to reloginASimple session persisting configuration. DO NOT USE IN PRODUCTION z{|}~c !"#$%&'()*+,-./0123456789:;<=>ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijxyz{|}~cz{h !"#$%&'()*+-,13256789:;4./0bcdefgiUWVXYZ[\]^_`aABCDEF<jLMNOPQRSTHIJK=|}~xy>G z{|}~ None $=HKM5Run a spock application using the warp server, a given db storageLayer and an initial state. Spock works with database libraries that already implement connection pooling and with those that don't come with it out of the box. For more see the U type.6eRun a raw spock server on a defined port. If you don't need a custom base monad you can just supply 7 as lift function.5689:;5656None !"$3BHMCreate a spock application using a given db storageLayer and an initial state. Spock works with database libraries that already implement connection pooling and with those that don't come with it out of the box. For more see the U type. Use runSpock to run the app or  spockAsApp to create a Wai.ApplicationACreate a raw spock application with custom underlying monad Use runSpock to run the app or  spockAsApp to create a Wai.Application.Like spockT@, but the first argument is request size limit in bytes. Set to  to disable.#Combine two route components safely"/foo" <//> "/bar" "/foo/bar""foo" <//> "bar" "/foo/bar""foo <//> "/bar" "/foo/bar"6Specify an action that will be run when the HTTP verb  and the given route match6Specify an action that will be run when the HTTP verb  and the given route match6Specify an action that will be run when the HTTP verb  'GET'/'POST' and the given route match6Specify an action that will be run when the HTTP verb  and the given route match6Specify an action that will be run when the HTTP verb  and the given route match6Specify an action that will be run when the HTTP verb  and the given route match6Specify an action that will be run when the HTTP verb  and the given route matchMSpecify an action that will be run when a HTTP verb and the given route matchSpecify an action that will be run when a HTTP verb matches but no defined route matches. The full path is passed as an argument%Define a subcomponent. Usage example: subcomponent "site" $ do get "home" homeHandler get ("misc" <//> ":param") $ -- ... subcomponent "/admin" $ get "home" adminHomeHandlertThe request /site/home will be routed to homeHandler and the request /admin/home will be routed to adminHomeHandlerHook wai middleware into SpocknWire up a safe action: Safe actions are actions that are protected from csrf attacks. Here's a usage example: newtype DeleteUser = DeleteUser Int deriving (Hashable, Typeable, Eq) instance SafeAction Connection () () DeleteUser where runSafeAction (DeleteUser i) = do runQuery $ deleteUserFromDb i redirect "/user-list" get ("user-details" <//> ":userId") $ do userId <- param' "userId" deleteUrl <- safeActionPath (DeleteUser userId) html $ "Click <a href='" <> deleteUrl <> "'>here</a> to delete user!"CNote that safeActions currently only support GET and POST requests.<=>?@AB  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijxyz{|}~ ?@<=>?@ABNone !"$(3BHMCreate a spock application using a given db storageLayer and an initial state. Spock works with database libraries that already implement connection pooling and with those that don't come with it out of the box. For more see the U type. Use runSpock to run the app or  spockAsApp to create a Wai.ApplicationACreate a raw spock application with custom underlying monad Use runSpock to run the app or  spockAsApp to create a Wai.Application< The first argument is request size limit in bytes. Set to  to disable.Like spockT<, but first argument is request size limit in bytes. Set to  to disable.6Specify an action that will be run when the HTTP verb  and the given route match6Specify an action that will be run when the HTTP verb  and the given route match6Specify an action that will be run when the HTTP verb  'GET'/'POST' and the given route match6Specify an action that will be run when the HTTP verb  and the given route match6Specify an action that will be run when the HTTP verb  and the given route match6Specify an action that will be run when the HTTP verb  and the given route match6Specify an action that will be run when the HTTP verb  and the given route matchMSpecify an action that will be run when a HTTP verb and the given route matchSpecify an action that will be run when a HTTP verb matches but no defined route matches. The full path is passed as an argument%Define a subcomponent. Usage example: subcomponent "site" $ do get "home" homeHandler get ("misc" <//> var) $ -- ... subcomponent "admin" $ do get "home" adminHomeHandlertThe request /site/home will be routed to homeHandler and the request /admin/home will be routed to adminHomeHandlerHook wai middleware into SpocknWire up a safe action: Safe actions are actions that are protected from csrf attacks. Here's a usage example: newtype DeleteUser = DeleteUser Int deriving (Hashable, Typeable, Eq) instance SafeAction Connection () () DeleteUser where runSafeAction (DeleteUser i) = do runQuery $ deleteUserFromDb i redirect "/user-list" get ("user-details" <//> var) $ \userId -> do deleteUrl <- safeActionPath (DeleteUser userId) html $ "Click <a href='" <> deleteUrl <> "'>here</a> to delete user!"CNote that safeActions currently only support GET and POST requests.Combine two path components#Render a route applying path piecesCDEF  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijxyz{|}~$  ?@CDEF None  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijxyz{|}~G           !!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXXYZ[[\]^_`abcdeffghijjklmnnopqrstuvvwxyz{|}~  W                        ! " # $ % & ' ()*++++,-./0-.01 Spock-0.8.0.0Web.Spock.SimpleWeb.Spock.SafeWeb.Spock.SharedWeb.Spock.Internal.UtilWeb.Spock.Internal.SessionVaultWeb.Spock.Internal.WireWeb.Spock.Internal.CoreActionWeb.Spock.Internal.TypesWeb.Spock.Internal.Monad!Web.Spock.Internal.SessionManagerWeb.Spock.Internal.Core Web.Spockhttp-types-0.8.6Network.HTTP.Types.MethodGETPOSTHEADPUTDELETETRACECONNECTOPTIONSPATCH StdMethodreroute-0.3.0.2Web.Routing.SafeRoutingrootstaticvarPathVarActionT UploadedFileuf_nameuf_contentTypeuf_tempLocationClientPreferredFormat PrefUnknownPrefTextPrefHTMLPrefXMLPrefJSON mimeMappingdetectPreferredFormat mapReqHeadersrequestheader rawHeadercookiepreferredFormatbodyjsonBody jsonBody'filesparamsparamparam' setStatus setHeaderjumpNextredirectmiddlewarePass modifyVault queryVault setCookie deleteCookie setCookie'responsebytes lazyBytestexthtmlfilejsonstreamrequireBasicAuth SessionId WebStateM SafeAction runSafeActionHasSpock SpockConn SpockState SpockSessionrunQuerygetStateWebStateSessionPersistCfgspc_load spc_store SessionCfg sc_cookieName sc_sessionTTLsc_sessionIdEntropysc_sessionExpandTTLsc_emptySession sc_persistCfgsc_housekeepingInterval PoolOrConnPCConnPCPool ConnBuilder cb_createConncb_destroyConncb_poolConfigurationPoolCfg pc_stripespc_resPerStripepc_keepOpenTimeSpockCfgspc_initialState spc_databasespc_sessionCfgspc_maxRequestSize SpockActiondefaultSpockCfgdefaultSessionCfg SessionVaultunSessionVault IsSession SessionKey getSessionKeynewSessionVault loadSession storeSession deleteSessiontoListfilterSessions$fIsSessionSession getSpockHeart runSpockIOrunSpock spockAsApp getSessionId writeSession modifySessionmodifySession'modifyReadSession readSessionclearAllSessionsreadShowSessionPersist SpockRouteSpockTSpockMspockspockT spockLimTgetpostgetpostheadputdeletepatch hookRoutehookAny subcomponent middlewaresafeActionPath renderRoute SizeException SpockAllT runActionTErrorTActionInteruptActionMiddlewarePass ActionDone ActionError ActionTryNextActionRedirect ResponseStaters_responseHeadersrs_multiResponseHeaders rs_statusrs_responseBody MultiHeaderMultiHeaderSetCookieMultiHeaderWWWAuthMultiHeaderWarningMultiHeaderViaMultiHeaderUpgradeMultiHeaderTransferEncodingMultiHeaderTrailerMultiHeaderProxyAuthenticateMultiHeaderPragmaMultiHeaderContentLanguageMultiHeaderContentEncodingMultiHeaderConnectionMultiHeaderCacheControl ResponseBody RequestInfo ri_request ri_paramsri_queryParamsri_files ri_vaultIfVaultIfvi_modifyVault vi_lookupKey multiHeaderCImultiHeaderMap runErrorTrespStateToResponse errorResponsenotFound invalidReq serverError sizeErrormiddlewareToAppmakeActionEnvironmentremoveUploadedFiles applyAction handleRequesthandleRequest'requestSizeCheckbuildMiddleware$fExceptionSizeException$fMonadTransActionT$fMonoidActionInterupt$fHashableMultiHeader$fHashableStdMethodsetMultiHeadersetHeaderUnsafe time-1.4.2Data.Time.Clock.UTCUTCTime wai-3.0.3.0Network.Wai.InternalResponse StreamingBody getSessMgrbase Data.MaybeNothing SpockAllMSessionManagersm_getSessionIdsm_readSessionsm_writeSessionsm_modifySessionsm_clearAllSessions sm_middlewaresm_addSafeActionsm_lookupSafeActionsm_removeSafeActionsm_closeSessionManagerSessionsess_idsess_validUntil sess_datasess_safeActions WebStateT runWebStateTSafeActionHashSafeActionStore sas_forward sas_reversePackedSafeActionunpackSafeAction web_dbConnweb_sessionMgr web_state $fShowSession$fMonadBaseControlbWebStateT$fMonadTransControlWebStateT$fMonadBasebWebStateT$fEqPackedSafeAction$fHashablePackedSafeActionwebM runQueryImpl getStateImplgetSessMgrImpl$fHasSpockWebStateT $fHasSpocktwithSessionManagercreateSessionManagergetSessionIdImplmodifySessionBasereadSessionBaseaddSafeActionImpllookupSafeActionImplremoveSafeActionImplreadSessionImplwriteSessionImplmodifySessionImplsessionMiddlewarenewSessionImplloadSessionImpldeleteSessionImplclearAllSessionsImplhousekeepSessions createSession randomHashspockAll spockAllTGHC.BaseidWeb.Routing.AbstractRouter _unSpockRoute runSpockThookSafeActions$fIsStringSpockRoute$fMonadTransSpockT