E|      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{ None|||None =BHKM-}~*}~}~None $=HKMeRun a raw spock server on a defined port. If you don't need a custom base monad you can just supply  as lift function.}None$HM#Get the original Wai Request object Read a header Read a cookieGet the raw request bodyParse the request body as jsonFParse the request body as json and fails with 500 status code on errorGet uploaded filesGet all request paramsnRead a request param. Spock looks in route captures first, then in POST variables and at last in GET variablesLike ., but outputs an error when a param is missing Set a response status!9Set a response header. Overwrites already defined headers"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 handeling 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)&Query the vault'1Set a cookie living for a given number of seconds(%Set a cookie living until a specific )Send a  ByteString$ as response body. Provide your own  Content-Type* Send a lazy  ByteString$ as response body. Provide your own  Content-Type+?Send text as a response body. Content-Type will be "text/plain",>Send a text as response body. Content-Type will be "text/html"-Send a file as response.>Send json as response. Content-Type will be "application/json"/=Send blaze html as response. Content-Type will be "text/html"0tBasic 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 ;-)" !"#$%&'()*+,-./0! !"#$%&'()*+,-./0 !"#$%&'()*+,-./0None &6:=BHKM 3CSafeActions are actions that need to be protected from csrf attacks4/The body of the safe action. Either GET or POST9Give you access to a database connectin from the connection pool. The connection is released back to the pool once the function terminates.:RRead the application's state. If you wish to have mutable state, you could use a  from the STM packge.Get the session manager<%Configuration for the session managerBjYou can feed Spock with either a connection pool, or instructions on how to build a connection pool. See EEMThe ConnBuilder instructs Spock how to create or close a database connection.JfIf Spock should take care of connection pooling, you need to configure it depending on what you need.O{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.I123456789:;<=>?@ABCDEFGHIJKLMNOC123456789:;<=>?@ABCDEFGHIJKLMNO 123456789:;<=>?@ABDCEFGHIJKLMNO None24=BKPRead the heart of Spock. This is useful if you want to construct your own monads that work with runQuery and getState using "runSpockIO"QWRun an action inside of Spocks core monad. This allows you to use runQuery and getStatePQPQPQ None$RRun a digestive functors formR form nameRR None$03HM1 None$=HKMRun 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 B type.None !"$(3BHMS}Get the current users sessionId. Note that this ID should only be shown to it's owner as otherwise sessions can be hijacked.TWrite to the current session. Note that all data is stored on the server. The user only reciedes a sessionId to be identified.UModify the stored sessionVRead the stored sessionWnGlobally delete all existing sessions. This is useful for example if you want to require all users to reloginSTUVWD !"#$%&'()*+,-./01256789:;<=>?@ABCDEFGHIJKLMNPQRSTUVWD !#"'()*+,-./$%&BDCEFGHIJKLMN56789:0<=>?@A1SVTUWRPQ2;STUVWNone !"$(3BHMZRun 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 B type.[8Run a raw spock application with custom underlying monad\(Convert a Spock-App to a wai-application]'Convert a Spock-App to a wai-middleware^6Specify an action that will be run when the HTTP verb  and the given route match_6Specify an action that will be run when the HTTP verb  and the given route match`6Specify an action that will be run when the HTTP verb  and the given route matcha6Specify an action that will be run when the HTTP verb  and the given route matchb6Specify an action that will be run when the HTTP verb  and the given route matchc6Specify an action that will be run when the HTTP verb  and the given route matchdMSpecify an action that will be run when a HTTP verb and the given route matcheSpecify an action that will be run when a HTTP verb matches but no defined route matches. The full path is passed as an argumentf%Define a subcomponent. Usage example: subcomponent "site" $ do get "home" homeHandler get ("misc" <> var) $ -- ... subcomponent "admin" $ do get "home" adminHomeHandler The request "site6home" will be routed to homeHandler and the request "admin(home" will be routed to adminHomeHandlergHook wai middleware into SpockhnWire 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.XYZ[\]^_`abcdefghi  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh%ZYO[X\  f^_`abcde g]34hXYZ[\]^_`abcdefghNone !"$3BHMlRun 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 B type.m8Run a raw spock application with custom underlying monadn(Convert a Spock-App to a wai-applicationo'Convert a Spock-App to a wai-middlewarep&Combine two route components safely "foo"  # " bar" ===> "foo bar" "foo"  # "bar" ===> "foo bar" "foo  # " bar" ===> "foo/bar"q6Specify an action that will be run when the HTTP verb  and the given route matchr6Specify an action that will be run when the HTTP verb  and the given route matchs6Specify an action that will be run when the HTTP verb  and the given route matcht6Specify an action that will be run when the HTTP verb  and the given route matchu6Specify an action that will be run when the HTTP verb  and the given route matchv6Specify an action that will be run when the HTTP verb  and the given route matchwMSpecify an action that will be run when a HTTP verb and the given route matchxSpecify an action that will be run when a HTTP verb matches but no defined route matches. The full path is passed as an argumenty%Define a subcomponent. Usage example: subcomponent "/site" $ do get "/home" homeHandler get "/misc/:param" $ -- ... subcomponent "/admin" $ do get "/home" adminHomeHandler The request site4home will be routed to homeHandler and the request admin'home will be routed to adminHomeHandlerzHook wai middleware into Spock{nWire 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.ijklmnopqrstuvwxyz{e  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWijklmnopqrstuvwxyz{!lkOmjnipyqrstuvwx zo34{ijklmnopqrstuvwxyz{           !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLLMNOPQRSTTUVWXXYZ[\ ] ^ _`abcdefghijklmnopqrstuvefghijwklmnopqrstuxy!z{|}~stqrBK eve Spock-0.7.2.0Web.Spock.SafeWeb.Spock.SharedWeb.Spock.SimpleWeb.Spock.Internal.UtilWeb.Spock.Internal.WireWeb.Spock.Internal.CoreWeb.Spock.Internal.CoreActionWeb.Spock.Internal.TypesWeb.Spock.Internal.MonadWeb.Spock.Internal.Digestive!Web.Spock.Internal.SessionManagerWeb.Spock.Internal.Wrapperhttp-types-0.8.5Network.HTTP.Types.MethodGETPOSTHEADPUTDELETETRACECONNECTOPTIONSPATCH StdMethodreroute-0.2.1.0Web.Routing.SafeRouting renderRouterootstaticvarPathActionT UploadedFileuf_nameuf_contentTypeuf_tempLocationrequestheadercookiebodyjsonBody jsonBody'filesparamsparamparam' setStatus setHeaderjumpNextredirectmiddlewarePass modifyVault queryVault setCookie setCookie'bytes lazyBytestexthtmlfilejsonblazerequireBasicAuth SessionId WebStateM SafeAction runSafeActionHasSpock SpockConn SpockState SpockSessionrunQuerygetStateWebState SessionCfg sc_cookieName sc_sessionTTLsc_sessionIdEntropysc_emptySession PoolOrConnPCConnPCPool ConnBuilder cb_createConncb_destroyConncb_poolConfigurationPoolCfg pc_stripespc_resPerStripepc_keepOpenTime SpockAction getSpockHeart runSpockIOrunForm getSessionId writeSession modifySession readSessionclearAllSessionsSpockTSpockMspockspockTspockAppspockMiddlewaregetpostheadputdeletepatch hookRoutehookAny subcomponent middlewaresafeActionPath SpockRoute<#> mapReqHeaders SpockAllT runActionTActionInteruptActionMiddlewarePass ActionDone ActionError ActionTryNextActionRedirect ResponseStaters_responseHeaders rs_statusrs_responseBody ResponseBodyResponseRedirect ResponseLBS ResponseFile RequestInfo ri_request ri_paramsri_queryParamsri_files ri_vaultIfVaultIfvi_modifyVault vi_lookupKeyrespStateToResponse errorResponsenotFound invalidReq serverErrorbuildAppbuildMiddleware$fMonadTransActionT$fErrorActionInterupt$fHashableStdMethod spockAllTbaseGHC.BaseidWeb.Routing.AbstractRouter time-1.4.2Data.Time.Clock.UTCUTCTime GHC.Conc.SyncTVar getSessMgr SpockAllMSessionManagersm_getSessionIdsm_readSessionsm_writeSessionsm_modifySessionsm_clearAllSessions sm_middlewaresm_addSafeActionsm_lookupSafeActionsm_removeSafeAction UserSessionsSessionsess_idsess_validUntil sess_datasess_safeActions runWebStateMSafeActionHashSafeActionStore sas_forward sas_reversePackedSafeActionunpackSafeAction web_dbConnweb_sessionMgr web_stateWStMunWStM $fShowSessionTFCo:R:StMWebStateMa$fMonadBaseControlIOWebStateM$fMonadBaseIOWebStateM$fEqPackedSafeAction$fHashablePackedSafeActionwebM runQueryImpl getStateImplgetSessMgrImpl$fHasSpockWebStateM $fHasSpocktcreateSessionManagergetSessionIdImplmodifySessionBasereadSessionBaseaddSafeActionImpllookupSafeActionImplremoveSafeActionImplreadSessionImplwriteSessionImplmodifySessionImplsessionMiddlewarenewSessionImplloadSessionImpldeleteSessionImplclearAllSessionsImplhousekeepSessions createSession randomHashspockAll runSpockThookSafeActions$fMonadTransSpockT _unSpockRoute